wso2 / product-ei

An open source, a high-performance hybrid integration platform that allows developers quick integration with any application, data, or system.
https://wso2.com/integration/
Apache License 2.0
374 stars 280 forks source link

Scheduled task does not schedule task when trigger is once="true" #1497

Closed milindaperera closed 1 month ago

milindaperera commented 6 years ago

Description: Scheduled task does not schedule task when trigger is once="true" When trigger once="true", is configured org.apache.synapse.task.TaskDescriptionFactory does not set execution interval which is referred in org.wso2.carbon.mediation.ntask.TaskBuilder#buildTaskInfo() and throws exception when interval is less that 1000. And won't task get scheduled.

Affected Product Version: WSO2 ESB 5.0.0

Steps to reproduce: Sample scheduled task config

<?xml version="1.0" encoding="UTF-8"?>
<task xmlns="http://ws.apache.org/ns/synapse"
      name="testTask"
      class="org.wso2.esb.tutorial.tasks.PlaceStockOrderTask"
      group="synapse.simple.quartz">
   <!--trigger count="1" interval="1"/-->
   <trigger once="true"/>
   <property name="to" value="sd"/>
   <property name="stockFile" value="qw"/>
</task>
PetteriPertola commented 5 years ago

This bug affects also WSO2 Integrator 6.4.0