Skip to content

Create Flow#

🔒 Flow.Create

Overview#

This operation is used to create a Flow. For more information, see the Creating a Flow Model Tutorial.

Setup#

No specific setup is required other than to meet the preconditions of the transaction.

Preconditions#

  • The Flow does not currently exist in the system.

Sequence of Steps#

There are several ways to create a new versioned object. Depending on the level, follow these steps to get started:

  • Entity - in the landing page of this entity type in the Business Data menu or in the details page of an existing entity of the same type, select New on the top ribbon. For more information, see Creating Entity Objects.
  • Revision - if you want to create a new revision, go to the New dropdown button on the top ribbon and select Revision. For more information, see Revisions.
  • Version - if you want to create a version associated to an existing revision, go to the New dropdown button on the top ribbon and select Version. For more information, see Versions.

Step 1: Change Set#

  1. Choose an existing Change Set or select Create to create a new Change Set. If configured to support implicit Change Sets, it is also possible to check the Use Automatic Change Set option.
  2. Optionally, select an Approval Role.
  3. Optionally, set the Make Change Set Items Effective on Approval to true so that the Change Set items become effective when the Change Set is approved.

Info

For more information, see Create Change Set.

Step 2: General Data#

  1. Provide a name for the Flow.

    Warning

    A Flow name may not contain the following characters: : and /.

  2. If you are creating a new version, the revision that was selected when you started the process will be the revision to which this version will be associated. If you are creating a new entity or revision (with a new version associated to it), provide a name for the revision or it will be automatically generated for you. For more information on revision naming, see Revision Naming.

  3. Optionally, provide a description of the Flow.
  4. Select the Flow type. The list of possible values is taken from the lookup table FlowType.
  5. Select the type of Flow:

    • Sequential
    • Alternate (choose Single or Multiple Selection)
    • Non-Sequential Block
    • Line

    Warning

    Non-Sequential Block Flows or Line Flows can only contain Steps.

  6. Set the Flow as enabled or disabled.

    Info

    A disabled Flow prevents any Material from being assigned to that Flow, whether from traditional creation or through rework, adjustment or any other reason. However, if the Material already exists in a Flow that is disabled, processing can continue normally.

  7. Select Create to complete the transaction and a new object will be created.

Screenshot showing the "Create" button in the context of entering general data for a new object.

Step 3: Flow Items#

At this point the Flow is created but there are no Steps or Flows defined for it. To start building the Flow structure, select the button in the center of the window.

Screenshot showing an empty Flow with a highlighted pencil icon to add steps and flows.

To add to the Flow structure, select either Add Step or Add Flow. This action will insert a new row will into the structure.

Screenshot showing the standard cookie flow options in the flow items section of a workflow editor.

Compose the structure of the Flow, bearing in mind the following restrictions:

  • A Flow cannot be empty - it must have at least one Child Flow or one Step.
  • When a Flow has Steps, the last Step cannot be an optional Step (even in the case of a Non-Sequential block, although it can be performed at any time).
  • A Flow which is Alternate cannot have Optional Steps.
  • A Flow which is Non-Sequential Block cannot be Alternate.
  • A Flow which is Non-Sequential Block cannot have duplicated Steps.

Each Step added to the Flow can be customized as outlined by the table below:

Flow Type Optional Line Step Skippable
Sequential X X X
Non-Sequential Block X X X
Alternate X X
Line X

Table: Flow Types and Step Options

Note

The Skippable option is only used in the context of Experiments. For more information, see Create Experiment Definition.

You can add any desired Flow Item to the structure and rearrange it as needed during the editing process.

Screenshot showing a UI with two editable fields labeled "Coomecn" and "anand ne", alongside a rearrangement option.

Info

If a Step has defined any Logical Names, the same Logical Names can be selected for the Flow, in order to represent a specific logical Step. For more information, see Flow with Logical Names.

Optional Flow Items#

Optional Flow Items, whether Step or Flow, can be skipped during the process. The decision to skip is made when moving the Material to the next Flow or Step, either manually or via a business rule.

You can define conditions for optional Flow Items and those in Alternate Flows to determine the next Steps for a Material, based on its state and characteristics. These conditions are set by the Condition Type property and include the following types:

