Creating Forms In Sailpoint 7.0p3

Creating forms in an IIQ environment has been pretty consistent over the releases.

However with each release comes the possibility of some changes. Mentioned below are 2 solutions I found helpful when creating some forms with 7.0p3.

PostBack

The use of postBack in a form allows for a form to refresh when the field value changes. This is done by setting postBack=”true” in the specified field attribute in the Form. However, for this to work, the attribute below needs to be added to the HashMap in the form Model step of the workflow. This has been necessary starting 6.0.

map.put("transformerClass","sailpoint.transformer.IdentityTransformer");

Display The Form

nly required the create and approval step like below:

<Step icon="Default" name="Display Tech Req Form" posX="364" posY="255">
  <Approval description="script:return &quot;Display Form to Requester &quot;+ context.getObjectByName(Identity.class,identityName).getDisplayableName();" mode="serial" name="InfoSec Custom System Access Form" owner="ref:launcher" return="techRequestFormModel" send="identityName">
  <Arg name="workItemType" value="Form"/>
  <Arg name="workItemForm" value="ADS InfoSec Custom System Access Form"/>
  <Arg name="workItemFormBasePath" value="techRequestFormModel"/>
  <Arg name="workItemDescription" value="Submiit Technology Request Form to Manager"/>
  <Arg name="workItemRequester">
    <Script>
      <Source>
         if (null!=identityName){
             return   context.getObjectByName(Identity.class,identityName).getDisplayableName();
         }
         else {
             return identityName;
         } 
      </Source>
    </Script>
  </Arg>
  <OwnerScript>
     <Source>
        //import sailpoint.object.Identity;

        /**if (identityName!=null){
        Identity id = context.getObjectByName(Identity.class,identityName);

           if (id.getManager() !=null){
              return id.getManager();
           }

        }
        else{
           return spadmin;
        */}

        launcher;
     </Source>
  </OwnerScript>
  </Approval>
  <Description>Display the Technology Request Form</Description>
  <Transition to="Stop"/>
</Step>

However with iiq7.0p3 and most likely onwards, this will not be enough as the form will not be displayed and may even throw an error.

In order to successfully display the form, the identity Model will have to be built in a previous step. Below is the step to accomplish this:-

<Step action="call:getIdentityModel" name="Build Identity Model" posX="348" posY="409" resultVariable="techRequestFormModel">
  <Arg name="newManagerName" value="New Manager"/>
  <Arg name="effectiveDate"/>
    <Script>
      <Source>
         import java.util.*;
         import sailpoint.tools.*;
         import java.text.*;

         SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
         sdf.setLenient(true);

         Calendar calendar = Calendar.getInstance();

         //Number of Business days Ahead
         int days = 5;

         for (int i=0; i &lt; days;){

             calendar.add(Calendar.DAY_OF_MONTH,1);

             if(calendar.get(Calendar.DAY_OF_WEEK) > 1 &amp;&amp;            calendar.get(Calendar.DAY_OF_WEEK) &lt; 6){
                 i++;
             }
          }

          Date now = calendar.getTime();

          String daysAhead = sdf.format(now);

          return now;
      </Source>
    </Script>
  </Arg>
  <Arg name="email" value="[email protected]"/>
  <Transaction to="Display Tech Req Form"/>
</Step>

This step should be added prior to the approval step to display the form. Please pay close attention to the action in the step.

action="call:getIdentityModel"

This call to getIdentityModel will is the determining factor in successfully displaying the form.