﻿<ProcessDefinition Version="13" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <Namespaces>
    <Namespace Prefix="forms" NamespaceURI="http://schemas.emakin.com" SchemaLocation="http://schemas.emakin.com" />
  </Namespaces>
  <Pools>
    <Pool Id="55555555-5000-4000-8000-000000000001" Name="Parent Workflow" RootElement="ParentData" DefaultForm="55555555-5000-4000-8000-000000000002">
      <Tasks>
        <Task Id="55555555-5000-4000-8000-000000000003" Name="Prepare Items" Caption="Prepare Items" IsInitiator="True" Module="Automation">
          <Actions>
            <Action Id="55555555-5000-4000-8000-000000000004" Name="Start Children" Caption="Start Children" ValidationGroup="Start">
              <Routes>
                <Route Id="55555555-5000-4000-8000-000000000005" Target="55555555-5000-4000-8000-000000000006" />
              </Routes>
            </Action>
          </Actions>
          <Configurations>
            <User Form="55555555-5000-4000-8000-000000000002" DeadlineNotify="False" AllowDefaultPrint="False" AllowForward="False" AllowDelegation="False">
              <Instructions><![CDATA[Add rows with stable IDs.]]></Instructions>
            </User>
          </Configurations>
        </Task>
        <Task Id="55555555-5000-4000-8000-000000000006" Name="Run Children" Caption="Run Children" Type="Module" Module="SubWorkflow">
          <Actions>
            <Action Id="55555555-5000-4000-8000-000000000007" Name="Continue" Caption="Continue">
              <Routes>
                <Route Id="55555555-5000-4000-8000-000000000008" Target="55555555-5000-4000-8000-000000000009" />
              </Routes>
            </Action>
          </Actions>
          <Configurations>
            <User DeadlineNotify="False" AllowDefaultPrint="False" IsHidden="True" AllowForward="False" AllowDelegation="False" />
            <SubWorkflow Pool="55555555-5000-4000-8000-00000000000a" Task="55555555-5000-4000-8000-00000000000c" Mode="WaitForAllChildsToComplete">
              <XPath><![CDATA[Items/Item]]></XPath>
              <ConditionXPath><![CDATA[not(@State = 'Deleted')]]></ConditionXPath>
              <RowIdXPath><![CDATA[Id]]></RowIdXPath>
              <SyncXPath><![CDATA[Items/Item]]></SyncXPath>
            </SubWorkflow>
          </Configurations>
        </Task>
        <Task Id="55555555-5000-4000-8000-000000000009" Name="Review Results" Caption="Review Results" Module="Automation">
          <Actions>
            <Action Id="55555555-5000-4000-8000-00000000000b" Name="Complete" Caption="Complete" />
          </Actions>
          <Configurations>
            <User Form="55555555-5000-4000-8000-000000000002" DeadlineNotify="False" AllowDefaultPrint="False" AllowForward="False" AllowDelegation="False">
              <Instructions><![CDATA[Verify synchronized child results.]]></Instructions>
            </User>
          </Configurations>
        </Task>
      </Tasks>
      <Forms>
        <Form Id="55555555-5000-4000-8000-000000000002" Name="Items" Caption="Items">
          <Contents />
          <Script>
            <Content><![CDATA[]]></Content>
          </Script>
        </Form>
      </Forms>
    </Pool>
    <Pool Id="55555555-5000-4000-8000-00000000000a" Name="Child Workflow" RootElement="Item" DefaultForm="55555555-5000-4000-8000-00000000000d" UseParentContext="True">
      <Tasks>
        <Task Id="55555555-5000-4000-8000-00000000000c" Name="Process Item" Caption="Process Item" IsInitiator="True" Module="Automation">
          <Actions>
            <Action Id="55555555-5000-4000-8000-00000000000e" Name="Complete" Caption="Complete" />
          </Actions>
          <PostWork>
            <Content><![CDATA[$Xml.SetValue('Status', 'Completed');]]></Content>
          </PostWork>
          <Configurations>
            <User Role="55555555-5000-4000-8000-00000000000f" Form="55555555-5000-4000-8000-00000000000d" DeadlineNotify="False" AllowDefaultPrint="False" AllowForward="False" AllowDelegation="False">
              <Instructions><![CDATA[Complete the child item.]]></Instructions>
            </User>
          </Configurations>
        </Task>
      </Tasks>
      <Roles>
        <Role Id="55555555-5000-4000-8000-00000000000f" Name="Item Processor" Caption="Item Processor" />
      </Roles>
      <Forms>
        <Form Id="55555555-5000-4000-8000-00000000000d" Name="Item" Caption="Item">
          <Contents />
          <Script>
            <Content><![CDATA[]]></Content>
          </Script>
        </Form>
      </Forms>
    </Pool>
  </Pools>
  <AccessScopes />
  <Reports />
  <XmlSchemas>
    <xs:schema elementFormDefault="qualified">
      <xs:element name="ParentData">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Items">
              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="Item">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="Id" type="xs:string" />
                        <xs:element minOccurs="0" name="Status" type="xs:string" />
                      </xs:sequence>
                      <xs:attribute name="State" type="xs:string" />
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Item">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Id" type="xs:string" />
            <xs:element minOccurs="0" name="Status" type="xs:string" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
  </XmlSchemas>
  <ExternalXmlSchemas />
  <Localization>
    <Translations>
      <Translation Name="Instructions" Entity="True">
        <Locations>
          <Location><![CDATA[//Route/Instructions]]></Location>
          <Location><![CDATA[//Task/Configurations/User/Instructions]]></Location>
        </Locations>
      </Translation>
      <Translation Name="TaskName" Entity="True">
        <Locations>
          <Location><![CDATA[//Task/@Caption]]></Location>
        </Locations>
      </Translation>
      <Translation Name="ActionName" Entity="True">
        <Locations>
          <Location><![CDATA[//Action/@Caption]]></Location>
        </Locations>
      </Translation>
      <Translation Name="DashboardName" Entity="False">
        <Locations>
          <Location><![CDATA[//Screen[@IsDashboard = 'True']/@Name]]></Location>
        </Locations>
      </Translation>
      <Translation Name="FormCaption" Entity="False">
        <Locations>
          <Location><![CDATA[//Form/@Caption]]></Location>
          <Location><![CDATA[//Screen/@Caption]]></Location>
        </Locations>
      </Translation>
      <Translation Name="Variable" Entity="True">
        <Locations>
          <Location><![CDATA[//Pool/Variables/Variable]]></Location>
        </Locations>
      </Translation>
      <Translation Name="RoleName" Entity="False">
        <Locations>
          <Location><![CDATA[//Pool/Roles/Role/@Caption]]></Location>
        </Locations>
      </Translation>
      <Translation Name="ActionConfirmation" Entity="False">
        <Locations>
          <Location><![CDATA[//Action/ConfirmationMessage]]></Location>
        </Locations>
      </Translation>
      <Translation Name="Template" Entity="False">
        <Locations>
          <Location><![CDATA[//Templates/Template/Content]]></Location>
        </Locations>
      </Translation>
      <Translation Name="TemplateSubject" Entity="False">
        <Locations>
          <Location><![CDATA[//Templates/Template/Subject]]></Location>
        </Locations>
      </Translation>
      <Translation Name="Label" Entity="True">
        <Locations>
          <Location><![CDATA[//Label/Content]]></Location>
        </Locations>
      </Translation>
      <Translation Name="Literal" Entity="False">
        <Locations>
          <Location><![CDATA[//AddNewLabel/Content]]></Location>
          <Location><![CDATA[//Column/@Caption]]></Location>
          <Location><![CDATA[//Column/Caption]]></Location>
          <Location><![CDATA[//Column/Properties/@Caption]]></Location>
          <Location><![CDATA[//DataExchange/Columns/Column/Caption]]></Location>
          <Location><![CDATA[//Footer/Content]]></Location>
          <Location><![CDATA[//LineChart/Title/Content]]></Location>
          <Location><![CDATA[//LineChart/XAxisLabel/Content]]></Location>
          <Location><![CDATA[//LineChart/YAxisLabel/Content]]></Location>
          <Location><![CDATA[//Literal/Content]]></Location>
          <Location><![CDATA[//PieChart/Title/Content]]></Location>
        </Locations>
      </Translation>
      <Translation Name="Html" Entity="False">
        <Locations>
          <Location><![CDATA[//Html/Content]]></Location>
        </Locations>
      </Translation>
      <Translation Name="XPath" Entity="False">
        <Locations>
          <Location><![CDATA[//LineChart/Lines/Line/LabelXPath]]></Location>
          <Location><![CDATA[//PieChart/Pies/Pie/LabelXPath]]></Location>
          <Location><![CDATA[//PieChart/Pies/Pie/ValueUnitXPath]]></Location>
        </Locations>
      </Translation>
      <Translation Name="FieldHint" Entity="False">
        <Locations>
          <Location><![CDATA[//Hints]]></Location>
        </Locations>
      </Translation>
      <Translation Name="PlaceHolder" Entity="False">
        <Locations>
          <Location><![CDATA[//PlaceHolder]]></Location>
        </Locations>
      </Translation>
      <Translation Name="ListItem" Entity="True">
        <Locations>
          <Location><![CDATA[//Items/Item/Text]]></Location>
        </Locations>
      </Translation>
      <Translation Name="Transforms" Entity="False">
        <Locations>
          <Location><![CDATA[//Form//Query/Columns/Column/Transforms/Transform/TransformValue]]></Location>
        </Locations>
      </Translation>
    </Translations>
    <Languages />
  </Localization>
</ProcessDefinition>