Workflow Form attributes

Which IIQ version are you inquiring about?

8.3

I have a workflow form and there is some editable attributes.

How could I retrieve the value of those attributes and modify the provisioning plan.

Hi @AhmedWaleed ,

Define the editable attribute as variable in your workflow like below.

<Variable editable="true" name="accountName">
    <Description>Account Name </Description>
  </Variable>

In the workflow step add your attribute in return and send like below.

 <Step icon="Default" name="Form" posX="118" posY="9">
    <Approval name="workflow form" owner="ref:launcher" return="accountName" send="accountName">
 

You can retrieve the attribute’s value and incorporate it into your plan.

Regards,
Arun

Hi @AhmedWaleed,

Please refer the sample workflow to retrieve the attributes from form.

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Workflow PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Workflow configForm="Provisioning Workflow Config Form" explicitTransitions="true" handler="sailpoint.api.StandardWorkflowHandler" libraries="Identity,Role,PolicyViolation,LCM,BatchRequest" name="Manage Accounts" taskType="LCM" type="LCMProvisioning">
  <Variable input="true" name="identityName">
    <Description>The name of the identity being updated.</Description>
  </Variable>
  <Variable editable="true" name="comments">
    <Description>Additional comments of the account</Description>
  </Variable>
  <Variable editable="true" name="purposeOfTheAccount">
    <Description>Purpose of the Service account</Description>
  </Variable>
  <Variable editable="true" name="accountName">
    <Description>Name of the Service account selected</Description>
  </Variable>
  <Step icon="Start" name="Start" posX="25" posY="10">
    <Transition to="WorkflowForm"/>
  </Step>
  <Step icon="Default" name="WorkflowForm" posX="118" posY="9">
    <Approval name="Account form" owner="ref:launcher" return="purposeOfTheAccount,comments,accountName" send="purposeOfTheAccount,comments,accountName">
      <Form name="Account form">
        <Attributes>
          <Map>
            <entry key="pageTitle" value="Manage Account form"/>
          </Map>
        </Attributes>
        <Button action="cancel" label="Cancel"/>
        <Button action="next" label="Submit"/>
        <Section label="Account">
          <Field displayName="Purpose of the Account:" displayType="textarea" dynamic="true" helpKey="Enter purpose of the account" name="purposeOfTheAccount" type="string"/>
          <Field displayName="Additional Comments:" displayType="textarea" dynamic="true" helpKey="Enter additional comments for this account" name="comments"/>
		  <Field displayName="accountName" displayType="textarea" dynamic="true"  helpKey="account name" name="accountName"/>
        </Section>
      </Form>
    </Approval>
    <Arg name="purposeOfTheAccount" value="ref:purposeOfTheAccount"/>
    <Arg name="comments" value="ref:comments"/>
	<Arg name="accountName" value="ref:accountName"/>
    <Transition to="buildPlan"/>
  </Step>
  <Step icon="Default" name="buildPlan" posX="267" posY="9">
    <Arg name="purposeOfTheAccount" value="ref:purposeOfTheAccount"/>
    <Arg name="accountName" value="ref:accountName"/>
    <Arg name="comments" value="ref:comments"/>

You can get the attributes in your build plan step and modify as per your requirement.

Regards,
Arun

Hello @Arun-Kumar

I did as above but still im not able to get them after editing them.

