[JBoss jBPM] - what are the active tokens
by tbeernot
I have a parent which has forked two childeren. At a certain moment the two childeren are each in some state and the parent is waiting in the fork. This means -for me- I have to two active token and one suspended.
Some time later the childeren have joined and the parent is active again. This means -for me- I have to one active token.
I would like to be able to determine all active tokens. I used to do this by scanning all tokens and removing all tokens that had a node of class "StartState", "Fork", "Join", "EndState".
That worked ok, but for some reason I now get Nodes that have a class "enhancedByCGLIB" and cannot use that anymore.
Is there any other way to determine if a token is active?
Methods like isSuspended, isLocked or hasActiveChildren don't work (the last not because one of the childs at some time will enter the Join state and thus is not active anymore, but it never hasActiveChildren).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197590#4197590
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197590
15 years, 6 months
[JBoss jBPM] - Re: How to best control access from multiple threads to a Pr
by kukeltje
anonymous wrote :
| I think, perhaps, my first post was a bit too abstract to be clear. So... here is a more concrete example.
|
Thanks, that always helps
anonymous wrote : E(mail) will provide J(bpm) with delivery notification and read receipt information via http callbacks.
| I hope it is an internal emailing system where users have no control over whether or not they send de read notification.
anonymous wrote : think that you are saying that I could model this in a different way, using tokens to ensure that the two async events are handled correctly (i.e. thread J2 will signal the "delivery" token and thread J3 will signal the "read" token. For example:
|
|
|
| |
| | start
| | |
| | |
| | V
| | send email via http
| | |
| | |
| | V
| | +------------------fork------------------+
| | | |
| | V V
| | wait for delivery receipt wait for read receipt
| | | |
| | | |
| | V V
| | send delivery receipt via http send read receipt via http
| | | |
| | | |
| | +------------------join------------------+
| | |
| | |
| | V
| | end
| |
|
| Have I understood you correctly?
Yes, and if you want to prevent de read-receipt being send to the P system before or at the same time as the delivery-receipt, you could also model it like this
| start
| |
| |
| V
| send email via http
| |
| |
| V
| +------------------fork------------------+
| | |
| V V
| wait for delivery receipt wait for read receipt
| | |
| | |
| V |
| send delivery receipt via http |
| | |
| | |
| +------------------join------------------+
| |
| |
| send read receipt via http
| |
| |
| V
| end
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197570#4197570
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197570
15 years, 6 months