Update

Article • 02.08.2022 • 5 minute(s) to read

Update

The Update Activity manipulates Entities directly in the Database. A SQL SELECT query is needed to select the unique IDs identifying the Entities to be manipulated. The new values for these Entities can either originate form the result of the SQL SELECT query, be directly specified or determined by a Process Context Expression.
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.
Update

Update 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

Specifies the SQL query to select the Entities and the updates done to the Attributes:

  • Sql query - The SQL SELECT query entered by clicking Edit, has to retrieve the IDs of one or more Entities to be edited. The query can also have additional result columns holding the new values for the Entities. Values in a specific row will be mapped to the Entity identified by the ID in this row.
  • 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 .
  • Entity type - The Type of the Entities that will be updated.
  • Entity Id column - Column in the SQL result holding the unique IDs of the Entities to be updated.
  • Attribute - column map - Mapping of the SQL result to Attributes of the be updated Entities. A mapping can be added by clicking Add:
    • Key - Entity Attribute name
    • Value - Name of the column in the SQL result holding the new value.
    • Each mapping can be removed by clicking on .
  • Set entity attribute values - This setting allows you to set Attributes of the Entities to values that are not part of the result of the SQL SELECT query. Instead, the values are entered directly or determined by a Process Context Expression. The assignments done here are applied after the results of the SQL SELECT query have been assigned. Hence, this section can overwrite the results from the SQL SELECT query. The assignments done here are applied to all Entities identified by the IDs loaded by the Sql query, i.e., to all rows of the SQL result.
    • Key - Entity Attribute name
    • Value - Value entered directly or determined by a Process Context Expression
    • Each assignment can be removed by clicking on .