Generic Rule - identity as input

There’s a note in the guide bundled with the validator zip that details how to do this:

Generic rules may need additional objects adding to the Signature. The next example shows that “identity” of type “sailpoint.object.Identity” is injected into the BeanShell script for linting:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Rule PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Rule name="Test" >
  <Description>Designed to generate mail for active directory. </Description>
  <Signature returnType="Object">
  <Inputs>
    <Argument name="identity" type="sailpoint.object.Identity">
      <Description>
        Identity object type pushed into this rule... note the "type" attribute is set
        to "sailpoint.object.Identity", if not type is specified the Linter will "assume"
        this is of type "string".
        </Description>
    </Argument>
  </Inputs> 
  </Signature>
  <Source><![CDATA[
	log.debug("Identity name: " + identity.getName());
]]></Source>
</Rule>
1 Like