Relationship: Element Has Action

Using the element has action relationship, an element type can be assigned actions that can be executed on elements of this type. Action descriptors referenced using this relationship appear in the context menu of all elements of this element type, but could also be deactivated there. An action Enabled or Visible condition determines when an action should be shown or activated. See Enabled/Visible Condition for more information.

Note: You should not create more than one relationship to the same action descriptor from an element type. Doing so results in a validation error and unexpected behavior at runtime.

Attribute Type Description
TargetID * ActionDescriptor The reference to the action descriptor.
ActionVisibleCondition ActionVisibleCondition This complex attribute lets you define the rules for when an action should be shown in the context menu of an element.
ActionEnabledCondition ActionEnabledCondition This complex attribute lets you define rules to specify when the action is activated. Non-activated actions are disabled, and cannot be executed by the user.
Default_Action [U] Boolean Defines whether this action should be carried out by a double-click on the element or by pressing the enter key when an element is selected. In the Application Explorer view the element type “Get Children” action is executed if it exists and if no default action is configured. In the case of a multiple selection, the default action is executed for each selection. Mass processing is not supported. If more than one action of an element type is set as “default action”, the first applicable action depending on the enabling conditions is executed.  

The default value is false.

Label [O] String Labeling of the action in the context menu. If no label is stated, the label of the referenced action descriptor is used.
Separator_After Boolean Determines whether to insert a separation line behind the context menu entry.

The default value is false.

SeqNo Integer The Position Number of the action in the context menu of an element.
Show_In_Table_View Boolean Determines whether the referenced action should display in the Table Results view context menu.
Show_In_Tree_View Boolean Determines whether the referenced action should be displayed in the Application Explorer view context menu.

Examples


Element Has Action

Element Has Action Properties
Attribute Value Description
Essential:
Seq No 1 This is the first AWM action added to the context menu of an element of element type SCLM_ELE_Editable.
Taget ID Reference to the action SCLM_ACT_CheckOut This context menu action references the SCLM check out action.
Optional:
Default Action false Specifies that this is not the default action of an element of element type SCLM_ELE_Editable.
Label Check-Out "Check-Out" is shown in the context menu of an element of element type SCLM_ELE_Editable for this action.
Separator After false There is no separator in the context menu after this action's label.
Show In Table View true This action's label is shown in the context menu of the Table Results view when an element of element type SCLM_ELE_Editable is selected.
Show In Tree View true This action's label is shown in the context menu of the Application Explorer view when an element of element type SCLM_ELE_Editable is selected.

The relationship between the element type SCLM_ELE_Editable and the action SCLM_ACT_CHECKOUT has a complex Enabled condition defining that the action is only enabled in the context menu when there is not already a SCLM access key on the selected element and the selected element is a SCLM source element, this means it is not read-only.