Symantec IGA

Expand all | Collapse all

Javascript BLTH to add the IM TaskID to document the IM Business Logic for Policy Xpress

  • 1.  Javascript BLTH to add the IM TaskID to document the IM Business Logic for Policy Xpress

    Posted 05-11-2018 11:49 AM

    Team,

     

    One of the challenges for documenting or debugging a live production CA Identity Management solution with 100's or 1000's of business rules, across multiple J2EE nodes, is to identify the full data flow for a single transaction.

     

    While out at a client site, I was able to observe a valuable additional, that could be harvested for the above use-case.

    The ability to output the IM task session ID (UUID) to the IM J2EE debug logs for PX Rules.

     

     

     

     

     

     

    Let me summarize the business logic options and the PX challenge:

     

     

     

    Process followed to leverage this feature:

     

     

    <BusinessLogicTaskHandler name="Task Session Attribute" description="">

    <JavaScript><![CDATA[function handleStart(blthContext, errorMsg) {
    try {
    var taskID = blthContext.getSessionId();
    var now = blthContext.getSessionCreateTime();
    var df = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    blthContext.setSessionAttribute("taskID",taskID); blthContext.setSessionAttribute("date",df.format(now));
    }
    catch (exception) {
    errorMsg.reference = "Cannot set Task ID or Create DateTime";
    return false;
    }
    return true;
    }
    ]]></JavaScript>

    </BusinessLogicTaskHandler>

     

     

    Select the IM task(s) that you wish to monitor:

     

    Copy and paste in the java script.   

    - Alternatively, you may export the IM environment out to XML, and use Notepad++ or other edit tool to search/replace this body of text; then re-import the XML to update the IM tasks.

     

     

     

     

    Step 2b:   Add in the Action Rule Actions.

    - Example below testing the various messages actions to the VST and/or the J2EE logs.

     

     

     

     

     

    Ref:  https://communities.ca.com/message/242014504-update-jbosswildfly-log4j-without-restart-for-identity-suite-and-vapp

     

     

     

     

     

     

     

     

     

    Skip step 7:  Will revise.

     

     

     

     

     

     

     

     

    Note:  I do have an enhancement request to our CA Identity Suite product team, for this feature to be included, without the need of the java or javascript BLTH, within the existing PX BLTH component.

     

     

     

    Cheers,

     

    Alan



  • 2.  Re: Javascript BLTH to add the IM TaskID to document the IM Business Logic for Policy Xpress

    Posted 05-11-2018 02:01 PM

    Appears the author of the javascript BLTH is ScottHamilton

     

    Task Session ID in PX Policy 

     

     

    Thanks Scott!