Symantec IGA

 View Only
  • 1.  Identity Portal Workflow - Add approver comments to the final email

    Posted Feb 24, 2021 03:53 AM
    Hi,

    we implemented some workflow assigning user access rights on Identity Portal 14.3 CP2.
    The final workflow step is an implementation and the responsible technician usually add some comment with the final instructions for the requester.
    We need to add this comment in the final email sent to the user (implemented as an email template on task completion).

    How can we add the comment/history to the email template ?

    Thanks
    Fabrizio


  • 2.  RE: Identity Portal Workflow - Add approver comments to the final email

    Posted Feb 26, 2021 08:49 AM
    Are you referring to the standard comment section in IP? If yes, I can tell you how I query the IP DB to get the information.



  • 3.  RE: Identity Portal Workflow - Add approver comments to the final email
    Best Answer

    Posted Feb 26, 2021 09:49 AM
    Assuming you are referring to the standard comment section in IP...
    I get the task ID at the start of the task and use it to query WF and IP DB to see if a comment has been added. If yes, I write the comments, the ID, action, and apprvoal node to a multi-value logical attribute. Once you have the data captured you can send it in an email. The DBs and datasource name might be different in your deployment. The PX is below.

    <?xml version="1.0" encoding="UTF-8"?>
    <ims:ImsTemplate xsi:schemaLocation="http://imsenvironmentobjects/xsd imsconfig://schema/ImsEnvironmentObjects.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ims="http://imsenvironmentobjects/xsd" xmlns:imsrule="http://imsmemberrule/xsd" xmlns:imsscope="http://imsscoperule/xsd" xmlns:imschange="http://imschangeaction/xsd">
    <ManagedObject type="POLICY XPRESS EXPORT" friendlyName="Add Approval Comments from IP SQL Query">
    <Attribute name="friendlyName">Add Approval Comments from IP SQL Query</Attribute>
    <Attribute name="enabled">true</Attribute>
    <Attribute name="category">Life Cycle</Attribute>
    <Attribute name="description"/>
    <Attribute name="runOnce">false</Attribute>
    <Attribute name="priority">2</Attribute>
    <Attribute name="type">EVENT</Attribute>
    <Attribute name="system">false</Attribute>
    <Attribute name="template">PolicyXpress</Attribute>
    <Attribute name="templateData"/>
    <Attribute name="whenToRun"><![CDATA[<Related>
    <WhenToRun>
    <Attribute name="type">EVENT</Attribute>
    <Attribute name="step">APPROVED</Attribute>
    <Attribute name="eventName">ModifyUserEvent</Attribute>
    </WhenToRun>
    <WhenToRun>
    <Attribute name="type">EVENT</Attribute>
    <Attribute name="step">REJECTED</Attribute>
    <Attribute name="eventName">ModifyUserEvent</Attribute>
    </WhenToRun>
    </Related>
    ]]></Attribute>
    <Attribute name="dataElements"><![CDATA[<Related>
    <DataElement>
    <Attribute name="friendlyName">Get Task Tag</Attribute>
    <Attribute name="elementType">element.type.task.data</Attribute>
    <Attribute name="subElement">element.task.data.tag.name</Attribute>
    <Attribute name="priority">0</Attribute>
    </DataElement>
    <DataElement>
    <Attribute name="friendlyName">Get Task ID</Attribute>
    <Attribute name="elementType">element.type.user.attribute</Attribute>
    <Attribute name="subElement">element.user.attribute.get</Attribute>
    <Attribute name="priority">1</Attribute>
    <PxParameter extraInfo="" index="1" uiType="SELECTED">|taskID|</PxParameter>
    </DataElement>
    <DataElement>
    <Attribute name="friendlyName">Get IP taskID</Attribute>
    <Attribute name="elementType">element.type.sql.query.data</Attribute>
    <Attribute name="subElement">element.execute.prepared.statement.get</Attribute>
    <Attribute name="priority">2</Attribute>
    <PxParameter extraInfo="" index="1" uiType="TYPED">java:jboss/datasources/jdbc/CAIMSupport-new-ds.props</PxParameter>
    <PxParameter extraInfo="" index="2" uiType="TYPED">SELECT DISTINCT IPA.taskId&#13;
    FROM [CAIM_Workflow].[dbo].[WP_PROCI] WP,&#13;
    [CAIM_Workflow].[dbo].[WP_ACTI_DATA] WAD,&#13;
    [CA_IdentityPortal].[dbo].[Approval] IPA&#13;
    WHERE WAD.PROCI_ID = WP.PROCI_ID&#13;
    AND WP.NAME = '{'Get Task ID'}'&#13;
    AND IPA.comments IS NOT NULL&#13;
    AND IPA.taskID LIKE '%' + CONVERT(varchar(50), WAD.ACTI_ID) + ':WPDS'</PxParameter>
    </DataElement>
    <DataElement>
    <Attribute name="friendlyName">IPtaskIDIterator</Attribute>
    <Attribute name="elementType">element.type.iterator</Attribute>
    <Attribute name="subElement">element.iterator.next.value</Attribute>
    <Attribute name="priority">3</Attribute>
    <PxParameter extraInfo="" index="1" uiType="TYPED">{'Get IP taskID'}</PxParameter>
    </DataElement>
    <DataElement>
    <Attribute name="friendlyName">Get IP activityName</Attribute>
    <Attribute name="elementType">element.type.sql.query.data</Attribute>
    <Attribute name="subElement">element.execute.prepared.statement.get</Attribute>
    <Attribute name="priority">4</Attribute>
    <PxParameter extraInfo="" index="1" uiType="TYPED">java:jboss/datasources/jdbc/CAIMSupport-new-ds.props</PxParameter>
    <PxParameter extraInfo="" index="2" uiType="TYPED">SELECT DISTINCT IPA.activityName&#13;
    FROM [CA_IdentityPortal].[dbo].[Approval] IPA&#13;
    WHERE IPA.taskID = '{'IPtaskIDIterator'}'</PxParameter>
    </DataElement>
    <DataElement>
    <Attribute name="friendlyName">Get IP approvalType</Attribute>
    <Attribute name="elementType">element.type.sql.query.data</Attribute>
    <Attribute name="subElement">element.execute.prepared.statement.get</Attribute>
    <Attribute name="priority">5</Attribute>
    <PxParameter extraInfo="" index="1" uiType="TYPED">java:jboss/datasources/jdbc/CAIMSupport-new-ds.props</PxParameter>
    <PxParameter extraInfo="" index="2" uiType="TYPED">SELECT DISTINCT IPA.approvalType&#13;
    FROM [CA_IdentityPortal].[dbo].[Approval] IPA&#13;
    WHERE IPA.taskID = '{'IPtaskIDIterator'}'</PxParameter>
    </DataElement>
    <DataElement>
    <Attribute name="friendlyName">Get IP approverID</Attribute>
    <Attribute name="elementType">element.type.sql.query.data</Attribute>
    <Attribute name="subElement">element.execute.prepared.statement.get</Attribute>
    <Attribute name="priority">6</Attribute>
    <PxParameter extraInfo="" index="1" uiType="TYPED">java:jboss/datasources/jdbc/CAIMSupport-new-ds.props</PxParameter>
    <PxParameter extraInfo="" index="2" uiType="TYPED">SELECT DISTINCT IPA.approverId&#13;
    FROM [CA_IdentityPortal].[dbo].[Approval] IPA&#13;
    WHERE IPA.taskID = '{'IPtaskIDIterator'}'</PxParameter>
    </DataElement>
    <DataElement>
    <Attribute name="friendlyName">Get IP comments</Attribute>
    <Attribute name="elementType">element.type.sql.query.data</Attribute>
    <Attribute name="subElement">element.execute.prepared.statement.get</Attribute>
    <Attribute name="priority">7</Attribute>
    <PxParameter extraInfo="" index="1" uiType="TYPED">java:jboss/datasources/jdbc/CAIMSupport-new-ds.props</PxParameter>
    <PxParameter extraInfo="" index="2" uiType="TYPED">SELECT DISTINCT IPA.comments&#13;
    FROM [CA_IdentityPortal].[dbo].[Approval] IPA&#13;
    WHERE IPA.taskID = '{'IPtaskIDIterator'}'</PxParameter>
    </DataElement>
    <DataElement>
    <Attribute name="friendlyName">Parse IP comments</Attribute>
    <Attribute name="elementType">element.type.string.parser</Attribute>
    <Attribute name="subElement">element.string.manipulation.replace.all</Attribute>
    <Attribute name="priority">8</Attribute>
    <PxParameter extraInfo="" index="1" uiType="TYPED">{'Get IP comments'}</PxParameter>
    <PxParameter extraInfo="" index="2" uiType="TYPED">'</PxParameter>
    <PxParameter extraInfo="" index="3" uiType="TYPED">'</PxParameter>
    </DataElement>
    <DataElement>
    <Attribute name="friendlyName">Get Approver Full Name</Attribute>
    <Attribute name="elementType">element.type.attribute.of.a.specific.user</Attribute>
    <Attribute name="subElement">element.attribute.of.user.get</Attribute>
    <Attribute name="priority">9</Attribute>
    <PxParameter extraInfo="" index="1" uiType="TYPED">{'Get IP approverID'}</PxParameter>
    <PxParameter extraInfo="" index="2" uiType="SELECTED">%FULL_NAME%</PxParameter>
    </DataElement>
    </Related>
    ]]></Attribute>
    <Attribute name="entryRules"><![CDATA[<Related>
    <EntryRule>
    <Attribute name="friendlyName">Task Tag and IPtaskIDIterator NOT NULL</Attribute>
    <Attribute name="priority">0</Attribute>
    <Attribute name="description"/>
    <Conditions>
    <Condition>
    <Attribute name="dataElement">Get Task Tag</Attribute>
    <Attribute name="operator">EQUALS</Attribute>
    <Attribute name="value">AddAdditionalAccesstoADAccount</Attribute>
    </Condition>
    <Condition>
    <Attribute name="dataElement">IPtaskIDIterator</Attribute>
    <Attribute name="operator">NOT_EQUALS</Attribute>
    <Attribute name="value"/>
    </Condition>
    </Conditions>
    </EntryRule>
    </Related>
    ]]></Attribute>
    <Attribute name="actionRules"><![CDATA[<Related>
    <ActionRule>
    <Attribute name="friendlyName">Add Approval Comments</Attribute>
    <Attribute name="priority">0</Attribute>
    <Attribute name="description"/>
    <Conditions/>
    <AddActions>
    <ActionElement>
    <Attribute name="friendlyName">Add Approval Comments</Attribute>
    <Attribute name="actionType">action.name.set.user.values</Attribute>
    <Attribute name="subAction">action.user.attribute.add</Attribute>
    <Attribute name="priority">0</Attribute>
    <PxParameter extraInfo="" index="1" uiType="SELECTED">|approvalComments|</PxParameter>
    <PxParameter extraInfo="" index="2" uiType="TYPED">INFO: {'Get IP approverID'} {'Get Approver Full Name'} chose to {'Get IP approvalType'} on approval node {'Get IP activityName'} and added comment "{'Get IP comments'}".</PxParameter>
    </ActionElement>
    </AddActions>
    <RemoveActions/>
    </ActionRule>
    </Related>
    ]]></Attribute>
    </ManagedObject>
    </ims:ImsTemplate>


  • 4.  RE: Identity Portal Workflow - Add approver comments to the final email

    Posted Feb 26, 2021 10:00 AM
    Hi Adam,

    yes I need to mail standard comments inserted into IP and your solution looks very interesting.
    I'll try to implement it using your suggestions.

    Thanks
    Fabrizio