Skip to content

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. In Design, under Object Types, select Process.
  2. Open PurchaseRequestProcessing.
  3. Select the existing Revise PR User Task in the Requester swimlane.
  4. Set the task’s Screen property to Purchasing.PurchaseRequestUpdate.
  5. Save the Process, then reselect Revise PR before configuring its Inputs and Output handlers.
  6. Configure the task as follows:
TabPropertyValue
PropertiesNameRevise PR
ScreenPurchasing.PurchaseRequestUpdate
Inputsrequest
process.request
Output handlerssubmit
process.request = data

return "resubmit"
  1. 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.

  1. Use the Process Editor connector to create each connection listed in the table.
  2. Select each route, then set its Name in the Properties panel to the corresponding route name.
Route nameFromTo
rejectApprove PRRevise PR
resubmitRevise PRApprove PR
  1. 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 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”
  1. Run the Purchasing app.
  2. Open Purchase Request → Create New.
  3. Select a Cost Center.
  4. Add at least one item and complete its request fields.
  5. Select Submit Request.
  6. On Home, open Approve PR as the Approver test user.
  7. Select Assign Task To Myself if the action appears.
Expected result:

A new PurchaseRequestProcessing instance creates Approve PR, and the task opens PurchaseRequestApprove with the submitted request.

If this does not happen:
  • 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.

  1. In Approver comment, enter a distinctive rejection reason that you can identify in the next task.
  2. Select Reject.
  3. Return to Home and locate Revise PR.
Expected result:

The Approve PR task completes, and the reject route moves the same Process instance to Revise PR.

If this does not happen:
  • If Revise PR is not created, confirm that the Approve PR submit output handler returns reject when data.isApproved is false.

  • Confirm that the route from Approve PR to Revise PR is named reject as 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”
  1. Open Revise PR as the Requester test user.
  2. Select Assign Task To Myself if the action appears.
  3. Confirm that the task opens PurchaseRequestUpdate.
  4. Compare the displayed Cost Center and line-item values with the submitted request.
  5. Confirm that the request fields can be edited.
  6. Confirm that the rejection reason appears in the read-only Approver comment field.
Expected result:

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 this does not happen:
  • 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 request input mapping with Configure the Revise PR User Task.

  • If the comment is missing, confirm that the Approve PR output handler assigns data.comment to process.request.comment and that the Update Screen Input is bound to screen.request.comment.

  1. Change one or more request values so you can identify the revision.
  2. Select Resubmit.
  3. Return to Home and locate the next Approve PR task.
Expected result:

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 this does not happen:
  • 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 data to process.request and returns resubmit. Then confirm that the route from Revise PR to Approve PR is named resubmit.

5. Verify the revised request in Approve PR

Section titled “5. Verify the revised request in Approve PR”
  1. Open the new Approve PR task as the Approver test user.
  2. Select Assign Task To Myself if the action appears.
  3. Confirm that the revised values appear in PurchaseRequestApprove.
  4. Do not select Approve during this checkpoint.
Expected result:

The same Process instance has returned to Approve PR, and the Screen displays the updated process.request submitted from Revise PR.

If this does not happen:

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.