[jboss-user] [jBPM] - Problem with starting process

Lukasz Kozerski do-not-reply at jboss.com
Tue Aug 23 09:08:58 EDT 2011


Lukasz Kozerski [http://community.jboss.org/people/lukasz.kozerski] created the discussion

"Problem with starting process"

To view the discussion, visit: http://community.jboss.org/message/622346#622346

--------------------------------------------------------------
Hi,

I have some problem with startring the process. Unfortunetly it is related to process persistence.

I have some breakpoints, here:
org.jbpm.process.instance.impl.ProcessInstanceImpl.start()

and here:
org.jbpm.persistence.processinstance.ProcessInstanceInfo.update()

When I'm starting process:
        ProcessInstance process = ksession.startProcess("process", parameters);
        ksession.insert(object);
        ksession.insert(process);
        ksession.fireAllRules();
        ksession.dispose();

everything seems to be ok. Breakpoints fires in correct order: start() and then update().

But I need to start the process like this:
        ProcessInstance process = ksession.createProcessInstance("process", parameters);
        long processId = process.getId();
        ksession.startProcessInstance(processId);
        ksession.insert(object);
        ksession.insert(process);
        ksession.fireAllRules();
        ksession.dispose();

In this example breakpoints fires in this order: update(), start().

Why this is problem? 

If the server restarts and ProcessInstance is deserialized it has state STATE_PENDING. If now we complete some work item there is one line of code here:
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(String, Object)

I looks like this:
if (getState() != ProcessInstance.STATE_ACTIVE) {
                                        return;
                              }

and process is not continuing.

What am I doing wrong?

Lukasz
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/622346#622346]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110823/6a01a3da/attachment.html 


More information about the jboss-user mailing list