Ryan Peterson [
http://community.jboss.org/people/rrpeterson] created the discussion
"Adding a timer between Service tasks causes ProcessInstance.getStatus() to be
STATE_ACTIVE"
To view the discussion, visit:
http://community.jboss.org/message/626795#626795
--------------------------------------------------------------
Hey guys,
I've got two identical custom service tasks setup to be called one after another in my
.bpmn file. Each does its job, and when complete calls workItemManager.completeWorkItem
With just a start -> serviceTask -> serviceTask -> end, defined, both get called
twice, and retrieving the session status at the completion of the tasks results in
STATE_COMPLETED as expected.
Adding a timer as: start -> serviceTask -> timer(5 seconds, 0 period) ->
serviceTask -> end, both get called twice, but after retrieving the session status at
the completion of the tasks results in STATE_ACTIVE. Shouldn't it be STATE_COMPLETED
same as the other? Examining the log output for the tasks in the database shows the same
state status throughout both runs, each node being entered/exited, so it seems like they
should both have the same status at completion.
I also have trouble when starting with a timer, such as:
start -> timer(5 seconds, 0 period) -> serviceTask -> end
my serviceTask is never invoked after calling ksession.startProcess I've tried
inserting various Thread.sleep() in an effort to see if my serviceTask will be invoked,
with no luck. Is there something special that needs to happen once the timer is
complete? I don't seem to have any handle to the timer itself other than that it
needs to begin using ksession.startProcess
Any advice/suggestions would be appreciated!
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/626795#626795]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]