Dynamic rules: Difference between revisions
(Initial draft adapted from transcript of video) |
Paul Holden (talk | contribs) (Flesh out Dynamic rules page.) |
||
Line 2: | Line 2: | ||
= Overview= | = Overview= | ||
The dynamic rules feature allows you to create “if this then that” rules based on one or more conditions to execute the selected actions. Each plug-in implements its own conditions and actions to be used in any dynamic rule. Other | The dynamic rules feature allows you to create “if this then that” rules based on one or more conditions to execute the selected actions. Each plug-in implements its own conditions and actions to be used in any dynamic rule. Other Workplace features make use of dynamic rules to automate some of their actions, like issuing [[Badges|badges]] or [[Certificates|certificates]], or granting [[Competencies|competencies]]. | ||
{{MediaPlayer | url = https://youtu.be/SZAcx6ZSomI | desc = Moodle Workplace | Training | Dynamic Rules}} | {{MediaPlayer | url = https://youtu.be/SZAcx6ZSomI | desc = Moodle Workplace | Training | Dynamic Rules}} | ||
= | = Creating dynamic rules = | ||
Dynamic rules can be accessed from the Workplace launcher | Dynamic rules can be accessed from the Workplace launcher. | ||
We can create a new rule by clicking the "New rule" button and giving the rule a name. We tick the “enable matching frequency limitation” option to limit how many times this rule will be triggered in a certain period. For example, let's say that this rule cannot be triggered more than once in one hour. | |||
= Conditions = | = Conditions = | ||
We | On the conditions tab we'll find a listing of predefined conditions for each entity that can be evaluated in order to trigger some actions. Each condition has its own editable properties. For example, using the drop down menus let’s select users from the Department “Europe” and who have completed the onboarding program. Once they're configured properly we click on “Save Changes”. | ||
We can always come back later and change or delete these settings using the "Edit condition" icon. | |||
At the bottom of the tab, we can check how many users would meet these conditions, and by clicking on “view matching users” we can easily check the complete user listing. | |||
= Actions = | |||
Now let's switch to the actions tab, to define what we want to happen when the conditions are met. In this example, we want to allocate the users to a certification so we click on "Allocate users to certification" and select the appropriate certification. | |||
= Activating a rule = | |||
Now that the rule contains at least one condition and one action, we can activate it by clicking the Enable button. Prior to enabling we will be shown a notification to remind us of how many users will be affected by the rule. We click “enable” and the rule will start working instantly. | |||
Note that prior to activating a rule, each condition and action is validated for correctness. If at some future point a rule fails validation (for example because a course no longer exists) it will be disabled automatically and will be flagged as containing an error. To re-enable such a rule, we must edit it and correct each condition and action. | |||
= | = Active/archived rules = | ||
The Active rules tab lists all rules that are currently active on your site. We can toggle whether an individual rule is enabled or not by using the Enable/Disable rule toggle in the rules table. | |||
Pressing the Archive rule button will disable that rule and move it to the Archived tab, allowing it to be preserved for reference in the future. Archived rules cannot be enabled again until they are moved back to the Active tab. | |||
Revision as of 09:37, 3 September 2019
Overview
The dynamic rules feature allows you to create “if this then that” rules based on one or more conditions to execute the selected actions. Each plug-in implements its own conditions and actions to be used in any dynamic rule. Other Workplace features make use of dynamic rules to automate some of their actions, like issuing badges or certificates, or granting competencies.
Creating dynamic rules
Dynamic rules can be accessed from the Workplace launcher.
We can create a new rule by clicking the "New rule" button and giving the rule a name. We tick the “enable matching frequency limitation” option to limit how many times this rule will be triggered in a certain period. For example, let's say that this rule cannot be triggered more than once in one hour.
Conditions
On the conditions tab we'll find a listing of predefined conditions for each entity that can be evaluated in order to trigger some actions. Each condition has its own editable properties. For example, using the drop down menus let’s select users from the Department “Europe” and who have completed the onboarding program. Once they're configured properly we click on “Save Changes”.
We can always come back later and change or delete these settings using the "Edit condition" icon.
At the bottom of the tab, we can check how many users would meet these conditions, and by clicking on “view matching users” we can easily check the complete user listing.
Actions
Now let's switch to the actions tab, to define what we want to happen when the conditions are met. In this example, we want to allocate the users to a certification so we click on "Allocate users to certification" and select the appropriate certification.
Activating a rule
Now that the rule contains at least one condition and one action, we can activate it by clicking the Enable button. Prior to enabling we will be shown a notification to remind us of how many users will be affected by the rule. We click “enable” and the rule will start working instantly.
Note that prior to activating a rule, each condition and action is validated for correctness. If at some future point a rule fails validation (for example because a course no longer exists) it will be disabled automatically and will be flagged as containing an error. To re-enable such a rule, we must edit it and correct each condition and action.
Active/archived rules
The Active rules tab lists all rules that are currently active on your site. We can toggle whether an individual rule is enabled or not by using the Enable/Disable rule toggle in the rules table.
Pressing the Archive rule button will disable that rule and move it to the Archived tab, allowing it to be preserved for reference in the future. Archived rules cannot be enabled again until they are moved back to the Active tab.