Skip to main content

SAP BuildMap Rule

Overview

This rule gathers additional attributes from SAP systems to build accounts. This rule is implemented using SAP's Java Connector (JCo) framework provided by a supplied SAP connection.

Execution

  • Connector Execution - This rule executes within the virtual appliance. It may offer special abilities to perform connector-related functions, and it may offer managed connections to sources.
  • Logging - Logging statements are viewable within the ccg.log on the virtual appliance, and they are viewable by SailPoint personnel.

Rule Execution

Input

ArgumentTypePurpose
objectsailpoint.object.AttributesReference to a SailPoint attributes object (basically a map object with some added convenience methods) that holds the attributes that have been built up by the default connector implementation. The rule should modify this object to change, add, or remove attributes from the map.
connectorsailpoint.connector.SAPInternalConnectorReference to the current SAP connector.
statejava.util.MapMap that can be used to store and share data between executions of this rule during a single aggregation run.
applicationsailpoint.object.ApplicationAttribute value for the identity attribute before the rule runs.
schemasailpoint.object.SchemaReference to the schema object for the delimited file source being read.
destinationcom.sap.conn.jco.JCoDestinationConnected and ready-to-use SAP destination object that can be used to call BAPI function modules and call to SAP tables.

Template

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Rule PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Rule name="Example Rule" type="SAPBuildMap">
<Description>Describe your rule here.</Description>
<Source><![CDATA[

// Add your logic here.

]]></Source>
</Rule>

Example

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Rule PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Rule name="Example Rule" type="SAPBuildMap">
<Description> This example SAP Build Map rule constructs an Initials attribute from the first character of the FirstName and LastName attributes and changes the name of the “InitDate” attribute toHireDate. </Description>
<Source><![CDATA[
import java.util.HashMap;

// Create initials

String firstName = object.get("FirstName");
String lastName = object.get("LastName");

String initials = "";

if ( firstName != null && firstName.length() > 0 ) {
char letter = firstName.charAt(0);
letter = Character.toUpperCase(letter);
initials = letter + ".";
}

if ( lastName != null && lastName.length() > 0 ) {
letter = lastName.charAt(0);
letter = Character.toUpperCase(letter);
initials += letter + ".";
}

object.put("Initials", initials);
object.put("HireDate", object.remove("InitDate"));

]]></Source>
</Rule>

Attach to Source

Refer to Attaching Connector-Related Rules to Sources for details on how to attach your rule to your source.