Have a Question?

Shipment Business Rules

Print

Each shipment type can have custom business rules to validate that the assembly or component being applied to the shipment matches certain criteria. If the component does not adhere to these rules, the user is prevented from adding the component to the shipment. Read below for information on adding, modifying, or removing business rules for Shipment Types.

To begin, open the Options dialog and locate ‘Shipment Types’ under ‘System Settings’. Expand out Shipment Types and select the type of shipment you wish to manage. You can either double-click on the name, or select it and click the edit button .

Select the ‘Business Rules’ tab to view the list of current business rules. By default, a ‘Completed Wheelset’ shipment has rules for requiring all new-mount wheelsets to have the charts reviewed, requiring all wheelsets to have bearings, and requiring all wheelsets to be successfully registered.

To remove an existing rule, select the rule from the list and click the Remove button . You will be prompted to confirm that you want to remove the rule, and if you choose Yes the rule will be permanently deleted at that time. This cannot be undone.

To add a new rule, click the Add button . To edit an existing rule, select the rule from the list and click the Edit button . Adding a new rule or Editing an existing rule both open the Test Business Rule dialog.

The ‘Test Business Rule’ dialog lets you specify the Error Message and Error Condition and test your rule to make sure it performs as you expect.

Error Message is the text you want to display to your user when the rule is violated. For example, if we want to create a rule that requires the Rim Thickness to be greater than or equal to 18, the Error Message might be something like “Rim Thickness must be 18 or greater”.

Error Condition is the logical statement that expresses the rule you want to enforce. In our example, values greater than or equal to 18 are valid, so the Error Condition must be written to check for values less than 18. This would be written as “SubComponents[WHEEL,1].Elements[C109].Value < 18”. Let’s examine the different parts of this statement:

  • SubComponents[WHEEL,1] tells us the data point (element) we are wanting is on the first wheel.
  • Elements[C109] tells us the specific data point (element) we want is C109 which is the id given to Rim Thickness by the AAR as part of the Component Tracking initiative. For a complete list of the element ids refer to our website at https://aicrail.com/element-ids.
  • Value tells us we want the actual value of the data point (element)
  • < is the mathematical Less Than operator symbol.
  • 18 is the value we want to compare