I recently learned that it's possible to add javascript to rules in control files by manually editing the XML. This appears to be fully functional when using the control file in RPD, but is unavailable through the plugin itself, and a control file that has been manually edited this way cannot be loaded into the control file. It would be great to have the option within the plugin, because it would allow for more complex rule creation without needing to go outside the normal process.
Example of javascript in a control file:
x<Criterion booleanOperator="and" elementId="Rule 2" matchType="positive" objectId="nested" uiName="ExampleScript">
<Criterion elementId="Rule 2 - RuleExpression 1" matchType="positive" objectId="binarylogical" uiType="RuleExpression">
<Params>
<JSContent><![CDATA[${Doc.Custom.DocLetterType}.indexOf('Statement') >= 0]]></JSContent>
</Params>
</Criterion>
<CriterionElementId uiElemId="FIRST_FRONT_ONLY" uiLeftOperandType="PreDefRule" uiMatch="positive" uiOperator="==" uiType="PredefRule">FIRST_FRONT_ONLY</CriterionElementId>
<RuleInfo>
<Description>
<![CDATA[]]>
</Description>
<Name>
<![CDATA[ExampleScript]]>
</Name>
</RuleInfo>
</Criterion>