Help: How to get workItem ID for a workflow step with foreground task before Method execution

Kesari Katakam kesari.katakam at gmail.com
Mon Jul 14 06:35:14 EDT 2008


Hi Deepali,

1)	 If you are storing the Workitem ID in the custom table just to
have the information and control of the Workitem of a particular step
from an OUTSIDE program,
 then you can always get it using the table swp_nodewi with Parent ID
and then finding subsequent child for the TASK you need.
This way you don't need to overload the workflow with custom code to
add it in tables.


2)	Otherwise, check if you can use the Alternate Methods under the
METHODs section of your task and put the custom method to update the
workitem in the BEFORE workitem gets executed section. So that in
anycase your workitem id is added before the process.

Regards,
Kesari V. S. Katakam


On 7/11/08, shaurya jain <jain.shaurya at gmail.com> wrote:
> Hi Deepali,
>
> I don't know what do you mean by before starting but workitem id will be
> generated only after an instance of that work item is generated. I think you
> can check with Program Exits if they can solve your purpose.
>
>
> Programming exits are available for workflow/dialog/wait step/background
> work items in which you can add ABAP classes. The ABAP classes must support
> the interface IF_SWF_IFS_WORKITEM_EXIT and they can react to a pre-defined
> status change.
>
>
>
> I hope this helps.
>
>
>
> Thanks,
>
> Shaurya Jain
>
>
> 2008/7/11 Deepali Margaj <deepalimargaj at gmail.com>:
>
>>  Hi Experts,
>>      We have a requirement to get workitem ID for a Foreground task in a
>> workflow. I have written code which uses FM SWO_QUERY_REQUESTER to return
>> the workItem ID and update it to custom table. I have placed this code in
>> the object method call (used by task) and it returns workitem ID correctly
>> only if work Item execution is started. However requirement is to get the
>> workItem ID as soon as WorkItem is created and we don't want to execute
>> the
>> workItem before receiving the ID in a custom table. Could anybody suggest
>> the proper place to write this code .
>>       Thanks in advance.
>>
>>
>> Regards,
>> Deepali
>>
>> _______________________________________________
>> SAP-WUG mailing list
>> SAP-WUG at mit.edu
>> http://mailman.mit.edu/mailman/listinfo/sap-wug
>>
>>
>



More information about the SAP-WUG mailing list