[JBoss jBPM] - unable to do graph navigation in jbpm using token.signal or
by ws_dev2001
Hi All,
I have a process definition with a start state, end-state and a node in between. I have configured actionhandlers for the start state , node and the end
state. i am using the jbpm exceutioncontext from the execute() method to advance the token using either :
a) context.getNode().leave(context, namedTransition);
or
b) context.getToken().signal(namedTransition)
in the second case i am explicitly unlocking the current node using the token id as below:
long tokenId = context.getToken().getId();
Token currentToken = context.getToken();
if(currentToken.isLocked()) {
currentToken.unlock("token[" +new Long(tokenId).toString()+"]");
}
the events which i am checking for are node-enter and node-leave events in the execute method which I am overriding in my ActionHandlers configured for these
nodes.
start-state = node-leave
node = node-enter and node-leave
end-state = node-enter
start-state ---transition1---> node1 ---transition2 ----> end-state
For the above scenario everything works as expected.
However if i introduce one more node between the start and end states :
start-state ---transition1---> node1 ---transition2 ----> node2 ----transition3----> end-state
the process instance doesnt complete and in one case returns the token to the first node and in another returns the token to the second node. Thus the
process instance wont complete unless i explicitly keep calling the token.signal(transition) or the node.leave(transition) as stated above.
Can anyone help me resolve this ? I have tried task-nodes as well but the behaviour is erratic.
Is there something in the API I am missing ?
TIA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200366#4200366
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200366
17 years, 2 months
[JBoss jBPM] - Re: Transition loop
by insanely.freak
I have a workflow requirement where I need to keep asking users in a system for approval till it is approved by all of them.
I decided to loop over two jbpm nodes first being decision node and then a task node.
Here I get a StackOverFlow Exception when i load the taskinstance from db again and try to end it. I have searched across various forums, only solution ppl seems to suggest for this is to persist it.
Currently I am persisting the task instance created and then I end the task by fetching it from database. After this flow is suppose to go to decision node and decide whether to go to task node or to end. but as soon as it reached decision node I get StackOverflow exception.
Cud anyone explain where and how i need to persist.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200315#4200315
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200315
17 years, 2 months
[JBoss jBPM] - Re: Stack overflow on recursive patten.
by insanely.freak
I have a workflow requirement where I need to keep asking users in a system for approval till it is approved by all of them.
I decided to loop over two jbpm nodes first being decision node and then a task node.
Here I get a StackOverFlow Exception when i load the taskinstance from db again and try to end it. I have searched across various forums, only solution ppl seems to suggest for this is to persist it.
Currently I am persisting the task instance created and then I end the task by fetching it from database. After this flow is suppose to go to decision node and decide whether to go to task node or to end. but as soon as it reached decision node I get StackOverflow exception.
Cud anyone explain where and how i need to persist.
It will be very help full if somebody can share what approach/design did they have used to resolve this problem. Any input will be helpful and is appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200314#4200314
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200314
17 years, 2 months
[JBoss jBPM] - Re: jBPM 3.3.0GA and Oracle causing StaleObjectStateExceptio
by Olivier_Debels
Digged into it a bit further.
Seems to me that there are cases for which FORCE lock will never work.
Let me try to explain:
If you have a process with a fork join where the parallel branches contain a node which performs a query.
If you can run from start to the join in the same transaction you get into trouble with the FORCE lock.
What happens is:
- Main token gets created and persisted - version is 0
- Fork join is triggered, 2 child tokens are created.
- when query is performed in a node in one of the branches, an auto flush is done. This will increment the version of the parent lock to 1, since this one changed since the beginning of the process (some dates are filled in,...)
- When you arrive in the fork, the lock will try to increase the version to 1, which fails since it is already 1.
So my problem was not related to any bug in oracle but just due to the default locking and the fact that in my unit test I run through the complete process in one transaction.
In these cases you need to set lock to upgrade.
In other cases you can leave the default locking (force lock).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200278#4200278
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200278
17 years, 2 months