Work item Form creation for quicklink form

Which IIQ version are you inquiring about?

Version 8.0

Share all details related to your problem, including any error messages you may have received.

I’m working on quicklink form and generating access request once the quicklink form is submitted. The approval flow is displayed properly in access request but workitem with form data which i selected during submission of quicklink form is not getting generated. I’m passing workItemForm argument with my custom form name.

Hi Lalitha,

Could you share the xml object?

1 Like

Hi @LalithyaReddy,

I am not exactly sure what are your requirements, but here’s a way to generate approvals from quicklink form submissions:

  1. Have a quicklink configured to launch a workflow by setting the quicklink action as workflow
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE QuickLink PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<QuickLink action="workflow" category="Custom"
  1. You can have a workflow embedded form that will collect the information (configure as required)
  2. Upon submission of the form transition to a workitem (type approval) configure the owner at the approval step.

This is a very high-level brief of the process, please tweak it accordingly.

I have attached a sample workflow that may be of help here.

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Workflow PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Workflow created="1629837882606" explicitTransitions="true" id="7f0000017b791eab817b79e874ee0105" modified="1629839384450" name="Request-CellPhone" type="">
  <Variable initializer="string:true" input="true" name="trace"/>
  <Variable initializer="string:false" input="true" name="transient"/>
  <Variable input="true" name="manager"/>
  <Variable input="true" name="requester"/>
  <Variable input="true" name="requesterEmail"/>
  <Variable input="true" name="managerEmail"/>
  <Variable name="phoneType"/>
  <Variable name="jobType"/>
  <Variable name="requesterComments"/>
  <Variable name="managerComments"/>
  <Variable name="dateNeeded"/>
  <Step icon="Start" name="Start" posX="28" posY="10">
    <Transition to="Print Input Variables"/>
  </Step>
  <Step icon="Message" name="RequesterForm" posX="280" posY="10">
    <Approval name="CellPhoneRequest-Form" owner="ref:requester" return="dateNeeded,requesterComments,phoneType,jobType" send="requester">
      <Arg name="workItemDescription" value="Enter Cell Phone Requirements for $(requester)"/>
      <Arg name="workItemRequester" value="ref:requester"/>
      <Arg name="workItemType" value="Form"/>
      <Form name="CellPhoneRequest-Form">
        <Attributes>
          <Map>
            <entry key="pageTitle" value="CellPhoneRequest-Form"/>
          </Map>
        </Attributes>
        <Section label="Instructions" name="userInstructions" type="text">
          <Field name="instructions" value="Please enter your choice of cell phone, your job type and any comments regarding your request."/>
        </Section>
        <Section label="Phone Request">
          <Field displayName="Phone" name="phoneType" required="true">
            <AllowedValuesDefinition>
              <Value>
                <List>
                  <String>iPhone</String>
                  <String>Android</String>
                  <String>Windows Phone</String>
                </List>
              </Value>
            </AllowedValuesDefinition>
          </Field>
          <Field displayName="Job Function" name="jobType" required="true">
            <AllowedValuesDefinition>
              <Value>
                <List>
                  <String>Sales</String>
                  <String>Support</String>
                  <String>Services</String>
                  <String>Executive</String>
                </List>
              </Value>
            </AllowedValuesDefinition>
          </Field>
          <Field displayName="Date Needed" name="dateNeeded" required="true" type="date"/>
          <Field displayName="Comments" displayType="textarea" name="requesterComments"/>
        </Section>
        <Button action="next" label="Submit for approval"/>
        <Button action="cancel" label="Fill in later"/>
      </Form>
    </Approval>
    <Transition to="ManagerForm"/>
  </Step>
  <Step icon="Message" name="ManagerForm" posX="414" posY="10">
    <Approval name="ManagerForm" owner="ref:manager" return="managerComments" send="requester,phoneType,jobType,requesterComments,dateNeeded">
      <Arg name="workItemDescription" value="Approval cell phone: $(requester)"/>
      <Arg name="workItemRequester" value="ref:requester"/>
      <Arg name="workItemNotificationTemplate" value="CellPhoneManagerApproval"/>
      <Arg name="workItemType" value="Form"/>
      <Arg name="requesterName" value="ref:requester"/>
      <Form name="ManagerForm">
        <Attributes>
          <Map>
            <entry key="pageTitle" value="ManagerForm"/>
          </Map>
        </Attributes>
        <Section label="Instructions" name="userInstructions" type="text">
          <Field name="instructions" value="The following employee has requested a cell phone."/>
          <Field displayName="Employee Name:" name="requester"/>
          <Field displayName="Phone Type:" name="phoneType"/>
          <Field displayName="Job Function:" name="jobType"/>
          <Field displayName="Comments:" name="requesterComments"/>
          <Field displayName="Date Requested" name="dateNeeded" type="date">
            <Attributes>
              <Map>
                <entry key="readOnly" value="true"/>
              </Map>
            </Attributes>
          </Field>
        </Section>
        <Section label="Comments">
          <Field displayName="Comments" displayType="textarea" name="managerComments"/>
        </Section>
        <Button action="next" label="Approve Request"/>
        <Button action="back" label="Reject Request"/>
      </Form>
    </Approval>
    <Transition to="Approved" when="script:approved"/>
    <Transition to="Rejected"/>
  </Step>
  <Step action="call:sendEmail" icon="Email" name="Approved" posX="573" posY="7">
    <Arg name="template" value="CellPhoneApproved"/>
    <Arg name="comments" value="ref:managerComments"/>
    <Arg name="from" value="ref:managerEmail"/>
    <Arg name="to" value="ref:requesterEmail"/>
    <Transition to="ProvisionCellPhone"/>
  </Step>
  <Step action="call:sendEmail" icon="Email" name="ProvisionCellPhone" posX="669" posY="10">
    <Arg name="template" value="CellPhoneProvision"/>
    <Arg name="phoneType" value="ref:phoneType"/>
    <Arg name="dateNeeded" value="ref:dateNeeded"/>
    <Arg name="managerComments" value="ref:managerComments"/>
    <Arg name="from" value="ref:requesterEmail"/>
    <Arg name="to" value="[email protected]"/>
    <Arg name="jobType" value="ref:jobType"/>
    <Arg name="requesterComments" value="ref:requesterComments"/>
    <Transition to="Stop"/>
  </Step>
  <Step action="call:sendEmail" icon="Email" name="Rejected" posX="532" posY="126">
    <Arg name="template" value="CellPhoneRejected"/>
    <Arg name="comments" value="ref:managerComments"/>
    <Arg name="from" value="ref:managerEmail"/>
    <Arg name="to" value="ref:requesterEmail"/>
    <Transition to="Stop"/>
  </Step>
  <Step icon="Stop" name="Stop" posX="800" posY="10"/>
  <Step icon="Default" name="Print Input Variables" posX="140" posY="10">
    <Script>
      <Source>System.out.println("manager = " + manager); 
System.out.println("requester = " + requester); 
System.out.println("managerEmail = " + managerEmail); 
System.out.println("requesterEmail = " + requesterEmail);</Source>
    </Script>
    <Transition to="RequesterForm"/>
  </Step>
</Workflow>

Hope this helps

3 Likes

Hi @BalajiChandrasekaran /@sreeram ,

Thank you for your prompt responses.

I’ve written code the same as how you mentioned achieving the use case… but the question I have is… I need to create an auto approve workitem(Type: Form) with the form details that was entered by the requester.

Kindly let me know if any additional information is required.

Thanks

Hi @LalithyaReddy

You want to auto approve the workitem if the requester and approver are the same? Is that your requirement?

Hi @LalithyaReddy,

Once you resolve the owner of the rule using rule\script you can use the following logic to auto-approve the workitem

              if (owner.equals(launcher)) {
                item.setState(WorkItem.State.Finished);
                System.out.println("The launcher and the approver are the same, launcher removed from approvers");
              }
1 Like

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