...
3. In the "Manage" menu, click on "Source View" under "Service Bus."
4. Add a necessary piece of code to "Service Bus Configuration." In the source view, add the task configuration based on your requirement.
The syntax of the task configuration is as follows:
...
Following are examples of configuring some common use cases. For an example of configuring a task with a simple trigger, see Sample 300: Introduction to Tasks with a Simple Trigger. To see a complete example of writing a new task and configuring it in the UI, see Writing Tasks Sample.
Anchor | ||||
---|---|---|---|---|
|
To run every 5 seconds continuously: Anchor
Code Block |
---|
<task name="CheckPrice" class="org.wso2.esb.tutorial.tasks.PlaceStockOrderTask"> <trigger interval="50005"/> </task> |
To run every 5 seconds for 10 times:
Anchor | ||||
---|---|---|---|---|
|
To run every 5 seconds for 10 times:
Code Block |
---|
<task name="CheckPrice" class="org.wso2.esb.tutorial.tasks.PlaceStockOrderTask"> <trigger interval="50005" count="10"/> </task> |
You can also give cron-style values. To run daily at 1:30 AM:
Anchor | ||||
---|---|---|---|---|
|
...