Skip to main content
Skip table of contents

Trigger workflows based on metadata changes

VidiFlow supports triggering workflows based on metadata changes in VidiCore. The rule engine of VidiFlow is used to decide if a changed metadata value is relevant and which workflow shall be called.

The conditional workflow service (part of core services) will receive changes on metadata values for items and collections and evaluate the configured rule for triggering a configured workflow.

To set up conditional workflows, some configuration has to be done in ConfigPortal in the section Trigger Workflows / Metadata Changes:

image-20240702-064823.png

Enter a name and description for your condition

  • Choose the event type (Item Metadata Changed / Collection Metadata Changed)

  • Select the business rule to be executed. This rule has to be created in the Rule Designer first:

    • The name of the input variables needs to match with the VidiCore name of the metadata. All types of VidiCore metadata are supported.

    • One of the output variables must be called StartWorkflow with Boolean type which will be used for triggering the configured workflow. If the rule sets this value to true, then the workflow will be executed.

      Sample rule configuration in Rule Designer: When the VidiCore variable V3_TriggerValue has the value “trigger”, then the output variable StartWorkflow is set to true, which will trigger the selected workflow. For any other value of the VidiCore variable V3_TriggerValue (indicated by the dash (-)), the output variable StartWorkflow is set to false which will not trigger the selected workflow.

  • Select the workflow to be executed.

  • Select the Input match method:

    • “All inputs changed”
      The rule will only be evaluated if the metadata fields for all of its input variables are changed at the same time, i.e. in the same VidiCore change set.

    • “At least one of the inputs changed”
      The rule will be evaluated if the metadata field for at least one of its input variables changed in a VidiCore change set. The other input variables will be filled with their corresponding metadata field values at the point in time when that change set was created.

All configurations for a conditional workflow trigger will lead to a single VidiCore notification registration.

Note:

The rule evaluation will always use the metadata field values from the point in time when the VidiCore notification was sent not when the notification is processed to execute the rule.

Trigger workflows based on metadata changes in metadata groups

It is also possible to trigger a workflow on metadata changes for metadata that belong to a group. To do so one can specify a metadata field "path" to determine the exact group and field name. Imaging the following metadata "scheme":

image-20240708-094827.png

The user can specify 

  • “___my_field”: to specifically focus on changes of the field my_field not belonging to any group

  • “___my_group___my_field”: to specifically focus on changes of the field my_field in group my_group

as an input parameter to a rule. The separator that is used to concatenate the different parts (ie. group and field names) of the "path" is a triple underscore (___). 

Note:

  • Groups can be nested.

  • Variable names in Camunda cannot exceed 255 characters.

The notation “my_field” is still available for backward compatibility and is interpreted as “___my_field”.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.