You use an ABAP class for defining an agent determination rule when you require very complex selection criteria for agent determination that cannot be depicted by other rule categories, and when you want to determine agents asynchronously.
The rule container, which is filled by binding, and the work item ID are transferred to this rule. Then the system can transfer the result of the rule execution to the initiating work item. This is done with the help of the function moduleSAP_WAPI_ASYNC_RULE_COMPLETE.
An ABAP class exists that supports the interfaceIF_SWF_IFS_ASYNCHRONOUS_RULE, in which the method INITIATE_EVALUATION is implemented and which calls agent determination. The ABAB class receives the necessary data from the workflow environment via the rule container.
The Change Container Element dialog box appears.
If you execute a rule of this type, the work item is created with the initial status Ready, but it has no recipient. First, the rule must determine agents. The system then transfers the agents to the work item, and determines the recipients of the work item. All recipients can now see the work item in their workflow inbox.