Previous Topic Next topic Print topic


Tool-defined Resource Operations

Unlike static resource operations such as UPDATE or DELETE, tool-defined resource operations can be dynamically returned by a tool. There are only two reasons for using a tool-defined resource operation instead of a static one:

Examples

  • A tool Check Out Member either updates an element if it already exists in the application's development stage (UPDATE) or copies a file into the application's development stage (INSERT).
  • The toolBuild Member creates several build output files (multiple INSERT resource operations).
Configuring a tool-defined resource operation in the model requires the following:
  • The Resource Processing attribute of the tool descriptor must be set to TOOL-DEFINED.
  • Properties returned by the resource operation must be modeled as output parameters of the type ToolDefinedResourceOperation.

The resource operations to be processed by AWM are returned by the tool at run time by using specific syntax:

operation(refid,REFRESH,SELECT): properties

See the table below for more information.

Example

UPDATE-ELEMENT(DDLOCK): SCLM,DEV1,SOURCE,TESTRP1, 2014/03/21 09:16:28

This resource operation updates the changed date and time of an SCLM element with the ID SCLM_DEV1_SOURCE_TESTRP1 and saves the properties in a separate context. This element can be accessed by follow-up tools by the logical name DDLOCK.

Keyword Description
operation * The resource operation to be executed.
Valid values include:
  • INSERT-ELEMENT
  • INSERT-CHILD
  • REMOVE-ELEMENT
  • UPDATE-ELEMENT

The values are equivalent to the static resource operations INSERT, INSERT-CHILD, REMOVE and UPDATE.

refid [O] A reference ID, which is a logical name that creates a separate context that can be accessed by other tools within the action. Properties returned by this resource operation are stored in the separate context instead of the main context.

Any following tools of the action that have the reference ID modeled as Affected Resource Name (relationship Action has Tool) use that separate context. See Relationship: Action has Tool for more information.

REFRESH [O] Determines whether to execute the Get All Properties action of the element. This action is executed directly after the tool that returned this resource operation.
SELECT [O] Selects the element in the view where the action was executed. Only relevant if the properties of the resource operation contain a valid element ID (combination of ID definition properties). See ID definition for more information.
properties Depending on the resource operation, the following rules apply to tool output parameters:
  • INSERT-ELEMENT and INSERT-CHILD

    Requires all key properties of the element that should be created and the match name property. If the returned ID exists, an UPDATE is performed instead. Additional regular properties are added to the inserted or updated element.

  • REMOVE-ELEMENT

    Depending on whether key properties and the match name property are returned by the resource operation, either the corresponding element or the selected one is removed.

  • UPDATE-ELEMENT

    Only updates properties returned by the resource operation. Key properties update a specific element. Without key properties, the selected element is updated.

Returned resource operation properties must be modeled as output parameters of the type ToolDefinedResourceOperation.

Previous Topic Next topic Print topic