Rule: Function to be Executed Asynchronously

Mark Pyc Mark.Pyc at boots.co.uk
Wed Jan 28 10:09:04 EST 2004


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