Summary

This block is used to add a category in the CategoryService.

 

Implementation

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

 

Example

This block is triggered based on a Node (the origin). A category is built with the name of the Node. The category index is set from the tag "b:categoryIndex".

 

 

 Properties

  • Artifacts: Artifacts created by this block
    • Category: category created in the CategoryService
  • CategoryName: SFormat to define the name of the category. Ex: hvac
  • Mode { Union, Intersection}: The category mode to create
  • IndexPolicy {First Available Index, Increment Last Index,  Fixed Index}: Define how the category index should be handled since this index should unique.
    • First Available Index: The block will look through all the existing categories and pick the first available index
    • Increment Last Index: The block will find the category which has the highest index and increment it for the new one.
    • Fixed Index: The block will set a fixed index defined in the Fixed Index slot. It's better to use a fixed when you want to have the same indexes on all of your stations because you share users and don't want to re-configure them on each station because the same categories have different indexes. Ex: You can use a tag to define the index.
  • FixedIndex: SFormat to define the category index.

AdvancedConfig

  • IndexUpdatePolicy {Ignore ; Update}:
    • Ignore: If the category is updated by the block, its index won't be changed. Ex: you want to control yourself your category indexes on the category itself.
    • Update: The category index will be updated even if the index has been changed manually. Ex: you updated the tag that was used to define the index, therefore the category index should be updated.

Note

A relation "b:category" is created between the origin of the strategy and the category. So you can reuse it later to retrieve the category easily. See AssignRoleToUser.


Behavior: DO

The category is created in the CategoryService.

 

Behavior: REDO

The category index might be updated depending on the IndexUpdatePolicy

Behavior: UNDO

The category is removed from the CategoryService.