How to trigger a stuck timer from a process instance running in Process Intelligent Server for JBoss BPM Suite 6.4.x?
Environment
- Red Hat JBoss BPM Suite (BPMS) 6.4.x
- Process Intelligent Server as execution server;
Issue
- How to trigger a stuck timer from a process instance running in Process Intelligent Server for JBoss BPM Suite 6.4.x?
- After looking at the tables, it looks like process instance entered the timer node and it's never exited it;
Resolution
It is possible to set a timer as triggered. This way the process instance will continue the execution right after the timer. A sample project can be found attached, however, bear in mind that the attached project is supposed to be only a sample and that we don't provide support for it.
This sample project uses Java 8, so kie-server must run with java 8. It is based on BxMS 6.4.2 (Maven library version: 6.5.0.Final-redhat-7
). In order to run it, please apply the following steps:
- Build the project with
mvn clean package
; - Copy the jar from target dir to
kie-server.war/WEB-INF/lib
; - Start the server and make a request to kie server to start a job that will run the custom command. Provide the processInstanceId and containerid (the container where the process instance is running), for example:
POST
on http://localhost:8080/kie-server/services/rest/server/jobs
with payload:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<job-request-instance>
<job-command>example.executor_update_timer.commands.SetTimerAsTriggeredCommand</job-command>
<scheduled-date>2016-12-19T00:00:00-02:00</scheduled-date>
<data>
<entry>
<key>identifier</key>
<value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">container_123</value>
</entry>
<entry>
<key>processInstanceId</key>
<value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">5</value>
</entry>
</data>
</job-request-instance>
You should see the command being executed and the process instance continue its execution after it.
NOTE: The attached project is supposed to be only a sample and that we do NOT provide support for it. We recommend to check the code to build your own project.
Attachments
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments