<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://reference.e-government.gv.at/namespace/moa/process/definition/v1"
	xmlns:tns="http://reference.e-government.gv.at/namespace/moa/process/definition/v1"
	elementFormDefault="qualified" version="1.0">

	<xsd:element name="ProcessDefinition">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:choice minOccurs="0" maxOccurs="unbounded">
					<xsd:element name="StartEvent" type="tns:StartEventType" />
					<xsd:element name="Task" type="tns:TaskType" />
					<xsd:element name="Transition" type="tns:TransitionType" />
					<xsd:element name="EndEvent" type="tns:EndEventType" />
				</xsd:choice>
			</xsd:sequence>
			<xsd:attribute name="id" type="xsd:ID" use="required" />
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="ProcessNodeType" abstract="true">
		<xsd:attribute name="id" type="xsd:ID" use="required" />
	</xsd:complexType>

	<xsd:complexType name="StartEventType">
		<xsd:complexContent>
			<xsd:extension base="tns:ProcessNodeType" />
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="TransitionType">
		<xsd:attribute name="from" type="xsd:IDREF" use="required" />
		<xsd:attribute name="to" type="xsd:IDREF" use="required" />
		<xsd:attribute name="id" type="xsd:ID" />
		<xsd:attribute name="conditionExpression" type="xsd:string" />
	</xsd:complexType>

	<xsd:complexType name="EndEventType">
		<xsd:complexContent>
			<xsd:extension base="tns:ProcessNodeType" />
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="TaskType">
		<xsd:complexContent>
			<xsd:extension base="tns:ProcessNodeType">
				<xsd:attribute name="async" type="xsd:boolean" default="false"/>
				<xsd:attribute name="class" type="xsd:string" />
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

</xsd:schema>