CATRule for the Data Collect Checklist

Using a CATRule, you can specify the content (Label, Values, Text) of the created Rows in the Data Collect Checklist dialog box.

The following CATRules are in ..\resources\knowledge\scripts and is a specialized kind of used to Data Collect Plan in the sense that it can only have Rows of type Boolean.

DELWKIDataCollectChecklistReqAssociation.CATRule
Executed when creating rows in the dialog box.

These CATRule files specify as Business Logic (BL) that is called during an assignment allowing you to specify the content (Label, Values, Text) of the created Rows.

  • BL Input
    • Requirement being Assigned
  • BL Output
    • Row Label
    • Row Value or Values
    • Row Text

This Business Logic calls when a Requirement assigns to a Data Collect Checklist (DC CL). The Information extracts from the Requirement / FTA Requirement and a Row creates under the DC CL using the extracted information.

Example

A complete example file is available in ..\resources\knowledge\scripts\DELWKIDataCollectChecklistReqAssociation.CATRule.

Let AssociatedReqObject(Requirement) 
Let strReqName(String)
Let strRequirementText(String)
Let strRequirementRichText(String)
Let strReqLabel(String)

// Initialize Default Values
strReqName = ""
strRequirementText = ""
strRequirementRichText = ""
strReqLabel = ""

set AssociatedReqObject = Parameters->GetAttributeObject("AssociatedRequirement")
if (AssociatedReqObject <> NULL)
{         
    // Note: Use "name" (not "Name") to get the name of the Requirement
    strReqName = AssociatedReqObject.name

    // First Get Rich Text from the Requirement
    strRequirementRichText = AssociatedReqObject."Content Data"
    if (strRequirementRichText <> "")
    {
        Parameters->SetAttributeString("ReqText", strRequirementRichText)
    }
    else
    {
       // Get Text from the Requirement
       strRequirementText = AssociatedReqObject."Content Text"
       if (strRequirementText <> "")
       {
          Parameters->SetAttributeString("ReqText", strRequirementText)   
       }
    }
	// Get Requirement Label
    strReqLabel = AssociatedReqObject."Title"
    if (strReqLabel <> "")
    {
        Parameters->SetAttributeString("ReqLabel", strReqLabel)   
    }
}