<?xml version="1.0" encoding="utf-8"?>
<!--
        
        ** OAGIS® Revision: 9.1  **
        ** Date: 11 May 2007 **
        ** Copyright 1997-2007, All Rights Reserved **
        
        This is an OAGIS® BOD XML Schema (XSD) Definition.
        
       License information for this file is provided in the file **OAGi License Agreement.txt** that is provided with this download package.
        
        For support, more information, or to report implementation bugs, please contact the Open Applications Group at xml@openapplications.org.
        
        XML Schema 
        
-->
 
<!--
© Copyright 2007 Infor Global Solutions Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. The 
word and design marks set forth herein are trademarks and/or registered trademarks of Infor Global Solutions 
Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. All other trademarks listed herein 
are the property of their respective owners.
 
-->
 
<!--    *****     Update Log     *****
 
Date          By      Note
10 Apr 2008   JB      Added correct Copyright and update comments to schema.
15 Jan 2010   PO      Added Operating Efficiency.
29 Sep 2010   NO      Added Status element.  (JIRA BOD-1428).
9 Aug 2016    LA      ConstrainedResourceLocation added, BOD-2436
10 Aug 2016   LA      Status and UserArea added to ConstrainedResourceLocation, BOD-2206
        *****     Update End     *****
 
-->


<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schema.infor.com/InforOAGIS/2"
    targetNamespace="http://schema.infor.com/InforOAGIS/2" elementFormDefault="qualified"
    attributeFormDefault="unqualified">

    <xsd:include schemaLocation="../Components/Operational/ManufacturingComponents.xsd"/>

    <xsd:element name="ConstrainedResource" type="ConstrainedResourceType"/>

    <xsd:complexType name="ConstrainedResourceType">
        <xsd:annotation>
            <xsd:documentation>Represents resources that can be used in the warehouse or production
                areas. This can be equipment or people, anything that is a limiting factore to
                production.</xsd:documentation>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="ResourceType">
                <xsd:sequence>
                    <xsd:element ref="Name" minOccurs="0"/>
                    <xsd:element ref="ResourceReference" minOccurs="0"/>
                    <xsd:element ref="ResourceTypeCode" minOccurs="0"/>
                    <xsd:element ref="ResourceAvailability" minOccurs="0"/>
                    <xsd:element ref="FreeCalendarReference" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="CostRule" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="EfficiencyPercent" minOccurs="0"/>
                    <xsd:element ref="Status" minOccurs="0"/>
                    <xsd:element ref="Capacity" minOccurs="0"/>
                    <xsd:element ref="OvertimeCostRule" minOccurs="0"/>
                    <xsd:element ref="OvertimeCapacity" minOccurs="0"/>
                    <xsd:element ref="Location" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>
                                ### Deprecated, use workCenterReferennce instead of this
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element ref="WorkCenterReference" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>
                                Indicates the reference to work center. when constrained resource is a machine or 
                                operator, the work center reference indicates the work center to which the resources belong to; 
                                when the constrained resource is a work center, work center reference will help to refer to 
                                the work center for all the other details 
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element ref="ConstrainedResourceLocation" minOccurs="0" maxOccurs="unbounded">
                        <xsd:annotation>
                            <xsd:documentation>
                                To specify any over-rides/specifics for a location
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    
    <xsd:complexType name="ConstrainedResourceLocationType">
        <xsd:sequence>
            <xsd:element ref="Location" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Location for which the over-rides are being specified. 
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="Status" minOccurs="0"/>
            <xsd:element ref="CostRule" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="UserArea" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="ConstrainedResourceLocation" type="ConstrainedResourceLocationType"/>

</xsd:schema>
