22 June 2023

How to check for a clearance check status change

The following procedure describes how to build an example workflow that checks applications for a specified clearance check changing status.

How it works

The workflow checks for the following conditions:

  1. Was the update triggered by a clearance check status change.

  2. Was it a specified clearance check that changed.

  3. Was the old clearance check status the specified status.

  4. Is the new clearance check status the specified status.

Then, the workflow moves applications that satisfy all these conditions to a specified folder.

To check the status of a clearance check before the clearance check was updated, the workflow uses the condition Clearance check status old.

Attention The condition Clearance check status old only works with the Update trigger.

The image Clearance check change shows the example workflow that runs on the trigger for Update and works as follows:

  1. The workflow starts at the Start activity A when the trigger for Update is triggered by updates to clearance checks on applications.

  2. Transition B runs the following checks:

    1. Was the update triggered by a clearance check status change with the condition ClearanceCheckStatusChanged.

    2. Was it a specified clearance check that changed with the condition ClearanceCheckType.

    3. Was the old clearance check status the specified status with the condition ClearanceCheckStatusOld.

    4. Is the new clearance check status the specified status with the condition ClearanceCheckStatus.

    After checking the specified conditions then the workflow does the following:

    • If all conditions are met, the workflow moves to the Review criminal conviction activity D. Note that as all conditions must be met, the transition has a concatenation AND.

    • If all conditions are not met, transition C moves the workflow to the Final activity F.

  3. The Review criminal conviction activity D has the action MoveToFolder that moves applications to the required folder.

  4. The workflow then moves to transition E, which moves the workflow to the Final activity F.

  5. The Final activity F ends the workflow.

Clearance check change
workflow to check for clearance check status change before moving application to folder

Build the workflow

Build the workflow as follows:

  1. Create a new scheme. In Business Entities, on the Workflow Service Code of ADMISSIONS with the Business Entity Code of APPLICATIONCLEARANCECHECK, go to the business entity scheme menu button and then selectview schemesView Schemes and then the create new scheme button. Then, define the following:

    1. Set a trigger to run the workflow when clearance checks are updated. On Scheme details, select Update.
    2. Select add scheme button, and Save and view scheme.
    Scheme details
    the scheme information section highlighting trigger for update
  2. On the workflow designer, check that the initial Start activity is present. To add an initial activity, select create activity and then drag the activity to the required position.

    Then, edit the activity: select the activity and then edit and edit the activity as follows:

    • Enter Start in Name and State. Note that when you enter text in Name, the State changes to the same text.

    • Select Initial and For set state.

    • Do not create any actions.

    Initial activity
    the workflow designer create activity pop up
  3. Add the activity to move the application to the Further checks folder. Select the initial activity, then to add the transition and activity, select add transition and activity.

    Transition and activity
    workflow designer example with transition and activity
  4. Edit the transition to check for a clearance check for criminal conviction changing status from failed check to passed check as follows:

    1. Set the Trigger to Auto.

    2. Set the Condition to Conditional?

    3. Add a condition to check if the update, that triggered the workflow to run, was a change to a clearance check status. Set the condition Type to Action and, in Action, select ClearanceCheckStatusChanged.

    4. Add a condition to specify the clearance check the transition is to check. Select Create a condition, set the condition Type to Action, and, in Action, select ClearanceCheckType, and then, in Action parameter, select the clearance check for Criminal conviction.

    5. Add a condition to check if the status of the clearance check before the status change was a specified value. Select Create a condition, set the condition Type to Action, and, in Action, select ClearanceCheckStatusOld, and then, in Action parameter, select Failed Check.

    6. Add a condition to check if the status of the clearance check after the status change is a specified value. Select Create a condition, set the condition Type to Action, and, in Action, select ClearanceCheckStatus, and then, in Action parameter, select Passed Check.

    7. Set the concatenation to apply all the conditions when selecting applications for transfer to the activity. Select Show concatenation, and set Conditions concatenation type to And.

    The image Conditional transition shows the transition is conditional and the defined conditions.

    Settings for the transition to specify clearance check conditions
    workflow designer transition pop up with condition set to conditional and condition defined
  5. Edit the activity to move applications to the Further checks folder as follows:

    1. In Name, enter Review criminal conviction. Note that the State automatically becomes the same as the name.

    2. Select Create and then, in Action, select MoveToFolder.

    3. Set the Action parameter: select the button set and in Folder code select the Further checks folder.

    Settings for the activity to move folder
    the workflow designer create activity pop up an action set
  6. Add the final activity that ends the workflow process. In Name, enter End and then select Final as shown in the image Settings for the final activity.

    Settings for the final activity
    the workflow designer create activity pop up with the name set to end
  7. Add a transition Otherwise from the initial activity to the final activity. To add a transition, select the initial activity button add transition and drag the transition arrow to the final transition. Then, edit the transition as follows:

    • Set the Trigger to Auto.

    • Set the Condition to Otherwise

    Transition otherwise
    workflow designer transition pop up with condition set to otherwise
  8. Add a transition from the move to folder transition to the final activity. To add a transition, select the initial activity button add transition and drag the transition arrow to the final transition. Then, edit the transition as follows:

    • Set the Trigger to Auto.

    • Set the Condition to Always

    Final transition
    workflow designer tranisition pop up with condition set to always

The video Workflow demo shows a simple workflow that checks if the clearance check for Criminal conviction on applications has changed from the Failed check status to the Passed check status and moves the application into a Further checks folder.

Workflow demo