you would need to use additional logic within your process like for example onEntry action that will count number of invocations of given node. There is nothing of that sort in the runtime engine as it cannot determine if it is invalid behavior or not when given node is entered many times.
Alternatively you could use custom implementation of ProcessEventListener for that too. The difference here is that you need to keep track of both process instance id and node.
Thanks for the help Maciej.
Would you please give one example for any of the above scenarios.
on Entry Actions of Script Task is not working, but for Human Task its working.
1 of 1 people found this helpful
don't have the complete example but I would first try with implementing custom process event listener where:
- at the process started event it would create structure for given process instance
- on node triggered it would record number of instances created for given node instance
- in case the defined threshold is exceeded would throw exception
- on process completed event remove the structure for the process instance
that with simplest impl would not be persistent so in case of restart you would loose that info so making it as part of the process (using process variables) could be easier.
Thanks for the help. Also I was trying with on Entry Actions of Script Task, unfortunately it's not working, but for Human Task on Entry Actions is working. Is there any other configuration with Script Task node??