Example Workflows

Here are few workflow examples that invoke SOAP method calls.

You may find more examples in the "examples" directory of the source distribution of this plugin.

Sort workflow

This workflow uses a sort WebService (refer to Linuxtoolbox Web Services) in order to sort the numbers "15 8 0" and "7 0 0".

Graph representation of the example sort workflow

Here is the original GWorkflowDL XML:

<?xml version="1.0" encoding="UTF-8"?>
<workflow xmlns="http://www.gridworkflow.org/gworkflowdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.gridworkflow.org/gworkflowdl http://www.gridworkflow.org/kwfgrid/src/xsd/gworkflowdl_2_1.xsd http://www.gridworkflow.org/gworkflowdl/operationclass http://www.gridworkflow.org/kwfgrid/src/xsd/gworkflowdl_operationclass_2_0.xsd"
          ID="No_ID">
  <!-- $Id: gworkflowdl_sort.xml 1359 2010-03-05 15:55:43Z andreas.hoheisel@first.fraunhofer.de $ -->
  <description>little workflow example with condition, side effect, and places related to data classes</description>
  <property name="occurrence.sequence" />
  <property name="faultManagementPolicy">AbortOnActivityTerminated</property>
  <place ID="begin">
    <token ID="d1">
      <data>
        <value xmlns="" xsi:type="xsd:string">15
8
0</value>
      </data>
    </token>
    <token ID="d2">
      <data>
        <value xmlns="" xsi:type="xsd:string">7
0
0</value>
      </data>
    </token>
  </place>
  <place ID="parameter">
    <token ID="d3">
      <data>
        <param xmlns="" xsi:type="xsd:string">-n</param>
      </data>
    </token>
    <token ID="d4">
      <data>
        <param xmlns="" xsi:type="xsd:string">-n</param>
      </data>
    </token>
  </place>
  <place ID="outputData" />
  <place ID="hasBeenSorted" />
  <transition ID="sort">
    <description>sorts strings or numbers</description>
    <property name="icon.url">http://fhrg.first.fraunhofer.de:8080/linuxtoolbox/images/text.png</property>
    <inputPlace placeID="begin" edgeExpression="value" />
    <inputPlace placeID="parameter" edgeExpression="params" />
    <outputPlace placeID="outputData" edgeExpression="*" />
    <outputPlace placeID="hasBeenSorted" />
    <condition>string-length($value) &gt; 0</condition>
    <condition>$params/@xsi:type = "xsd:string"</condition>
    <operation>
      <oc:operationClass xmlns:oc="http://www.gridworkflow.org/gworkflowdl/operationclass" name="urn:dgrdl:service:sort">
        <oc:operationCandidate type="soap" operationName="sort" resourceName="http://fhrg.first.fraunhofer.de:8080/linuxtoolbox/services/Sort?wsdl" selected="true" />
      </oc:operationClass>
    </operation>
  </transition>
</workflow>

WebService in the Loop

This workflow invokes a "plus" service within a loop.

Graph representation of the example loop workflow

Here is the original GWorkflowDL XML:

<?xml version="1.0" encoding="UTF-8"?>
<workflow xmlns="http://www.gridworkflow.org/gworkflowdl"
          xmlns:oc="http://www.gridworkflow.org/gworkflowdl/operationclass"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.gridworkflow.org/gworkflowdl http://www.gridworkflow.org/kwfgrid/src/xsd/gworkflowdl_2_1.xsd http://www.gridworkflow.org/gworkflowdl/operationclass http://www.gridworkflow.org/kwfgrid/src/xsd/gworkflowdl_operationclass_2_0.xsd"
          ID="No_ID">
  <description>small concrete workflow with loop</description>
  <property name="occurrence.sequence" />
  <place ID="begin">
    <token>
      <data>
        <counter xmlns="" xsi:type="xsd:int">0</counter>
      </data>
    </token>
  </place>
  <place ID="addme">
    <token>
      <data>
        <one xmlns="" xsi:type="xsd:int">1</one>
      </data>
    </token>
  </place>
  <place ID="result" />
  <place ID="end" />
  <transition ID="i_plus_plus">
    <description>i++</description>
    <property name="icon.url">http://fhrg.first.fraunhofer.de:8080/linuxtoolbox/images/plus.png</property>
    <readPlace placeID="addme" edgeExpression="b" />
    <inputPlace placeID="begin" edgeExpression="a" />
    <outputPlace placeID="result" edgeExpression="$plusReturn" />
    <operation>
      <oc:operationClass>
        <oc:operationCandidate type="soap" operationName="plus" resourceName="http://fhrg.first.fraunhofer.de:8080/linuxtoolbox/services/Calculator?wsdl" selected="true" />
      </oc:operationClass>
    </operation>
  </transition>
  <transition ID="continue">
    <description>continue loop if plusReturn is less than 5</description>
    <property name="icon.url">http://fhrg.first.fraunhofer.de:8080/linuxtoolbox/images/play.png</property>
    <inputPlace placeID="result" edgeExpression="plusReturn" />
    <outputPlace placeID="begin" edgeExpression="$plusReturn" />
    <condition>$plusReturn &lt; 5</condition>
  </transition>
  <transition ID="break">
    <description>end loop if plusReturn is greater or equal 5</description>
    <property name="icon.url">http://fhrg.first.fraunhofer.de:8080/linuxtoolbox/images/stop.png</property>
    <property name="isQuasiLive">true</property>
    <inputPlace placeID="result" edgeExpression="plusReturn" />
    <outputPlace placeID="end" edgeExpression="$plusReturn" />
    <condition>$plusReturn &gt;= 5</condition>
  </transition>
</workflow>