PO WF triggers twice
Chentorycki, Richard
Richard.Chentorycki at molex.com
Tue Nov 15 09:17:37 EST 2005
Why am I receiving this email ?
Rich
-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Mike Pokraka
Sent: Tuesday, November 15, 2005 5:03 AM
To: SAP Workflow Users' Group
Subject: RE: PO WF triggers twice
Hi Manish,
The check function is called in the LUW which raised the event. Thus
introducing a commit work (by using SWW_WI_START) will commit the
calling function, which obviously contained something to trigger the
extra event.
Using commits in this way is generally not a good idea, you can cause
havoc if e.g. the caller decides to roll back later in the program then
half your data is already in the DB because you've introduced a commit
in the middle of the LUW. Oops.
Use events, let us know what the issues were? As a matter of interest,
why trigger a WF from a check function?
Cheers
Mike
Khanna, Manish wrote:
> Apologies for the typo error.
>
> The code is written in a check FM that starts WF for PO and SA
> conditionally. We have custom WF for our requirement.
>
> Event triggering did not work in that check FM (bcoz of update task
> issue) that is why I'm using the SWW_WI_START FM to start purchasing
> workflows.
>
> I debug the code of SWW_WI_START and found the following..
> 1. It goes to SWW_WI_START->SWW_FI_START->SWW_FI_CREATE
> 2. In SWW_FI_CREATE, the code creats an entry in SWWWIHEAD. Till this
> point there is only 1 WF. 3. In the end of SWW_FI_CREATE there is
> SWW_WI_LOG_WRITE_SUCCESS.. Which has comit work deep inside.. The
> moment this comit work is fired, a second workflow is triggered +
> event BUS2012-releasestepcreated is also triggered.
>
> Now I'm confused from where this 2nd WF is triggered.
>
> WF trace does not show anything and so does SWEL.
>
> Thanks
> Manish
>
> -----Original Message-----
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On
> Behalf Of Mike Pokraka
> Sent: Tuesday, November 15, 2005 11:48 AM
> To: SAP Workflow Users' Group
> Subject: Re: PO WF triggers twice
>
> Hi Manish,
> Assuming you use SWW_WI_START (why?) to start a workflow not a PO,
> which workflow and what steps does it execute when you get the event?
> Mike Pokraka Senior Consultant
> Workflow Connections Ltd.
> Mobile: +44 (0)7786 910 855
>
> Khanna, Manish wrote:
>> Hi,
>>
>> Following are the SWEC entries.
>>
>> EINKBELEG BUS2012 CHANGED
>> EINKBELEG QCYBUS2012 CREATED
>> EINKBELEG BUS2011 QUOTATIONCREATED
>> EINKBELEG BUS2010 RFQUPDATED
>> EINKBELEG BUS2012 CUSTCHANGED
>> EINKBELEG BUS2013 CUSTCHANGED
>> EINKBELEG BUS2014 CUSTCHANGED
>> EINKBELEG FREBUS2012 CREATED
>> EINKBELEG
>>
>>
>> However when I start a PO using SWW_WI_START. Now this should start
>> the WF directly. However the moment this executes it fires BUS2012
>> 'RELEASESTEPCREATED' . As a result, 2 WF are triggered, one thru
>> SWW_WI_START and another through the event.
>>
>> Dont know why this happens :(
>>
>> Thanks
>> Manish
>> _______________________________________________
>> SAP-WUG mailing list
>> SAP-WUG at mit.edu http://mailman.mit.edu/mailman/listinfo/sap-wug
>>
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu http://mailman.mit.edu/mailman/listinfo/sap-wug
>
>
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>
_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug
CONFIDENTIALITY NOTICE: This message (including any attachments) may contain Molex confidential information, protected by law. If this message is confidential, forwarding it to individuals, other than those with a need to know, without the permission of the sender, is prohibited.
This message is also intended for a specific individual. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message or taking of any action based upon it, is strictly prohibited.
Chinese Japanese
www.molex.com/confidentiality.html
More information about the SAP-WUG
mailing list