Comment #1 on issue 82 by
vaverche...@appsecinc.com: token set join
Sorry, accidentally pressed some button that submitted issue before I
finished description :).
Token set join behaviour is defined as follows (see here:
http://sarasvati.googlecode.com/svn/java/tags/v1.0.4/doc/reference/html/ch04s02.html)
A tokenSetAnd join will be satisfied when all active arc tokens in the set
are on incoming arcs to the same node and there are no active node tokens
in the token set. An exception will be raised if a non-token set token
arrives.
In the previous release of Sarasvati (1.0.4) TS join worked fine (according
to the definition); however in the latest release (2.0.1) actual behavior
has changed so that e.g. the following workflow will never complete:
ts-split-node ----> node1 --A--> node2 ---> ts-join-node
--B------------->
(Arks A and B have different names, e.g. one is default, another is named;
only one arc token is created in node1).
We use this pattern quite frequently in our workflows, e.g. to skip some
parts on some conditions, or use alternative route, etc.
With the new engine token set join never happens - for any number of tokens
in the token set, because process waits for TWO arc tokens per TS token
(one per incoming arc), but receives only one. As a result process hangs
forever.
There is a workaround - to change process definition as follows:
ts-split-node ----> node1 --A--> node2 ---> node3 ----> ts-join-node
--B------------->
I leave it to you to decide if this is a bug or new definition of the token
set join.
However, the previous definition seamed more reasonable; also the new
behavior looks less reliable (processes are not guaranteed to end any more)
I attached unit test that reproduces the problem - the first test finishes
OK, the second one fails
Attachments:
TokenSetJoinTest.java 3.1 KB