...
Step 1 | Create a Data Model field by right-clicking on the Root Node → Add Field of Type → Float. Set the Field Name and Description to RequestAmount. | |||||
Step 2 | Add an Input control in the Form Container and bind it to field RequestAmount in the Data Model.
Set the Label of the Input control to Request Amount. Remove the Label of the Form Container. Set the Label of the Form to Request Details. Click Save. | |||||
Step 3 | Click the Workflow button to open the FAB Process Designer. Go to the Requirements tab. Click the Add button and enter the requirement details. In this example, we will use the following values: Id: AMOUNT_GT_1000 Description: Amount > $1000 Go to the Tasks tab. Click the Requirements button of the Approve task and select the requirement. Click OK. Go to the Process Flow tab and the requirement is now reflected in the Approve task. Click Save & close. | |||||
Step 4 | Implement the Requirement in ABAP by clicking the Code button. In the Form Life-Cycle dialog, click Auto-Generate Class Name button then click Generate Class. In the Workflow section, click the ABAP Routine button next to Evaluate Task/Outcome Requirements to create the implementation of the REQUIREMENT_EVALUATE method. Click it the button again to open the class editor. Implement the following logic for the Requirement and Activate.
In the Form Life-Cycle dialog, click Save. | |||||
Step 5 | Add an Action to Update the Process Flow Diagram when the Request Amount is Changed (optional). Configure a Default Path. Go to Workflow → Tasks → Actions (Approve Task). In the APPROVE action, click the Behaviour button and tick Default Path. Click OK. In the FAB Process Designer, click Save & Close. Test the application. |
Using Roles in a Workflow
...
Step 1 | Implement the Role Determination in ABAP by clicking the Code button. In the Workflow section, click the ABAP Routine button next to Determine Approvers for Roles to create the implementation of the DETERMINE_APPROVERS_FOR_ROLE method. Click it the button again to open the class editor. Implement the following logic for the user assignment and Activate.
Note here that we have assigned two user IDs FABAPPR1 and FABAPPR2 to Role Approver1. In the Form Life-Cycle dialog, click Save. Once DETERMINE_APPROVERS_FOR_ROLE has been implemented, it is possible to check the agents for each Task by clicking on the Task in the Process Flow Diagram of the application. |
Using View Control in a Workflow
It is often desired that certain sections of the App are only visible to certain users at different stages of the Workflow. For this capability, we can use the concept of View Control to restrict the visibility or editability of sections depending on the user's Role.
To demonstrate, let us two sections:
Submission Details
Approver Comments
Using Parallel Tasks in a Workflow
...