Connect Update Request to the Process
Key Lesson: A revision loop combines a task Screen, Process-to-Screen input mapping, state update, output route name, and matching incoming and outgoing routes.
Connect PurchaseRequestUpdate to the existing Revise PR User Task, then add only the routes required for the first complete revision loop:
Approve PR → reject → Revise PR → resubmit → Approve PR
The prior stage’s Approve PR output handler already stores data.comment in process.request.comment before it returns reject. Because PurchaseRequestUpdate receives that same process.request, its read-only Approver comment field can display the rejection reason.
1. Configure the Revise PR User Task
Section titled “1. Configure the Revise PR User Task”- In Design, under Object Types, select Process.
- Open
PurchaseRequestProcessing. - Select the existing Revise PR User Task in the Requester swimlane.
- Set the task’s Screen property to
Purchasing.PurchaseRequestUpdate. - Save the Process, then reselect Revise PR before configuring its Inputs and Output handlers.
- Configure the task as follows:
| Tab | Property | Value |
|---|---|---|
| Properties | Name | Revise PR |
| Screen | Purchasing.PurchaseRequestUpdate | |
| Inputs | request | |
| Output handlers | submit | |
-
Save your changes before continuing.
The input mapping sends the current Process request to the Update Screen. When the Requester selects Resubmit, the output handler replaces process.request with the submitted Purchase Request and returns the route name resubmit.
Attention
If the Inputs or Output handlers tabs do not appear after assigning the Screen, see User Task Inputs and Output Handlers Do Not Appear.
2. Connect the reject and resubmit routes
Section titled “2. Connect the reject and resubmit routes”- 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 |
|---|---|---|
| reject | Approve PR | Revise PR |
| resubmit | Revise PR | Approve PR |
-
Save your changes before continuing.
Route names must match the values returned by the task output handlers. The existing Approve PR handler returns reject for a rejected request, and the Revise PR handler now returns resubmit.
Do not connect Approve PR to Request Quotation from Vendors, configure the Request Quotations Screen, add sendRequest, or connect the End Event during this stage.
Outcome
The Process now contains its first complete behavioral loop. A rejection moves the current request to Revise PR, and a resubmission updates the Process request before the same Process instance returns to Approve PR.
Verify Reject and Resubmit
Section titled “Verify Reject and Resubmit”Verify the first complete Process loop:
Approve Request → Reject → Update Request → Resubmit → Approve Request
Use a fresh Process instance after every task configuration change. Existing instances and tasks retain the configuration that was active when they were created.
Attention
Before testing, ask the application owner or administrator to confirm that the Approver test user is linked to the Approver role and the Requester test user is linked to the Requester role. The repository does not contain a verified user-to-role assignment procedure.
1. Start a fresh Process instance and open Approve PR
Section titled “1. Start a fresh Process instance and open Approve PR”- Run the Purchasing app.
- Open Purchase Request → Create New.
- Select a Cost Center.
- Add at least one item and complete its request fields.
- Select Submit Request.
- On Home, open Approve PR as the Approver test user.
- Select Assign Task To Myself if the action appears.
A new PurchaseRequestProcessing instance creates Approve PR, and the task opens PurchaseRequestApprove with the submitted request.
-
If the Process does not create Approve PR, complete Verify Approve Request before continuing.
-
If the task is unavailable, ask the application owner or administrator to verify the test user’s Approver role membership.
2. Reject the request
Section titled “2. Reject the request”- In Approver comment, enter a distinctive rejection reason that you can identify in the next task.
- Select Reject.
- Return to Home and locate Revise PR.
The Approve PR task completes, and the reject route moves the same Process instance to Revise PR.
-
If Revise PR is not created, confirm that the Approve PR
submitoutput handler returnsrejectwhendata.isApprovedisfalse. -
Confirm that the route from Approve PR to Revise PR is named
rejectas configured in Connect the reject and resubmit routes.
3. Open Revise PR and verify the rejected request
Section titled “3. Open Revise PR and verify the rejected request”- Open Revise PR as the Requester test user.
- Select Assign Task To Myself if the action appears.
- Confirm that the task opens
PurchaseRequestUpdate. - Compare the displayed Cost Center and line-item values with the submitted request.
- Confirm that the request fields can be edited.
- Confirm that the rejection reason appears in the read-only Approver comment field.
PurchaseRequestUpdate receives the current process.request. Its request details are editable, and screen.request.comment displays the rejection reason without allowing the Requester to change it.
-
If the task is unavailable, ask the application owner or administrator to verify the test user’s Requester role membership. Also confirm that Revise PR is in the Requester swimlane.
-
If the wrong Screen opens or its data is missing, compare the Revise PR Screen and
requestinput mapping with Configure the Revise PR User Task. -
If the comment is missing, confirm that the Approve PR output handler assigns
data.commenttoprocess.request.commentand that the Update Screen Input is bound toscreen.request.comment.
4. Revise and resubmit the request
Section titled “4. Revise and resubmit the request”- Change one or more request values so you can identify the revision.
- Select Resubmit.
- Return to Home and locate the next Approve PR task.
Resubmit completes the existing Revise PR task. The resubmit route returns the same Process instance to Approve PR; it does not start another PurchaseRequestProcessing instance.
-
If the task does not complete, confirm that Resubmit runs
await output.submit(screen.request)as configured in Configure the Resubmit action. -
If the Process does not return to Approve PR, confirm that the Revise PR output handler assigns
datatoprocess.requestand returnsresubmit. Then confirm that the route from Revise PR to Approve PR is namedresubmit.
5. Verify the revised request in Approve PR
Section titled “5. Verify the revised request in Approve PR”- Open the new Approve PR task as the Approver test user.
- Select Assign Task To Myself if the action appears.
- Confirm that the revised values appear in
PurchaseRequestApprove. - Do not select Approve during this checkpoint.
The same Process instance has returned to Approve PR, and the Screen displays the updated process.request submitted from Revise PR.
If the original values appear, confirm that the Revise PR output handler runs process.request = data before it returns resubmit. Start a fresh Process instance after correcting the configuration.
Testing Approve → Request Quotation from Vendors, sendRequest, and End Event completion is deferred until the Procurement/RFQ stage is configured.