Schedule Business Process via Bot Task
Download the Scheduler package.
Description
The attached Business Process (BP) is used to emulate the functionality of the Scheduler with the help of a Bot Config. You can add this custom logic and use it if you want to stop a BP that is not completed and re-run it over time.
The BP operates as follows:
Stops the run for the record in the Data Store (with the IN_PROGRESS status and Data Source UUID from the ETL form) via the REST API call and set the STOPPED status.
Runs the Business Process with the Data Source UUID from the ETL form using the task-start plugin. The plugin returns the run UUID. The Bot Config inserts a new record to the Data Store with the IN_PROGRESS status for the Data Source UUID.
Using the release plugin, the Bot Config is turned to sleep for a specific time and then executes the step again.
Optionally, you can add the code below to the Bot Config to update the record status in the Data Store to COMPLETED in the Business Process:
<script>
<![CDATA[
import com.freedomoss.crowdcontrol.webharvest.RunDto;
import com.freedomoss.crowdcontrol.webharvest.WebHarvestTaskItem;
RunDto run = (RunDto) ((WebHarvestTaskItem) item.getWrappedObject()).getRun();
String run_uuid= run.rootRunUuid;
]]>
</script>
<datastore name="SchedulerDatastore">
update @this set status = 'COMPLETED' where run_uuid=\${run_uuid};
</datastore>
Preparation
To prepare for using the Scheduler BP:
Add the Secure Storage variable:
Attribute Value alias basic.hash.for.restkey basic.hash.for.restvalue <you credentials hash>Create the SchedulerDatastore Data Store for monitoring. See a sample record in the Data Store:

Import the BP with the Scheduler to the instance.
Procedure
Follow the steps below:
- Start the imported BP with the Scheduler and provide the Data Source UUID on the ETL form for the Business Process you want to run.
- To find the Data Source UUID, go to Data Sources > View all, set the filter to Composite, and find your BP by title.
- Open the Business Process, go to the Enter Property tab, and see the UUID in the Data Source UUID field.