﻿<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="33333333-3000-4000-8000-000000000001" Name="Case Profile Update" RootElement="CaseData" DefaultForm="33333333-3000-4000-8000-000000000002">
      <Tasks>
        <Task Id="33333333-3000-4000-8000-000000000003" Name="Edit Profile" Caption="Edit Profile" IsInitiator="True" IsCaseHandler="True" Module="Automation">
          <Actions>
            <Action Id="33333333-3000-4000-8000-000000000004" Name="Save" Caption="Save" ValidationGroup="Save" />
            <Action Id="33333333-3000-4000-8000-000000000006" Name="Close Case" Caption="Close Case" Order="1" Comment="Required" ValidationGroup="Save" />
          </Actions>
          <PreWork>
            <Content><![CDATA[var profile = $Case.Profile.SelectSingle('TutorialProfile/Record');
$Xml.SelectSingle('Record').InnerXml(profile.InnerXml());]]></Content>
          </PreWork>
          <PostWork>
            <Content><![CDATA[$Case.Profile.SelectSingle('TutorialProfile/Record')
    .OuterXml($Xml.SelectSingle('Record').OuterXml());
$Case.ProfileChanged();

if ($WorkItem.SelectedAction == 'Close Case') {
    $Case.IsClosed = true;
}]]></Content>
          </PostWork>
          <Configurations>
            <User Role="33333333-3000-4000-8000-000000000005" Form="33333333-3000-4000-8000-000000000002" DeadlineNotify="False" AllowDefaultPrint="False" AllowForward="False" AllowDelegation="False">
              <Instructions><![CDATA[Update the profile or close the case with a required comment.]]></Instructions>
            </User>
          </Configurations>
        </Task>
      </Tasks>
      <Roles>
        <Role Id="33333333-3000-4000-8000-000000000005" Name="Profile Editor" Caption="Profile Editor" />
      </Roles>
      <Forms>
        <Form Id="33333333-3000-4000-8000-000000000002" Name="Case Profile" Caption="Case Profile">
          <Contents>
            <RowContent Type="Section" XPath="Record" SectionName="Profile">
              <Label>
                <Content><![CDATA[Profile]]></Content>
              </Label>
              <Columns>
                <Column WidthXS="12" WidthSM="12" WidthMD="12" WidthLG="12">
                  <Controls>
                    <TextBox MaxLength="100" Size="Large" RequiredForGroup="Save" XPath="Name">
                      <PlaceHolder><![CDATA[Name]]></PlaceHolder>
                    </TextBox>
                    <TextBox MaxLength="50" RequiredForGroup="Save" XPath="Status">
                      <PlaceHolder><![CDATA[Status]]></PlaceHolder>
                    </TextBox>
                  </Controls>
                </Column>
              </Columns>
            </RowContent>
          </Contents>
          <Script>
            <Content><![CDATA[]]></Content>
          </Script>
        </Form>
      </Forms>
    </Pool>
  </Pools>
  <AccessScopes />
  <Reports />
  <XmlSchemas>
    <xs:schema elementFormDefault="qualified">
      <xs:element name="CaseData">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Record">
              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" name="Name" type="xs:string" />
                  <xs:element minOccurs="0" name="Status" type="xs:string" />
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </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>