Please find my workflow and rule and logging below:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Workflow PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Workflow created="1724848258926" explicitTransitions="true" id="0ac8749091091c99819198f7bf6e4c51" libraries="Identity" modified="1725026658055" name="Provision Approval Subprocess JDBC" type="Subprocess">
  <Variable initializer="serial" input="true" name="approvalMode">
    <Description>A string that specifies how we should handle the approvals.

        By default this is serial since most of these request with
        the exception of manager transfers will have only one approver.

        parallel
        Approvals are processed concurrently and there must be consensus,
        we wait for all approvers to approve.  The first approver that
        rejects terminates the entire approval.

        parallelPoll
        Approvals are processed concurrently but consensus is not required.
        All approvals will be processed, we don&amp;#39;t stop if there are any
        rejections.

        serial
        Approvals are processed one at a time and there must be consensus.
        The first approver that rejects terminates the entire approval.

        serialPoll
        Approvals are processed in order but consensus is not required.
        All approvals will be processed, we don&amp;#39;t stop if there are any
        rejections.  In effect we are &amp;quot;taking a poll&amp;quot; of the approvers.

        any
        Approvals are processed concurrently, the first approver to
        respond makes the decision for the group.</Description>
  </Variable>
  <Variable input="true" name="approvalScheme">
    <Description>A csv string that specifies how approval items should be generated 
      for the incoming request.

      The value can be &amp;quot;none&amp;quot;, in which case approvals are disabled.

      The value can also be a combination of any of the values below 
      in any order, separated by commas. The order in which they are 
      specified is the order in which they are processed:

      owner
        The object owner gets the approval item. 
        For Role approvals this is the Role object owner. 
        For Entitlement approvals this is the Entitlement object owner.

      manager
        The manager gets the approval item.

      securityOfficer
        The identity in the variable securityOfficerName gets the approval item.

      identity
        The identities/workgroups in the variable approvingIdentities get the approval item.</Description>
  </Variable>
  <Variable input="true" name="approvingIdentities">
    <Description>List of identities and/or workgroups names/ids that should be involved in the approval 
       process.</Description>
  </Variable>
  <Variable initializer="spadmin" input="true" name="fallbackApprover">
    <Description>A String that specifies the name of the Identity that will 
      be assigned any approvals where the owner of the approver 
      can&amp;#39;t be resolved. Example if the scheme is &amp;quot;owner&amp;quot; and the 
      application doesn&amp;#39;t specify and owner.</Description>
  </Variable>
  <Variable input="true" name="flow">
    <Description>The name of the LCM flow that launched this workflow.

      This is one of these values:

      AccountsRequest
      EntitlementsRequest
      RolesRequest
      IdentityCreateRequest
      IdentityEditRequest
      ForgotPassword
      ExpiredPassword
      PasswordRequest
      joiner
      mover
      leaver
      AttributeSync</Description>
  </Variable>
  <Variable input="true" name="identityName">
    <Description>The name of the identity being updated.</Description>
  </Variable>
  <Variable input="true" name="identityDisplayName">
    <Description>The displayName of the identity being updated.
      Query for this using a projection query and fall back to the name.</Description>
  </Variable>
  <Variable input="true" name="identityRequestId">
    <Description>The ID of the IdentityRequest for this request.</Description>
  </Variable>
  <Variable input="true" name="noTriggers">
    <Description>If true, then do no attempt to trigger lifecycle events.</Description>
  </Variable>
  <Variable input="true" name="policyViolations">
    <Description>List of policy violations that were found during our initial policy scan.
       This list is passed into each work item so the approvers can see
       pending violations.</Description>
  </Variable>
  <Variable input="true" name="managerElectronicSignature">
    <Description>The name of the electronic signature object that should be used when workitems
       are completed by a manager.</Description>
  </Variable>
  <Variable input="true" name="ownerElectronicSignature">
    <Description>The name of the electronic signature object that should be used when workitems
       are completed by object owners.</Description>
  </Variable>
  <Variable input="true" name="securityOfficerElectronicSignature">
    <Description>The name of the electronic signature object that should be used when workitems
       are completed by the security officer.</Description>
  </Variable>
  <Variable input="true" name="identityElectronicSignature">
    <Description>The name of the electronic signature object that should be used when workitems
       are completed by object owners.</Description>
  </Variable>
  <Variable initializer="LCM Identity Update Approval" input="true" name="managerEmailTemplate">
    <Description>Name of the email template to use when manager of pending approvals.</Description>
  </Variable>
  <Variable initializer="LCM Identity Update Approval" input="true" name="ownerEmailTemplate">
    <Description>Name of the email template to use when notifying the owner of pending approvals.</Description>
  </Variable>
  <Variable initializer="LCM Identity Update Approval" input="true" name="securityOfficerEmailTemplate">
    <Description>Name of the email template to use when notifying the security officer of pending approvals.</Description>
  </Variable>
  <Variable initializer="LCM Identity Update Approval" input="true" name="identityEmailTemplate">
    <Description>Name of the email template to use when notifying the security officer of pending approvals.</Description>
  </Variable>
  <Variable initializer="false" name="trace">
    <Description>Used for debugging this workflow and when set to true trace
      will be sent to stdout.</Description>
  </Variable>
  <Variable input="true" name="workItemDescription">
    <Description>String &amp;quot;template&amp;quot; that will be used as the workitem description.</Description>
  </Variable>
  <Variable input="true" name="workItemEscalationTemplate">
    <Description>The email template that should be used when sending out reminders.</Description>
  </Variable>
  <Variable input="true" name="workItemHoursBetweenReminders">
    <Description>The number of hours to wait between sending reminders to approvers.</Description>
  </Variable>
  <Variable input="true" name="workItemHoursTillEscalation">
    <Description>The number of hourse to wait until an approval should be escalated.</Description>
  </Variable>
  <Variable initializer="Normal" input="true" name="workItemPriority">
    <Description>The String version of a WorkItem.Priority. This variable is
       used to set the priority on all of the workitems generated
       as part of this workflow and also set on the IdentityRequest
       object.</Description>
  </Variable>
  <Variable input="true" name="workItemReminderTemplate">
    <Description>The email template that should be used when sending out reminders.</Description>
  </Variable>
  <Variable input="true" name="workItemEscalationRule">
    <Description>The rule used to assign a new ownder during escalation.</Description>
  </Variable>
  <Variable input="true" name="workItemMaxReminders">
    <Description>The maximum number of reminder emails that will be sent before we begin the escalation process.</Description>
  </Variable>
  <Variable initializer="true" input="true" name="filterRejects">
    <Description>True to filter rejected items when running in Serial/SerialPoll mode.</Description>
  </Variable>
  <Variable initializer="false" input="true" name="setPreviousApprovalDecisions">
    <Description>True to pre-populate approval decisions from previous approvals.</Description>
  </Variable>
  <Variable initializer="false" input="true" name="clearApprovalDecisions">
    <Description>True to clear all decisions when generating approvals</Description>
  </Variable>
  <Variable initializer="true" input="true" name="dontUpdatePlan">
    <Description>True to skip updating the ProvisioningProject masterPlan when processing approval decisions.</Description>
  </Variable>
  <Variable input="true" name="approvalSet" output="true">
    <Description>ApprovalSet representing the things that were requested and come from
      the master provisioning plan.</Description>
  </Variable>
  <Variable editable="true" input="true" name="project" output="true">
    <Description>ProvisioningProject which is just a compiled version of the ProvisioningPlan, the 
      master plan will be adjusted when approval decisions are applied and a new 
      revised provisiobion project will be returned.</Description>
  </Variable>
  <Variable input="true" name="plan" output="true">
    <Description>The provisioning plan.</Description>
  </Variable>
  <Variable initializer="false" input="true" name="requireCommentsForApproval">
    <Description>When true we will require comments when an approval item is approved.</Description>
  </Variable>
  <Variable initializer="false" input="true" name="requireCommentsForDenial">
    <Description>When true we will require comments when an approval item is denied.</Description>
  </Variable>
  <Variable editable="true" name="IdNumber"/>
  <Variable editable="true" name="InsertUserId"/>
  <Description>Simple approval subrocess introduced into release 6.2 to make
    adding custom approvals easier.  This approval subprocess
    has a configuration form to make it easier to configure
    from the Business Process Editor.</Description>
  <RuleLibraries>
    <Reference class="sailpoint.object.Rule" id="0ac87490865410108186548059400187" name="LCM Workflow Library"/>
  </RuleLibraries>
  <Step icon="Start" name="Start" posX="20" posY="22">
    <Transition to="Approval"/>
  </Step>
  <Step icon="Approval" name="Approval" posX="154" posY="25">
    <Approval mode="ref:approvalMode" name="Approval Form" owner="call:buildCommonApprovals" renderer="lcmWorkItemRenderer.xhtml" return="" send="identityDisplayName,identityName,approvalSet,flow,policyViolations,identityRequestId">
      <AfterScript>
        <Source>
          import sailpoint.workflow.IdentityRequestLibrary;
                    
          if ( item == null ) 
              return;

          assimilateWorkItemApprovalSet(wfcontext, item, approvalSet);          
          auditDecisions(item);  
          IdentityRequestLibrary.assimilateWorkItemApprovalSetToIdentityRequest(wfcontext, approvalSet);
        </Source>
      </AfterScript>
      <Arg name="launcher" value="ref:launcher"/>
      <Arg name="workItemDescription" value="ref:workItemDescription"/>
      <Arg name="workItemEscalationRule" value="ref:workItemEscalationRule"/>
      <Arg name="workItemEscalationTemplate" value="ref:workItemEscalationTemplate"/>
      <Arg name="workItemHoursTillEscalation" value="ref:workItemHoursTillEscalation"/>
      <Arg name="workItemMaxReminders" value="ref:workItemMaxReminders"/>
      <Arg name="workItemEscalationFrequency" value="ref:workItemEscalationFrequency"/>
      <Arg name="workItemHoursBetweenReminders" value="ref:workItemHoursBetweenReminders"/>
      <Arg name="workItemIdentityRequestId" value="ref:identityRequestId"/>
      <Arg name="workItemNotificationTemplate" value="ref:approvalEmailTemplate"/>
      <Arg name="workItemPriority" value="ref:workItemPriority"/>
      <Arg name="approvalMode" value="ref:approvalMode"/>
      <Arg name="approvalScheme" value="ref:approvalScheme"/>
      <Arg name="approvalSplitPoint" value="ref:approvalSplitPoint"/>
      <Arg name="clearApprovalDecisions" value="ref:clearApprovalDecisions"/>
      <Arg name="workItemReminderTemplate" value="ref:workItemReminderTemplate"/>
      <Arg name="workItemRequester" value="$(launcher)"/>
      <Arg name="project" value="ref:project"/>
      <Form name="Approval Form">
        <Attributes>
          <Map>
            <entry key="pageTitle" value="Approval Form"/>
          </Map>
        </Attributes>
        <Section label="Intsructions" name="Intsructions">
          <Field displayName="Email" name="Email" type="string">
            <Attributes>
              <Map>
                <entry key="readOnly" value="true"/>
              </Map>
            </Attributes>
            <RuleRef>
              <Reference class="sailpoint.object.Rule" id="0ac8749091091c9981919464a28207ff" name="Test-Username"/>
            </RuleRef>
          </Field>
          <Field displayName="Display Name" name="DisplayName" type="string">
            <Attributes>
              <Map>
                <entry key="readOnly" value="true"/>
              </Map>
            </Attributes>
            <RuleRef>
              <Reference class="sailpoint.object.Rule" id="0ac874909199178e81919d4786a50729" name="JDBC-DisplayName"/>
            </RuleRef>
          </Field>
          <Field displayName="InsertUserId" name="InsertUserId" type="string">
            <RuleRef>
              <Reference class="sailpoint.object.Rule" id="0ac874909199178e81919d4e2b260732" name="JDBC - InsertUserId"/>
            </RuleRef>
          </Field>
          <Field displayName="IdNumber" name="IdNumber" type="string">
            <RuleRef>
              <Reference class="sailpoint.object.Rule" id="0ac874909199178e81919d523210073b" name="JDBC - IdNumber"/>
            </RuleRef>
          </Field>
        </Section>
        <Button action="next" label="Next"/>
        <Button action="cancel" label="Cancel"/>
      </Form>
      <InterceptorScript>
        <Source>
            
            import sailpoint.object.Workflow.Approval;
            import sailpoint.object.ApprovalItem;
            import sailpoint.object.ApprovalSet;
            import sailpoint.object.Workflow;
            import sailpoint.object.WorkItem;
            import sailpoint.tools.Util;
            import java.util.Iterator;
            import java.util.ArrayList;
            import java.lang.Boolean;

            if (Workflow.INTERCEPTOR_PRE_ASSIMILATION.equals(method)) {
                // promote completion state to Rejected if all items are rejected
                ApprovalSet aset = item.getApprovalSet();
                if (aset != null) {
                    List items = aset.getItems();
                    if (items != null) {
                        int rejectCount = 0;
                        for (ApprovalItem item : items) {
                            // note that isRejected can't be used since that
                            // assumes no answer means rejected
                            if (item.getState() == WorkItem.State.Rejected) {
                                rejectCount++;
                            }
                        }
                        if (rejectCount == items.size()) {
                            item.setState(WorkItem.State.Rejected);
                        }
                    }
                }
            } else if (Workflow.INTERCEPTOR_START_APPROVAL.equals(method)) {

                ApprovalSet currentSet = approval.getApprovalSet();

                if (currentSet != null &amp;&amp; !Util.isEmpty(currentSet.getItems())) {
                    //If filterRejects is true, filter any rejected items in the master ApprovalSet from the currentSet
                    if (Boolean.valueOf(filterRejects)) {
                        filterRejectsFromApprovalSet(approvalSet, currentSet);
                    }

                    //We've filtered all items from the approval set
                    if (Util.isEmpty(currentSet.getItems())) {
                        //Complete the approval if it contains no ApprovalItems
                        approval.setComplete(true);
                    } else {

                        if (Boolean.valueOf(setPreviousApprovalDecisions)) {
                            // If setPreviousApprovalDecisions is enabled, set the decision
                            // on the items to that of the global item.
                            setPreviousDecisionsOnApprovalSet(approvalSet, currentSet);
                        }
                    }
                }

            } else if (Workflow.INTERCEPTOR_END_APPROVAL.equals(method)) {
                // Owner children approvals need to propagate the rejection state if all children are rejected
                Approval parentApp = approval.getParent();
                // Never relay the state to the root approval
                // If we don't have an approvalSet, must be a container approval
                if (parentApp != null &amp;&amp; approval.getApprovalSet() == null) {
                    boolean completeAndRejected = false;
                    for (Approval child : Util.safeIterable(approval.getChildren())) {
                        if (child.isComplete() &amp;&amp; child.getState() == WorkItem.State.Rejected) {
                            completeAndRejected = true;
                        } else {
                            completeAndRejected = false;
                            break;
                        }
                    }
                    //If all children complete and rejected, set the status on the parent approval
                    if (completeAndRejected) {
                        approval.setState(WorkItem.State.Rejected);
                    }
                }
            } else if (Workflow.INTERCEPTOR_OPEN_WORK_ITEM.equals(method)) {
               import sailpoint.workflow.IdentityRequestLibrary;

               //Sync IdentityRequestItems with the WorkItem
               IdentityRequestLibrary.assimilateWorkItemApprovalSetToIdentityRequest(wfcontext, item.getApprovalSet(), false);
            }
            
        </Source>
      </InterceptorScript>
    </Approval>
    <Arg name="IdNumber" value="ref:IdNumber"/>
    <Arg name="project" value="ref:project"/>
    <Arg name="InsertUserId" value="ref:InsertUserId"/>
    <Transition to="Process Approval Decisions" when="script:(step.getApproval() != null &amp;&amp; step.getApproval().containsApprovalItems())"/>
    <Transition to="end"/>
  </Step>
  <Step action="call:processApprovalDecisions" icon="Task" name="Process Approval Decisions" posX="420" resultVariable="project">
    <Arg name="disableAudit" value="true"/>
    <Arg name="dontUpdatePlan" value="ref:dontUpdatePlan"/>
    <Arg name="approvalSet" value="ref:approvalSet"/>
    <Arg name="recompilePlan" value="true"/>
    <Arg name="project" value="ref:project"/>
    <Arg name="plan" value="ref:plan"/>
    <Transition to="Update Project"/>
  </Step>
  <Step icon="Stop" name="end" posX="420" posY="225"/>
  <Step action="rule:Update Project" icon="Default" name="Update Project" posX="547" posY="126">
    <Arg name="IdNumber" value="ref:IdNumber"/>
    <Arg name="project" value="ref:project"/>
    <Arg name="InsertUserId" value="ref:InsertUserId"/>
    <Transition to="end"/>
  </Step>
