Skip to main content
Create a Workflow for Files in a Project

This article helps you understand how to create a workflow for files in a project.

Updated over a month ago

Pre-requisites:

Steps to create a new document workflow are mentioned below:

1. Navigate to 'Workflows' tab and select the project in which a new workflow needs to be created.

2. Click on 'Create Workflow Definition' button to start creating a new workflow.

Alternatively, right click on project name and select 'Create Workflow Definition'.

3. Capture required details in mandatory fields and click on 'Create' to create a new workflow record.

Workflow Name - Name which you want to give to the new workflow.

Description - Capture a brief description about this new workflow.

Workflow Context - Select 'Document' as workflow context.

Total Workflow Days - Total length of the workflow in number of days.

4. Once you click on 'Create', the visual workflow designer screen will appear. Within the shape repository in left panel, various shapes are available to configure the workflow described below:

Shape

Name

Description

Start Event

Indicates where a workflow starts.

End Event

Indicates where workflow ends.

Sequence Flow

The connector between two elements of a process.

Association

Used to associate a text annotation (comment) with a particular workflow node.

User Task

A workflow task which needs to be done by users, human intervention is required.

System Task

A workflow task which is performed by the system automatically.

Timer Event

Used to halt the workflow at a given point for specific duration.

Boundary Timer Event

Used to set a deadline by which an activity should start and if it doesn't start then boundary timer is triggered to take alternative flow.

Exclusive Gateway

Used when you want only one output to go ahead, in case if multiple outputs are required then status condition needs to be there.

Parallel Gateway

Used when you want the workflow to wait till it receives all inputs in order to proceed further.

Inclusive Gateway

Used when you want multiple inputs coming in and multiple outputs going out with a condition attached.

Text Annotation

Used when you want to put a text comment on a particular workflow node.

Accordingly, below is a description of various tools available in the top panel:

Icon

Name

Description

Save

To save the changes in workflow.

Publish

To publish the changes in workflow.

Cut

To cut the selected objects or shapes into the clipboard.

Copy

To copy the selected objects or shapes into the clipboard.

Paste

To paste the selected objects or shapes to the workflow designer canvas.

Delete

To delete the selected objects or shapes.

Undo

Undo the last action.

Redo

Redo the last undone action.

Middle

To position the objects or shapes in the selected area to middle.

Center

To position the objects or shapes in the selected area to center.

Same Size

To set same size for selected objects or shapes.

Add Docker

Select any point of a line (connecting object), then click this icon. You can now drag the selected line pointer and arrange it precisely to indicate the movement of workflow.

Delete Docker

To delete an already added docker.

Zoom In

To zoom in to the workflow.

Zoom Out

To zoom out of the workflow.

Zoom to Standard

To set the zoom of selected objects or shapes to their standard size.

Zoom to Fit

To set the zoom of selected objects or shapes to fit the selected area.

5 Example Scenario


Let us create an example workflow using all of above shapes as per below mentioned process:

5a. Workflow starts when a new document revision is uploaded.

5b. Document controller has to change the status of newly uploaded files in 2 days.

5c. If document status is 'QA Checked', it should go to lead reviewer for further action.

5d. If document status is 'QA Rejected', then workflow should end.

5e. If document status is different from above two, then it should go back to document controller.

5f. Lead reviewer changes the status again and distribute the document with other reviewers.

5g. If lead reviewer assigns status as 'Parallel Client Review', then document should go to the client and it should also go to other reviewers.

5h. Other reviewers create an aMessage on the document within 5 days.

5i. Client creates an aMessage on the documents.

5j. All documents from other reviewers and client reaches to lead reviewer.

5k. Lead reviewer releases the required aMessages, post which documents should reach document controller for status change.

5l. Workflow should end with above step.


Steps to create workflow as per above example:

5.1. Drag and drop the 'Play' shape onto drawing board to start creating a new workflow. This is the starting point of workflow.

5.2. Drag and drop a connecting object (arrow) coming out from the start event.

5.3. Add a new user task which is connected with the start event using the connecting arrow mentioned above.

5.4. Once the new user task is added, you need to configure properties for the same.

Name - Key in a name for this user task.

Description - Enter a brief description about this user task.

Task - Select the task you want the user to perform. In this example workflow, it will be 'For Status Change'. See below for a list of supported user tasks:

Context

Supported User Tasks

File

For Acknowledgement

For Action

For Comment Coordination

For Comment

For Distribution

