Check if a related workflow is in particular status

If your workflow is complex enough, you can break it up into a few simple processes. For example, a business trip execution process might be simplified in the following way:

  • Travel request – the master process.
  • Travel order – the subprocess, containing gathering detailed information about the trip, booking etc.
  • Expenses report - the subprocess required to submit an expenses report for approval.

To run the processes in the right order, you should connect them with references, and set validation rules. Validation rules will help you to check, whether the related subprocess is in particular status or not. To retrieve particular data from a related item, use the following expression pattern:

 $<Reference_Field_ID> -> <Related_Item_Field_ID>

where:

<Reference_Field_ID> - the identifier of a field which references to another item.

<Related_Item_Field_ID> - the identifier of any field of the referenced item.

To connect the processes:

1. Assuming that the templates were previously created and configured, go to a respective workspace and select the Travel request app.

2. Click Fields.

3. Create the fields Travel order (ID: Travel_order) and Expenses report (ID: Expenses_report) of the Reference type. Select the appropriate apps as references. Click Save.

4. Go to Form and drag the created fields to the workflow task form. Save the changes.

To set validation rules:

1. In the Travel request app go to Workflow.

2. Find the step of the Travel request master process on which the related Travel order should be Verified by Manager (ID: wfstate.verifiedBoss).

3. Open the transition, which follows this step and connects it with the next step in the master process.

4. Go to Validation Rules and click Add Rule.

5. Type the following expression in the built-in expressions editor:

 NOTEQUALS($Travel_order->workflowState, ID(""wfstate.verifiedBoss""))

6. Type the rule name and the validation message that will be displayed, if the the related Travel order has not been verified yet. Click Save.

7. Return to the workflow diagram and find the step of the Travel request process on which the related Expenses Report should be Verified by Manager (ID: wfstate.verifiedBoss). Perform the steps 3-6 and use the following expression for the Expenses Report:

 NOTEQUALS($Expenses_report->workflowState, ID(""wfstate.verifiedBoss""))

To check how it works:

1. Create new workflow tasks Travel request, Travel order and Expenses report.

2. Connect them using the reference fields.

3. Move the Travel request workflow task through workflow.

4. On performing the required transition of the Travel request the validation message will be shown to you, if the related workflow task is not verified by manager.

Attachments
There are no attachments for this article.
Feedback
Security Code
Related Articles
Invite Others to Try Comindware Tracker
Viewed 48 times since Wed, Dec 5, 2018

Windows System Information File
Viewed 138 times since Wed, Dec 5, 2018

Navigation pane
Viewed 48 times since Wed, Dec 5, 2018

Setting a Backup Location
Viewed 79 times since Wed, Dec 5, 2018

On-Premises Licenses
Viewed 45 times since Wed, Dec 5, 2018

Step 6: Configure Application: Set Up The Web Form
Viewed 44 times since Wed, Dec 5, 2018

Comindware Tracker Audit Log
Viewed 62 times since Wed, Dec 5, 2018

How To Create an Application
Viewed 44 times since Wed, Dec 5, 2018

Comindware Tracker for Outlook add-in log
Viewed 46 times since Wed, Dec 5, 2018

Feature comparison of mobile apps and add-ins in Comindware Tracker
Viewed 46 times since Wed, Dec 5, 2018