<?xml version="1.0" encoding="UTF-8"?> 
<process xmlns="http://drools.org/drools-5.0/process"
         xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
         xs:schemaLocation="http://drools.org/drools-5.0/process drools-processes-5.0.xsd"
         type="RuleFlow" name="TestProcess" id="org.drools.test.TestProcess" package-name="org.drools.test" >

  <header>
    <variables>
      <variable name="name" >
        <type name="org.jbpm.process.core.datatype.impl.type.StringDataType" />
        <value>xxx</value>
      </variable>
    </variables>
  </header>

  <nodes>
    <start id="1" name="Start" />
    <actionNode id="2" name="Action" >
        <action type="expression" dialect="java" >System.out.println("Executing for " + name);</action>
    </actionNode>
    <workItem id="3" name="WorkItem1" >
      <work name="MyWork" >
      </work>
      <mapping type="in" from="name" to="name" />
    </workItem>
    <actionNode id="4" name="Action" >
        <action type="expression" dialect="java" >System.out.println("Executing for " + name);</action>
    </actionNode>
    <composite id="5" name="CompositeNode" >
      <variables>
        <variable name="text" >
          <type name="org.jbpm.process.core.datatype.impl.type.StringDataType" />
        </variable>
      </variables>
      <nodes>
        <actionNode id="1" name="Action" >
          <action type="expression" dialect="mvel" >kcontext.setVariable("text", name);</action>
        </actionNode>
        <workItem id="2" name="Log" x="130" y="46" width="80" height="40" >
          <work name="MyWork" >
            <parameter name="Message" >
              <type name="org.jbpm.process.core.datatype.impl.type.StringDataType" />
            </parameter>
          </work>
          <mapping type="in" from="text" to="text" />
        </workItem>
        <actionNode id="3" name="Action" x="129" y="109" >
          <action type="expression" dialect="mvel" >System.out.println("Subprocess " + text);</action>
        </actionNode>
      </nodes>
      <connections>
        <connection from="1" to="2" />
        <connection from="2" to="3" />
      </connections>
      <in-ports>
        <in-port type="DROOLS_DEFAULT" nodeId="1" nodeInType="DROOLS_DEFAULT" />
      </in-ports>
      <out-ports>
        <out-port type="DROOLS_DEFAULT" nodeId="3" nodeOutType="DROOLS_DEFAULT" />
      </out-ports>
    </composite>
    <end id="6" name="End" />
  </nodes>

  <connections>
    <connection from="1" to="2" />
    <connection from="2" to="3" />
    <connection from="3" to="4" />
    <connection from="4" to="5" />
    <connection from="5" to="6" />
  </connections>

</process>