</Workflow>

The rule in the last step “Update Project” wont get the attibutes:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Rule PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Rule created="1725023989329" id="0ac874909199178e8191a3712e5111fc" language="beanshell" name="Update Project" type="Workflow">
  <Description>A rule used by a Workflow to determine a step action or variable value.

Note that an Attributes map of all variables from the current WorkflowContext, merged with the arguments from the Step, is also passed into the workflow rule.</Description>
  <Signature returnType="Object">
    <Inputs>
      <Argument name="log" type="org.apache.commons.logging.Log">
        <Description>
          The log object associated with the SailPointContext.
        </Description>
      </Argument>
      <Argument name="context" type="sailpoint.api.SailPointContext">
        <Description>
          A sailpoint.api.SailPointContext object that can be used to query the database if necessary.
        </Description>
      </Argument>
      <Argument name="wfcontext">
        <Description>
          The current WorkflowContext.
        </Description>
      </Argument>
      <Argument name="handler">
        <Description>
          The workflow handler associated with the current WorkflowContext.
        </Description>
      </Argument>
      <Argument name="workflow">
        <Description>
          The current Workflow definition.
        </Description>
      </Argument>
      <Argument name="step">
        <Description>
          The current Step.
        </Description>
      </Argument>
      <Argument name="approval">
        <Description>
          The current Approval.
        </Description>
      </Argument>
      <Argument name="item">
        <Description>
          The WorkItem being processed.
        </Description>
      </Argument>
    </Inputs>
    <Returns>
      <Argument name="Object">
        <Description>
          The result of the workflow rule; dependent on the rule itself.
        </Description>
      </Argument>
    </Returns>
  </Signature>
  <Source>import sailpoint.object.ProvisioningPlan;
