Introduction to the WebService Activity Plugin

The scope of the WebService activity plugin is to enable the Generic Workflow Execution Service (GWES) to invoke remote SOAP method calls. Using this plugin you can model WebService method calls within GWorkflowDL workflows by connecting transitions with the WSDL of the WebService.

Operation

In order to invoke a SOAP method call, the transition needs to contain an operation candidate of type "soap". The operation name is equal to the SOAP method as declared in the WSDL of the WebService. The resource name is equal to the URL of the WSDL.

Example:

  <transition ID="sort">
    <inputPlace placeID="begin" edgeExpression="value" />
    <inputPlace placeID="parameter" edgeExpression="params" />
    <outputPlace placeID="outputData" edgeExpression="*" />
    <operation>
      <oc:operationClass xmlns:oc="http://www.gridworkflow.org/gworkflowdl/operationclass"
                         name="urn:dgrdl:service:sort">
        <oc:operationCandidate type="soap"
                               operationName="sort"
                               resourceName="http://server:8080/linuxtoolbox/services/Sort?wsdl"
                               selected="true" />
      </oc:operationClass>
    </operation>
  </transition>

Inputs

If the transition is enabled, the plugin automatically generates a SOAP request using the XML on the tokens from the corresponding read and input places. The incoming edge expressions map the token XML to the matching SOAP parameter part.

Outputs

The plugin interprets SOAP responses using XPath expressions on the outgoing edge expressions. The GWES puts the result as new tokens on the corresponding output places.

Installation

  1. Install the Generic Workflow Execution Service (GWES). In the following we assume that the GWES is newer or equal version 2.1 and has been installed at the directory $GWES_HOME (e.g., $GWES_HOME=~/local/apache-tomcat/webapps/gwes).
  2. Download
    gwes-plugin-wsactivity-2.1.1.rc1-bin.tar.gz
      or
    gwes-plugin-wsactivity-2.1.1.rc1-bin.zip

    from the GWES download section and unpack the java library file gwes-plugin-wsactivity-2.1.1.rc1.jar.

    Alternatively download the plugin sources

    gwes-plugin-wsactivity-2.1.1.rc1-src.tar.gz
      or
    gwes-plugin-wsactivity-2.1.1.rc1-src.zip

    from the GWES download section and compile the java library by yourself using maven2 with the command

    mvn clean package
  3. Copy the java library gwes-plugin-wsactivity-2.1.1.rc1.jar to the directory $GWES_HOME/WEB-INF/lib/ (e.g., $GWES_HOME=~/local/apache-tomcat/webapps/gwes/WEB-INF/lib/)
  4. Configure your gwes.properties (details refer next section):
    gwes.activity.soap.class=de.fraunhofer.first.gwes.plugin.wsactivity.WSActivity
  5. Restart the GWES, e.g., restarting the tomcat container.

Configuration

The plugin supports the following properties:

gwes.properties

Global GWES configuration file ($GWES_HOME/WEB-INF/classes/gwes.properties):

################################
# GWES WSActivity Plugin
################################
# Implementation of net.kwfgrid.gwes.Activity for operation type "soap", e.g.,
# <oc:operationCandidate type="soap" operationName="sort"
#            resourceName="http://fhrg.first.fraunhofer.de:8080/linuxtoolbox/services/Sort?wsdl"
#            selected="true" />
gwes.activity.soap.class=de.fraunhofer.first.gwes.plugin.wsactivity.WSActivity

Transition properties

There are no special workflow or transition properties supported by this plugin. You may use the generic properties defined for all GWES activities to adjust fault tolerance or timeouts for this plugin, such as:

  • activity.maxattempts
  • breakpoint
  • combine.data.groups
  • ignore.data.groups
  • priority
  • timeout
  • timeout.running
  • timeout.active

Please refer to GWES documentation for details, especially the JavaDoc of class net.kwfgrid.gwes.Constants.java.