0
votes

I'm using jBPM 5.4 with MsSql.

It is working fine.

I have simple workflow from START ----> TASK A ----------> TASK B --------> STOP

I'm trying to access such an workflow from Servlets

When i execute such an workflow, i'm able to forward till the Starting of Task B.

onExit of TASK B isnt called.

Hence the workflow isn't reaching the Completed status but the task table is updated to completed status also no exception is logged.

This is my server log,

[stdout] (http-localhost-127.0.0.1-8080-1) ****** Creating EMF

[stdout] (http-localhost-127.0.0.1-8080-1) ****** Creating env

[stdout] (http-localhost-127.0.0.1-8080-1) ****** Reading Properties

[stdout] (http-localhost-127.0.0.1-8080-1) ****** config section

[stdout] (http-localhost-127.0.0.1-8080-1) OnEntrying the First Task ***

[stdout] (http-localhost-127.0.0.1-8080-1) Started Process Output 14

[stdout] (http-localhost-127.0.0.1-8080-1) Completed Process Output 14

[stdout] (Thread-73) OnExiting the First Task ***

[stdout] (Thread-73) OnEntrying the Second Task ***

[stdout] (http-localhost-127.0.0.1-8080-1) Started Process Output 15

[stdout] (http-localhost-127.0.0.1-8080-1) Completed Process Output 15
2
How are you starting your process? Are you using ksession.startProcess() or ksession.startProcessInstance()?. There was a known error that prevented internal listeners to be executed (because of a dirty tx) if you use the latter. Hope it helps,Esteban Aliverti
@EstebanAliverti ksession.startProcess("com.sample.bpmn.hello"); is wat i usesiva

2 Answers

0
votes

It's important that you have a ksession connect to your task service when you are completing your task, so that that session can continue the execution of your process. So:

  • how are you using the task service? a local task service, or remote using HornetQ?

  • is the session that started the process instance still active? or if not, do you instantiate a new session before completing the task?

  • did you call connect() on your human task handler after creating it? this actually connects the handler to the task service and registers the necessary listeners

0
votes

Since it is successfully running through the first task, it seems it might not be persisting the changes after the completion of the first task. Which handler class are you using? Could you turn on sql output (in your persistence.xml) and check whether you see the necessary changes in the process instance info class after completing the first task?

Kris