SailPoint Custom Form and Workflows

Using a map in the SailPoint workflow greatly simplifies the data exchange with the form. The form fields (attribute/value) correspond to the key/value pairs of the designated map.

The map can be initialized before presenting the form to the user in order to suggest certain default values. The map is rebuilt or overwritten after the form has been submitted. It can then be used for further processing, like building the provisioning plan.

What Can Be Achieved

  •  Data set on map can be displayed on the form (useful for pre-populating the form fields)
  •  Form data can be collected in the map

Configuration Required

  •  Define the map as a workflow process variable
  •  Specify map variable in the workItemFormBasePath field (this is passing the map to form)
  •  Specify map variable in the return field (this is returning the map from form)

Reading Attributes

String name = customMap.get("name");
String name= $(customMap.name);

Setting Attributes on the Map

customMap.put(“name”, “some value”);

Printing All Attributes

System.out.println(“Model Data:” + customMap.toString());

Example Workflow

<Workflow explicitTransitions=”true” handler=”sailpoint.api.StandardWorkflowHandler” libraries=”Identity,BatchRequest” name=”Custom Model Test” taskType=”LCM” type=”LCMProvisioning”>

<Variable initializer=”true” input=”true” name=”trace”/>

<Variable name=”customModel” type=”complex”>

<Description>The custom model that is used to collect and pass form data.</Description>

</Variable>

<Step icon=”Start” name=”Start” posX=”43″ posY=”148″>

<Transition to=”Display Custom Form”/>

</Step>

<Step name=”Initialize” posX=”169″ posY=”149″ resultVariable=”customModel”>

<Description>

Initialize the data in the model.

</Description>

<Script>

<Source>HashMap model = new HashMap();

model.put(“PINCode”, “777000”);

return model;</Source>

</Script>

<Transition to=”Display Application Form”/>

</Step>

<Step icon=”Approval” name=”Display Application Form” posX=”240″ posY=”2″>

<Approval mode=”serial” name=”Display Application Form” owner=”spadmin” return=”customModel”>

<Arg name=”workItemType” value=”Form”/>

<Arg name=”workItemDescription” value=”Display Application Form”/>

<Arg name=”workItemForm” value=”Application Form”/>

<Arg name=”workItemFormBasePath” value=”customModel”/>

</Approval>

<Description>

Display the application form

</Description>

<Transition to=”Debug”/>

</Step>

<Step icon=”Default” name=”Debug” posX=”340″ posY=”21″>

<Script>

<Source>System.out.println(“Model=” + customModel.toString());

System.out.println(“First Name=” + $(customModel.firstname));

System.out.println(“Last Name=” + customModel.get(“lastname”));

</Source>

</Script>

<Transition to=”end”/>

</Step>

<Step icon=”Stop” name=”end” posX=”763″ posY=”15″/>

</Workflow>