Workflow Setup

INTRODUCTION

This document will let you know about the Workflow in Frappe ERPNext. So basically Workflow allows you to decide how you have to approve the particular workflow/process in NotiBell Mobile App.

In Workflow you have three types of concepts, you should know before creating workflow : 

  1. Workflow Actions

  2. Workflow States

  3. Workflow Transitions


WORKFLOW ACTIONS

Workflow Actions are defined as the single place to manage the pending actions you can take on the workflow. For Example - For Leave Request the Leave Approver can take only two action either Approve or Reject.


WORKFLOW STATES

Workflow states are defined as the different stages of workflow. For example - In Leave Request from HR module has only two states - Approved or Rejected, as either leave can be approved or rejected.


In the above image, you can see the State column with different states with Doc Status. Actually Doc Status has different variations: 

  1. Doc Status is 0 - Saved, this should be used when you just have to save the document and do nothing further.

  2. Doc Status is 1 - Submitted, this should be used when you have to finish the workflow process.

  3. Doc Status is 2 - Canceled, this should be used when you have to finish the workflow process along with cancelling the workflow entry.

Only Allows Edit For column states the different role types who are allowed to take action in that defined state.


WORKFLOW TRANSITIONS

Workflow transitions are defined as changes in the state of any workflow to another state.

For example - In Leave Request from the HR module the default state or the very first state will be Applied, and as the Leave Approver approves the request it either gets changed to Approved or Rejected based on the Workflow State i.e. Approve or Reject respectively.


Hence this change in the state from one to another is defined through the Workflow Transition.


This can be defined as the Transition Rules -





As you can see in the above image, this defines the transition rule of the Leave Request. Let’s understand this with the example of creating a workflow for the Leaves.

To create the workflow for Leaves we will be required with the states - Draft & Pending. 

Next State will be defined as the next updated state of the workflow entry.

When the employee first starts creating the new Leave Application, the initial state of the document is Draft. So if the Employee saves the document & takes action as Review, the state will be changed to Pending. Also, one workflow entry is created against which the Leave Approver can take action.

As the workflow entry is created the Leave Approver will receive the push notification on their smartphones through the NotiBell app and they can review the request from the Approvals section on the NotiBell mobile app.

When the Leave Approver opens the approvals list or details, from there they can take the action as per the actions defined in the Workflow Transitions.


    last updated 5 months ago