Sample Workflow 2
  • 12 Aug 2024
  • 9 Minutes to read
  • PDF

Sample Workflow 2

  • PDF

Article summary

In the first sample workflow that we saw, we have seen how to defile activities and capture data. We will now look at the same workflow to which an extra transition is added. This newly added transition will tell us how we can use conditions on our workflow.

1.Workflow Description

  1. The Designer works on a drawing.

  2. The drawing may or may not need a review. If it needs a review, it is passed on to a Design Lead. And if it doesn’t need a review, it is sent to to the Project Manager who will then issue/publish the file to the Project Engineer.

  3. If the file is with the Design Lead,  he can do one of the following:

    • Send it back to the Designer for more work with some review comments. In this case, the workflow will repeat itself until the drawing is approved by the Reviewer.

    • Approve the drawing and send it to the Project Manager for issuing/publishing the file to the client.

  4. When the file is with the Project Manager, he issues/publishes the file to the Project Engineer.

Step 2 above is the additional transition we are going to add, and it will have a condition involved. The condition is to make a choice if review is required for the file or not.

1.1 Actors

The Actors in this workflow are the Designer, Design Lead (reviewer), Project Manager (who issues the file to the Client) and the Project Engineer (who receives the issued/published file on the site).
Note that we have added an actor (Project Manager) between the reviewer (Design Lead) and the client (Project Engineer) as the Designer may not have direct access to the Client.

Let us now see the above pictorial representation in a workflow.

1.2 Attributes Required

  1. States attribute of list type having all the states as its options.

  2. Revision Number integer type attribute to hold the revision number of the file.

  3. Review Required? attribute with Yes/No options.

1.3 Transitions

While all the transitions in this workflow are mostly the same as the previous sample workflow, there will be one new transition added from WIP —> Ready to be Issued state. We will also add a condition to the WIP —> In Review transition. Let us define the additional transition and condition here.

Transition

Activities/Conditions/Data Captures

Description

WIP —> Ready to be Issued

Activities - Unlocking the file for issuing; Send an email to the Project Manager to let him know that file is ready for issue; Assign the workflow to the Project Manager.


Condition - If Review Required? attribute is Yes, then perform this transition. This means that if it is No, then the WIP —> In Review transition should be triggered.

The Designer can decide whether he wants the file to be reviewed or not. If the file does not need a review, only then this transition is triggered. The file is unlocked and sent to the Project Manager who will in turn issue/publish it to the Project Engineer.  

WIP —> In Review

Activities - Assign the workflow to Design Lead; Lock the File to the Design Lead

Condition - If Review Required? attribute is No, only then perform this transition. This means that if it is Yes, then the WIP —> Ready to be Issued transition should be triggered.

The Designer can decide whether he wants the file to be reviewed or not. If the file needs a review, only then this transition is triggered. The workflow is assigned to the Design Lead for review and the file is now locked for the Design Lead.

