item status loops
Accepted answer
You're going to have to explain that a bit more I'm afraid - what do you mean? Are you talking about the number of times a work item goes back and forth through a workflow?
Comments
Yes, you are right. I am talking about the number of times an EWM work item goes back and forth through a workflow. I need a guideline or piece of script on how to integrate this into my EWM Process Configuration Source. I know how to refer on the work item status. But how to trigger the increase of a value of a capturing attribute I am not sure. Thank you in advance.
There is no simple way I am aware of to implement this in the JavaScript attribute customization. The reason is, you do not know about the state transition, you only know about the current state.
You can try to have an old state attribute that has a state stored and a second that gets set with the current state. If the current state and the old state is different, you can try to set the old state to the current state. Maybe you can detect a state change that way and increase another attribute.
Absolute ugly and should not be done.
The Plain Java Client Libraries API allows to iterate the historical states and check the values.
A work item save participant/follow up action would be able to detect state changes and increase work item attribute values.
https://github.com/jazz-community/rtc-statushistory-presentation would be a potential approach As well.
Thank you @Ralph. That sounds sufficient.