Create

Article • 02.08.2022 • 5 minute(s) to read

Create

This Activity creates new Entity Variables and initializes them with the specified values in their Attributes. While it is possible that Create also writes values in the Attributes of the created Entity Variable, this can obviously also be done later by other Activities.
This Activity can have an arbitrary amount of Outcomes, but all Outcomes must have the same name. The script of each Outcome is evaluated once the Activity has completed. Each Outcome with a script evaluating to true is followed. If more than one Outcome script evaluates to true, the Instance is paralleled. If no Outcome script evaluates to true, the Instance is ended by entering the closed-state.

Activity config

General
General
  • Name - Name of the Activity.
  • Version - Version of this Activity used in the Process. If a new version of this Activity is available and you want to use it, you have to manually update the version here. When a new Activity is added to the Process, automatically the latest version is placed.
  • Timeout in second - Once this time is elapsed, the Activity is closed and the Instance changes into the faulted-state. The default Timeout is two minutes. The timeout can be shortened and extended by entering a custom duration. If the Activity is left after a timeout, the first Outcome is followed. If multiple Outcomes have the same name as the first Outcome, all of them are followed. However, a continuation after a timeout does not effect the Outcome Scripts, meaning only Outcomes with Outcome Scripts evaluating to true are followed.
  • Hide in process graph - Controls if the Activity is hidden (Yes) or shown (No) in the Process Graph on the Execution Screen.
  • Continue on error - If this is set to Yes, the execution of the Instance continues even if the Activity failed. If set to No, the Instance fails when the Activity fails by entering the faulted-state. In the case of a continuation after an error, the first Outcome is followed. If multiple Outcomes have the same name as the first Outcome, all of them are followed. However, a continuation after an error does not effect the Outcome Scripts, meaning only Outcomes with Outcome Scripts evaluating to true are followed.
Create

Create Activity specific configurations

GENERAL

General interaction configuration, shared with most other Activities

  • Disable activity - Disables (Yes) or enables (No) the Activity. When disabled, the Activity is not executed and passed like a Connection by following the first Outcome. If multiple Outcomes have the same name as the first Outcome, all of them are followed. Disabling the Activity does not effect the Outcome Scripts, i.e., still only Outcomes with Outcome Scripts evaluating to true are followed.
  • Retry on error - If set to Yes, an automatic retry is executed up to ten times. If set to No, no retries are done. Retries are issued when the Activity failed so that the Instance would enter the faulted-state if the retry is disabled.
  • Additional text for task list - Description of this Activity shown to the Users in their task list. You can enter this text directly or use Process Context Expressions to compile it.
SETTINGS

Specification of the Entity Type of the new Entity Variable and the Attributes that will be initialized with values. The configuration is executed in the order as of:

1. Map context to entity variable or Use Sql
2. Set entity attribute values

While it is not possible to access the set values in the same Activity, the order of the configuration can be used to overwrite values. I.e., the Set entity attribute values configuration can overwrite Attribute values set by Map context to entity variable or Use Sql, but it cannot read them.

  • Entity type - Sets the Entity Type of the new Entity Variable. If no Entity Type is selected, no new Entity Variable will be created.

  • Map context to entity variable - Here you can entered the name of an existing Variable to copy over its Attributes into the newly created Entity Variable:

  • Set entity attribute values - Here the Attributes of the newly created Entity Variable can be set. Each attribute has to be set in a separate row. You can add a new row by clicking Add:

    • Key - Full name of the Attribute, i.e., Variable name followed by a dot and then the Attribute Name.
    • Value - Value of the Attribute, entered directly or determined by a Process Context Expression.
    • Each row can be removed by clicking on .
  • Use Sql - When set to Yes, the Attributes of the created Entity Variable can be initialized with the results of an SQL SELECT query:

    • Sql query - The SQL SELECT query can be entered by clicking Edit. The SQL SELECT query has to return one result row. If the SQL SELECT query returns more than one row, only the last row is used. Parameters have to have a leading @ in the SQL SELECT query.
    • Parameters - By clicking Add, you can map a fixed value or the result of a Process Context Expression to the Parameters used in the SQL SELECT query:
      • Key - Name of the parameter used in the SQL SELECT query without the leading @.
      • Value - Value of this parameter. You can enter the value directly or use a Process Context Expression to determine it.
      • Each mapping can be removed by clicking on .
    • Attribute - column map - Mapping of the SQL result to Attributes of the created Entity Variable. If the SQL result has multiple rows, only the last row is mapped and the previous ones are omitted. However, the SQL result can have multiple column and each column has to be mapped individually. By clicking Add, you can create a new mapping:
      • Key - Entity Attribute name
      • Value - Name of the column in the SQL result
      • Each mapping can be removed by clicking on .
  • Variable - Name of the the created Entity Variable