For Information

For Status Change

For Comment Incorporation

To - Select the user who needs to perform above task. You can select multiple users. In this example workflow, it will be document controller.

Roles and organizations can be selected instead of individual users if task needs to be assigned to multiple users.
Tasks can also be assigned to 'Document Publisher', 'Workflow Originator' as well as 'Document Publisher's Organization'. The visual workflow engine will pick up these values dynamically based on the actual document or workflow being executed.

Due Days - Specify the number of days you want to give for the user to complete given task. Please key in '2D' if you want to give 2 days of time.

Workflow Transition Condition - Select appropriate option from the dropdown.
Wait for all users to complete task: Workflow will halt until all selected users have completed the tasks assigned to them.
Proceed after any one person completes task: Workflow will start progressing the moment at least one user completes task.

5.5. Similarly drag and drop the user task for lead reviewer and configure its properties using status change task with 5 days time.

5.6. Now let us drag and drop an exclusive gateway on the drawing board and configure its status conditions:

If document status is 'QA Checked', it should go to lead reviewer (user task) for further task.

If document status is 'QA Rejected', then workflow should end.

To configure a status condition, click on the connecting object moving out of the exclusive gateway.

Click on the connecting object between exclusive gateway and lead reviewer nodes.

Now configure the properties for this connecting object:

Name - Key in a name for this condition.

Description - Key in a small description about this step if required.

Conditional Flow - Select 'Yes' as this flow has a condition i.e. document status marked as QA Checked. You need to select 'No' if there is no condition.

Flow Condition - Here we need to key in a small query to select the status value as 'QA Checked' as per below steps:

Click on the value field in front of flow condition.

Context

Supported Parameters in Flow Condition

Actual Name in Flow Condition

Supported Values

Document

Document Status

status

Auto populated

Document

Purpose of Issue

poi

Auto populated

Document

Dynamic ADecision Variable

dynamicADecisionVariable

1 to 99 (Numeric)

