Skip to main content
3. Automate your business process

Guide to automating business processes in Yeeflow, illustrating setup of an approval form, workflow design, and conditions.

Updated over 8 months ago

A process is a type of workflow that ensures a strict sequential set of steps performed on form data. Flow Admins for a process can set up a form to carry data, and then make a predefined path for it to follow. The system automatically routes the requests through various steps until the item is complete. Processes are a great fit in places where you would want strict control and efficiency.


Common processes examples

  • Vacation request

  • Purchase request

  • Employee onboarding

  • Budget approval request

  • Visitor pass request

  • Vendor enrolment


When a process is the best flow

Processes are ideal when you have to streamline a sequence of steps, performed by people to achieve an objective and it can be modified at any time. It best suits when you want to automate repeatable unstructured tasks in your organization. The form, its fields, and the workflow need to be well defined. Every time the form is initiated, it needs to go through the predefined steps to the associated person for approval.


Take action: Automate your business process

Follow up the creation of our Projects for excellence application. We are now going to creating our first automate process: new project approval process.

Imagine that there's a new project coming. You might need to request the project owner to submit a form with the detail information, and get all the sponsors to review and decide whether it's good to start.

Only those projects which are approved by sponsors will be created in the projects pool (which is the Projects data list we've created previous).

In this stage, we’ll walk through how to create an approval form in Yeeflow to manage this process.


Step 1: Create a new approval form

Firstly, let's open the Projects for excellence application. From the top navigation menu bar, click the "+" button to open the create new component form. Then click the first "Approval form":

From the New Form pop-up window, set the form name as "Project Approval Form", and the following Id as "PRO_AF". Add some description to explain the purpose of this form. Click "OK" button to create this new form.

After the approval form is created, a pop-up dialog shows up to ask if you'd like to open the form designer. Click "OK" button to open this form in the design model.


Step 2: Add the form header

In the form designer, Click the "+" button from the top-left of the form designer to open the "add controls" panel. Scroll down to the General section, find the "Title" control, then click and hold your mouse to drag this control to the top of the canvas.

Change the text of this Title control to "New project approval form", then change the size to Large and alignment to center.

Next, use your mouse to right-click on the Title control to open the context menu box. (Learn more about Right Click Operation) Select "Duplicate" from the menu list to make a copy:

Change the new Title control's text to "Use the template to capture your project's desired outcomes, benefits, and anticipated resource requirements." and change the size of the text to "Small".

Click the "+" button from the top-left of the form designer to open the "add controls" panel. Scroll down to the General section, find and drag the "Divider" control to the bottom of the previous "Title" control.

Then, from the property settings panel, go to the Style tab, and change the color to #D1D1D1, Weight as 2.0.

Click the "Preview" button from the bottom of the controls panel to preview the content and style you've set!


Step 3: Add project related fields

Click the "+" button to open the "Add control" panel and find the "Text Box" field control from the Basic Fields section. Click and drag this Text Box control below to the divider.

From the Settings panel, go to Content -> Basic -> Associated Variable, click the Edit icon to open the Associated Variable settings window, then change the Field ID to "field_projectname" and the Field Name to "Project Name", Click OK button to close this window.

Then, go to the Content -> Validation panel, turn ON the required option to make this field as mandatory.

Click and drag the Grid control into the same section. then go to Content -> Appearance, click "+" button on the header of the columns option, to add a new column. Turn OFF the Display Caption option to hide the caption of this Grid.

Next, click and drag the Data Picker controls into this Grid, and change the field ID and field name to field_startdate and Start Date. Turn ON the required option to set this field as mandatory.

Right click the Start Date control and select duplicate from the context menu. Change the new Data Picker control's field ID and field name to field_enddate and End Date.

Normally, the End Date of a project should not earlier than the Start Date. So you'd better to add the validation. To do so, select the End Date control, and go to Content -> Validation. Click the "Custom Validation" button to open the Custom Validation settings window.

Firstly, click the settings button of Rule to open the expression editor. From the function list, select "dateDiff", and the set 1st parameter as the variable of End Date, and 2nd parameter as the Start Date. Select "Day" from the dropdown of the 3rd parameter. Then make it return value as greater or equal to 0. Click "OK" button to close the expression editor window.

Secondly, click the settings button of Error Message to open the expression editor. Add the error message: "The End Date must come after the Start Date".

Click "OK" button to complete the Custom Validation settings. You can click the Preview button to test this custom validation.

Pro Tip

Alternatively, you can also use the Data Range field control for users to set the Start Date and End Date. The Data Range control will automatically restrict the second date from earlier than the first date.

Next, click and drag a Text Area field control into the same section, after the Grid control, and set the field name as "Brief Introduction":

Change the title of field controls from Horizontal to Vertical:

Click the "+" button to open the "Add control" panel, switch from the "Controls" tab to "Page" Tab, then from the "Appearance" section, click to select "Vertical" button to change the title of each control to the top of the field control.


Step 4: Add project cost related fields

As the internal approval process, the sponsors need to know the finance related information of this project, like the cost, profit etc. In order to track those information, you can add those fields on this form.

Let's add another Grid by clicking and drag the Grid control to the canvas, and include 3 columns. Change the Title's text to "Financial Information".

Then, Add 2 Currency field controls into this Grid with the field name as Contract Price, and Estimated Cost. Make those 2 fields as mandatory.

Next, add a Calculation field control into the Grid. Change the Title's text to "Rate of profit". Then click the "Edit" button from the basic panel to open the expression editor. Set the value as: (Contract Price - Estimated Cost) / Contract Price.

Click the "Save" button on the top-right to save all the changes of this form.


Step 5: Design the approval workflow

From the top center of the designer, click the tab of "Workflow" to navigate to the workflow designer.

5.1 Add the first Assignment Task

Click and drag the "Assignment Task" onto the Canvas.

Click the gear icon from the middle of the bottom icons to open the Settings panel of the Assignment Task Action. Then, change the Action Name to “Line Manager Approval”. From the Task Assignee, click the following "+ Click to set the assignee" area to open the Assignee Settings window.

Next, click to select Expression radio button, and click the following Expression settings button. From the Expression Editor window, click to select "Instance Context -> Applicant -> Line Manager", and click the Insert button. Then click "OK" button to close the Expression Editor window. Next, click the "Add" button to add this value to the selected text box.

Click Save button to close the Assignee settings window.

The setting above means that task for this step will be assigned to the line manager of the user who submitted this request.

Next, from the Task Form section, you can select the task form which is associated to this Assignment Task. This form will be used when the task owner open the generated task from the workflow.

Click "+ Create a Task Form" link after the dropdown list to create a new task form. Select "Copy from an existing form", and select the Project Approval Form from the Select Form dropdown list. Set the Form Title as "Approval Task Form", and click "OK" to create a new Task Form. Select this task form from the above dropdown list.

Pro Tip

This task form can only be accessed by the Task Owner(s). Other users access the form will see the access denied notification.

5.2 Add the second Assignment Task

Next, let's click and drag another assignment task to the canvas, and open the settings window. Change the action name to "PMO Approval". Then, click to open the Assignee settings window. Select the "Expression" radio button, and open the expression editor.

Click to select User group -> PMO -> All user, and click insert to add the PMO:All user as the assignee of this assignment task.

Pro Tip

The PMO here is a user group which includes a group of users who are responsible for the Project Process Management. To create such a user group, please kindly refer: Group users in different groups.

From the Task Form dropdown list, select the same "Approval Task Form".

As a user group includes multiple users, once the workflow goes to this step, all users included in this group will receive this pending task. You can decide the way of produce those users' response. In the Complete Condition section, select "First Decision". This means the first one in this group who Approve/Reject this task, the task will be completed by taking the result of this first user's response.

5.3 Connect Steps with Arrows

Click the Start step (the green triangle), click and drag the Arrow icon below this step, and connect to the first assignment task. Then, drag the Arrow icon below this assignment task to connect to the second assignment task.

Next, click and drag the "End with Rejection" step to add to the canvas, and drag the arrow from the first assignment task to connect to this step. Click to select this Arrow, then click the Gear icon to open the settings window.

Click "Condition Editor" button to open the condition editor window. From the Add condition dropdown list, select "Rejected", and click "Save" button to close this window.

Select another Arrow which is connected from the first assignment task to the second assignment task. Then, open the condition editor to select "Approved", and click "Save" button to close this window.

5.4 Add Inclusive Gateway

Click and drag the Inclusive Gateway to add to the canvas. Then, add 2 another assignment tasks. Change the Action Name of those 2 assignment tasks as "Dept Head Approval" and "CFO Approval".

Open the Assignee settings window of the "Dept Head Approval" task. Click to select the Expression radio button. Then, open the expression editor and select "Instance Context -> Applicant -> Organization -> Manager" as the assignee. From the Task Form dropdown list, select "Approval Task Form".

Next, select the "CFO Approval" task. Open the assignee settings window, click to select "Job position". Then, select CFO from the Job positions list, and set it as the Assignee.

Pro Tip

The Job position is managed in the Yeeflow admin center. To add a job position like CFO here, please refer: Manage job positions.

From the Task Form dropdown list, select "Approval Task Form" too.

Select the "PMO Approval" assignment task. Click and drag arrow to connect to the Inclusive Gateway. Open the condition editor of this Arrow, and select "Approved" from the Add Condition dropdown list. Also, add another "End with Rejection" step after the "PMO Approval" task step. Then, drag an arrow to connect from "PMO Approval" task to this "End with Rejection" step, and set the condition as "Rejected" from the condition editor.

Next, drag an arrow from the Inclusive Gateway to the "Dept Head Approval" task. open the condition editor of this Arrow. Click the "Add Condition" button to add customized condition. Open the first expression editor and select "Workflow Variables -> Rate of profit“. Then, select "Number" from the first dropdown list, and select ">=" from the next dropdown list, and from the second expression editor type in 0.2.

Following the same steps above to add another Arrow from the Inclusive Gateway to the "CFO Approval" task. and set the customize condition as: Rate of profit < 0.2.

5.5 Save the approved project to the Projects data list.

Click and drag the "Set Data List" step below to the "Dept Head Approval" and "CFO Approval" steps. Change the Action Name to "Create new project". Form the List dropdown list, select Projects as the target data list. From the Execute Type, select the "Add" radio button, and click the Field Settings button to open the Settings window.

Click the Check Box to select Project Name, and from the Evaluate column, open the expression editor, and select "Workflow Variables -> Project Name". Click Insert and OK button to close the expression editor. Following the same steps to select Description to map to "Workflow Variables -> Brief Introduction"; Owner map to "Instance Context -> Applicant"; Start Date map to "Workflow Variables -> Start Date"; End Date map to "Workflow Variables -> End Date";

Click OK button to complete the Field mapping settings.

5.6 Set the rest Conditions to complete the design

Select the "Dept Head Approval" task and drag an Arrow to connect to the Set Data List step. From the condition editor, click to select "Approved" from the Add Condition dropdown list. Then, drag another Arrow to connect to the "End with Rejection" step, and set the condition as "Rejected".

Repeat the same step to connect the "CFO Approval" task to the "Set Data List" with the condition as "Approved". and connect to the "End with Rejection" with the condition as "Rejected".

Lastly, click and drag the "End" step, and connect an arrow from the "Set Data List" step.

Click the "Save" button on the top-right to save all the changes of this workflow.


Step 6: Publish your business process

After all set, click the "Publish" button on the top-right of the approval form designer. Then, from the pop-up window, click the "Publish" button to make your approval form be published to users.


Step 7: Test and modify the process

After the approval form is published successfully, you can click the "Click to access the form" link to exit the designer and access the form from the application.

When a new project approval request is submitted, and is approved by the sponsors, you will see the approved project is created as a new record in the Projects data list.

To modify the business process, click the "Edit in Designer" button on the top-right to open the designer.

Did this answer your question?