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

AVEVA™ Work Tasks

Invoke web Service from workflows

  • Last UpdatedDec 17, 2025
  • 5 minute read

You can invoke a web service from a workflow.

Complete the following steps to invoke a web service from a workflow:

  • Invoking a Hello World web service

  • Calling the HelloWorld () method from the web service

  • Displaying the return value in the Information activity

Prerequisites

  • Create a repository.

  • Log on to the repository using Administrator credentials.

  • Create a Hello World web service

Understand Invoke web service activity

Create workflow

  1. In the Enterprise Console, click the Menu button, and then click Workflows. The Workflows page appears.

  2. On the action bar, click New, and then click Workflow. The New Workflow wizard appears.

In the Title box, type the name for the workflow, and in the Description box, type the description for the workflow.

  1. Click Save & Continue. The workflow is created, and the Workflow Options wizard appears.

  2. Select Design the Workflow now, which is the default option, and then click Finish. The Process Designer appears.

    In this example, you will invoke a web service that contains a method which displays “Hello World”. To store the return value of the web service, create a workflow variable.

    The following steps show how to create a variable in a workflow:

    Create variable

    • Right click the Start activity, and then select Activity Properties.

    • To declare the variable, click on the edit icon of the Variables property. The Variables dialog box appears.

    • Enter the variable name as "NewVariable” and select the Type as “String”.

    • Click Update to save the variable.

    • Click Save in the Activity Properties pane to save all the data entered.

    Invoke web service activity

    To call a web service, you must add an InvokeWebService activity to the Process Designer.

    1. Select Integration Activities from the Activities pane.

    2. Drag and drop an InvokeWebService activity to the Process Designer.

    3. Right click InvokeWebService activity to get the Activity Properties pane.

      Add web service

      1. Click on the edit icon of the Web Service Details property. The Web Services dialog box appears. You can add or edit the web services to be invoked in this dialog box.

      2. Click Add to add a web service.

      3. Enter the WebService Name. As you would call this web service to display "Hello World", you can name the web service as HelloWorldWebService.

      4. Enter the WebService URL. The URL must be the WSDL URL of the web service that you have created. For example, it can be as the following image:

      5. If authentication is required, you must select the Authenticated check box. This displays additional authentication fields.fields, enter the Login Name, Password, Domain name, and Proxy URL. This step is necessary only if the web service being added requires authentication.

      6. In the authentication fields, enter the Login Name, Password, Domain name, and Proxy URL. This step is necessary only if the web service being added requires authentication.

      7. Click Save.

        The method associated with the web service is HelloWorld. You can get this web method when you view the web service in a browser as shown below:

        If you invoke this method, you get the output in an XML format as shown in the following image. You can display this in the Information Activity.

        After you save the details, you can see the web service listed. Click the Preview Methods check box to preview the methods in the web service.

        Bind web service  

        1. Right click the web service that you have added. You get options like Edit, Refresh, Delete, and Bind.

        2. Use the Bind option to bind the selected web service to the database. The Method list dialog box appears.

        3. Click a Method, and click the Bind Parameters. A window appears which lists out the Parameters to be passed. As the current method just displays a value, the Parameter list will be empty.

        4. You must save the return value from the Web Method to a variable so that you can use it in subsequent activities. So, select the output type as "Variable" from the Save Output in drop down. Select the variable created in the Start activity.

        5. Give the Login Name and Password, if required.

        6. Click Update to save all the data.

        7. In the Activity Properties window, click Save to save all the details entered. The Invoke Web Service activity is added successfully.

          Display return value of web service method in Information activity

          1. Select Human Activities.

          2. Drag and drop an Information activity to the process design area.

          3. Right-click the Information activity, and then select Activity Properties. The Activity Properties pane appears.

          4. Configure the following properties:

            1. Name & Description of the activity. For example, enter name as Display Web Service Data.

            2. The Actor to whom this information should be sent. For example, select Id = Variable Variable.SubmittedBy.ID.

            3. The Subject of the actual information. For example, select <%#Variable.NewVariable%>.

          5. Click Save in the Activity Properties pane to save all the data entered.

          6. Link all the activities, Start, InvokeWebService, and Display Web Service Data.

            Publish InvokeWebServiceWorkflow

            1. Click Publish from the menu bar. The Publish successful dialog box appears.

            2. Clicking Close. You will be redirected to the page showing the Workflows list.

            3. Run the published workflow. Right-click the workflow, and then click Publish and Test Run. The Process execution view window appears which shows the execution status of the workflow. You will notice that the Start, InvokeWebService, and Display Web Service Data activities are executed successfully.

              Note: If the Status is Execution Pending in the Process execution view window, then click the Refresh button to get the latest status.

              View inbox

              To view the information task assigned to the actor who alerted the workflow, see the activity in the Inbox.

              1. in the Enterprise Console, click the Menu button, and then click Inbox. The Inbox page appears.

              2. In the Inbox, you can find the Display Web Service Data activity with the subject "Hello World".

              3. Click the Information task in the Inbox to get a pop-up details view for the task.

                You have successfully created the Invoke Web Service Workflow.

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