2.How to define the WIP —> Ready to be Issued transition

  1. Please refer to the How to build a workflow procedure for building the workflow. we will define the new conditions and activities here.

  2. Access the required folder in the 12d Synergy application job tree and apart from creating the Design Status list attribute and the Revision Number attribute, create a Yes/No type attribute named Review Required? by right-clicking the folder and selecting the Edit Folder option and in the Edit a Folder:<Folder name> window > Attributes tab > File Attributes tab.  

    Thus we have the required three attributes in place.

  3. After building the workflow diagram in the Edit a workflow window, add an arrow from the WIP —> Ready to be Issued states and select it.

  4. Now, let us define the transition now.

    1. Let us first unlock the file for the Project Manager. In the Activities tab, click the button, select the Files category in the Add a New Transition Activity window and then double-click Unlock a file activity (or select and use the Add button).

      Please refer to the Activities table to know which actions fall under which category.

      The New unlock a file activity is added to the Activities tab.

    2. Enter an appropriate name for the activity in the Name box. Let us name it Unlock the file for the Project Manager.

      It is highly recommended that you name the activity appropriately so that it is easier for anyone to understand the activity at a later point in time.

    3. We now have to give values to the inputs for the activity. Click in the corresponding Value column of the input File to lock. The description of this input value is displayed below the Input-Value table for your reference.
      The following prompt window is displayed.

    4. The following three options are displayed.

      • Pick a path option to locate and select the required file in a job.

      • Use the current file option to simply select the current file which when added to the folder has triggered this workflow.

      • Enter manually option to access the Expression Helper to build a variable expression for selecting a file when the workflow is running.


        In our example, let us select the Use the current file option. This will add {Entity} as the value to the File to Lock input in the Activities tab.

    5. Let us now assign the workflow to the Project Manager. In the Activities tab, click the button, select the General category in the Add a New Transition Activity window and then double-click Assign this workflow activity (or select and use the Add button).  

      A New Assign this workflow activity is added to the Activities tab.

      1. Enter an appropriate name for the activity in the Name box. Let us name it Assign this workflow to Project Manager.

      Click the the corresponding Value column of the input Assign to. The description of this input value is described below the Input-Value table.
      The following prompt is displayed for you to select a contact, group or role.

      We assign the file to the actor of a transition so that no other user can work on the same file while the selected actor is working on it.

    6. Since we have to assign the workflow to the Project manager, select the Role option.

      The following prompt is displayed.

    7. Select the Specific Value option and then the Designer role in the following Select a Role prompt.


      The value for the Assign to input is now set to Role: Project Manager.  

    8. For the Send email input, select the No option. We will draft a customised email in the following steps. The Assign this workflow to Project Manager activity is defined.

    9. Let us now look at sending a customised email to the Project Manager.

      1. In the Activities tab, click the button, select the General category in the Add a New Transition Activity window and then double-click Send an email activity (or select and use the Add button).
        The New Send an email activity is added to the Activities tab.

      2. Rename the activity to Send an email to the PM in the Name box.

      3. Click in the Value column row against the Send to input.
        The Edit Contacts Input window is displayed.

      4. Click the button and select the Role > Specific Role > Project Manager option from the prompts that are displayed chronologically.
        The Role:Project Manager contact is added to the Edit Contacts Input window

      5. Click the Set button.
        The value for the Send to input is set.

      6. If you want to CC the email to anyone, click in the Value column against CC to input and add contacts accordingly using the same procedure mentioned for Send to input value.  This is an optional field.

      7. 12d Synergy offers a wide range of inbuilt email templates. And it also gives you the options to customize or create email templates. Create a template named, No Review Required. Ready to Issue. In the Template subject, copy the same Template name viz No Review Required. Ready to Issue. Edit the body of the email to let the Project Manager know that no review is required and hence you are directly sending him the email. Click the Select button.

      8. If you want to attach any files with the email, click the Value column against the Files to attach input and give the variable expressions of the files to attach in the  Set Task Input window. For instance, if you enter {Entity}, the current file that is ready for issue is attached. This is an optional input.

      9. Similarly, you can choose to zip the attachments by selecting the Yes option displayed in the Value column against the input. This is also an optional input.

      10. Click the Save button.

  5. Now let us define the condition for triggering this transition. Select the Conditions tab.

  6. Click the button. In the Add a New Transition Condition window, select the General category and then double-click Compare string property condition (or select and use the Add button).


    A new compare string property condition is added to the Conditions tab.

  7. Rename the condition to Review Required? in the Name box.  

  8. Click in the Value column against String 1. We have to select the Review Required? attribute for the file for which we are running the workflow. For that to happen, enter {Entity.Review Required}.

  9. Click in the Value column against Operator field. We want the transition to trigger when the review is NOT required. So, select the Exact Match option from the list.

  10. Click in the Value column against String 2. The value against which the attribute has to be compared should be selected as String 2. In our case, If the attribute is NO, then the transition is triggered. So, enter No in the cell.

  11. In  the Value column of the Case sensitive comparision?, select the No option so that any case in which you enter No is acceptable.

  12. Click the Save button.
    The condition is saved.

  13. Now let us define the condition for the WIP —> In Review transition. The condition is that if the value of Review Required attribute is a Yes, then the WIP —> In Review transition must be triggered. Select the WIP —> In Review transition and select the Conditions tab on the right.

  14. Follow steps 6 to 12 in this procedure, with the only change that in step 10, enter Yes for the value of String 2 input.  

  15. Click the Save button in the Edit a Workflow window and close it.

  16. Click the Save button in the Create/Edit an Attribute window.

  17. Click the Save button in the Edit a Folder:<folder name> window.

    We have finally defined the WIP —> Ready to be Issued transitions which include a condition. Now let us see a video to see what happens when we run it.

    When you add a file to the folder on which the workflow is defined, the file name is displayed in red font. This means that the file is locked for someone.


Was this article helpful?

What's Next