[jboss-user] [JBoss jBPM] - Blocked signal call
avivstav
do-not-reply at jboss.com
Mon May 14 09:45:35 EDT 2007
Hi
I wrote a simple flow that use web events as trigger to continue the flow.
I use the following code to start the flow:
| public Long startFlow(long id,String problem, long sid) {
|
| Long processDefId = null;
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| try {
|
| GraphSession graphSession = jbpmContext.getGraphSession();
|
| ProcessDefinition processDefinition =
| graphSession.findLatestProcessDefinition("start");
|
| ProcessInstance processInstance =
| new ProcessInstance(processDefinition);
|
| ContextInstance contextInstance = processInstance.getContextInstance();
| contextInstance.setVariable("id", id);
| contextInstance.setVariable("problem", problem);
| contextInstance.setVariable("sid" , sid);
| contextInstance.setVariable("processDefId" , processDefinition.getId());
|
| Token token = processInstance.getRootToken();
|
| token.signal();
| jbpmContext.save(processInstance);
|
| } finally {
| return processDefId;
| }
| }
|
And I also wrote second method which continue to other states in the flow.
As I understand each call to signal() moves one step in the flow in non-blocking mode,
Is it possible that the token.signal() will be blocked until the ActionHandler defined for that state ended?
I want to response the caller of that method (startFlow) with variable returned in the ContextVariable of the ActionHandler, is it possible?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045460#4045460
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045460
More information about the jboss-user
mailing list