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

AVEVA™ Work Tasks

InvokeWebService Activity

  • Last UpdatedJul 01, 2024
  • 5 minute read

Activity Description

The Invoke-Web-Service Activity can be used to invoke a web service from the workflow. The output of the activity can be used to determine the path of workflow execution.

Variables for capturing exception messages

The exceptions occurring in the Invoke Web Service activity can be captured by creating a system variable of type 'string'.

The variable name should be created in the following format:

'^'+CurrentActivity.Name+'Error'

Activity Properties

The Invoke-Web-Service activity has to be configured by specifying appropriate values for the different properties in the Activity Properties area. The Activity Properties can be accessed by clicking on the Activity Properties tool in the Tool Bar or by selecting the appropriate option from the right click menu for the Invoke-Web-Service 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

You can use these properties to specify the name and description for the activity.

Name - This property can be used to specify a name for the activity.

Property Type: Optional (This property needs to be set only if necessary.)

Description - This property specifies a brief description to be displayed for the activity.

Property Type: Optional (This property needs to be set only if necessary.)

Configuration

The property in the Configuration group has been described below. You can use this property to specify the web service details.

Web Service Details - The Web Service Details property allows the user to select a web service to invoke and specify the input and output details for it.

Property Type: Mandatory (This property must be set if the activity is to be executed.)

Steps to set the Web Service Details property

  1. To add and configure Web Services, click on the button for the 'Web Service Details' property to open the Web Service List, which is the main property window.

  2. This is the first window of the Web Service configuration user-interface and lists all the Web Services that have already been configured.

  3. You can click the Preview Methods check box to preview the methods for the selected Web Service in this window.

  4. Click the Add button in the web service listing window to add a new Web Service. This opens the window to add new Web Services. Enter the Web Service name and the WSDL URL, e.g., localhost/SkeltaWebService/WorkfllowClient.asmx?wsdl, in the respective fields in this window. Click on the Save Web Service button after specifying the required values here if the new Web Service does not need authentication.

  5. Click on the Authenticated check box to select the option, if authentication is required for the web service being added. This displays authentication fields. Enter the login name, password, and domain name in the corresponding fields.

  6. To bind a Web Service to the database right-click on the Web Service listing in the Web Service List window and select the Bind option from the context menu. This will display the Methods List window. If there are no public fields in the Web Service you are binding, go directly to step 8.

  7. If there are any public fields in the selected web service, selecting the Bind option in the previous step will open the Public Fields List window listing all the public fields in the Web Service. You can edit field values by selecting the Edit option in the context menu for the fields list. In the web service parameter editing window that opens, click on the Serialize check box to enable serialization. Specify the value in the Value field by selecting the value type (Value, Variable, Content, XMLVariables) in the first drop down and providing the value. After specifying the value, click on the Update Parameter Value button to save it. Then click on the Update button at the bottom of the Public Fields List page to update the parameter value. After updating, click on the Link button to open the Web Service List window and right-click on the Web Service listing and then select Bind from the context menu. This will open the Methods List window mentioned in step 6.

  8. In the Methods List window select the required method parameter(s) and bind them by clicking Bind Parameters.

  9. In the Method Parameter listing window select parameter(s) to be updated and select the Edit option from the context menu. This opens the web service parameter editing window similar to the one in step 7. In this window specify the parameter values in the same way as described in step 7.

  10. If you wish to specify authentication details for the web service, enter the Login Name, Password and Domain Name in the authentication fields in this window. If specified, these details will need to be used while executing the web service.

  11. Select a Variable or Content Handler or XMLVariable to save the parameter values in from the Save Output in drop down.

  12. Click on Update button after entering all the parameters to bind the Web Service.

See WebService - Web Service Details for a detailed description of the Web Service Details property windows.

Miscellaneous

The property in the Miscellaneous group has been described below.

Retry on Failure? - This property allows the user to enable the activity to retry up to three times if the first attempt to connect to the web service fails. By default, it is set to Yes. This is useful to improve the chances of connecting to Webservices. This property can be set to No during development to avoid automatic retries.

Property Type: Optional (This property needs to be set only if necessary.)

Activity outputs:

The Invoke-Web-Service Activity returns the following values -

Webservice Execution Failed: Displayed when the Web service execution has failed.

In addition to this standard return value it also returns the value specified by the user in the Return Values property as output.

The Web Service block diagram is as shown below:

Getting Work Item/Task details for an actor and rendering the same in Windows Forms

Embedded Image (65% Scaling) (LIVE)

Submitting an Activity/Task via the web service and alerting the engine to execute next step in the workflow

Embedded Image (65% Scaling) (LIVE)

 

Exception Behavior

Each activity has the Raise Error on Unhandled Linked Output property on click of which, it shows all the default configured mapped error outputs in red with their check boxes selected.

Mapped Error Outputs for more details.

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