Using Function Modules to Define Roles
Function modules are an extremely powerful tool you can use to return a list of agents for a task in workflow. Use function modules to define roles if you require very complex selection criteria for finding agents, that is, if you cannot model agent selection using responsibilities.
First create and name a standard role. Then decide what you require the workflow to do. Depending on that, decide whether you are going to use a standard function module delivered by SAP or one you have created to suit your own requirements. To avoid having to view the coding of the function module during the procedure, make sure you know in advance which container elements the function module requires. However, if you do decide you need to check the coding of the function module, choose Goto -> Function module.
On the Create Standard Role screen:
Depending on the function module you have selected, the field Evaluation Path appears.
The Standard Role: Edit Container screen appears.
The Create with Data Dictionary field Proposals dialog box appears.
The table appears.
The system prompts you to confirm the names of these container elements.
The Create Standard Role screen appears.
Workflow runs the function module, and, depending on the data in the container, returns a list of possible agents.