Key in status query as ${status== and you will see a list of available statuses and along with their id's.

Similarly you can key in purpose of issue query as ${poi== to see a list of available purpose of issues along with their id's.
Status and purpose of issue conditions can be used jointly along with logical operators 'AND' and 'OR' as:
Example if 's1' is the id for required status and 'p1' is the id for required purpose of issue. Then:
For 'AND' condition, the flow condition will be: ${status==s1 && poi==p1}
For 'OR' condition, the flow condition will be: ${status==s1 || poi==p1}
Note: ${status==s1} is when the status id is equal to 1 and ${status!=1} is when the status id is not equal to 1, where == is 'equals to' while != is 'not equals to'.

For applying condition on multiple statuses, the flow condition will be: ${status==s1 && status==s2} where 's1' is first status id and 's2' is second status id respectively.
For applying condition on multiple purpose of issues, the flow condition will be: ${poi==p1 && poi==p2} where 'p1' is first poi id and 'p2' is second poi id respectively.
Select appropriate status from the dropdown list i.e. in this example workflow it will be 'QA Checked'.
Complete the brace bracket and click on 'OK'.

5.7. Drag and drop an end event connecting with exclusive gateway for 'QA Rejected' status as the workflow should end if document is rejected.

5.8. Configure the properties of second connecting object between exclusive gateway and end event as mentioned above by selecting status as 'QA Rejected'.

5.9. Now it is required to ensure that if the document status is anything except 'QA Checked' and 'QA Rejected' then it should go back to document controller. Drag a third connecting object coming out from exclusive gateway and going back to a system task with status change task to document controller. See below for a list of supported system tasks:

Context

Supported System Tasks

File

Distribute Files

Status Change

Clear Tasks

Update File Privacy

Execute Groovy Script

Lock File Activities

Unlock File Activities

Email Notification

Publish As PDF

A5 10. To complete the loop, add a connecting object as output from system task connecting it with the original user task for document controller.

5.11. Continuing from steps 5e & 5f, once the document which is 'QA Checked' reaches the lead reviewer who reviews the document and changes its status.

5.12. If the status is 'Parallel Client Review' then document should go to client and it should also go to other reviewers, to ensure this use a inclusive gateway.

5.13. Drag and drop an inclusive gateway on drawing board ahead of lead reviewer user task and connect both with a connecting object. Connecting object will be a output from lead reviewer user task and input for the inclusive gateway.

5.14. Now you need to ensure that documents having status 'Parallel Client Review' should flow to the client and all others should flow to other reviewers.

5.15. Drag and drop a user task to drawing board for 'Distribute' to client and configure its properties as user task to distribute documents to the client. Configure the properties for this task as mentioned in step d above and select 'For Distribution' task and assign it to concerned user with time line of 3D i.e. 3 days.

Use a connecting object to connect the inclusive gateway with above user task. This will be first output of inclusive gateway. Configure the status condition in properties as described in step f above using status value 'Parallel Client Review'.

5.16. Drag and drop a user task for other reviewers and configure its properties as mentioned above using 'For Comment' task and task time as 5D i.e. 5 days and assign this task to all users who need to review these documents.

5.17. Use a connecting object as second output of inclusive gateway and input to above mentioned user task and mark it as default flow. This ensures all the documents having status except 'Parallel Client Review' will take this flow.

5.18. Using boundary timer event: The task time line mentioned in step p is five days. If we want that user doesn't complete this task within stipulated time line, then the workflow should not stop here and it should move forward to next step. For this, put a boundary timer event on the 'Distribute to Client' user task.
While configuring the properties of boundary timer, you need to ensure that the task time line for the main task should be less than the boundary timer time line. In this task, if the user doesn't complete the task within 5 days then after the sixth day boundary timer will trigger and workflow will move ahead.

Timer interval - The boundary timer would trigger after lapse of the duration mentioned in 'Time Interval'. This timer is to be placed on a user task and the interval set on timer should be more than the user task. You can define the interval in days like 1D for 1 day, 2D for 2 days, 3D for 3 days and so on.
The capital letters P, M, D, T and R are designators for each of the date and time elements.

P is the duration designator (for period) placed at start of the duration representation.

M is the month designator that follows value for the number of months.

D is the day designator that follows value for the number of days.

T is the time designator that precedes time components of the representation.

R is repeating intervals.

Time recurrences - This value indicates number of recurrences of the boundary timer. If the value is kept as 1, the boundary timer will be executed once and user task will be marked as cancelled. For values greater than 1, the boundary timer would execute after lapse of the timer interval, and wait for the same time interval, to be executed again, and user task will not be marked as cancelled after the mentioned recurrences.

5.19. Output from boundary timer: Boundary timer event has its own output. In this case let's use an exclusive gateway. Drag and drop an exclusive gateway and connect the 'Distribute to Client' user task's output and boundary timers output as an input to this exclusive gateway.

5.20. Now we have outputs coming out from two nodes. We need to wait for both of them before proceeding ahead.

Output coming out of the exclusive gateway mentioned in step s and

Output coming out of the user task mentioned in step p

5.21. Now workflow cannot proceed unless both above tasks are completed, hence we will use a parallel gateway.

5.22. Drag and drop a parallel gateway and connect it with outputs mentioned in t --> i & t --> ii

5.23. Now the workflow will wait at parallel gateway till it receives input from t --> i and t --> ii. Once both the inputs are received workflow will progress to next node i.e. distribute files to lead reviewer where in lead reviewer will release selected aMessages on the files.

5.24. Drag and drop a user task after the parallel gateway which has a single input coming in from parallel gateway.

5.25. Configure the user task properties using 'For Comment Coordination' task with task time of 5 days and assigned to user who is the lead reviewer.

5.26. The next step after lead reviewer releases selected aMessages as document status change by document controller.

5.27. Drag and drop a user task for document controller status change having 'For Status Change' task assigned to document controller with task time of 5 days.

5.28. Once the document controller changes status of files, workflow should end.

5.29. Drag and drop an end event and connect it with document controller user task i.e. output of user task is the input of end event.

5.30. Now the workflow is fully configured & you need to save it by clicking on the 'Save' button in the top left. Completed workflow is shown in image below:


6. System will give a prompt if the workflow needs to be published now or later, Workflow once created needs to be published in order to be able to run it.

Click on 'Yes' to publish the workflow or click on 'Later' if you wish to publish it later.

7. Clicking on 'Yes' to publish the Workflow, you will be prompted to create a trigger event for this workflow.

8. Click 'Yes' to configure a trigger event for this workflow. Click here for detailed help on how to create a trigger event.

9. Once the trigger event is configured, workflow is ready to use and it will start working the moment trigger event occurs.

Note: A maximum of 2000 workflow definitions are allowed to be created on a single project or a single project template. This can include workflows of all types including files, forms and custom objects.



Did this answer your question?