Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Introduction

This document describes 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 Offering Rule Matrix and Offering Rule Generator#Customer Specific Processes below describes any customer specific requirements.

Workflow to Create and Update Offering Rules

  1. The customer would get a pre-filled Offering Rule Matrix (courses/OrgProfileField values) which has been extracted from the LMS via GetOfferingRuleMatrix command

    • Instead of a complete Offering Rule Matrix, it is possible to only send an partial Offering Rule Matrix to the customer which only contains courses which need a rule update

  2. Generate the offering rules (either instructor or registrations) using the Offering Rule Generator

  3. Pause the rule background thread via command PauseAutomaticOfferingRuleProcessing. Check the status of the background thread with GetOfferingRuleStatus to make sure the thread is paused and not in the middle of processing.

  4. Remove previous offering rules for courses (the set of rules to be removed is created by the Offering Rule Generator)

  5. Create the new offering rules - commands created by the Offering Rule Generator
    Note: The commands to add new rules automatically checks if the OPF single choice values exist

  6. Re-evaluate the rules for courses for which the rules have been changed (student and/or instructor) via command ReEvaluateOfferingRulesByCoursePathMatch (task 

    Jira Legacy
    serverSystem JIRA
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId23f523ea-1678-3ca2-a1e8-2de53fd3b74a
    keyPSDEV-760

    https://marinels.atlassian.net/browse/PSDEV-760 will add the proper commands to the output file of the Offering Rule Generator)
    Note: you can check the progress of the re-eval command by executing GetOfferingRuleStatus in a new pages/dev client window.

  7. Continue rule background thread via command ContinueAutomaticOfferingRuleProcessing once all re-eval commands finished.

  8. Check the that the background thread is not paused anymore with GetOfferingRuleStatus

Note: 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 GetOfferingRuleMatrix

Offering Rule Matrix (in progress)

The Offering Rule Matrix (a.k.a. Registration Rule Matrix) is a csv representation of registration or instructor rules for courses. The instructor and registration rules matrix format is slightly different.

...

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.

Code Block
GetOfferingRuleMatrix [orgPath] [type: 'Registration' (student) or 'Instructor'] [Optional: IsTransposed (Default to true for new format, false for original matrix format] [Optional: CsvOutputPath (Note: if not provided, outputs to command line)] [optional: -includeOpfs:"OPFName1|OPFName2|…|OPFNameX"] [optional: -includeAllOpfValues]

All OPFs and OPF values which are being used in rules are automatically included in the matrix. That means if an OPF 'Rank' contains values Captain, Engineer and Deckhand and the rules only use Captain, only Captain is included in the matrix.

...

This parameter includes all listed OPFs in the Offering Rule Matrix even if they are not referenced in any rule. All OPFs listed must be single-choice-strings. The list is still valid if an OPF is already referenced by a rule. The Offering Rule Matrix would contain all available OPF values.
If an OPF name contains white spaces, enclose the whole OPF list with double quotes - example: -includeOpfs:"Rank|Functional Position|Vessel"

...

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. 

Generate Registration Rules via

...

Offering Rule Generator Tool

The Offering Rule Generator (aka Registration Rule Generator) can be found here. Unzip the latest version to a local folder and run DOS prompt (Ctrl+R, type 'cmd' and hit enter).

The Offering Rule Generator takes old and new (transposed) formats of Offering Rule Matrices as input. The output of the tool are 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.

Example

Student -f "D:\CMG\cmgtestRegRulesTest.csv" -o "D:\Stefan_Data\CMG\SD-2057\CmgTestRegistrationRule_Commands.txt" -p /Root/Carnival/CMG -v

Instructor -f "D:\CMG\cmgtestInstructorRulesTest.csv" -o "D:\CMG\CmgTestInstructorRule_Commands.txt" -p /Root/Carnival/CMG -v

Replace/Upload Offering Rules in LMS

TODO: add full manual on how to replace/upload registration rules created by the Offering Rule Generator.


Info

Since release v3.0.5+ any updated registration rule needs to be run 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 run 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 the attributes have been updated (i.e. by the rule generator) and doesn’t make any attempt to determine if 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.


Info

Before updating any registration rule the rule engine needs to be paused.

Commands to pause/continue/check status of the automatic registration rule processing:

  • PauseAutomaticOfferingRuleProcessing

  • getOfferingRuleStatus

  • ContinueAutomaticOfferingRuleProcessing


 

Customer Specific Processes

...

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 (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@a03
sortmodified
showSpacefalse

...

reversetrue
typepage
cqllabel in ( "registrationrulegenerator" , "registrationrulematrix" , "registrationrules" ) and type = "page" and space = "PS"
labelsRegistrationRules RegistrationRuleGenerator RegistrationRuleMatrix


Page Properties
hiddentrue


Related issues