Delete
The Delete Activity deletes Entities from the Database. Entities are only deleted if there are no Entity Variables using them. If you try to delete an Entity in use by an Entity Variable, the Instance will fail. Furthermore, Entities that are referenced by other Entities cannot be deleted. This means, that the reference or the referencing Entity has to be deleted first or the Instance will fail.
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 totrue
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 totrue
are followed.
Delete
Delete 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
The settings determine what Entity should be deleted.
- Use Sql - If this is set to Yes, a SQL
SELECET
query is used to determine witch Entities are deleted. All Entities returned by the query will be deleted. I.e., a list of Entities can be deleted at once.- Sql query - The SQL
SELECT
query can be entered by clicking Edit. The query must return at least one column holding the ID of the Entity to be deleted. - 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 .
- Key - Name of the parameter used in the SQL
- Entity Id column name - Name of the column in the SQL result holding the ID of the Entity to be deleted.
- Sql query - The SQL
If Use Sql is set to No, the Entity to be deleted can be specified via its Entity Type and ID or unique value:
- Entity type - Type of the Entity to be deleted. Must be specified.
- Mode - This specifies how the Entity is identified:
- Entity Id - Specifies the Entity by its ID. The field Entity Id allows you to specify an Entity ID directly, or to determine it with a Process Context Expressions.
- Unique Value - When the Entity in question has an Attribute that is subject to a unique constraint, this Attribute can be used to identified the Entity:
- Attribute - Specifies the name of the unique Attribute used to select the Entity to be deleted.
- Value - The Entity with this value will be deleted. The value can be specified directly, or it can be determined by entering a Process Context Expressions.
- Child entities - If the Entity you are deleting holds a reference to an second Entity in one of its Attributes, you can delete this second referenced Entity with this option. This option is only available if Use Sql is set to No.