Automations

Automation steps perform automated actions in workflows.

Data-driven workflows, available in Semarchy xDM 2023.1 and later, are subject to specific licensing requirements; please confirm your eligibility to use such new functionality by consulting your license agreement or by contacting your Semarchy account representative prior to use.
All customers can still use the workflow feature available in previous versions (now known as legacy workflows). For more information, see Workflows (Legacy).

The operations performed by an automation depend on its type. Two automation types are available in Semarchy xDM:

  • Send Email sends customizable emails to one or multiple recipients. The emails' subject, body, and recipients are data-driven.

  • Submit Data publishes data to the hub by running the certification process.

Add an Automation Step

To add an automation step:

  1. Click Add button Create Step. The Add a Step dialog appears.

  2. From the Type drop-down list, select Automation.

  3. In the Name field, enter a name for this automation step.

  4. Click Create. The new step is added to the workspace: Automation step icon

  5. Double-click the step you just added. A side panel sweeps in.

  6. Set the general properties:

    Table 1. Automation step general properties
    Property Required Description

    Label

    Required

    Label displayed for the automation step.

    Icon

    Optional

    Image displayed on the automation step in the workflow diagram. The Browse image library Select an image button allows browsing and selecting an image from the image library.

    Automation Type

    Required

    Type of automation. Possible values are:

    • Send Email, which sends a configurable email to a list of recipients. Emails are sent using the first default SMTP notification server.

    • Submit Data, which runs the current dataset through the certification process.

  7. Set the specific properties depending on the selected automation type. See Configure a Send Email Automation or Configure a Submit Data Automation.

  8. Set the Transition properties:

    Table 2. Automation step transition properties
    Property Required Description

    To Step

    Required

    Step that should follow the current automation step.

    Label

    Optional

    Label displayed for the transition of the automation step. This label appears in the workflow diagram.

Configure a Send Email Automation

The following properties are available to configure a Send Email automation:

Table 3. Send Email automation properties
Property Required Description

Application

Required

Application that sends this email. The application branding is used in the layout of emails using the HTML - Preformatted content type.

Reply-To

Optional

Sender’s email address. If this property is not set, the From User property of the default SMTP notification server is used.

Sender Name

Optional

Sender’s display name.

Recipients

Required

List of email recipients. At least one recipient must be configured. See Email recipients.

Recipients Max Count

Required

Maximum number of recipients for an email (defaults to 1,000). If Fail On Error is selected and this maximum number is reached while building the list of recipients, the step fails and no email is sent. Fail On Error is not selected, emails are only sent to the first <Max Count> recipients and the step does not fail.

Custom Parameters

Optional

Allows defining parameters you can use in the email body. See Email parameters.

Subject

Required

Email subject line. It can use built-in and custom parameters. Click Open email editor Email editor to edit the subject line.

Content Type

Required

Defines the email body content type:

  • HTML - Preformatted: the value of the Body property is inserted in a preformatted layout with predefined styling and header. With this type, you must only provide the email content with simple HTML formatting.

  • HTML - Raw: the value of the Body property is used without any encapsulation or styling. With this type, you must provide the full HTML email payload in the body.

Body

Required

Email body. The body can contain built-in and custom parameters. Click Open email editor Email editor to edit the body.

Fail On Error

Required

Defines whether the step must fail if an error occurs while building the list of recipients or sending emails.

Email Recipients

You can define one or multiple recipient configurations for a Send Email automation. Each recipient configuration adds to the email one or multiple recipients.

To add a recipient configuration:

  1. Click the Add recepient Create button next to Recipients.

  2. Enter a Name for this recipient configuration and then click CREATE.

  3. Select a Type and then set the type-specific properties:

    • The SemQL - Emails type sends emails to a list of email addresses. This comma-separated list of email addresses is defined in the SemQL Expression property:

      Example. Add a list of emails (SemQL literal) to the recipients
      'adele.mackson@company.com,john.edelman@company.com'
    • The SemQL - Usernames type sends emails to a set of platform users identified by their usernames. This comma-separated list of usernames is defined in the SemQL Expression property:

      Example. Add a list of named users—​plus the initiator—​to the recipients
      'amackson,jedelman,' || WorkflowInstance.InitiatorName
    • The Users from Role type sends emails to all the users having a specific role. This role is defined using the Role property.

    • The Workflow Administrators type sends emails to all the workflow administrators. This includes:

      • Users having one role with Grant full access to the model selected in the model privileges.

      • Users having the role defined as the Workflow Administrator Role in the workflow definition.

Email Parameters

You can use email parameters in a Send Email automation step to insert dynamic content in the email subject and body.

Two types of parameters are available:

  • Built-in parameters are available by default and can be used without any configuration.

  • Custom parameters allow designers to insert specific content into emails, such as record chips or values calculated with SemQL.

