Previous Topic Next topic Print topic


Tool with Resource Processing

After a tool's successful execution, certain processing should be applied to given resources in the UI. This is known as resource processing. An example of this is that after the execution of a deletion tool, the deleted element should be removed from the UI.

In some situations, the resource processing after the successful execution of a tool is unique and can be directly modelled by the AWM model administrator. For example, the resource processing of a deletion tool should be delete, the resource processing of an insertion tool should be insert.

There are other situations when the resource processing depends on the tool's execution logic. In these situations, only the tool can decide what resource processing should be done after the tool's successful execution. For these situations, the resource processing would be tool_defined.

There is a defined protocol for how the tool can inform AWM which resource processing measures should be taken after its successful execution.

The following table shows some typical use cases for the resource operation usage in a tool definition.

Resource Operation Use Case
COPY Copy a member of a PO data set.
DELETE Delete a member of a PO data set.
INSERT Insert a new member in the TD Table view.
INSERT-CHILD Insert a new PO member into a PO data set.
MOVE Move a member of PO data set is moved to another PO data set.
READ Perform no changes to resource attributes, for example browse of a PO member.
REFRESH Change some attributes of a resource, for example edit of a PO member.
UPDATE Change some attributes of a resource. In this case, the tool must return all attributes that should be updated in the UI. An example of this is a tool that changes the change code of a source where the change code is one of the attributes of the element visible in the UI.
TOOL_DEFINED Get results in different effects on the UI. An example if this is a tool that gets a function code and, depending of the function code, deletes or inserts an element.

In some scenarios, the resource operation returned by a tool should not be applied to the selected resource, but to another resource, such as a resource that was created by the action. In this type of scenario, the tool must return a link name to the newly created resource with the resource operation. Another tool in the action's tool chain can refer to this link name by the attribute Affected Resource Name in the relation between action descriptor and tool descriptor.

TOOL_DEFINED resource processing use case example

Consider a somewhat sophisticated use case sample for the usage of TOOL_DEFINED resource processing.

The example scenario involves checking out an element from a remote SCM system and creating a local file for a later local edit action. In the UI, the checkout can be done either on a life cycle level from where the element can be edited, or on a higher life cycle level from where the element must be drawn down on an editable level before checkout. The graphics in the following are taken from the corresponding action in the SCLM model.

The action consists of two tools. The first tool does the checkout processing inclusively the draw down if necessary. The second tool is the tool "Create Persistent File" from the AWM function package.

The action is modelled like this:

The tool SCLM_TOOL_ISPF_REX_CheckOut gets the key properties of the SCM element to be checked out as element input parameter. It has to return all properties to be changed as element output parameters.

The graphic below shows how the tool SCLM_TOOL_ISPF_REX_CheckOutis modeled in the AWM SCLM model:

The resource operation is tool-defined because the resource processing depends on whether or not the element has to be drawn down.

If the element is already on a level to be directly edited, the tool SCLM_TOOL_ISPF_REX_CheckOut has to return the resource operation UPDATE-ELEMENT(CHKOUTELE). This means that the selected resource is updated in the UI by the property values returned by the tool.

If the element has to be drawn down to a level from where it can be edited, the tool SCLM_TOOL_ISPF_REX_CheckOut has to return the resource operation INSERT-ELEMENT(CHKOUTELE,REFRESH,SELECT). This means that a new element is inserted in the UI with the property values returned by the tool. The properties returned by the tool must at least comprise all the key properties for the element to be successfully created. SELECT means that the element is selected in the UI after the execution of the action.

CHKOUTELE is an element reference needed by the subsequent tool SCLM_TOOL_AWM_LocalFileCreator.

This element reference has to be entered under Affected Resource Name in the relation between the action SCLM_ACT_CheckOut and the tool SCLM_TOOL_AWM_LocalFileCreator, as shown in the following graphic:

Previous Topic Next topic Print topic