Skip to Content
0
Former Member
Apr 24, 2010 at 08:40 AM

Read current workitem ID inside Programmed Binding code

27 Views

Hi All,

In one of the workflow we have some approval steps (for FI documents), which creates items in Useru2019s inbox. Now we want to develop a report which shows how much time an approver has taken to approve a particular payment.

SOLUTION APPROACH: The approach we had would work was to capture the workitem ID in a programmed binding of the task container, which can then provide the start and end timestamps (for the workitem ID and hence) of the approval step.

ISSUE: The issue is the task container doesnu2019t have the recently generated workitem ID for the step. It gets populated to the task container after the programmed binding is executed. So, we are now stuck up as to how to read the workitem ID.

Additional Information: While debugging I could find out that the workitem ID gets generated by the class CL_SWF_RUN_WIM_LOCAL in method CREATE_VIA_WFM. But it doesnu2019t get assigned to the task container until just after the CREATEWORKITEM_CONTAINER method which executes the binding operations. In short the programmed binding code gets executed just before the workitem ID is made available to be read and used.

I have already tried a number of generic workflow related classes (eg. CL_SWF_RUN_WIM_FACTORY), but couldnu2019t read this workitem ID.

Any suggestions or pointers regarding this would be well appreciated.

Thanks and regards,

Ramu Mullapudi