22 June 2023

How to check for a folder change

The following procedure describes how to build an example workflow that checks if applications have moved from a specified folder to another specified folder before the workflow assigns clearance checks and sets the application status on applications.

How it works

To check the folder that applications move from when applications change folders, the workflow uses the condition Is old folder.

Attention The condition Is old folder only works with the custom event Application folder changed.

The image Folder change shows the example workflow that runs on the custom event Application folder changed and works as follows:

  1. The workflow starts at the Start activity A when the custom event Application folder changed is triggered by applications moving folders.

  2. Transition B checks the old folder of applications with the condition IsOldFolder and the new desk of applications with the condition IsFolder.

    • If both conditions are met, the workflow moves to the Add clearance checks and set status activity D. Note that as both conditions must be met, the transition has a concatenation AND.

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

  3. The Add clearance checks and set status activity D has the actions CreateClearanceChecks and SetApplicationStatus.

    • The action CreateClearanceChecks adds specified clearance checks to applications.

    • The action SetApplicationStatus changes the application status on applications to the specified status.

  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.

Folder change
workflow to check for change of folder before performing actions

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 APPLICATION, 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 applications change folders. On Scheme details, in Custom event, select Application folder changed.
    2. Select add scheme button, and Save and view scheme.
    Scheme details
    the scheme information section highlighting custom name set to application folder changed
  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 add clearance checks and set the application status. 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 the old folder and the new folder for the application folder change as follows:

    1. Set the Trigger to Auto.

    2. Set the Condition to Conditional?

    3. Add a condition to check the folder the application was in before the folder change. Set the condition Type to Action and, in Action, select IsOldFolder, and then, in Action parameter, select the folder, such as New.

    4. Add a condition to check the folder the application is in after the folder change. Select Create a condition, set the condition Type to Action, and, in Action, select IsFolder, and then, in Action parameter, select the folder, such as Checks in progress.

    5. Set the concatenation to apply both 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 folder conditions
    workflow designer transition pop up with condition set to conditional and condition defined
  5. Edit the activity to add visa and passport clearance checks to the application and set the application status to applicant in clearing as follows:

    1. In Name, enter Add clearance checks and set status. Note that the State automatically becomes the same as the name.

    2. Add an action to add clearance checks to applications. Select Create and then, in Action, select CreateClearanceChecks.

    3. Select clearance checks for the action to add to applications. Set the Action parameter: select the button set and in Clearance checks to create select the Visa and the Passport clearance checks.

    4. Add an action to change the application status on applications. Select Create and then, in Action, select SetApplicationStatus.

    5. Select a status for the change of application status. Set the Action parameter: select the button set and in Application status select an application status, such as Applicant in clearing.

      Attention If an application status of Withdrawn is selected, then a reason for transfer or withdrawal needs to be selected. Reason for transfer or withdrawal must be empty for other application statuses.
    Settings for the activity to add clearance checks and set the application status
    the workflow designer create activity pop up with actions 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 assigns visa and passport clearance checks to applications and sets the application status to applicant in clearing when applications move from the New folder to the Clearance checks in progress folder.

Workflow demo