I'm trying to express that an action inside an expansion region should take its first parameter from outside the expansion region on the first iteration and from a partial result on successive iterations. This is the activity diagram I'm trying to pull off:
I understand that the specification allows interpreting that, on the first expansion region iteration, "Template Input" should start by receiving a token from "Validated dataset", then pass that token to the "Apply template and store..." pin. However, on successive iterations, "Template Input" will receive a token from "Partial result".
Is this a valid interpretation?
On the other hand, I'm not 100% sure about the output parameter. I understand it should return the last partial result after completing the iteration.
Any other suggestions to improve the activity diagram will be greatly appreciated.
Follow up
I carefully took Axel Scheithauer's suggestions and made a second, improved diagram.
Specifically:
- Changed to «stream» instead of «iterative». About "The second and all following executions will receive the Partial result from its output pin.", I hope I had understood that correctly. Two edges at the same input pin do not feel correct, but if I understand correctly, just one of them will have a token at any given moment.
- Used «overwrite» on the output pin.
Now for the issues:
- Now, there are proper Activity Parameter Nodes at the top.
- I do not mix pin and object notation anymore (I kept pin notation).
- Replaced object notation with two-pin notation.
- Added a Fork on
Partial result. - Output pin on the expansion region now outside of it.
- About the interrupting edges: I intend to cease processing when any action that uses an XSLT processor fails. Added interruptible regions and an accept event. I hope that is correct. From my process point of view, it is not essential to portray how the error happens, but how to handle it.
- Added a merge node to
Error report.
Apart from the corrected diagram, I made a simple animation showing how I understand the tokens flows through actions and in the «stream» expansion region. I'm aware that input collections may have more or less than four elements; I panted them for illustration. Am I right?

