Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 Simple Trigger. To see a complete example of writing a new task and configuring it in the UI, see Writing Tasks Sample.

Anchor
interval
interval

To run every 5 seconds continuously: Anchorintervalinterval

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
specified number of times
specified number of times

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
cron style
cron style

...