Approve Request Task Screen
Key Lesson: In this step, you learn how to create the Approve Request task screen, display the submitted Purchase Request in read-only mode, and return the approver's decision and comment to the Process.
Create the PurchaseRequestApprove task screen used by Approvers to review a submitted Purchase Request and approve or reject it.
Create the Approve Request screen
Section titled “Create the Approve Request screen”- Create a new screen and name it
PurchaseRequestApprove. - Configure the screen text label:
| Property | Value |
|---|---|
| Text | Please approve or reject the following request: |
-
Save your changes before continuing.
Display the Purchase Request details
Section titled “Display the Purchase Request details”Embed the Purchase Request Include screen to reuse its existing layout.
1. Define the screen variables
Section titled “1. Define the screen variables”This screen uses the request input variable to receive the submitted Purchase Request from the Process instance.
To create this variable:
- Open the screen’s Variables tab.
- Create the
requestvariable and configure it as follows:
| Property | Value |
|---|---|
| Name | request |
| Context | Input |
| Type | |
| Default expression | Leave blank |
-
Save your changes before continuing.
2. Embed the Include screen
Section titled “2. Embed the Include screen”- Return to the Layout tab.
- From the SCREEN STRUCTURE section of the Components toolbar, drag a Screen component into the main content area below the text label.
Editor Help
- In the screen’s Properties panel, set:
| Tab | Property | Value |
|---|---|---|
| Properties | Screen | Purchasing.PurchaseRequestInclude |
| Inputs | request | |
-
Leave all other properties at their default values.
-
Save your changes before continuing.
3. Wrap the Include screen instance with a Disable component
Section titled “3. Wrap the Include screen instance with a Disable component”-
Select the embedded PurchaseRequestInclude screen component.
-
From the LOGIC section of the Components toolbar, add a Disable component next to the Include screen component and drag the screen component inside it.
-
Set or confirm the following properties:
| Property | Value |
|---|---|
| Disabled | true |
| Keep disabled if already disabled | Checked |
-
Leave all other properties at their default values.
-
Save your changes before continuing.
4. Add a comment field
Section titled “4. Add a comment field”Checkpoint
Expand screen.request in the VARIABLES panel and confirm that the comment property is available.
- From the CORE section of the Components toolbar, add an Input component below the PurchaseRequestInclude screen component.
- Configure the comment Input component:
| Property | Value |
|---|---|
| Label | Approver comment |
| Binding | |
| Type | Text Area |
-
Leave all other properties at their default values.
-
Save your changes before continuing.
5. Define the screen output
Section titled “5. Define the screen output”Define a submit output that returns the approver’s decision and comment to the Process.
- Open the screen’s Outputs tab.
- Create a new output variable.
- Configure as follows:
| Property | Value |
|---|---|
| Name | submit |
| Output type | |
| Can drive Process forward | Checked |
-
Save your changes before continuing.
6. Add Approve and Reject buttons
Section titled “6. Add Approve and Reject buttons”- Return to the screen’s Layout tab.
- From the LAYOUT section of the Components toolbar, add a Layout component below the comment field.
- Configure as follows:
| Property | Value |
|---|---|
| Layout | horizontal in one row |
-
From the CORE section of the Components toolbar, add two Button components inside the horizontal layout.
-
Set the following properties for each button:
| Button | Tab | Property | Value |
|---|---|---|---|
| Approve | Properties | Prefix icon | thumb_up |
| Text | Approve | ||
| Appearance | Color | Primary | |
| Events → Click | Action type → Ad-hoc action | | |
| Reject | Properties | Prefix icon | thumb_down_alt |
| Text | Reject | ||
| Appearance | Color | Warn | |
| Events → Click | Action type → Ad-hoc action | |
-
Leave all other properties at their default values.
-
Save and close the editor.