Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Logistics Execution > Setup > Constraints > Constraints

Constraints, at their very core, are user-defined queries that can be applied to a number of objects within the program.

You can use constraints to filter and prohibit the pairing and assignment of assets, workers, positions, and orders during activity template creation and activity execution.

Constraints can also be used to ensure that a logistics order has the required data necessary to execute an activity under an operation.

...

Note
title

...

Important

Be cautious regarding the use of multiple constraints over large lists of assets. While it is possible to create very complicated scenarios of interrelated constraints, performance challenges may come into play if large amounts of data are also being constrained.


Currently, any number of constraints may be applied to:

...

  • logistics types
  • activity masters
  • activity templates
  • logistics addresses
  • item classifications

Similar to logistics type attributes, constraints follow a hierarchy, and the parent type's constraints are applied to the child type.

...

Image Added

Header Section

...

Image Added

FIELDDESCRIPTION
ValidityIdentifies whether the constraint is valid.
Constraint IDName of the constraint.
DescriptionDescription of what the constraint accomplishes.
Constraint Type

Defines which logistics type is being constrained against and therefore limits which tables are selected within the related constraint query: 

  • Asset
  • Worker
  • Position
  • Logistics Order
  • Handling Unit
  • Logistics Line
Logistics Type

Defines which logistics type is being constrained.

Info
titleNote

Constraint Type + Logistics Type = evaluated object


Constraint Restriction

Controls whether a constraint failure stops the attempted process or a warning is issued.

The process to stop/warn is configured in the sections below.

Expression Section

This section functions as the logic behind the constraint. 

Image Modified

Set up a constraint expression to restrict and filter data against the selected logistics type.

...

titleExample

...

Each new line within this section represents another clause in the expression. Multi-lined constraints are joined by the conjunctions AND or OR.

The rules and order of operations for crafting an expression mirrors that of SQL or a generic AX query build. Unlike AX build queries, constraints allow the use of unions, enabling you to create complex statements otherwise unavailable in AX.

Info
titleNote

When creating a constraint, the operator of the first line should be WHERE. For all succeeding lines, AND or OR should be selected, depending on the query logic. AND requires both statements to return as true while OR only requires one statement or the other to return as true.

Grouping

Use grouping to create complex union queries, similar to SQL.

Grouping is visually expressed through parentheses.

Image Modified

Info
titleExample

Some shipments require refrigeration (e.g., perishable food) and often require extra visibility to ensure safe transit.

The constraint might require either a Reefer trailer (i.e., refrigerator) or an asset with both a refrigerator and temperature control mechanism. The written logic would be written as:

WHERE Asset Description == Reefer OR (Refrigerator == Yes AND Temperature Controlled == Yes)


Operations Section

This section displays a list of operations that use the constraint.

Image Modified

Used By Section

This section displays constrained logistics types.

Image Modified

Constraint Descriptor Section

This section will display a description of the configured constraint once the constraint is validated.

Image Added

Buttons


Expand
titleValidate

Before a constraint can be applied, it must pass validation.

Once you finish defining the constraint expression, click Validate to validate the constraint.

Image Added

Validation Example

A user attempts to create a constraint against assets. This forces an order to use either a Crab or Donkey type forklift.

Upon testing, however, the validation fails.

Image Added


Noting the error message, the user enters a value and attempts to validate a second time.

Image Added


Although the user entered a value to eliminate the "null" error, the expression is still invalid. This time, however, the error states the expression is impossible. The error suggests the user look over the expression where the logistics type is being set.

In this case, the issue lies in the conjunction of the two constraint lines. Because an asset cannot be two logistics types simultaneously, the expression is illogical.

The user resolves the issue a second time by changing the AND conjunction to an OR conjunction and validates once more.

Image Added


Expand
titleSimulator

Use the Constraint Simulator to test how the constraint will perform in your system.

Click Simulator to open the Constraint Simulator flyout window. 

Image Added


The flyout window opens with no selected parameters. You can use the optional filters to narrow down the list of operations to pull from. The available filters depend on the selected constraint type. 


Info
titleExample

If you configure a constraint with the Position constraint type, the Constraint Simulator allows you to filter by Facility. The program will then pull only from the selected facilities. 

If you leave the parameters blank, the program will pull from every operation.


Click Simulate to view how the constraint will perform with your data.


Note
titleImportant

This is a test; it does not affect your data.

Click OK to close the Constraint Simulator when you are done viewing the simulator results.

Image Added