Carrying Previous Attachments on New Workflow Instance with s ame Object.

Zmudzin,Tomasz,VEVEY,GL-IS/IT Tomasz.Zmudzin at nestle.com
Tue May 20 09:33:58 EDT 2003


Dear Vinod,
 
1. "I want to retain the attachments of previuos workflow instance to new
workflow instance."
 
Do you really really want to do this?  And when your second instance aborts
and you start the third -- what will you collect? Please be aware that --
while it may seem to make sense in some application scenarios -- something
like this can usually be avoided by carefully designing your workflow. It
will be then much more reliable -- not to mention performant.
 
 
2. "Every Time when workflow terminated, I store Object ID and Workitem ID
into the Z-Custom Table".
 
You already have this information in the workflow logs. You should rather
use SAP_WAPI_WORKITEMS_TO_OBJECT and check for the status.
 
 
3. "I want to attach all these attachments into the container element
_attach_objects."
 
Again -- this is rather discouraged. Technically it can be done (e.g. by a
background task picking the items as you've described), but again -- please
rethink it.
 
 
4. "It is working...." -- "But problem is my Background task is going into
the "In Process..." status for a long time..."
 
Check for system dumps... Probably your call to the FM ends in a dump
because of argument type mismatch.
And if you task gets "Completed" by itself -- well, you have the design
issue from item 1. above.
 
 
 
Kind regards,
Tomasz
 
 
-----Original Message-----
From: Vinod Ramchandani [mailto:vinod.ramchandani at patni.com]
Sent: Tuesday,20. May 2003 15:02
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Carrying Previous Attachments on New Workflow Instance with
same Object.
 
 
Hi All,
- I want to retain the attachments of previuos workflow instance to new
workflow instance.
- Every Time when workflow terminated, I store Object ID and Workitem ID
into the Z-Custom Table.When workflow triggered on same   Object, I will
pick up previous workitem ID and collect all its attachments into one
internal table using SAP_WAPI_GET_ATTACHMENTS.I want to attach all these
attachments  into the container element _attach_objects.
- Can anybody suggest how can I do this ?
 
I have define one FM which will do this and that is called via user defined
Object Method at the initiation of the workflow.
Export Parameter of the FM is the Multiline Table SOFM type.
It is working....
But problem is my Background task is going into the "In Process..." status
for a long time...
 
Any help will be kindly appericiated.
 
Thanks & Regards,
Vinod.
 


More information about the SAP-WUG mailing list