workDefinition "WorkDef_Review_PeerToPeer" {
   id "25334"
   startState "Prepare"

   widgetDefinition "Title" {
      attributeName "Name"
      xWidgetName "XTextDam"
      option REQUIRED_FOR_TRANSITION
   }

   widgetDefinition "Role" {
      attributeName "ats.Role"
      xWidgetName "XUserRoleViewer" 
      option REQUIRED_FOR_TRANSITION
   }

   widgetDefinition "Meeting Length" {
      attributeName "ats.Meeting Length"
      option REQUIRED_FOR_TRANSITION
   }

   widgetDefinition "Meeting Location" {
      attributeName "ats.Meeting Location"
      option REQUIRED_FOR_TRANSITION
   }

   widgetDefinition "Related To State" {
      attributeName "ats.Related To State"
      xWidgetName "XStateCombo"
      option FILL_VERTICALLY
   }

   widgetDefinition "Location" {
      attributeName "ats.Location"
      xWidgetName "XTextDam"
      option FILL_VERTICALLY
      option REQUIRED_FOR_TRANSITION
   }

   widgetDefinition "Description" {
      attributeName "ats.Description"
      xWidgetName "XTextDam"
      option FILL_VERTICALLY
   }

   widgetDefinition "Meeting Attendees" {
      attributeName "ats.Meeting Attendee"	
      xWidgetName "XHyperlabelMemberSelDam"
      option REQUIRED_FOR_TRANSITION
   }

   widgetDefinition "Review Blocks" {
      attributeName "ats.Review Blocks"
      xWidgetName "XComboDam(OPTIONS_FROM_ATTRIBUTE_VALIDITY)"
      option REQUIRED_FOR_TRANSITION
      option HORIZONTAL_LABEL
   }

   widgetDefinition "Review Formal Type" {
      attributeName "ats.Review Formal Type"
      xWidgetName "XComboDam(OPTIONS_FROM_ATTRIBUTE_VALIDITY)"
      option REQUIRED_FOR_TRANSITION
      option HORIZONTAL_LABEL
   }

   widgetDefinition "Review Defect" {
      attributeName "ats.Review Defect"
      xWidgetName "XDefectViewer"
   }

   widgetDefinition "Resolution" {
      attributeName "ats.Resolution"
      xWidgetName "XTextDam"
      option FILL_VERTICALLY
   }

   state "Prepare" {
      type Working
      ordinal 1
      to "Cancelled"
      to "Review" AsDefault
      to "Meeting"
      layout {
         widget "Title"
         attributeWidget "ats.Legacy PCR Id"
         widget "Description"
         widget "Role"
         widget "Location"
         composite {
         	numColumns 8
            widget "Review Blocks"
            widget "Review Formal Type" 
            attributeWidget "ats.Need By"
            widget "Related To State"
         }
         composite {
         	numColumns 4
            attributeWidget "ats.Estimated Hours"
            attributeWidget "ats.Estimated Completion Date"
         }
         composite {
            numColumns 8
            attributeWidget "ats.LOC Changed"
            attributeWidget "ats.LOC Reviewed"
            attributeWidget "ats.Pages Changed"
            attributeWidget "ats.Pages Reviewed"
         }
      }
   }

   state "Review" {
      type Working
      ordinal 2
      to "Cancelled"
      to "Completed" AsDefault
      to "Meeting" OverrideAttributeValidation
      to "Prepare" OverrideAttributeValidation
      layout {
         widget "Description"	
         widget "Role"
         widget "Review Defect"   
         composite {
         	numColumns 8
            widget "Review Blocks"
            widget "Review Formal Type" 
            attributeWidget "ats.Need By"
            widget "Related To State"
         }      
         composite {
         	numColumns 4
            attributeWidget "ats.Estimated Hours"
            attributeWidget "ats.Estimated Completion Date"
         }
         composite {
            numColumns 8
            attributeWidget "ats.LOC Changed"
            attributeWidget "ats.LOC Reviewed"
            attributeWidget "ats.Pages Changed"
            attributeWidget "ats.Pages Reviewed"
         }
         widget "Resolution"
      }
   }

   state "Meeting" {
      type Working
      ordinal 3
      to "Cancelled"
      to "Review" OverrideAttributeValidation
      to "Completed" AsDefault
      to "Prepare" OverrideAttributeValidation
      layout {
         composite {
         	numColumns 4
            attributeWidget "ats.Estimated Hours"
            attributeWidget "ats.Estimated Completion Date"
         }
         composite {
            numColumns 4
            widget "Meeting Length"
            widget "Meeting Location"
         }
         widget "Meeting Attendees"
         widget "Description"	
         widget "Role"
         widget "Review Defect"
         composite {
            numColumns 8
            attributeWidget "ats.LOC Changed"
            attributeWidget "ats.LOC Reviewed"
            attributeWidget "ats.Pages Changed"
            attributeWidget "ats.Pages Reviewed"
         }
         widget "Resolution"
      }
   }

   state "Completed" {
      type Completed
      ordinal 4
      to "Meeting" OverrideAttributeValidation
      to "Review" OverrideAttributeValidation
      rule AddDecisionValidateBlockingReview
      color DARK_GREEN
   }
   
   state "Cancelled" {
      type Cancelled
      ordinal 5
      to "Prepare" OverrideAttributeValidation
      to "Review" OverrideAttributeValidation
      to "Meeting" OverrideAttributeValidation
      color DARK_GREEN
   }
}
