Hi All,
Based on the examples from this forum and jBPM wiki I have implemented a custom action
that accepts a list of items, generates a token for each item from the list, creates a
variable with the list item for each token and sends the token further to the process.
This action could be used in any node.
It all works perfectly but there is an original parent token that came to this node (with
the list of items) that I do not need anymore. However, I would need all variables
associated with this token because they are inherited by the children tokens generated by
the action.
I could reuse this parent token as one of the child tokens but this is bad idea because of
two reasons: a) there could be no items in the list so the question would still remain:
where to route the parent token since no tokens should go along the process anymore; b)
this new reused parent token would carry all the variables inherited by all other child
tokens which is not right - some variables should be private for each token.
I could also create a decision node later in the process flow that would route the parent
token to the end of the process based on some business value - this parent token will
definitely lack some important variable, f.i. the one which keeps the item from the list -
all siblings would have it but the parent would not. This solution would complicate the
process topology unnecessary.
I could not end this parent token because it will effectively terminate all children with
all the variables. I could not also suspend this token because I would not know when to
restart it and (eventually) where to route it after un-suspend.
So the question is: is there any way to route this parent token in the action code right
to the end of the process or to some designated node (join?) where it would wait for all
of its children without having the process to know about it?
Thank you,
Mark
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071423#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...