Requires a Case Sensitive expression in JSONata ⧉ that evaluates the state of the Material and returns true or false. This expression can reference direct properties, attributes, and characteristics of the Material, as well as properties of its Product, Product Group, and Step. Some examples are:

  • Material Primary Quantity is greater than 100: PrimaryQuantity > 100
  • Material name contains the value "Material A": $contains(Name, 'Material A')
  • Material Is Hot set to true or false: IsHot = true or IsHot = false
  • Step name equals "Step A": Step.Name = 'Step A'
  • Product Group default units are "Kg": Product.ProductGroup.DefaultUnits = 'Kg'
  • Attribute 'RetailPrice' is greater than 100: Attributes.RetailPrice > 100
  • Material Characteristics 'Color' is equal to "Red": MaterialCharacteristics.Color = 'Red'

    Screenshot showing a JSONata expression for evaluating Material state in a Conditions Wizard.

    Case Sensitivity#

    JSONata is case sensitive by design. This means that an expression must respect the casing of the properties it references, as it can cause issues when comparing values if the actual value is stored in any other casing variation.

    A workaround to the case sensitivity issue when comparing JSONata expressions is to use the built-in $lowercase() or $uppercase() functions to normalize both sides of the comparison.

    See the example below:

    $lowercase(MaterialCharacteristics.Color) = $lowercase("Black")
    // true if Color is "BLACK", "black", "Black", and other case variations
    

    This ensures that expressions behave consistently by converting values to the same case before comparison.

Involves a Rule linked to a DEE Action of scope 'Flow Item Evaluation', returning true or false.

Screenshot showing an optional flow item configuration condition in a sampling plan.

The Step Sampling condition determines whether a Material should enter an optional Step for sampling based on a Sampling Plan. When a Step is marked with this condition, CM MES evaluates the associated Sampling Plan at the designated Sampling Evaluation Step to decide if the Material should be processed for inspection or proceed directly to the next Step.

Screenshot showing a configuration screen for Step Sampling, displaying condition rules and settings.

The Sampling Plan condition applies a specific Sampling Plan directly to a Step. When this condition is set, CM MES selects Materials for sampling based on the plan’s frequency rules (counter-based or time-based) and processes them in that Step.

Screenshot showing the Step Configuration page, highlighting the CONDITION AT WORK LISTS and STEP 01 settings.

Info

Only Flow Items of type Step in Flows other than Non-Sequential Blocks or Alternate Flows can use Step Sampling or Sampling Plan as Condition Types.
When adding a condition of type Step Sampling, you must ensure that the selected Sampling Step exists in the Flow before the Step being configured.

Rework Paths#

If Rework Paths need to be configured, after saving the Flow structure, select the Step for which Rework Information will be added, go to the right side of the Step section, select the three vertical dots and choose Step Configuration.

Use the and icons to add or remove Rework Paths for the Step. For each Rework Path, specify:

  • Reason, that is applicable for Rework at that Step, which will indicate the default Rework Path for that a given Reason.
  • Go To Flow Path, the Flow and Step where the Material should be sent for Rework.
  • Return Flow Path, where the Material will return after it reaches the last Step of the Go to Flow Path. The Material will return automatically after the Move Next from the last Step of the Go to Flow Path. For convenience, use the Browse button to select the Return Flow Path directly from the Flow structure.
  • On Rework Rule (optional), that will be executed when a Material follows a given Rework Path.
  • Toggle Applicable to Queued and Applicable to Processed to indicate whether the Rework Path applies to Materials in Queued and Processed states, respectively.

Screenshot showing a UI with toggle buttons labeled "Applicable to Queued" and "Applicable to Processed".

After completing your edits, select Save on the top ribbon to update the Flow and complete the transaction. At anytime you may select the View Rework Paths button to access the Rework Paths configured.

Rules on Enter/Exit Step#

You can define Rules to be run when a Material enters or exists a Step. These Rules are linked to DEE Actions, enabling you to execute custom code to be triggered when entering or exiting a specific Step. The management of these Rules is handled by the Flow structure. In the Edit Flow Structure view, you can select a Rule with the scope Material Tracking to be executed for Enter and Exit events of Flow Items of type Step. This functionality is controlled by the On Enter Rule and On Exit Rule properties of the Flow Item.

Screenshot showing the Rules Wizard configuration for Enter/Exit steps.