Summary

This block is used to add a component in a target.

 

Implementation

  • Drag and drop the block from the palette
  • Link the "execute" action from the "executed" topic of the previous block

 

Example

This block creates a synthesis (a SmartStatus from btibToolkit) and put it in the origin of the event (which is a node representing a building).

 

 Properties

  • Artifacts: Artifacts created by this block
    • Added: component created. Ex: the SmartStatus added in the target (HQ Synthesis)
  • Target: SFormat to define the parent of the component to add. Ex: the origin of the event: a building (HQ)
  • SlotName: SFormat to define the name of the component to add. Ex: the display name of the origin of the event (HQ) followed by "Synthesis": HQ Synthesis
  • Policy {AddOnlyIfNotExists, AddAlways, AddOrMerge, AddOrReplace}: Define the behavior of the component to add if it already exists:
    • Add only if not exists: nothing will happen if a slot already exists with the same name in the target
    • Add always: it will add a suffix number after the slotName like HQ Synthesis1, HQ Synthesis2... for each execution of the block
    • Add or merge: it will recursively merge properties from the value to the existing component. Ex: if a property of the SmartStatus is updated in the bog file. This policy will apply the change in the HQ Synthesis
    • Add or replace: the existing component is removed before the new one is added
  • Value: Define the component to add in the target. See General strategy parameters. Ex: a SmartStatus is extracted from a resource which is a bog file

 

Behavior: DO

A component is added in a target.

 

Behavior: UNDO

The added component is removed from the target. 

(warning) A component can be added by several pairs of block-origin. It will be removed only if all pairs block-origin are undone.

Example: A block creates a General console and use a policy "Add if not exists". Several Nodes triggers this same block but only one console is created. Removing some Nodes will not remove the console as long as one of these Node still exists.