How to check for a desk change
The following procedure describes how to build an example workflow that checks if applications have moved from a specified desk to another specified desk before the workflow assigns applications to a specified folder.
How it works
To check the desk that applications move from when applications change desks, the workflow uses the condition Is old desk.
The image Desk change shows the example workflow that runs on the custom event Application desk changed and works as follows:
-
The workflow starts at the Start activity A when the custom event Application desk changed is triggered by applications moving desks.
-
Transition B checks the old desk of applications with the condition IsOldDesk and the new desk of applications with the condition IsDesk.
-
If both conditions are met, the workflow moves to the Move to folder 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.
-
-
The Move to folder activity D has the action MoveToFolder that moves applications to the required folder.
-
The workflow then moves to transition E, which moves the workflow to the Final activity F.
-
The Final activity F ends the workflow.
Build the workflow
Build the workflow as follows:
-
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 Schemes and then. Then, define the following:
- Set a trigger to run the workflow when applications change desks. On Scheme details, in Custom event, select Application desk changed.
- Select , and Save and view scheme.
-
On the workflow designer, check that the initial Start activity is present. To add an initial activity, select and then drag the activity to the required position.
Then, edit the activity: select the activity and then 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.
-
-
Add the activity that moves applications to the New folder. Select the initial activity, then to add the transition and activity, select .
-
Edit the transition to check the old desk and the new desk for an application as follows:
-
Set the Trigger to Auto.
-
Set the Condition to Conditional?
-
Add a condition to check the desk the application was in before the desk change. Set the condition Type to Action and, in Action, select IsOldDesk, and then, in Action parameter, select the desk, such as UG - Health.
-
Add a condition to check the desk the application is in after the desk change. Select Create a condition, set the condition Type to Action, and, in Action, select IsDesk, and then, in Action parameter, select the desk, such as Medical School.
-
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.
-
-
Edit the activity to move applications to the New folder as follows:
-
In Name, enter Move to folder. Note that the State automatically becomes the same as the name.
-
Add an action to move applications to a folder. Select Create and then, in Action, select MoveToFolder.
-
Select the folder for the move. Set the Action parameter: select the button and in the Folder code select the New folder.
-
-
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.
-
Add a transition Otherwise from the initial activity to the final activity. To add a transition, select the initial activity 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
-
-
Add a transition from the move to folder transition to the final activity. To add a transition, select the initial activity 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
-
The video Workflow demo shows a simple workflow that assigns applications to the New folder when they move from the Undergraduate - Health desk to the Medical school desk.