How to identify that an event occurred outside the workflow?

Dart, Jocelyn jocelyn.dart at sap.com
Thu Aug 22 05:44:57 EDT 2002


Hi Alon/Tomasz,
Honest, it's not that hard - an asynchronous task with a terminating
event is all that's needed.  That's why we have asynchronous tasks
with terminating events - to be used where we don't want to complete
the task until the system confirms the work has really been done, i.e.
updated the database.
 
We tend to drink the odd cup of coffee ourselves so we have thought of this one before :-)
Regards,
        Jocelyn Dart
Consultant (SRM, EBP, Workflow)
and co-author of the book
"Practical Workflow for SAP"
SAP Australia
email: jocelyn.dart at sap.com
phone: +61 412 390 267
fax:   +61 2 9935 4880
 
 
 
 
-----Original Message-----
From: Alon Raskin [mailto:araskin at 3i-consulting.com]
Sent: Thursday, 22 August 2002 4:50 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: How to identify that an event occurred outside the
workflow?
 
 
Hi Tomasz,
 
You are right. Its always the coffee that ruins your best Workflow
designs...:)
 
I like your way much better.
 
Regards,
 
Alon
 
 
 
Alon Raskin
3i Consulting Group
e: araskin at 3i-consulting.com
w: http://www.3i-consulting.com
 
 
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]On Behalf Of
Zmudzin,Tomasz,VEVEY,GL-DS/DM
Sent: Thursday, August 22, 2002 7:34 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: How to identify that an event occurred outside the workflow?
 
But... if a user wants to grab some coffee before completing the task (it
takes 2 minutes on the average), this will not be safe either :-)
 
Normally a way to handle this could be passing some parameter into the
respective transaction that would only be set if the call occured via
workflow. Then in the code you'd have to raise the event only if the
parameter is empty. But this requires a change to the code, so it's probably
not applicable in this case.
 
Another way of doing this is to:
1. Set a "lock" entry indicating the workflow is running for this object
instance. This could be done in some custom table early in the process.
2. Create another event (e.g. ABSENCE.ApprovedOutsideWF)
3. In the type coupling -- enter a receiver function module that will be
triggered upon ABSENCE.Approved and raise ABSENCE.ApprovedOutsideWF if the
lock is NOT set
4. In the workflow -- wait for ABSENCE.ApprovedOutsideWF instead of
ABSENCE.Approved
5. At the end of the flow -- clear the "lock" entry.
 
Still ugly, messy and far from perfect, but a bit safer. And it's 100% pure
workflow certified :-)
 
Tomasz
 
-----Original Message-----
From: Alon Raskin [mailto:araskin at 3i-consulting.com]
Sent: Thursday,22. August 2002 07:55
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: How to identify that an event occurred outside the
workflow?
 
 
This is kind of ugly but could you put a 1 minute wait after the wait for
event step? That way it would ensure that the workflow gets a chance to
complete before the parallel step terminates it.
 
Alon Raskin
3i Consulting Group
e: araskin at 3i-consulting.com
w: http://www.3i-consulting.com
 
 
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]On Behalf Of
Cristiana d'Agosto
Sent: Thursday, August 22, 2002 4:58 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: How to identify that an event occurred outside the workflow?
 
Hi All,
 
I'm using 4.6c and implementing a workflow to Process Leave. Employees will
be applying for leave via ESS and workflow will be triggered.
 
The work item goes to the manager for approval but depending on the type of
leave the manager's approval will not unlock the record. Instead the record
will be sent to a central area where a few other checks will be done. I
created a task that will execute ABSENCE.ApproveInteractive ie. the user
will be taken to the screen and upon saving it the record will be ulocked
(this will generate event APPROVED). This task is also set up with
indicator for Confirm End Processing switched on.
 
I also have a Wait for event APPROVED step that will terminate the workflow
- this step was set up because someone might unlock the record via PA30,
outside the workflow...can you see the problem happening? Well, when the
user executes the work item and saves the record, the event APPROVED is
generated and terminates the workflow before the Confirm End Processing
screen happens...
 
How can I identify that an event has been generated outside the workflow?
If there is a way of doing it, I will be able to control if the Wait step
will terminate the workflow or not.
 
Any other ideas?
 
Much thanks and regards
 
Cristiana
_________________________________________________________________
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.
 


More information about the SAP-WUG mailing list