Check if WF Instance Exists for a Certain Key

Ali Husain mr_mago40 at hotmail.com
Tue May 25 02:49:59 EDT 2010



Hello Alon,

We are using Release 7.0. I'm not sure which schema we are using but we have not changed the default setting. The FM 

SAP_WAPI_WORKITEMS_TO_OBJECT which was suggested by Pavan works nicely for this. Are there other ways of achieving this?

Thanks.
Ali

> From: sap-wug-request at mit.edu
> Subject: SAP-WUG Digest, Vol 66, Issue 65
> To: sap-wug at mit.edu
> Date: Mon, 24 May 2010 10:48:22 -0400
> 
> Send SAP-WUG mailing list submissions to
> 	sap-wug at mit.edu
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://mailman.mit.edu/mailman/listinfo/sap-wug
> or, via email, send a message with subject or body 'help' to
> 	sap-wug-request at mit.edu
> 
> You can reach the person managing the list at
> 	sap-wug-owner at mit.edu
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of SAP-WUG digest..."
> 
> 
> Today's Topics:
> 
>    1. RE: Check if WF Instance Exists for a Certain Key (Alon Raskin)
>    2. Re: Check if WF Instance Exists for a Certain Key (Ali Husain)
>    3. RE: Help required in designing a workflow template
>       (Griffiths, Mark)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Mon, 24 May 2010 08:34:18 -0400
> From: Alon Raskin <araskin at go3i.com>
> Subject: RE: Check if WF Instance Exists for a Certain Key
> To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
> Message-ID:
> 	<7DEF3CA60BA28D4484A482714C1AFA6D03A08EA4D8 at 3IExchange01.3I-Consulting.loc>
> 	
> Content-Type: text/plain; charset="us-ascii"
> 
> What release of SAP are you building this in? Are you using the 'old' persistence schema or the 'new' XML persistence approach?
> 
> Regards,
> 
> Alon Raskin
> e: araskin at go3i.com<mailto:araskin at 3i-consulting.com>
> 
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Ali Husain
> Sent: Monday, May 24, 2010 3:13 AM
> To: SAP WUG
> Subject: Check if WF Instance Exists for a Certain Key
> 
> 
> Hello WF Experts,
> 
> I'm triggering an event from an ABAP program for a certain key in the Business Object using the the FM 'SAP_WAPI_CREATE_EVENT'. Is there a way to check in my ABAP program if a WF has already been triggered for this key? The reason for this is that i don't want to re-trigger the WF again for the same key if it has already been triggered.
> 
> Thanks a lot for your help.
> Ali
> ________________________________
> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. Get busy.<http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20100524/299141b0/attachment-0001.htm
> 
> ------------------------------
> 
> Message: 2
> Date: Mon, 24 May 2010 13:09:36 +0000
> From: Ali Husain <mr_mago40 at hotmail.com>
> Subject: Re: Check if WF Instance Exists for a Certain Key
> To: SAP WUG <sap-wug at mit.edu>
> Message-ID: <BAY130-W12CB6A1E6D81DD12B659348FE70 at phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> 
> 
> Hey Pavan,
> 
> That's a very neat FM. Thanks a lot for the help.
> Ali
> 
> 
> > Message: 3
> > Date: Mon, 24 May 2010 13:48:46 +0530
> > From: Pavan Chand <bpawanchand at gmail.com>
> > Subject: Re: Check if WF Instance Exists for a Certain Key
> > To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
> > Message-ID:
> > 	<AANLkTimBtn1Fw1zN8Rx0bg1zXEDJONjK7uhNuFKElAUp at mail.gmail.com>
> > Content-Type: text/plain; charset="iso-8859-1"
> > 
> > Hi,
> > 
> >    You can check it by using the FM SAP_WAPI_WORKITEMS_TO_OBJECT
> > 
> > On Mon, May 24, 2010 at 1:42 PM, Ali Husain <mr_mago40 at hotmail.com> wrote:
> > 
> > >
> > > Hello WF Experts,
> > >
> > > I'm triggering an event from an ABAP program for a certain key in the
> > > Business Object using the the FM 'SAP_WAPI_CREATE_EVENT'. Is there a way
> > > to check in my ABAP program if a WF has already been triggered for this key?
> > > The reason for this is that i don't want to re-trigger the WF again for the
> > > same key if it has already been triggered.
> > >
> > > Thanks a lot for your help.
> > > Ali
> 
>  		 	   		  
> _________________________________________________________________
> The New Busy is not the old busy. Search, chat and e-mail from your inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20100524/c399eaf2/attachment-0001.htm
> 
> ------------------------------
> 
> Message: 3
> Date: Mon, 24 May 2010 16:48:18 +0200
> From: "Griffiths, Mark" <mark.griffiths at sap.com>
> Subject: RE: Help required in designing a workflow template
> To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
> Message-ID:
> 	<C6A64D82E3A5D24B949315CFBC1FA1AD07A1B51389 at DEWDFECCR01.wdf.sap.corp>
> Content-Type: text/plain; charset="us-ascii"
> 
> The technique you want to use is called Dynamic parallel processing.  It allows you to dynamically create a separate step or subflow for each entry in a multiline container element.  You enter the multiline element in the last (? Other?) tab on a step in the 'Dynamic parallel' section.  You then change your bindings to bind with index.
> 
> This technique is covered in the BIT601 training.
> 
> Hope this helps,
> 
> Regards,
> 
> Mark
> 
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Mamtha Bhanam
> Sent: 24 May 2010 12:49
> To: sap-wug at mit.edu
> Subject: Help required in designing a workflow template
> 
> Hi All,
> 
> I need to design a workflow template where in the approvers list and steps are sent to a import parameter of a class based on the import values I need to trigger a workflow.In the import struucture there are 9 fields COMPANY CODE,STEP,FLAG and AGENT1 to AGENT6.In the below table if the field FLAG is X mean the WF should complete only after all the decissions are completed not as hirarchy .In other words all the agents should take a decission,anyone can take decission anytime and Workitem text should be unique for all the agents.In the workitem text Agent name and id should be displayed.If the Flag is not X one decission is enough to complete the workflow here also workitem text should be unique.
> 
> Company Code
> 
> Step
> 
> Flag
> 
> Agent1
> 
> Agent2
> 
> Agent3
> 
> Agent4
> 
> Agent5
> 
> Agent6
> 
> 0001
> 
> 1
> 
> X
> 
> USDZ5233
> 
> USDZ5454
> 
> USDZ5687
> 
> USDZ5702
> 
> USDZ5988
> 
> USDZ5103
> 
> 0001
> 
> 2
> 
> 
> 
> USDZ5***
> 
> USDZ5***
> 
> USDZ5***
> 
> USDZ5***
> 
> USDZ5***
> 
> USDZ5***
> 
> BP01
> 
> 1
> 
> X
> 
> US******
> 
> US******
> 
> US******
> 
> US******
> 
> US******
> 
> US******
> 
> BP01
> 
> 2
> 
> 
> 
> US******
> 
> US******
> 
> US******
> 
> US******
> 
> US******
> 
> US******
> 
> Bp01
> 
> 3
> 
> X
> 
> US******
> 
> US******
> 
> US******
> 
> US******
> 
> US******
> 
> US******
> 
> 
> My ideas in achieving this requirement are:
> 
> 1) If flag = X. Create step fork with multiple branches and put the fork inside the loop.Create a variable counter and pass the value of the agents list.If 4 Agents set the counter to 4 and loop until the value is reached.Please correct me if my design is wrong.
> 2) If flag is not equal to X. This should be a normal approval process if 1 takes the decission the workitem will be disappeared from the others inbox.I need assistance in Workitem text handling.How to send unique text???
> 3) For agent assigment I have created a multiline element AGENTS with char14 datatype and calling this structure choosing EXPRESSION option under Agent assigment for decission task.Please correct me if I am wrong.
> 
> I request your inputs in achieving this requirement.Thanks in advance.
> 
> With Regards,
> Mamtha
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20100524/1016d6db/attachment.htm
> 
> ------------------------------
> 
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
> 
> 
> End of SAP-WUG Digest, Vol 66, Issue 65
> ***************************************
 		 	   		  
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20100525/06a3f0b1/attachment.htm


More information about the SAP-WUG mailing list