Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

This document describes the processes how registration rules offering rules (for registrations and instructors) are generated and updated using the Registration Offering Rule Matrix (RRMaka Registration Rule Generator) and the Offering Rule Generator (aka Registration Rule Generator (RRG) DOS prompt tool .For every customer we should have one RRM which is the truth and applied to the LMS. Maintain the files within the Professional Services Google Drive folder of every customer (https://drive.google.com/drive/folders/0B7g9LwWIoQa2Vnlacmhobk1xRjQ). Some customers will have slightly different workflows on where the RRM file is being maintained (i.e. a shared drive the customer provides) and how they update/add courses. The section 5440513396in 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 RRM Offering Rule Matrix (courses/OrgProfileField values) where they are able to tick all the requirements for their courses
    1. Preferably, we would fill in the course paths ahead of sending the file to the customer rather than let the customer fill in courses. The customer would only need to tick the OrgProfile values for the courses and decide on de-/re-registration/expiry periods,...
  2. We will double check the validity of the returned RRM
  3. Generate the registration rules using the RRG
  4. Upload/replace all registration rules with the freshly generated reg rules
  5. Upload the RRM file to Google Drive location (and possibly to the customer as a reference)

Handle PDR Registration Rules

Currently, we have 'manual' registration rules - generated by the PDR generator - for all PDRs. PDRs won't be part of any RRM for now and any new PDR upload will contain a somewhat manual process to crafting the rules.

Update Registration Rules

If a customer needs to add/update registration rule requirements for courses we have 2 proposals at the moment
  • Send the full RRM to the customer
  • Send a partial RRM which only contains the new courses/courses they need to update. Because of the amount of courses some customers have, this may make it easier for the customer and us to manage the changes

Generate Registration Rules via RRG Tool

TODO: add full manual on how to use/where to get the RRG tool.

...

  1. 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
     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

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.


Get Offering Rule Matrix via GetOfferingRuleMatrix

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.

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.

Note: switch parameters can be placed in any order - they are identified by the parameter name like '-includeAllOpfValues'

mandatory: orgPath

The organization path to extract the offering rules from

mandatory: type

The offering rule type to export - Registration or Instructor rules

semi-optional: IsTransposed

By default we only export transposed Offering Rule Matrices (IsTransposed=true). That is, csv rows for OPF values and columns for courses. Use false to get the old Offering Rule Matrix format

Note: if parameter CsvOutputPath is used, this parameter is mandatory

optional: CsvOutputPath

The Offering Rule Matrix output will be written directly into a file on the hosting server. The Offering Rule Matrix is also output to the client command window.
Note: the parameter IsTransposed must be set if this parameter is used (order of parameters is important)

optional switch parameter -includeAllOpfValues

This option will include all OPF values of an SCS OPF in case the OPF is referenced in a rule (order all OPF values alphabetically).

Example:
An OPF 'Rank' single-choice-string contains 3 values Captain, Engineer and Deckhand. If the rules only referenced Rank values Captain and Deckhand, the option -includeAllOpfValues would also include the not used OPF value Engineer in the Offering Rule Matrix.

optional switch parameter -includeOpfs:OPFName1|OPFName2|…|OPFNameX

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"

Current Client Command Limitations

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 Registration Rule Generator Tool

The 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 RRGOffering 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

Some customers will have certain workflows how the RRM the Offering Rule Matrix will be updated and where the file will be maintained. This section contains a list and description of the common process for customers.

Moran Tug

Maintain the up to date RRM Moran Tug usually provides an updated Offering Rule Matrix file on their shared OneDrive: https://morantug-my.sharepoint.com/:f:/p/louisew/ElaWorMNr_9FkAfKd4mu6LoBfqE4pwv-8hT8p4WE0i_D8g?e=5%3ab6a80c75e1bf4883bed19030ccb784c5

Login as support@marinels.com.

New Courses

Provide Moran with an empty RRM (found here: TBD) 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 RRM full Offering Rule Matrix on their OneDrive.

Update Existing Courses

Moran will use the full RRM 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
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ( "registrationrulegenerator" , "registrationrulematrix" , "registrationrules" ) and type = "page" and space = "PS"
labelsRegistrationRules RegistrationRuleGenerator RegistrationRuleMatrix

...