16 dicembre 2010

How to: invoke an external web service in YAWL

In this post I will show how to invoke an external Web Service in YAWL.
I will suppose you already know what YAWL is :) and how to create a basic network in its editor.

  1. Select/create a task decomposition for the task that involves the web service invocation;
  2. In the task decomposition detail, select "web service invoker" as "YAWL service" in the "YAWL Registered Service Detail" section;
  3. Add all the input and output variables as specified in the xsd of your web service.
    Notice that all the names in the input message are the same of the ones in the variable panel, and the same applies to the output message and variables;
  4. Close the task decomposition detail panel and open the "update parameter mappings";
  5. Create the parameter mappings Input and Output as needed;
  6. Be aware that the following parameters must be mapped as follow:
    • YawlWSInvokerWSDLLocation must be the path to the wsdl describing the service, and having at least one Port to access the service;
    • YawlWSInvokerPortName is the name of the Port implementing the web service (XPath expression: /definitions/service/port/@name);
    • YawlWSInvokerOperationName the name of the operation to invoke as stated in the description of the service (XPath expression:/definitions/portType/operation/@name).

1 commento:

Fabio ha detto...

And if I want to invoke an external web service from a custom service? How can I make this??