<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:coord="http://www.ismobile.com/coordinator/2006/operations/cwi/create_asgt/" targetNamespace="http://www.ismobile.com/coordinator/2006/operations/cwi/create_asgt/" elementFormDefault="qualified">
	<xs:attribute name="target" type="xs:string"/>
	<xs:attribute name="type" type="xs:string"/>
	<xs:element name="instruction" type="xs:string">
		<xs:annotation>
			<xs:documentation>Assignment instructions</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="messageid" type="xs:string">
		<xs:annotation>
			<xs:documentation>ID of the message from backend system, if this element is set in the XML, an ack/nack will be sent back</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="woid" type="xs:string" nillable="false">
		<xs:annotation>
			<xs:documentation>External workorder ID</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="companyid" type="xs:string" nillable="false">
		<xs:annotation>
			<xs:documentation>Team name where the workorder exists</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="workitemid" type="xs:string" nillable="false">
		<xs:annotation>
			<xs:documentation>Workitem Id, the workitem to create the assignment from</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="resid" type="xs:string" nillable="false">
		<xs:annotation>
			<xs:documentation>External Id of assigned resource</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="starttime" nillable="false">
		<xs:annotation>
			<xs:documentation>Start time for the assignment (ISO-8601)</xs:documentation>
		</xs:annotation>
		<xs:complexType mixed="true">
			<xs:attribute ref="coord:type" use="required" fixed="datetime"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="stoptime" nillable="false">
		<xs:annotation>
			<xs:documentation>Stop time for the assignment (ISO-8601)</xs:documentation>
		</xs:annotation>
		<xs:complexType mixed="true">
			<xs:attribute ref="coord:type" use="required" fixed="datetime"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="useglobalid" nillable="false">
		<xs:annotation>
			<xs:documentation>Use global search over all teams for resource id</xs:documentation>
		</xs:annotation>
		<xs:complexType mixed="true">
			<xs:attribute ref="coord:type" use="required" fixed="bool"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="assignmentpart">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="coord:starttime"/>
				<xs:element ref="coord:stoptime"/>
				<xs:element ref="coord:effort"/>
				<xs:element ref="coord:percentcomplete"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="percentcomplete">
		<xs:annotation>
			<xs:documentation>How much of the work is done on the part of the assignment</xs:documentation>
		</xs:annotation>
		<xs:complexType mixed="true">
			<xs:attribute ref="coord:type" use="required" fixed="int"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="effort">
		<xs:annotation>
			<xs:documentation>Effort for this assignment part in minutes</xs:documentation>
		</xs:annotation>
		<xs:complexType mixed="true">
			<xs:attribute ref="coord:type" use="required" fixed="int"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="dispatched">
		<xs:annotation>
			<xs:documentation>True/false flag saying if the assignment should be dispatched immediately</xs:documentation>
		</xs:annotation>
		<xs:complexType mixed="true">
			<xs:attribute ref="coord:type" use="required" fixed="bool"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="create">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="coord:useglobalid" minOccurs="0"/>
				<xs:element ref="coord:companyid"/>
				<xs:element ref="coord:resid"/>
				<xs:element ref="coord:workitemid"/>
				<xs:element ref="coord:starttime"/>
				<xs:element ref="coord:stoptime"/>
				<xs:element ref="coord:assignmentpart" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="coord:instruction" minOccurs="0"/>
				<xs:element ref="coord:dispatched" minOccurs="0"/>
			</xs:sequence>
			<xs:attribute ref="coord:target" use="required" fixed="assignment"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="header">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="coord:messageid"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="operation">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="coord:header" minOccurs="0"/>
				<xs:element ref="coord:create"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>
