Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Invoke Web API Activity

  • Last UpdatedJun 21, 2024
  • 3 minute read

Activity Description:

You can use the Invoke Web API Activity to invoke a web API from the workflow. Use the output of the activity to determine the path of workflow execution.

The output is triggered based on the http Status Code returned by the activity. Alternatively, the output Status Code can be saved in a System variable.
The variable has to be prefixed with "^" followed by "Activity Name _StatusCode". For example, if the activity name is Invoke Web API1, then variable name should be "^Invoke Web API1_StatusCode" and the data type should be "string".

The Error Message can be saved in the System variable.
The variable has to be prefixed with "^" followed by "Activity Name _WebAPIErrorMessage". For example, if the activity name is Invoke Web API1, then variable name should be "^Invoke Web API1_WebAPIErrorMessage" and the data type should be "string".

The additional error information (i.e. http custom content message) can be saved in the System variable.
The variable has to be prefixed with "^" followed by "Activity Name _WebAPIErrorDetails". For example, if the activity name is Invoke Web API1, then variable name should be "^Invoke Web API1_WebAPIErrorDetails" and the data type should be "string".

You can use any HTTP client to invoke your web API. In fact, you can invoke it directly from a web browser. When the Web API framework receives a request, it routes the request to an action. To determine which action to invoke, the framework uses a routing table.

Activity Properties:

Specify correct values for the different properties in the Activity Properties area to configure the Invoke Web API activity.

To access the activity properties, click the Activity Properties tool in the Tool Bar or by select the appropriate option from the context menu for the Invoke Web API activity. The Activity Properties are organized under the following groups of related properties. The properties under each group are described in this topic.

Name & Description

Use the Name and Description properties to enter the the name and description for the activity. This property is optional, and can be set if required.

  • Name: Specify a name for the activity.

  • Description: Specifies a brief description to be displayed for the activity.

Configuration

Use the configuration properties to configure the functionality of the activity.

Configure Web API: Use this property to configure the Web API to be called. Web APIs are frameworks to build HTTP services for browsers and mobile devices.

For more information about this activity property, see Configure Web API.

Exception Behavior

Each activity has the Raise Error on Unhandled Linked Output property. Configure this property to raise an error if the output is not linked to the next activity in the workflow. You can also use this property to define and configure email templates and users for the exception mails. This property is optional, and can be set if required.

See Mapped Error Outputs for more details.

Looping Behavior

Use this property to specify the looping behavior of the activity. This property is optional, and can be set if required.

Loop through this action if output is: Specify the condition for looping the activity. Select any one of the following activities from the list:

  • No Loop

  • BadGateway(502)

  • BadRequest(400)

  • Error Encountered

  • Forbidden(403)

  • GatewayTimeout(504)

  • HttpVersionNotSupported(505)

  • InternalServerError(500)

  • MethodNotAllowed(405)

  • NotAcceptable(406)

  • NotFound(404)

  • NotImplemented(501)

  • ProxyAuthenticationRequired(407)

  • RequestTimeout(408)

  • ServiceUnavailable(503)

  • Successful

  • Unauthorized(401)

  • Unsuccessful

  • UnsupportedMediaType(415)

In This Topic
TitleResults for “How to create a CRG?”Also Available in