×

IDMWORKS Blog

SailPoint Custom Form and Workflows


Using a map in the 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

Setting Attributes on the Map

Printing All Attributes

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>

Questions, comments or concerns? Feel free to reach out to us below, or email us at IDMWORKS to learn more about how you can protect your organization and customers.

Leave a Reply

Your email address will not be published. Required fields are marked *