We are using ECC 6.0 and I have this below requirement. Please share your thoughts on how we can achieve this.
We are using a User decision step in parallel workflow to generate and send individual work items to multiple approvers. that is, we generate multiple work items and send to individual approvers for the same step in the workflow and get the combined result (Approve or Reject) to proceed further. I understand that individual result for each work item is stored in container element '_RESULT' (0001 for Approve, 0002 for Reject) and combined result of all the sub-work items is stored in '_WI_RESULT' (0001 for Approve, 0002 for Reject). Also, we can see the index # of work items generated for the same step (node) from container element ''_WF_PARFOREACH_INDEX'.
My requirement is to set work item to COMPLETED status after we obtain a certain # of APPROVE (_RESULT = 0001) decision. Let's say, after 2 of the approvers say Ápproved', then I'd like to close all the other relevant work items and set the Combined result '_WI_RESULT'to APPROVE and Complete the relevant work item. I was wondering if there is a container element that holds the (count) # of work items generated in individual work item container so that I can keep reading this value to see how many decisions have been made. That is, for example, If there are 3 parallel work items generated and 1st user said Äpproved', is there a way to know out of a total of 3 approvals (to get the combined result '_WI_RESULT'), one is completed and 2 approval decisions are still pending. I'm trying to use step-level Pgm Exit (After_execution Method) to read this container element for # of approvals done and if the combined result '_WI_RESULT'is '0001'(Approve), i'll try to end other work items. One way of doing is to have a custom table to capture this and keep reading this table after each decision. But, I don't want to have all this customization and I believe there should be a way the SAP is storing somewhere this # of completed or Pending approval work items that got originated from a single step/node. One way of doing could be, after each decision, read the dependent work items (having same node # and Parent Work item etc.,) and get the other relevant work items and read their status etc., But I think this is a lengthy process and may be there is an easier way, perhaps some container element that holds this information.
Please let me know if you need any clarification on my requirement and share your thoughts on how I can achieve easily.
Appreciate and thank you in advance for your help.