Skip to content

Delete Storable

Maikel-Shinoda edited this page Jan 2, 2024 · 1 revision

Figure 1: Delete Storable The Delete Storable object is a Modeling Block to delete existing Storable instances. Dragging a Delete Storable object into a Workflow you can configure it to delete the Sorable instance given with the Input Parameter. Therefore this instance has to provide at least the Storable instance's Unique Identifier.

Table of Contents

Add a Delete Storable to the Workflow

To insert a Delete Storable object into a Workflow, drag the Delete Storable symbol out of the icon bar.

Configure a Delete Storable

The Delete Storable has two Input Parameters:

  • Storable: Parameter for the Storable instance, that has to be deleted.
    Please note: The passed instance will be deleted based on its Unique Identifier.
  • Delete Parameter: These parameters define how to deal with historization and referenced objects when deleting.
    • Including history: Can take the values true and false. Specifies if potentially historized instances shall be deleted as well. The default value is false.
    • Reference handling: Specify how referenced Storable instances shall be dealt with.
      • Backward: Concerns all instances referencing the to be deleted instance. Possible values are:
        • cascade: Each referencing instance will be deleted as well.
        • error: A failure occurs when a reference to the to be deleted instance exists. This is the default setting.
        • delete: Only the to be deleted instance will be deleted, each referencing instance will be kept.
      • Forward: Concerns all instances referenced by the to be deleted instance. Possible values are:
        • recursive: Each referenced instance will be deleted as well.
        • keep: Only the to be deleted instance will be deleted, each referenced instance will be kept. This is the default setting.

Example

If there is a Data Type Device inheriting from xnwh.persistence.Storable, it is not possible to delete all Device instances with the value 1.1.2 as firmware version in one step. To receive the appropriate Unique Identifier of such an instance, you therefore first have to execute a Query Storable with these filter criteria. Iterating the result list and executing a Delete Storable for each filtered Device will do the job.

See Also

Clone this wiki locally