<?xml version="1.0" encoding="UTF-8"?>

<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>

    <BUSINESSCLASS  name="WorkFlowStage"   package="performa.orm">
        <IMPORT value="performa.orm.types.*"/>
                
        <MULTIPLEREFERENCE  name="WorkFlowMessages"      type="WorkFlowMessage"       backreferenceName="WorkFlowStage" />
        
        <TABLE  name="tl_work_flow_stage"    tablePrefix="object"    polymorphic="FALSE">
            
            <ATTRIB name="Name"                 type="String"           dbcol="name"                mandatory="true"/>
            <ATTRIB name="UseMessaging"         type="Boolean"          dbcol="use_messaging"       mandatory="false"       defaultValue="Boolean.FALSE"/>
            <ATTRIB name="StageType"            type="StageType"        dbcol="stage_type"          attribHelper="EnumeratedAttributeHelper"        mandatory="true"/>
            <ATTRIB name="SortOrder"            type="Integer"          dbcol="sort_order"          mandatory="true"/>

            <SINGLEREFERENCE    name="WithdrawalMessage"        type="WorkFlowMessage"          dbcol="withdrawal_message_id"  />
            <SINGLEREFERENCE    name="WorkFlowTemplate"         type="WorkFlowTemplate"         dbcol="work_flow_template_id"    backreferenceName="WorkFlowStages"    mandatory="true"/>

        </TABLE>
        
        <SEARCH type="All"  paramFilter="tl_work_flow_stage.object_id is not null"   orderBy="tl_work_flow_stage.object_id"   />
            
    </BUSINESSCLASS>
    
</ROOT>