Symantec IGA

 View Only
  • 1.  [IM] How do i modify a workflow node in a blth

    Posted Nov 25, 2016 11:39 AM

    Hi,

     

    I have a task that need to modify a user data in a specific workflow node, then reset it.

    I have a jobId(XXXXX-WPDS) and a eventId (************-XXXXXXXX-XXXXXXX), i want know how can i get the jobData linked to the workflow node in a blth

     

    Best Regards.



  • 2.  Re: [IM] How do i modify a workflow node in a blth

    Broadcom Employee
    Posted Nov 28, 2016 12:10 AM

    Hi,

     

    For BLTH pertaining to Admin Task, you are dealing with BLTHContext and for jobdata inside Workpoint, you are dealing with WorkflowContext. The only common placeholder to share values (get/set) between BLTHContext & WorkflowContext can be Screen Logical Attribute (SLA)/Logical Attribute (LA)/User Store Physical Attribute (LDAP)/DB table/Flat File.

     

    With SLA & LA, we have faced intermittent issues where attr value set by BLTHContext was not sometimes available from WorkflowContext. So finally, between LDAP/DB/Flat File, we chose an external custom DB and this works fine.

     

    Regards,

    Sumeet

     



  • 3.  Re: [IM] How do i modify a workflow node in a blth

    Posted Nov 28, 2016 05:04 AM

    Hi Sumeet, thank you for your answer, i think i did not express my self well, i do not want share data between my blth and my workflow, i just want to modify the custom resolver for a specific node in a workflow then reset the node, please check the code snippets below:

     

            JobNodeData nodeToReaffect = #########.; // i do not know how can i get the jobdata of my workflow, i have   the eventId=8b48f945-0a64093d-340ed562-1faa0d82 and jobId=40383:WPDS
            ActivityInstData activity = nodeToReaffect.getActivity();
            activity.setUserData("APPROVER_CUSTOMRESOLVER_NAME", "REAFFECTE_TASK"); // modify the custom resolver
            JobData jobData = nodeToReaffect.getChildJob();
            com.workpoint.client.Job job = (com.workpoint.client.Job)jobData;
            job.reset(); // Reset the node

     

    Can i do that without interfering with the workpoint code? Otherwise, what do you advise me?

     

    Best regards.



  • 4.  Re: [IM] How do i modify a workflow node in a blth

    Broadcom Employee
    Posted Nov 28, 2016 10:26 AM

    Hi,

     

    Thanks for clarification. Please try following as per your use case:

     

    Option1: Synchronous Agent at Job Level:

    ActivityInstData approver1 = ThisJobData.getActivityByName("Approver1");

    approver1.setUserData("APPROVER_CUSTOMRESOLVER_NAME", "REAFFECTE_TASK");

     

    Option2: Synchronous Agent at Activity Level:

    ThisActivityInstData.setUserData("APPROVER_CUSTOMRESOLVER_NAME", "REAFFECTE_TASK");

     

    No need to save Job as Agent is written at Synchronous level.

     

    Regards,

    Sumeet

     

     



  • 5.  Re: [IM] How do i modify a workflow node in a blth
    Best Answer

    Posted Nov 29, 2016 06:36 AM
    I wanted to retrieve the object jobNodeData (node in a specific workflow) in my BLTH using his jobID, as you explain me in your first message we cannot get a workflowContext form a BLTHContext, so i  created and connected ClientContext for accessing the WorkPoint server, then i got the job (my workflow) using his ID, after that i got my job node in the workflow. you find below my code:
    // my job id
    TableID jobParentTableId = new TableID(jobParentId);
    // initialise my client context
     ClientContext cctx = ClientContext.createContext();
    cctx.setResourceID("IDM");
    cctx.setDatabase("WPDS");
     //connect to workflow databases
     ClientContext clientContext = cctx.openNewContext();
    // get my job (workflow)
     Job job = Job.queryByID(clientContext, jobParentTableId, true);
    // get the activity linked to my job node
    TableID activityTableId = new TableID(activityId);
    ActivityInstData activity = job.getActivityByID(activityTableId);
    // get my node
    JobNodeData nodeToReaffect = job.getNodeByActivityName(activity.getName());
    // reset it
    job.resetFromNode(nodeToReaffect);

     

     

    Thank you for your help.