Starting a Process
This manual provides a step-by-step guide to designing a leave request workflow process in Workmaster, which involves multiple approvers and an initiator. The example workflow demonstrates how a user can submit a leave request, which then moves through different approval stages—first by a manager (preapprover) and finally by HR (approver). It shows how to create swimlanes to define roles, add tasks for each step of the process, link data objects, and configure rules to manage the state transitions. This example helps you understand how to design a complex, multi-step process with clear role-based tasks and data integration, enabling seamless task automation within your app.
Getting Started with Process Design
Step 1: Open the Process Panel
Navigate to the left-hand sidebar and click on the Process tab.
Step 2: Create a New Process
Select New Process.
Name your process (e.g., "LeaveApplicationApproval").
Step 3: Define Swimlanes
anon: any user submitting a leave request.
Preapprover: Manager responsible for first-level approval.
Approver: HR for final approval.
Step 4: Add Process Tasks
Add and connect the following tasks within the respective swimlanes:
ApplyforLeave
Lane: anon
A user submits the leave application form.
Manager Approval
Lane: Preapprover
The request moves to the manager for review and approval.
HR Approval
Lane: Approver
If approved by the manager, HR gives the final decision.
End Event
Mark process completion.
Step 5: Connect Data Object
Go to the right sidebar and link the process to the LeaveApplication data object.
Make sure this object includes fields like:
Employee Name
Leave Type
Start Date, End Date
Reason
Status (Pending, Approved, Rejected)

Step 6: Save and Run the Process
Click Save on the top right to store your process.
Once you have saved your process follow these steps to make it functional within your app. This involves making the app public, creating a page and triggering the process through user interaction.
Step 7: Make the App Public
Go to the homepage of Workmaster
Click three dots(...) of your application
Select Make Public

Before starting the process, you must assign approvers (e.g., Manager, HR) to the swimlane roles used in your process.
Invite Users and Assign Roles
Go to the Rules section of the page.
Create a new rule:
When: Page is loaded or a condition is met (like form submission).
Then: Use the InviteUser action to assign users to specific roles in the process.

Create a Page for the Process
Step 1: Drop Process Container Widget
In the left sidebar, click on the Page tab.
Create a new page (e.g., Leave Request Page).
Drag and drop the Process Container widget onto the page.
Step 2: Add Input Fields
Add the required form fields (like employee name, leave type, start date, etc.).
These should match the fields in your LeaveApplication data object.
Step 3: Bind Fields to Data Object
Select each form field.
In the Binding section (right-hand panel), connect each one to the corresponding field in your LeaveApplication object.

Step 4: Add Rules to Run Process
Rule 1: Start Process on Page Load
Go to the Rules tab of the page.
Add a rule:
When: Page is loaded
Then: Start a new process for LeaveApplication
Rule 2: Submit and Change Process State
Add another rule:
When: Submit button is clicked and form validation is true
Then: Change the process state (e.g., move from ApplyforLeave to ManagerApproval)

Manager Receives Task in Process Inbox
Once the user submits the leave request form:
The process state changes (from ApplyforLeave to ManagerApproval) via the submit button rule.
The task is now assigned to the user in the Preapprover role (e.g., the Manager).
The Manager can view the assigned task in their Process Inbox.

Now When the Manager logs into the app:
They go to the Run tab (or a page where the Process Inbox widget is added).
Here they will find all pending tasks assigned to them.
The task will appear with:
Status: Pending
Assigned Data: Details of the leave request submitted

When Manager Clicks a Row in Process Inbox
Show Existing Process on Row Click
When: A row is selected in the Process Inbox
Then: “Change Page” rule
This will trigger the show existing process rule
This rule will:
Load the current state and data of the selected process instance
Populate the fields on the page with the existing application data
Manager views Application
Once this rule runs:
The same form used during submission is shown again
All fields are pre-filled with the original leave request data
The Manager can review the application and make a decision (approve/reject)

Last updated