Is there any difference in usage of OOTB activity AddWork, as I have seen the usage of the description of the activity and the description of developer help?
Activity usage description: "Call this activity to create a new work object from a Utility or Post-Processing activity. Prior to calling this activity create and populate a new work object page using createWorkPage then use it as the primary page to call this activity. Caller must commit changes using commitWithErrorHandling."
Developer Help Description:"Creates a new covered or non-covered work object. Called with a primary page that inherits from the Work- base class. Commits the new work object if there is no flow execution to start; if it starts a flow execution, the commit operation typically occurs when that flow execution creates an assignment."
Does OOTB activity Addwork perform commit when it runs?
As per the requirement, I have to execute in a flow process(in an utility), then what would be this solution that i can use. You mean it cannot be use because it is required a commit before the flow commit is executed. Please share your view on this.
Why would you want to do a commit in the middle of flow processing? Once your flow lands on an assignment shape, it will commit your transaction. Why would the business care where the commit is done so long as it makes it to the database? Doing it yourself opens you up to a number of potential problems and is not recommended unless there is truly no other way to do what you need to do.
Hi Mike, The requirement is to remove some sub cases from original parent case, then those sub cases wrap to a new parent case using SpinoffNewWork activity(it self has the addwork activity), those sub cases' new pyid are required to have before the flow end.
For exaplem: before removing a sub cases
Original Parent:EGL_1 sub cases: ASEGL_1_1, ASEGL_1_2, ASEGL_1_3
After remove the sub cases: ASEGL_1_2 from the orignal parent
EGL_1 has ASEGL_1_1, ASEGL_1_3
EGL_2 has ASEGL_2_1
To maintain this relationship in the PC_work table: parentID column and pyid column.
This whole process handle in an activity in a utility shape.
Please let me know,how to handle this kind of situation without changing the requirement.
As you mentioned above, it means we cannot use obj-delete: immediate , obj-save:write now method in an activity of an utility shape of a flow.