Cancelling the previous workitem

Kjetil Kilhavn KJETILK at statoil.com
Thu Jun 2 09:09:27 EDT 2005


That is true. It will not change the existing workitem. But your initial message did not mention anything about sending approvals back to the first level ;-)
Although, now that I read it again, I do see that you specifically wrote that the first workflow should be terminated. You did not write that the requirement is that there should not be two active workflows. I just read that between the lines :-)
 
So Michael's solution is the best one. You should perhaps check that the event is only triggered when there are significant changes, to avoid bothering the managers with unnecessary repeated approvals.
-- 
Kjetil Kilhavn, Statoil KTJ IT BKS
 

________________________________

From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Amit Moghe
Sent: 2. juni 2005 14:23
To: sap-wug at mit.edu
Subject: Cancelling the previous workitem



Hi Steven,

Thanks for your inputs. But if I implement the check function module, that will only prevent a new workitem from being generated and not restart the existing workitem (i.e. if an approval workflow is lying with second approver, it will not go back to first approver again). Please correct me if I am missing something.

But anyways, thanks a lot for the clarifications...

Regards,
Amit
--------------------
Hi Amit,



You can do this in the event linkage. This is where you link the event to a workflow. Here you can enter a check function to decide if you would like to start the WF or not. 

Transaction SWETYPV.



Good luck,



Steven Maes



  _____  

Van: Amit Moghe [mailto:amitpmoghe at rediffmail.com] 
Verzonden: donderdag 2 juni 2005 13:07
Aan: sap-wug at mit.edu
Onderwerp: Cancelling the previous workitem



Hi Kjetil,

Do you want me to call this function module before the triggering  event is published? 

If yes, then, I am afraid whether I can do that since the event is published by the standard program. Also for a moment even if I have control over publishing the event, how can I restart the same workitem?

If no, then, will you please a bit more elaborate?

I would definitely like to trigger as few workflows as possible since that would reduce my work :))

Thanks & Regards,
Amit


-------------------
It's a bit late I guess, but I would recommend using a check function instead. Then you prevent starting the second instance by looking for existing workflows related to your purchase order (function SAP_WAPI_WORKITEMS_TO_OBJECT). 

The fewer workflows started, the better - unless your salary depends on the number of started workflows.
-- 
Kjetil Kilhavn, Statoil KTJ IT BKS



________________________________

From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Amit Moghe
Sent: 2. juni 2005 10:32
To: sap-wug at mit.edu
Subject: AW: Cancelling the previous workitem



Hi Michael,

  Thanks a lot for the help. It works perfectly...  

Regards,
Amit

--------
  Hi Amit,

  You can built a parallel processing in Your workflow, which ends,  
  if one of the both branches is completed. One branch includes Your 
  current workflow and the other consits of a Wait Step , which waits 
  for the event 'CHANGED' of BUS2012.


  Best regards
  Michael Ludwig
  rku.it GmbH

    -----Ursprüngliche Nachricht-----
    Von: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] Im Auftrag von Amit Moghe
    Gesendet: Donnerstag, 2. Juni 2005 08:34
    An: sap-wug at mit.edu
    Cc: amitpmoghe at rediffmail.com
    Betreff: Cancelling the previous workitem
    
    

    Hi Workflow Gurus,
    
    I am new to workflow and need some help.
    
    I have a workflow for which I am using 'CHANGED' event of the business object BUS2012 (Purchase Order) as the triggering event. When a user changes a particular PO, this workflow starts. But before it is completed if there is another change to the same PO, then, one more workitem is started.
    
    My requirement is that if there is change to the PO, then, it should delete the previous workitem and start a new workitem. Can you please advise me as to how this can be achieved?
    
    Thanks in advance.
    
    Regards,
    Amit



-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20050602/40d0cbb7/attachment.htm


More information about the SAP-WUG mailing list