Tool Descriptor

Tools are central to an AWM model. Tools are defined by a function package and provide the functionality which can be used in actions of the model. An action always consists of a sequence of tools. Every tool returns a tool execution code. When the tool execution code is higher than the maximum permitted return code specified under Application Options, the action is terminated.

The input and output parameters of a tool have to be modelled. This enables the tools of an action to exchange information. The value of an output parameter of a tool can be used as input value for a subsequent tool in the tool chain of an action.

The idea is to write tools in an atomic and modular way, encapsulating a specified functionality so that a tool can be reused in various action contexts.

AWM provides two features to control the tool execution within an action:

By default, the execution of a tool is a black box process. In certain cases a tool might need to affect the AWM resource(s) on which it is applied. For example, a deletion tool that removes the AWM resource from the AWM cash. AWM provides the resource processing concept to support this requirement which would be modeled using the ResourceProcessing attribute of a tool.

The following rules apply for resource processing:

The following resource processing can be modeled for a tool descriptor:

Resource Processing Description
COPY Creates a new element based on the selected element. All the property values are copied first. Property values returned by the tool are assigned to the copied resource. The copied element is inserted into the Application Explorer or Table Results view. In the tree view the element is inserted on the same hierarchical level as the selected element.
DELETE Removes the selected elements from all lists. It does not necessarily mean that the elements are deleted in the attached application system. This depends on the modeled tool. Supports deleting specific elements if their key properties and match name are returned with the resource processing.
INSERT Inserts a new element into the Application Explorer or Table Results view. In the tree view the element is inserted on the same hierarchical level as the selected element.

If an element with the same ID already exists, an UPDATE is performed instead.

INSERT-CHILD Inserts a new element as a child of the current selection. Works only if the selected resource is able to have children, such as an element that has a "Get Children" action and is only relevant for the Application Explorer view. If an element with the same ID already exists, an UPDATE is performed instead.
MOVE Creates a new element based on the selected element. All the property values are copied first. Property values returned by the tool are assigned to the copied resource. Then it removes the selected element from all lists. It does not necessarily mean that the element is deleted in the attached application system. This depends on the modeled tool. The new element is inserted into the Application Explorer or Table Results view. In the tree view the element is inserted on the same hierarchical level as the selected element.
READ Standard value. Does not make any changes to elements.
REFRESH Updates all property values of the selected element by means of the "GetAllProperties" action assigned to the element type. If you want to refresh an element directly after inserting an element, you should use the "Refresh Resource" attribute of the tool descriptor instead.
UPDATE Updates the selected element with the values returned by the tool. Key property values cannot be updated. Supports updating specific elements if their key properties and match name are returned with the resource processing.
TOOL_DEFINED The rules about which element operations are to be used for this tool descriptor are set in the attached tools and not in the model. This makes dynamic implementation of resource processing possible. It also allows for dealing with more than one resource. See Tool-defined Resource Operations for more information.

The attributes which are displayed for a tool descriptor in the model editor depend on the tool description in the corresponding function package.

Like all attributes, clicking on an attribute in the Properties view should show a short description at the bottom of the window. Opening the contextual help page with the tool descriptor selected (default key: F1) will display the help page for the tool with additional information.

Note: If a tool was developed by a third-party supplier, the tool descriptor may not have a contextual help page associated with it.

Attributes that are valid for all tool descriptors are listed in the table below:

Attribute Type Description
ID * ID * The ID of the tool descriptor.
RefreshResource Boolean Indicates whether the element should be updated after successful execution of the tool. This means that the "GetAllProperties" action of the element is always called after a successful execution of the tool. See Get All Properties Action for more information.  

The default value is false.

ResourceProcessing Selection Defines the impact on AWM resources the tool expects from AWM after a successful execution of the tool.

Valid values include:

  • COPY
  • DELETE
  • INSERT
  • INSERT-CHILD
  • MOVE
  • READ (default value)
  • REFRESH
  • TOOL_DEFINED
  • UPDATE
In Parm Separator [O] String Separator used to separate input parameter values for command based tools. Can be entered with double quotes, which are removed at run time.  

The default value is " " (Blank).

Out Parm Separator [O] String Separator that parses returned output parameter values from command based tools. Can be entered with double quotes, which are removed at run time.  

The default value is " " (Blank).

Relationship Cardinality Description
Has Input Parameter 0..* Relationship to a property. The property value is passed as an input parameter to the tool.
Has Output Parameter 0..* Relationship to a property. The value returned by the tool is mapped to the modelled output parameter property.

Tool Parameters

Tools typically support input and/or output parameters modelled as a Tool_Has_Input_Parameter or Tool_Has_Output_Parameter relationship.

The parameter types and number of mandatory or optional parameters are determined by the tool definition. Mandatory parameters will be created automatically by AWM, while optional parameters can be created manually.

Some tools may have additional children, which are referred to as complex attributes.

Note: Legacy tool descriptor types, which have been specified with the deprecated API from version 4.0 or earlier, are unable to define valid parameter types. To resolve this issue, you can add generic parameter types in the model editor.

Examples

The SVN_TOOL_SVN_AddRepository tool adds a new SVN repository location.


Add repository tool

Add repository properties
Attribute Value Description
Essential:
ID SVN_TOOL_SVN_AddRepository Unique identifier of the tool in this model.
Optional:
Help Text --- Not relevant for this tool type.
In Parm Separator " " Input parameter for the tool are separated by blanks.
Out Parm Separator " " Output parameter for the tool are separated by blanks.
Resource Processing:
Refresh Resource false The GetAllProperties action should not be called after the successful execution of this tool.
Resource Processing INSERT_CHILD The new repository location returned by the tool is inserted as child entry in the tree below the resource from where it was called.

Tool SVN_TOOL_SVN_DiscardLocation. This tool discards an SVN repository location.


SVN Tool to discard repository location

SVN Tool properties to discard repository location
Attribute Value Description
Essential:
ID SVN_TOOL_SVN_DiscardLocation Unique identifier of the tool in this model.
Optional:
Help Text --- Not relevant for this tool type.
In Parm Separator " " Input parameter for the tool are separated by blanks.
Out Parm Separator " " Output parameter for the tool are separated by blanks.
Resource Processing:
Refresh Resource false The GetAllProperties action should not be called after the successful execution of this tool.
Resource Processing DELETE The selected SVN repository location is deleted from the UI after successful execution of this tool.