import sailpoint.object.ProvisioningProject;
import sailpoint.object.ProvisioningPlan.AccountRequest;
import sailpoint.object.ProvisioningPlan.AttributeRequest;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

Log serilog = LogFactory.getLog("sailpoint.AttributeUpdate.WorkflowRule");
serilog.debug("Starting the script.");

try {
    ProvisioningProject project = workflow.get("project");
    String IdNumber = workflow.get("IdNumber");
    String InsertUserId = workflow.get("InsertUserId");

    if (project != null) {
        serilog.debug("ProvisioningProject retrieved.");

        List plans = project.getPlans();
        if (plans != null) {
            int planSize = plans.size();
            if (planSize > 0) {
                serilog.debug("Number of ProvisioningPlans: " + planSize);

                for (ProvisioningPlan plan : plans) {
                    if (plan != null) {
                        serilog.debug("Processing ProvisioningPlan.");

                        List accountRequests = plan.getAccountRequests();
                        if (accountRequests != null) {
                            int accountRequestSize = accountRequests.size();
                            if (accountRequestSize > 0) {
                                serilog.debug("Number of AccountRequests: " + accountRequestSize);

                                for (AccountRequest accountRequest : accountRequests) {
                                    if (accountRequest != null) {
                                        String applicationName = accountRequest.getApplicationName();
                                        serilog.debug("Processing AccountRequest for application: " + applicationName);

                                        List attributeRequests = accountRequest.getAttributeRequests();
                                        if (attributeRequests != null) {
                                            int attributeRequestSize = attributeRequests.size();
                                            if (attributeRequestSize > 0) {
                                                serilog.debug("Number of AttributeRequests: " + attributeRequestSize);

                                                for (AttributeRequest attributeRequest : attributeRequests) {
                                                    if (attributeRequest != null) {
                                                        String attributeName = attributeRequest.getName();
                                                        serilog.debug("Processing AttributeRequest with name: " + attributeName);

                                                        if ("IdNumber".equals(attributeName)) {
                                                            attributeRequest.setValue(IdNumber);
                                                            serilog.debug("Updated 'IdNumber' to: " + IdNumber);
                                                        } else if ("InsertUserId".equals(attributeName)) {
                                                            attributeRequest.setValue(InsertUserId);
                                                            serilog.debug("Updated 'InsertUserId' to: " + InsertUserId);
                                                        }
                                                    } else {
                                                        serilog.warn("Encountered null AttributeRequest in AccountRequest for application: " + applicationName);
                                                    }
                                                }

                                                accountRequest.setAttributeRequests(attributeRequests);
                                                serilog.debug("AttributeRequests updated for AccountRequest in application: " + applicationName);
                                            } else {
                                                serilog.warn("AttributeRequests list is empty for application: " + applicationName);
                                            }
                                        } else {
                                            serilog.warn("AttributeRequests list is null for application: " + applicationName);
                                        }
                                    } else {
                                        serilog.warn("Encountered null AccountRequest in ProvisioningPlan.");
                                    }
                                }

                                plan.setAccountRequests(accountRequests);
                                serilog.debug("AccountRequests updated in ProvisioningPlan.");
                            } else {
                                serilog.warn("AccountRequests list is empty in the ProvisioningPlan.");
                            }
                        } else {
                            serilog.warn("AccountRequests list is null in the ProvisioningPlan.");
                        }
                    } else {
                        serilog.warn("ProvisioningPlan is null.");
                    }
                }
            } else {
                serilog.warn("No ProvisioningPlans found in the ProvisioningProject.");
            }
        } else {
            serilog.warn("ProvisioningPlans list is null.");
        }
    } else {
        serilog.warn("ProvisioningProject is null.");
    }
} catch (Exception e) {
    serilog.error("Error in script", e);
}

