[jboss-user] [jBPM] - jBPM 5.0 ProcessContext creation

Jim Hill do-not-reply at jboss.com
Tue May 3 16:35:03 EDT 2011


Jim Hill [http://community.jboss.org/people/jdh] created the discussion

"jBPM 5.0 ProcessContext creation"

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

--------------------------------------------------------------
Michael Wohlfart gave me some good advise to upgrade my project to jBPM 5.0.0 and I am trying to do so.  I have the install configured, but the user guide has some holes in it.  I was reading through the online version at  http://docs.jboss.org/jbpm/v5.0/userguide/ch03.html http://docs.jboss.org/jbpm/v5.0/userguide/ch03.html.  In 3.2 it discusses how to create a KnowledgeBuilder, a KnowledgeBase and a StatefulKnowledgeSession.  Then it jumps to using a ProcessContext called kcontext.  There is no instruction on how to create a kcontext.  It is referenced several times in chapter 3.  How do I create one of these?
 
I am trying to take an external message that was received by my application and pass the object to the current state in the process.  I already know which process the message is for and have the process instance.  In jBPM 4.4 I used to do something like this:
 
execution = getProcessInstance().findActiveExecutionIn(activityName);
exectuionId = exectuion.getId();
Map Parameters.put("message", msg);
processInstance.signalExectuionById(executionId, "Message", parameters);

What is the best way to accomplish the same thing with 5.0?  I assumed this would use the kcontext to get the current node kcontext.getNodeInstance().  Then use that to signal the current state and pass the message to it as I did before.  Can anyone point me to either documentation on this or an example.  Thanks!

Jim
--------------------------------------------------------------

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

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/20110503/207e015a/attachment.html 


More information about the jboss-user mailing list