Rule: Function to be Executed Asynchronously

Griffiths, Mark mark.griffiths at sap.com
Thu Jan 29 05:56:32 EST 2004


Hi Mark,
 
I am not certain but I think what you are referring is tied up either with the new Workflow Template header level events (look in the header data, version dependent, events tab) where, amongst other things, you can re-evaluate Rules for all active work items. Or possibly it could be do to with the new step level conditions functionality.
 
Let us know how you get on.
 
Cheers,
 
Mark
 
SAP UK
 
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of Mark Pyc
Sent: Mittwoch, 28. Januar 2004 16:09
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Rule: Function to be Executed Asynchronously
 
 
G'day WFers,
 
Does anyone know the intended usage of this flavour of Rule? It's only
from 4.7 me thinks. The on-line help is a bit vague and there is only one
example I can find in the system. Apparently the idea is that you would
want the Workitem to exist prior to the Agent Determination taking place.
So the WI will be Ready but have no agents, and then at some point in the
future function SAP_WAPI_ASYNC_RULE_COMPLETE is called passing in the Agents.
 
Demo program RSWD_DEMO_ASYNCHRONOUS_RULES triggers Workflow WS45301461
which contains a decision step with Rule 45300342. This rule calls a
method which implements Interface
IF_SWF_IFS_ASYNCHRONOUS_RULE~INITIATE_EVALUATION. This is passed the
Container and two fields necessary for the call to SAP_WAPI_ASYNC_RULE_COMPLETE; IM_WIID & IM_TICKET. In the demo there is simply an export to memory of
these two key fields in the Rule and then the demo calling program imports
them and passes these and an evaluated agent list to SAP_WAPI_ASYNC_RULE_COMPLETE.
 
I can appreciate that this is a simplified training demo designed to show
how the pieces hang together, but what I can't grasp is why. When would it
be necessary to have such a complicated mechanism. I can't see what this
can do that couldn't be achieved with a Wait for Event step in the
Workflow followed by a step with a synchronous Rule called once the
missing information is known.
 
Mike Pokraka has a few initial theories. The use of the term Ticket in
IM_TICKET sounds webby, and this mechanism may be easier for an external
system to use than a raise of event since no containers/binding/object
instance information is necessary.
 
Just wondering...
 
Have fun,
Mark
 


More information about the SAP-WUG mailing list