This documentation supports the 9.1 version of Remedy Action Request System.

To view the latest version, select the version from the Product version menu.

Automation action and structures

The Automation active link action enables a Windows client to control Automation servers on the same computer, accessing the data and methods that those servers make available.

The ARAutomationStruct structure (see the following figure) defines an Automation action.

Structures used to define automation action 

 

The ARAutomationStruct structure has the following elements:

Server Name

String that specifies the name of the Automation server, length limited by AR_MAX_COM_NAME (64 bytes).

Class ID

String that specifies the unique ID assigned to this server in the registry, length limited by AR_MAX_COM_ID_SIZE (128 bytes).

Action

String that specifies the equation defined by this action, including nested methods and the assignment if any. For example:$Status$ = MethodA().MethodB(MethodC()) This string is used only for display and is limited by AR_MAX_AUTOMATION_SIZE (2000 bytes).

Visible

Not used. Specify 0 (zero).

Methods

List of methods called by this active link action, specified in an ARCOMMethodList structure. List the methods in execution order. For example, if Method B is passed as a parameter to Method A, list Method B first so that its result value is available when Method A is called.

Each method in an ARCOMMethodList structure uses the ARCOMMethodStruct structure (see the following figure).

Structures used to define OLE automation method 

 

The ARCOMMethodStruct structure has the following elements:

Name

Method name, length limited by AR_MAX_COM_METHOD_NAME (128 bytes).

Interface ID

ID of the interface that owns the method, length limited by AR_MAX_COM_ID_SIZE (128 bytes).

Type

Type of value returned by the method, if any. Possible values are all OLE variant types.

Value

BMC Remedy AR System field to set to the method's return value, if any. This is specified in an ARCOMValueStruct structure (see the following figure).

Parameters

List of parameters passed to this method, specified in an ARCOMMethodParmList structure.

Each parameter in an ARCOMMethodParmList structure is specified in an ARCOMMethodParmStruct structure (see the following figure), which has the following elements:

Name

Name of the parameter.

Type

Data type of the parameter. Possible values are all OLE variant types.

Value

Value of the parameter, specified in an ARCOMValueStruct structure.

The value returned by a method and the value passed in a parameter are each specified in the ARCOMValueStruct structure (see the following figure).

Structures used to define OLE method and parameter values 

 

The ARCOMValueStruct structure has the following elements:

Interface ID

One of these values:

  • When this structure defines the return value of a method, specify the ID of the interface returned by the method.
  • When this structure defines the value of a parameter that is an OLE interface, specify the ID of that interface.
  • Otherwise, specify NULL.

Transient ID

Link between a method that takes another method as a parameter to the method used as the parameter. For example, Method A takes Method B as a parameter. Use the same integer for the ARCOMValueStruct structure that defines the return value for Method B as you do for the structure that defines the parameter value of Method A.

Value Type

Integer that specifies the type of value represented by the structure (see the following table). For Value Type 0, set the other elements of the structure to NULL or 0.

Field ID/Value

Union that defines the field ID or value, depending on the Value Type:

  • Value Type 1--ID of the field to set to the return value of this method or to pass as this parameter, specified in an ARInternalId structure.
  • Value Type 2--Value to pass as this parameter, specified in an ARValueStruct structure.

Method return value types for ARCOMValueStruct

0

AR_COM_METHOD_NULL

No value returned for this method.

1

AR_COM_METHOD_FIELDID

Set the specified field to the value returned by this method.

Parameter value types for ARCOMValueStruct

0

AR_COM_PARM_NULL

No value for this parameter.

1

AR_COM_PARM_FIELDID

Pass the specified field as the parameter.

2

AR_COM_PARM_VALUE

Pass the specified value as the parameter.

Was this page helpful? Yes No Submitting... Thank you

Comments