Skip to content

Connect and Test Request Submission

Key Lesson: Verify submission and persistence independently before connecting approval behavior.

Connect the existing Submit Request action to PurchaseRequestProcessing. At this checkpoint, the Process has one active path:

Start Event → save process.request through PurchaseDB and await completion → End Event

This checkpoint proves submission and persistence independently before approval behavior is added. The User Tasks created in Process Foundation remain unconnected; no approval, rejection, revision, or quotation behavior runs yet.

Attention

The minimal Start-to-End flow is supported, but the exact save expression and its editor field still require verification. Complete the LEIGH TODO below before treating this as a working persistence checkpoint. Starting a Process or returning to Home alone does not prove that the request was saved.

  • Complete Create the Purchase Request Process, including its request: This.PurchaseRequest input and retained Start Event and End Event.
  • Configure PurchaseDB with Purchasing.PurchaseRequest and Purchasing.PurchaseRequestItem, and confirm their Access Control coverage.
  • Use an authenticated test user. This path does not reach a User Task or require an approval task assignment.
  1. Open PurchaseRequestProcessing in Design → Object Types → Process.
  2. Use the Process Editor connector to connect the existing Start Event directly to the existing End Event.
  3. Select the connection and set its Name to submit in the Properties panel.
  4. Leave Approve PR, Revise PR, and Request Quotation from Vendors unconnected and their Screens unassigned.

The submit connection is the only active route. Its save operation must complete before the Process reaches the End Event.

The Process receives screen.request through its request input. Configure the submit connection to save process.request through the existing PurchaseDB, awaiting the save operation before the connection continues to the End Event. Configuring the Server Data Store selects the Entities available for storage; it does not itself write the submitted request.

Simon’s November 19, 2025 transcript confirms that code can run when a connection is activated, that the save-one operation receives process.request, and that its promise must be awaited before the Process moves forward. The transcribed receiver and method name do not establish an executable expression for PurchaseDB.

LEIGH TODO: Verify the connection-code field and the exact awaited save expression against the generated PurchaseDB API or implementation, then add the executable code and exact editor steps here. Confirm whether this operation saves the related PurchaseRequestItem records; if separate saves are required, verify and document those operations and await them before completion. Do not assume cascade persistence. This procedure remains incomplete until those details are verified.

After the TODO is resolved, configure the verified save code on the submit connection and

Save your changes before continuing.

. Do not use a code-free Start-to-End run as evidence of persistence.

2. Start the Process from PurchaseRequestCreate

Section titled “2. Start the Process from PurchaseRequestCreate”
  1. Open the PurchaseRequestCreate Screen.
  2. Select the Submit Request button.
  3. Configure the click action as follows:
ButtonTabPropertyValue
Submit RequestEvents → ClickAction type → Ad-hoc action
await This.$Process.PurchaseRequestProcessing.start({
  request: screen.request
})

Sys.Screen.navigateToScreen(
  This.$Screens.Home,
  {}
)
  1. Save and close the editor.

The action starts a new PurchaseRequestProcessing instance, passes the current Screen request into the Process request input, and returns the user to Home.

3. Allow authenticated users to start the Process

Section titled “3. Allow authenticated users to start the Process”

Configure Process-specific Access Control so the client-side Submit Request action can start PurchaseRequestProcessing.

  1. Go to Design → Object Types → Access Control and open PurchasingAppAC.
  2. Select the Process tab.
  3. Under Covered business objects, select PurchaseRequestProcessing.
  4. In the generated start restriction, add the following code:
RestrictionCode
start
if (Sys.User.currentUser) {
  accessController.allowClient()
}
  1. Save and close the editor.

Run these checks only after the save procedure above has been verified and configured. Use a fresh Process instance after each Process configuration change; existing instances retain their original configuration.

  1. Run the Purchasing app and open Purchase Request → Create New.
  2. Select a Cost Center and add at least one item with a distinctive description and completed request fields.
  3. Record the entered values, then select Submit Request.
Expected result:

The configured action starts a new PurchaseRequestProcessing instance with the current request and returns to Home.

If this does not happen:
  • If the Create Screen remains open, compare its button action with Start the Process from PurchaseRequestCreate.
  • If Process start reports Access Denied, check the authenticated-client restriction above. For data-operation errors, check the named Server Data Store and Entity restriction; see Access Control Errors.
  1. Inspect the newly started Process instance using the runtime’s Process inspection tools. Confirm that its request input matches the submitted values.
  2. Check the records stored through PurchaseDB using a verified data inspection method. Match the stored PurchaseRequest to this submission and compare its values. Process input data alone is not evidence of a stored Entity record.
  3. Inspect the submitted PurchaseRequestItem records and their relationship to the stored request separately. Record their result; do not infer it from the presence of process.request.items.
  4. Confirm that the save completed before the instance reached the End Event and that the instance is complete with no active User Task.

LEIGH TODO: Add the verified Studio/runtime steps for inspecting the stored records and the Process instance, including evidence of save completion before the End Event. Until these inspection steps and the save procedure are verified, the persistence and completion checks remain a documented acceptance target, not a validated runtime result.

Expected result:

The submitted request is stored through PurchaseDB, the awaited save completes before the End Event, and the fresh Process instance completes without an Approve PR task. Item persistence is confirmed separately using the verified procedure.

If this does not happen:
  • If the Process completes but the stored request is missing, the checkpoint has failed. Check that the active submit connection executes the verified awaited save through PurchaseDB.
  • If items are missing, resolve the item-persistence TODO before claiming that the complete request is persisted.
  • If an approval task appears, check that the fresh instance uses the Start-to-End route and that no connection leads to Approve PR.

Keep this completed submission instance as evidence of the checkpoint. The approval stage extends the route for subsequent fresh instances; it does not add approval to an instance that has already finished.