Clone

Article • 02.08.2022 • 4 minute(s) to read

Clone

This Activity clones Entity Variables. Consequently, also the underlying data in the Database is cloned. The Clone Activity can only operate on Entity Variables and not on Context Variables.

When the Entity Variable you are cloning has one or more Attribute with a unique constraint, you have to overwrite these Attributes to satisfy the unique constraint. This can either be done in the original Entity Variable with Set source entity attribute values or in the new cloned Entity Variable with Set clone entity attribute values.

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
  • 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.
Clone

Clone 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

Cloning configuration

  • Entity type - Type of the Entity Variable to clone and consequently also the Type of the cloned Entity Variable.
  • Source entity - Entity Variable to clone
  • Attribute name to store source entity Id - If you want to store the ID of the original Entity Variable in an Attribute of the cloned Entity Variable, you have to enter the name of the Attribute here. If this option is empty, the ID is not stored in an Attribute of the cloned Entity Variable.
  • Set clone entity attribute values - Specifies Attributes that are overwritten in the cloned Entity Variable. You can add attributes to be overwritten 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 .
  • Set source entity attribute values - Specifies Attributes that are overwritten in the source Entity Variable after the clone has been created. You can add attributes to be overwritten 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 .
  • Variable - Name of the new cloned Entity Variable.