Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
Expand all | Collapse all

Update in p8/completeStep RequestFilter.

  • 1.  Update in p8/completeStep RequestFilter.

    Posted Tue March 09, 2021 01:37 PM

    I am trying to update the WFProperty "value" on click of Launch button via /p8/completeStep request filter. But it is not reflecting when checking from F12/Network. Below is the code snippet for the same-

    public JSONObject filter(PluginServiceCallbacks callbacks, HttpServletRequest request, JSONArtifact jsonRequest) throws Exception {

    System.out.println("***Inside TestLDAPCompleteStepRequestFilter222***");

    System.out.println("JSONArifact=="+jsonRequest);

    System.out.println("request=="+request);

    JSONArray criteriasJsonArray = (JSONArray)request.getAttribute("json_post");

    for (int index = 0; index < criteriasJsonArray.size(); index++)

    {

    JSONObject criteria = (JSONObject)criteriasJsonArray.get(index);

    String criteriaName = criteria.get("name").toString();

    JSONArray criteriaValues = null;

    if(criteriaName.equalsIgnoreCase("W_LaunchManagementIO_WG_AuForAp")) {

    if (criteria.get("value") != null) {

    if ((criteria.get("value") instanceof JSONArray))

    {

    System.out.println("==Inside Approver==");

    criteriaValues = (JSONArray)criteria.get("value");

    JSONArray js=new JSONArray();

    js.add("SONIA CHAUHAN");

    criteria.put("dataType", "xs:user");

    criteria.put("value",js);

    }

    }

    }

    }

    System.out.println("criteriasJsonArray-->"+criteriasJsonArray);

    String criteriaString=criteriasJsonArray.toString();

    PluginRequestUtil.setRequestParameter(request,"json_post", criteriaString);

    System.out.println("json_post Sett---");

    return null;

    }

    I tried to implement /p8/checkin request filter as well and I noticed that in F12/Network the new data is not updated but the backend (property value)the data is updated.

    Can someone suggest that for request filter the new data will not updated in the F12 whereas in backend the datawill be updated? Anyone has implemented the /p8/completeStep request filter? can you give some code snippet



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 2.  RE: Update in p8/completeStep RequestFilter.

    Posted Mon March 15, 2021 09:50 AM

    Hi,

    The parameters modified by request filter cannot be viewed on client side.

    Regarding code snippet, you may refer to the redbook http://www.redbooks.ibm.com/Redbooks.nsf/RedpieceAbstracts/sg248055.html . Sample plugins are available at https://github.com/ibm-ecm/ibm-content-navigator-samples.

    Regards,

    Angie



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration