Offering Rule Matrix and Offering Rule Generator
- 1 Introduction
- 2 Workflow to Create and Update Offering Rules
- 3 Offering Rule Matrix (general information)
- 4 Get Offering Rule Matrix via GetOfferingRuleMatrix (general information)
- 5 Offering Rule Generator (general information)
- 6 Customer Specific Processes (deprecated?)
- 6.1 Moran Tug
- 6.1.1 New Courses
- 6.1.2 Update Existing Courses
- 6.1 Moran Tug
- 7 Related articles
Introduction
This document and sub-documents describe the processes how offering rules (for registrations and instructors) are generated and updated using the Offering Rule Matrix (aka Registration Rule Generator) and the Offering Rule Generator (aka Registration Rule Generator) DOS prompt tool in combination with the Core client command GetOfferingRuleMatrix
.
The Offering Rule Matrix is usually extracted with the Core client command GetOfferingRuleMatrix
before any changes are made to the existing rules. This ensures an accurate picture of what is in the system before any change is made. The section Customer Specific Processes below describes any customer specific requirements.
Workflow to Create and Update Offering Rules
The customer would get a pre-filled Offering Rule Matrix (with courses and OrgProfileField values) which has been extracted from the LMS via Core command
GetOfferingRuleMatrix
The Offering Rule Matrix can be split into sub-matrices so only a portion of the courses' offering rules are replaced.
Important: if a course has multiple rules a sub-matrix must contain all rules for that course - rules for one course can’t be split across multiple sub-matrices (this is automatically considered by the Core commandGetOfferingRuleMatrix
).
Generate the offering rules (either instructor or registrations) using the Offering Rule Generator
Pause the offering rule background thread via command
PauseAutomaticOfferingRuleProcessing
. Check the status of the background thread with the commandGetOfferingRuleStatus
to make sure the thread is paused and not in the middle of processing. It may take a bit to finish if the background thread is paused in the middle of processing.Remove previous offering rules for courses (the commands to remove offering rules is created by the Offering Rule Generator) by executing the commands provided by the Offering Rule Generator
Add new offering rules - commands created by the Offering Rule Generator
Note: The commands to add new offering rules automatically checks if the OPF single choice values existRe-evaluate the rules for courses for which the rules have been changed (student and/or instructor) via command
ReEvaluateOfferingRulesByCoursePathMatch
(task https://rippleops.atlassian.net/browse/PSDEV-760 will add the proper commands to the output file of the Offering Rule Generator)
Note: while re-evaluation is being executed you can check the progress of the re-eval command by executingGetOfferingRuleStatus
in a new pages/dev client window.Continue rule background thread via command
ContinueAutomaticOfferingRuleProcessing
once all re-eval commands have finished.Check the that the background thread is not paused anymore with
GetOfferingRuleStatus
It is not required to keep the Offering Rule Matrix on file because if the customer asks for an Offering Rule Matrix the next time we will freshly export a new matrix via comand GetOfferingRuleMatrix
Since release v3.0.5+ any updated offering rules need to be re-evaluated manually to bring the rule engine up to date. The rules need to be run because rule changes/invalidate the ‘from’ date that the new rule engine uses internally to scan for changes. If you just let the engine run normally after rule updates it might miss people who are: (a) affected by the new rule, and (b) have not changed since the internal from date the engine records.
There are command lines to run the rules only for specific courses, so if you have only changed the rules for a small set you can just re-eval the rules for those (i.e. reEvaluateOfferingRulesByCoursePathMatch (-logOnly, -debug) [RuleType (Registration, Instructor, All)] [string: startPath] [string: terminalElement] [batchSize: optional, default Core.OfferingRuleEvaluatorBatchSize]
)
The rule engine doesn’t care that offering rules have been updated (i.e. by the rule generator) and doesn’t make any attempt to determine if offering rules have changed. So its up to a human in this case to decide what rules have changed semantically and ensure to manually run the rules for those courses.
Before updating any offering rule the rule engine needs to be paused.
Commands to pause/continue/check status of the automatic offering rule processing:
PauseAutomaticOfferingRuleProcessing
getOfferingRuleStatus
ContinueAutomaticOfferingRuleProcessing
Offering Rule Matrix (general information)
The Offering Rule Matrix (aka Registration Rule Matrix) is a csv representation of registration and instructor rules for courses. The instructor and registration rules matrix’s format are slightly different.
In general, one column determines one rule for a course. Multiple columns for the same course are allowed - a user gets registered/added as instructor if at least one rule applies to the user.
The offering rule matrix may change over time/LMS versions as the offering rules' capabilities are being extended. Please refer to the corresponding LMS version in sub documents for format references.
Rows specify the requirements for a user to get registered/added as instructor.
De-Registration and Remove Instructor Rules
Offering rules are able to add registrations for users or add the user as instructor. You can also specify offering rules to remove registrations or instructors from a course, as soon as the offering rule requirements doesn’t apply for a user anymore (i.e. due to a vessel change). The matrix usually contains a row similar to De-Registration or Remove Instructor. Adding an 'x' in this row and course (column) will add de-registration/remove instructor rules.
Multiple columns for one course must have all the same value - either an ‘x' or nothing. Multiple offering rules for the same course can’t be mixed.
OPFs as Offering Rule Requirement
Org Profile Fields (OPFs) and values can be specified as offering rule requirement as well. An ‘x' in a course column and OPF value row specifies that a user requires that OPF value in order to get registered. ‘!x' specifies that a user gets registered/added as instructor if they DON’T have that specific value - see Invert OPF Selection for more details on '!'.
Invert OPF Selection
If you need the opposite of an OPF value as registration/instructor requirement you can invert the selected OPF value. In order to do that we use the Boolean NOT character '!' in front of 'x'.
OPF values selections can be marked with an ‘x' or ‘!x' (for the inverse) for a course (column). Selected values of one OPF name must have either all ‘x' or all '!x' within one course. You can't have a mix of 'x' and '!x' in one column within one OPF name. The Offering Rule Generator will throw an exception if '!x' and 'x' are mixed within one column and OPF name.
Example
For example, if all users should be registered who are NOT assigned to Vessel: Shore use '!x' for OPF value Shore. This will result in a simpler offering rule which uses !ProfileValueIn(Vessel,Shore) instead of ProfileValueIn(Vessel,[list all vessels])
1 |
| Course Name | TRG-OHS-2205 Working at Height Training for Workers |
2 |
| Course Path | /Root/Carnival/CMG/HESS/WorkingHeightWorker |
3 |
| Registration Type | OneTime |
4 |
| Re-Registration Before Certificate Expiry |
|
5 |
| Certificate Short Id |
|
6 |
| De-Registration |
|
7 |
|
|
|
8 | OPF Name | OPF Value |
|
9 | Vessel | Shore | !x |
10 | Vessel | AIDAblue |
|
11 | Vessel | Costa Atlantica |
|
12 | Rank | Captain |
|
13 | Rank | Engineer | x |
14 | Rank | Environmental Officer |
|
Registration Rule Matrix
Instructor Rule Matrix
Example Offering Rule Matrices
Get Offering Rule Matrix via GetOfferingRuleMatrix
(general information)
The command GetOfferingRuleMatrix
is able to extract registration/instructor rules into an Offering Rule Matrix (csv format) accepted by the Offering Rule Generator and makes it easy to update any rules.
Limitations for GetOfferingRuleMatrix
All limitations for the client command also apply to the Offering Rule Generator:
some rule predicates are not supported and can't be extracted. If a rule does contain one of those not (yet) supported predicates it will list them in the command output
Manual rules are not included in the matrix - in order to include in the matrix the rule needs to be marked as AUTO
De-registration rules are interpreted as inverts of registration rules. Therefore, asymmetric registration/de-registration rules pair will loose the asymmetry, using the registration rule as truth.
Offering Rule Generator (general information)
The Offering Rule Generator (aka Registration Rule Generator) creates LMS Core commands to replace and add new offering rules based on an Offering Rule Matrix. The DOS prompt tool input can be the old (deprecated) or new transposed (preferred) format of an Offering Rule Matrix. The tool generates LMS Core client commands to remove any old registration/instructor rules for which the Offering Rule Matrix has a course for and commands to add the new registration/instructor rules.
The Offering Rule Generator tool itself can be found attached to the sub-document with the proper version. Unzip the latest version to a local folder and run DOS prompt (Ctrl+R, type 'cmd' and hit enter).
Customer Specific Processes (deprecated?)
Some customers will have certain workflows how the Offering Rule Matrix will be updated. This section contains a list and description of the common process for customers.
Moran Tug
Moran Tug usually provides an updated Offering Rule Matrix file on their shared OneDrive: https://morantug-my.sharepoint.com/:f:/p/louisew/EiPxFVLmbhlBlo4XITf3dhcB_ZrEtzDsriaCGiVRMDBiMg?e=5%3aTmOPYT&at=9
Login as support@marinels.com
New Courses
Provide Moran with an empty Offering Rule Matrix extracted from the system whenever they need to add new courses. We will check correctness and add the courses to the full Offering Rule Matrix on their OneDrive.
Update Existing Courses
Moran will use the full Offering Rule Matrix to update any existing courses. After the changes we will check correctness and upload the new registration rules to the LMS.
Related articles
Filter by label
There are no items with the selected labels at this time.