0

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
siva
  • 1,429
  • 3
  • 26
  • 47
  • 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 Feb 18 '13 at 11:35
  • @EstebanAliverti ksession.startProcess("com.sample.bpmn.hello"); is wat i use – siva Feb 18 '13 at 12:26

2 Answers2

0

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

Kris Verlaenen
  • 2,918
  • 1
  • 15
  • 5
  • 1. I'm connecting to HornetQ running in port number 5153 in my machine. 2. I have made my ksession static, so it will be in the memory i guess. 3. I used the command connect when i registered for a taskHandler. Do i have to do it somewhere else ? – siva Feb 25 '13 at 02:08
0

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

Kris Verlaenen
  • 2,918
  • 1
  • 15
  • 5
  • i couldn't attach the server log here. so pls find it posted here, [here](https://community.jboss.org/message/799507#799507) I hope the changes are refected in process info class. Also kindly review my **persistence.xml** attached. **Snippet for creating a process**: `HornetQHTWorkItemHandler myhandler = new HornetQHTWorkItemHandler(ksession); try{ StartProcess.ksession.getWorkItemManager().registerWorkItemHandler("Human Task", myhandler); }catch(Exception e){ e.printStackTrace(); }` – siva Feb 26 '13 at 06:04