<?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="WorkFlow"   package="performa.orm">
        
        <IMPORT value="performa.orm.types.*"/>
        
        <TABLE  name="tl_work_flow" tablePrefix="object">
            
            <ATTRIB name="Name"                 type="String"               dbcol="name"                mandatory="true"    length="20"/>
            <ATTRIB name="SortOrder"            type="Integer"              dbcol="sort_order"          mandatory="true"    />
            <ATTRIB name="ApplicationStatus"    type="ApplicationStatus"    dbcol="application_status"  mandatory="true"    attribHelper="EnumeratedAttributeHelper"/>
            
            <SINGLEREFERENCE    name="Job"      type="Job"                          dbcol="job_id"      backreferenceName="WorkFlows"/>
            <SINGLEREFERENCE    name="Template" type="AssessmentCriteriaTemplate"   dbcol="template_id" backreferenceName="WorkFlows"/>
            
        </TABLE>
        
        <SEARCH type="All"  paramFilter="tl_work_flow.object_id is not null"   orderBy="tl_work_flow.sort_order">
        </SEARCH>
        
    </BUSINESSCLASS>
    
</ROOT>