Tow Truck

V2.1
1.0 First version
1.1 New request to detect the missing timer
2.0 Execute Groovy script 2.2 Add SQL parameters in Groovy Script
Environment
Application server Tomcat
Bonita Server 7.8.3
Database Postgresql
Logs
I have a bike
I have a car
I have a boat
Setup Configuration
The groovy code is executed on the server. This operation has to be done under the control of Bonitasoft Support
Source Code
Bonitasoft Code :

{{ctrl.groovy.title}}


{{ctrl.groovy.description}}
Parameters
{{groovyparam.label}}
{{groovyparam.value}}
({{groovyparam.databasename}}) {{groovyparam.value}}
{{groovyparam.tips}}
Direct REST API CALL : {{ctrl.groovy.directRestApi}}
Groovy Source Code
In your Groovy code, you can use 'apiAccessor', 'apiClient' and 'restAPIContext' variables. Example : ProcessAPI = apiAccessor.getProcessAPI();
.

{{ctrl.groovy.result}}
{{ctrl.groovy.exception}}
Show Groovy resolved

Timers

.
{{ctrl.timerstatus}}
Name Statename CaseId Process Definition ID Process Name Process Version
{{timer.name}} {{timer.statename}} {{timer.processinstanceid}} {{timer.processdefinitionid}} {{timer.processdefinitionname}} {{timer.processdefinitionversion}}
Statename = waiting
Effect: the quartz timer for a timer in waiting state will be recreated Implementation: On each timer, the method timerEventHandlerStrategy.handleCatchEvent() is called
Limitation: this operation works only on "waiting" timer.
Statename = waiting
Effect: will skip the current waiting timer and go to the next step.
Implementation: execute the task by the method processAPI.executeFlowNode()
Limitation: this operation works only on "waiting" timer.
Statename = failed
Effect: the timer will be retried. Implementation: apply on the task the method processAPI.retryTask().
Limitation: this operation works only on "failed" timer.

{{ctrl.missingtimerstatus}}