You can select both types of parameters in the Email editor when composing the email subject and the body.

Built-in Parameters

The following table lists the built-in parameters.

Table 4. Send Email automation built-in parameters
Name Description

PARAM_B_RECIPIENT_FIRST_NAME

Current recipient’s first name.

This parameter returns a value only if the recipient is an xDM user; it returns an empty value if the recipient is added using a SemQL Emails recipient configuration.

PARAM_B_RECIPIENT_LAST_NAME

Current recipient’s last name.

This parameter returns a value only if the recipient is an xDM user; it returns an empty value if the recipient is added using a SemQL Emails recipient configuration.

PARAM_B_RECIPIENT_USERNAME

Current recipient’s username.

This parameter returns a value only if the recipient is an xDM user; it returns an empty value if the recipient is added using a SemQL Emails recipient configuration.

PARAM_B_SERVER_BASE_URL

Base URL of the xDM instance.

Custom Parameters

Custom parameters are configurable parameters that designers can use to define data-driven content to insert in emails.

To add a custom parameter:

  1. Click the Add custom parameter Create button next to Custom Parameters.

  2. Enter a Name for the parameter and then click CREATE.

  3. Select a Type and enter the related parameters

    • The SemQL type executes a SemQL expression and uses its value. If this type is selected, open the Open SemQL editor SemQL editor to define the expression.

      Example. SemQL custom parameter using the workflow initiator name
      'Initiated by ' || WorkflowInstance.InitiatorName
    • The Records (Chips) type shows records from the current dataset as chips. If this type is selected, set the following properties:

      • Entity: entity from which the record chips must be generated.

      • Max Record Count: maximum number of records to show. Defaults to 1 if the cardinality of the selected entity is Single Record in this workflow definition and to 10 if the cardinality is Multi Record.

      • Max Records Per Row: maximum number of chips per row in the generated email.

Email Editor

The Email editor allows editing the subject and body of emails.

Email editor window

The editor is organized as follows:

  • The left panel displays the Custom Parameters or Built-in Parameters. Double-click a parameter to add it to the condition or the expression.

    To switch between custom and built-in parameters, select the corresponding element in the action menu above the tree view. You can enter text in the input field to search among elements of the selected type.
  • Problems appear in the right bottom panel, showing parsing errors such as unknown parameters.

Below are examples of custom emails and subject lines that you can configure in the Email editor.

Example 1. Subject line featuring a custom parameter
{PARAM_C_WORKFLOW_INITIATOR}, a workflow has just been completed
Example 2. Email body using the HTML - Preformatted content type
<p>Dear {PARAM_B_RECIPIENT_FIRST_NAME},</p>

<p>The workflow {PARAM_C_WORKFLOW_DEFINITION_NAME} you initiated on {PARAM_C_WORKFLOW_START_DATE} has been successfully completed on {PARAM_C_SUBMIT_STEP_COMPLETION_DATE}.</p>

<p>The following records have been processed:
{PARAM_C_PROCESSED_RECORDS_CHIPS}</p>

<p><a href="{PARAM_B_SERVER_BASE_URL}/mdm-app/YourModelName/YourAppName/browsing/Entity">Open the product inventory</a>to view the updated records.</p>
Example 3. Email body using the HTML - Raw content type
<!DOCTYPE html>
<html>
<head>
    <meta ...>
    <style>
    ...
    </style>
</head>
<body ...>
    <table ...>
        <...>
<p>Dear {PARAM_B_RECIPIENT_FIRST_NAME},</p>

<p>The workflow {PARAM_C_WORKFLOW_DEFINITION_NAME} you initiated on {PARAM_C_WORKFLOW_START_DATE} has been successfully completed on {PARAM_C_SUBMIT_STEP_COMPLETION_DATE}.</p>

<p>The following records have been processed:<br>
{PARAM_C_PROCESSED_RECORDS_CHIPS}</p>

<p><a href="{PARAM_B_SERVER_BASE_URL}/mdm-app/YourModelName/YourAppName/browsing/Entity">Open the product inventory</a>to view the updated records.</p>
        </...>
    </table>
</body>
</html>

Configure a Submit Data Automation

The following properties are available to configure a Submit Data automation:

Table 5. Submit Data automation properties
Property Required Description

Integration Job

Optional

Job used to process the data submitted by the step. If no job is selected, then a job is generated depending on the root entity of the workflow.

After adding a submit automation step with no job selected, you must redeploy the related model to generate a job.

Submit User

Required

Name of the user (Username) that submits the data to xDM. This username can be used to log in to xDM. Open the Open SemQL editor SemQL editor.

For more information on all the attributes, see Workflow attributes.

Example. Submit with the user named 'semadmin'
'semadmin'
Example. Submit with the workflow initiator
WorkflowInstance.InitiatorName