serilog.debug("Script completed.");
</Source>
</Rule>
`

the logging states that the value is null:

2024-08-30T16:58:34,505 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Starting the script.
2024-08-30T16:58:34,505 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - ProvisioningProject retrieved.
2024-08-30T16:58:34,505 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Number of ProvisioningPlans: 1
2024-08-30T16:58:34,505 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Processing ProvisioningPlan.
2024-08-30T16:58:34,505 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Number of AccountRequests: 1
2024-08-30T16:58:34,506 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Processing AccountRequest for application: Lebara 360
2024-08-30T16:58:34,506 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Number of AttributeRequests: 8
2024-08-30T16:58:34,506 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Processing AttributeRequest with name: role
2024-08-30T16:58:34,506 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Processing AttributeRequest with name: DisplayName
2024-08-30T16:58:34,506 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Processing AttributeRequest with name: Email
2024-08-30T16:58:34,506 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Processing AttributeRequest with name: Source
2024-08-30T16:58:34,506 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Processing AttributeRequest with name: InsertUserId
2024-08-30T16:58:34,506 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Updated 'InsertUserId' to: null
2024-08-30T16:58:34,506 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Processing AttributeRequest with name: Status
2024-08-30T16:58:34,506 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Processing AttributeRequest with name: IdNumber
2024-08-30T16:58:34,506 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Updated 'IdNumber' to: null
2024-08-30T16:58:34,506 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Processing AttributeRequest with name: Password
2024-08-30T16:58:34,507 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - AttributeRequests updated for AccountRequest in application: Lebara 360
2024-08-30T16:58:34,507 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - AccountRequests updated in ProvisioningPlan.
2024-08-30T16:58:34,507 DEBUG https-jsse-nio-443-exec-7 sailpoint.AttributeUpdate.WorkflowRule:166 - Script completed.

Please let me know if you want anything else

Hi @AhmedWaleed,

you haven’t added the variable names(IdNumber,InsertUserId) in return and send approval attribute.

  <Step icon="Approval" name="Approval" posX="154" posY="25">
    <Approval mode="ref:approvalMode" name="Approval Form" owner="call:buildCommonApprovals" renderer="lcmWorkItemRenderer.xhtml" return="InsertUserId,IdNumber" send="identityDisplayName,identityName,approvalSet,flow,policyViolations,identityRequestId,InsertUserId,IdNumber">
      <AfterScript>
        <Source>

Thank @Arun-Kumar. It worked

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.