Note: This information is outdated for LP Learning Platform (LXP) customers post October 16th 2025. Please refer to Terminate Workflow and Automatic Job Termination. Otherwise the information below may be useful if you are using another platform that sends unerolment statements to our Learning Record Store.
When a user has an active job within Automation that tracks course completion over a set period, there may be cases where the user is unenrolled from the Learning Experience during the workflow. In such instances, continuing to remind the user to complete the course is no longer necessary.
Currently, Automation cannot automatically detect whether a user is still enrolled in the course. To address this, a check can be added before triggering a workflow action—such as 'Send an Email'—to ensure the user is still enrolled.
Where the data is stored:
When a user is unenrolled from a Learning Experience, like with enrolment, an xAPI statement is triggered to the LRS.
Within Automation, it is possible to use the 'Get custom xAPI Statement' to find the above statement, and therefore, if Automation can find the statement, the user's job on the workflow ends, and no follow-up emails are triggered.
Adding the workflow item within Automation:
When adding a new workflow item, on the right-hand side panel that shows, select from the LRS integration 'Get Custom xAPI Statement':
Configuring the workflow item:
This workflow item can be used to get almost any statement that is stored within the LRS; however, in this instance, it will be used to find a statement for the user being unenrolled from the Learning Experience, so in this instance, below is how it would be configured:
The breakdown:
- Verb - This is the action taken in the Learning Platform, there can be a number of these that are available for choosing (Joined, Completed, Passed etc). In this instance, Left has been chosen as that the is the statement triggered when a user is unenrolled from an LX. Find out more information on what xAPI statements are triggered from Learning Pool Products here.
- Activity ID - This is the ID of the activity that the verb has been triggered for. This can include questions within an Adapt course (each question has its own ID) to overall course completion, this is the activity ID that is needed in this instance the Activity ID of the course.
- Result - When requesting for Automation to go to the LRS and fetch a statement for the user in question, that result will need to be stored in a custom variable which can be used to compare and take the next action within the workflow. Find out more in regards to Custom Variables in Automation here.
Comparing the result from the LRS:
At this stage, Automation will go to the LRS and attempt to find a left statement for the activity ID as specified above. In order to ensure that if the user has been unenrolled from the LX that their workflow is ended, so therefore, the result would be either True or False.
To facilitate this in Automation, using the Condition Workflow item will help assist with this:
Side Note:
If there are currently further workflow items on the workflow (for example you are adding the above to an existing workflow) then the below message will be presented on screen.
If this is presented, it will be required to choose which path in this condition workflow the rest of the workflow items below it will fall. In this instance, because this workflow will be doing a check to see if the user has been unenrolled therefore, if this result is false (meaning they are still enrolled) the rest of the workflow should continue down the false path.
Configuring the workflow item:
With the Condition workflow item, it allows the comparison of the output from the check to either check if the result is true or false.
The breakdown:
- Variable - This is where the output custom variable comes into play. At this point, it is not fully known what is stored within this variable therefore in this workflow item it will be compared to what is needed.
- Operator - There are a few options here such as is equal to, not equal to or is greater than. This is essentially taking the variable and choosing what it should be compared as.
- Value - This is where it is chosen what the variable should be compared to. In this example, it would be the requirement that the unenrolment is true therefore we would compare to being true.
The result:
By the end of configuring the two additional workflow items, the workflow may look like something below:
The flow of this workflow now goes like:
- Checks for the completion of the LX - This is known to not be present because the user has been unenrolled.
- Once the condition is completed the user goes down the false path as no completion exists.
- This then triggers the additional workflow items to check if they have been unenrolled.
- At the condition workflow item, as the user has been unenrolled they will go down the true path therefore their job will end.
Example of a user who has been unenrolled while having a job in progress:
Example of a user who remains enrolled while having a job in progress: