Skip to content

Create the Purchase Request Process

Key Lesson: A Process can define its data, participants, and task structure before its task Screens and routing behavior are connected.

Create the initial PurchaseRequestProcessing Process structure. The next stage connects and tests request submission and persistence without a User Task. Later stages connect and test each task incrementally, beginning with Approve Request.

  1. Go to Design → Object Types → Process.
  2. Click +.
  3. Enter PurchaseRequestProcessing and click OK.
  4. When the Process Editor opens, delete the default Hello World task and its connectors.

Keep the existing Start Event, End Event, and Initiator swimlane. The Start and End Events remain unconnected during this stage.

The request input carries the submitted Purchase Request through the Process after Process-start behavior is configured in a later stage.

  1. Open the Variables tab at the top of the Process Editor.
  2. Click + Add new variable.
  3. Configure the variable as follows:
NameContextTypeDefault expression
requestInput
This.PurchaseRequest
(leave blank)
  1. Save your changes before continuing.

Each swimlane identifies a Process participant. Its Assignee expression references the corresponding role created in the previous tutorial step.

  1. Select the existing Initiator swimlane.
  2. In the Properties panel, set the following values:
PropertyValue
NameRequester
Assignee
return {
  users: [],
  groups: [],
  roles: [This.$Roles.Requester],
}
  1. Click the Add lane below icon.
  2. Select the new swimlane.
  3. In the Properties panel, set the following values:
PropertyValue
NameApprover
Assignee
return {
  users: [],
  groups: [],
  roles: [This.$Roles.Approver],
}
  1. Click the Add lane below icon.
  2. Select the new swimlane.
  3. In the Properties panel, set the following values:
PropertyValue
NameProcurement
Assignee
return {
  users: [],
  groups: [],
  roles: [This.$Roles.Procurement],
}
  1. Save your changes before continuing.

Add one User Task to each swimlane. Configure only the Name property during this stage.

SwimlaneUser Task name
RequesterRevise PR
ApproverApprove PR
ProcurementRequest Quotation from Vendors

For each User Task:

  1. Select the required swimlane.
  2. Add a User Task.
  3. Select the new task and set Name in the Properties panel to the value shown in the table.
  4. Leave Screen unassigned.

After adding all three User Tasks,

Save your changes before continuing.

Note

Leave the Start and End Events unconnected and do not configure task Screens, Inputs, or Output handlers yet. The Process is intentionally not executable at this foundation checkpoint. Connect and Test Request Submission adds the minimal Start-to-End route, Process-start action, authenticated Access Control, and persistence checkpoint before approval is connected.