-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 10.10-HF18, 11.1, 2021.0
-
Component/s: Events / Works
-
Epic Link:
-
Tags:
-
Backlog priority:500
-
Upgrade notes:
-
Team:PLATFORM
-
Sprint:nxplatform 11.1.21, nxplatform 11.1.22
-
Story Points:3
Some Works are scheduled in a group and we want to have a trigger on completion, like compute all the rendering for a document then fire a document rendition done Event.
Note that this is not an idempotent or coalescing work where we are interested in only running the work once, here we want all Works of the group to be executed.
The StreamWorkManager implementation is straightforward:
- all the Works of the group will use the same partitionKey (work Id could be different in order to keep existing implementation for default WM)
- like for the coalescing work when submitting such a work the offset is persisted in the KeyValue store (key=partitionKey, value=offset)
- after executing the Work the computation will compare its record offset with the value in the KV, if they are equals this means that this is the last Work and the trigger action can be executed.