Finalize the Purchase Request Process
Key Lesson: In this step, you learn how to connect the Purchase Request Process routes, start the Process from the Purchase Request Create screen, and allow authenticated users to start it at runtime.
Connect the PurchaseRequestProcessing Process so submitted Purchase Requests can move through approval, revision, procurement, and completion.
1. Connect the Process routes
Section titled “1. Connect the Process routes”Create the routes that match the values returned by the User Task output handlers.
- Use the Process Editor connector to create each connection listed in the table.
- Select each route, then set its Name in the Properties panel to the corresponding route name.
| Route name | From | To |
|---|---|---|
| submit | Start Event | Approve PR |
| reject | Approve PR | Revise PR |
| resubmit | Revise PR | Approve PR |
| approve | Approve PR | Request Quotation from Vendors |
| sendRequest | Request Quotation from Vendors | End Event |
-
Save your changes before continuing.
2. Start the Process from PurchaseRequestCreate
Section titled “2. Start the Process from PurchaseRequestCreate”Connect the Submit Request button to PurchaseRequestProcessing and pass screen.request to the Process request input.
- Open the PurchaseRequestCreate screen.
- Select the Submit Request button.
- Configure the click action as follows:
| Button | Tab | Property | Value |
|---|---|---|---|
| Submit Request | Events → Click | Action type → Ad-hoc action | |
-
Save and close the editor.
3. Allow authenticated users to start the Process
Section titled “3. Allow authenticated users to start the Process”Update PurchasingAppAC so authenticated users can start PurchaseRequestProcessing from the Submit Request button.
- Go to Design → Object Types → Access Control and open PurchasingAppAC.
- Select the Process tab.
- Under Covered business objects, select PurchaseRequestProcessing.
Note
If more than one Process appears under Covered business objects, select PurchaseRequestProcessing before configuring the start restriction.
- In the generated
startrestriction, add the following code:
| Restriction | Code |
|---|---|
| start | |
-
Save and close the editor.