MIM Functions

The MIM functions allows the agent to publish its own MIM values or to read MIM values from other agents.

Note!

The MIM functions cannot be used within global APL scripts, that is in code saved in the APL Code Editor.

The following functions for OAuth described here are:

mimGet

Returns the value of a MIM resource available in the workflow.

any mimGet ( string category , string mimResourceName );



Parameter

Description

Parameter

Description

category

Name of the agent or workflow owning the MIM resource

mimResourceName

Name of the MIM resource whose value is to be returned

Returns

MIM value as any type. The result always needs to be type casted or else compilation fails



Example - Using mimGet



mimGet("Workflow", "Batch Count"); // Retrieving a MIM resource owned by the workflow. mimGet("Disk_1", "Source File Count"); // Retrieving a MIM resource owned by the agent "Disk_1".



mimIsNull

Evaluates if a MIM resource is defined. Available to evaluate MIMs of non-object types, such as int.

boolean mimIsNull ( string category , string mimResourceName );



Parameter

Description

Parameter

Description

category

Name of the agent or workflow owning the MIM resource.

mimResourceName

Name of the MIM resource to look for.

Returns

true or false.

mimPublish

Publishes a MIM resource. The method call can only be used outside a function block.



Parameter

Description

Parameter

Description

assigned

Keyword that identifies when the MIM resource is assigned a value. Can be one of:

  • batch - Value is assigned from the consume block.

  • header - Value is assigned in the beginBatch block.

  • trailer - Value is assigned in the endBatch block.

  • global - Value is assigned from any block.

name

MIM resource name. Must be a string constant.

mimType

Data type of MIM resource

Returns

Nothing



Note!

Real-time workflows can only publish MIMs of type global.

mimSet

Assigns a value to a user defined MIM resource. The function may be called at any time. Note that it is the responsibility of the user to make sure the MIM value is available in accordance with the specified assigned type (refer to the section above, mimPublish).



Parameter

Description

Parameter

Description

name

Name of the MIM resource to assign a value

value

Value to assign - must match the published MIM type

Returns

Nothing

MIM Example