IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Issue with Task API in webMethods 713

    Posted Thu June 16, 2011 10:34 AM

    hi All,

    We are facing an issue with Task API during migration from 7.1.2 to 7.1.3

    We understand that previously (7.1.2) a user could view/open/update a task even when the assignedToList does not contain a role that a user is in - as long as the user has the corresponding functional access privileges.

    However since 7.1.3, this is no longer the case and the user must be in a role in the assignedToList to view/update the task.

    We have not seen related release notes for this change (just noticed the behavior change in testing).
    1) Can you please point me to the release notes?
    2) Is there a flag to apply the 7.1.2 behavior in 7.1.3?

    In any case we have made code changes as shown below, so that when we perform some task reassignments- we now alter the assignedToList (role) to the roles of the target user as well as setting the acceptedByList (user) to the target user.

    This is necessary due to the above mentioned change in 7.1.3.

    public void reassignToOtherRoles(){
    List<String> assignedToList = new ArrayList<String>();
    UserModel userModel = new UserModel();
    // refresh MWS Task
    this.getCustomTask().refresh();
    // unaccept the task from the current assigned user.
    this.getCustomTask().unacceptTask();
    
    // set target user in the acceptedByList
    this.getCustomTask().getTaskInfo().setAcceptedByList(<targetUser>);
    
    // get role names of the target user and update assignedToList
    assignedToList.add("Role 1");
    assignedToList.add("Role 2");
    // change assignedToList of Task Info with new list.
    this.getCustomTask().getTaskInfo().setAssignedToList(assignedToList.toArray(new String[]{}));
    
    // set some other paramters in Task Data.
    this.getCustomTask().getTaskData().setComments("Assigned by user:"+userModel);
    this.getCustomTask().getTaskData().setParameter2("Value2");
    
    // apply changes.
    try{
    this.getCustomTask().applyChangesNoAccept();
    }catch(Exception e){
    // handle exception
    System.out.println("User performed Reassign operation across the roles - Exception Suppressed");
    System.out.println("Error details::"+e);
    }
    }

    However this introduced a new problem where the task API we use to do these changes (applyChangesNoAccept) seems to perform 2 task related activities inside the method,
    1st to apply the changes (updateTask), the 2nd to refresh the task (refresh).

    However the 2nd call to refresh the task throws an exception (PortalAccessException: You don’t have permissions to view this task) because now the current user may not be in a role in the new assignedToList.

    3) Apart from catching and ignoring this exception is there another way to handle this scenario?

    Kind regards,
    Raja sekhar Kintali


    #webMethods-BPMS
    #webMethods
    #MWS-CAF-Task-Engine


  • 2.  RE: Issue with Task API in webMethods 713

    Posted Thu June 23, 2011 11:02 PM

    I thought i had already answered this post, but i’m having problems finding my response.

    Anyway to recap, The new behavior was introduced with a Fix in 7.1.3. (I don’t know the exact fix right now).

    As a result, there isn’t a good solution available right now. The workaround you implemented is about as good as can be done. To get a better solution, you’ll need to file an Incident so we can make a proper adjustment to the API.

    Regards,
    –mark


    #webMethods-BPMS
    #webMethods
    #MWS-CAF-Task-Engine


  • 3.  RE: Issue with Task API in webMethods 713

    Posted Mon June 27, 2011 10:21 AM

    hi Mark,

    Thanks for your reply.

    By any chance, are you referring to this post?
    http://tech.forums.softwareag.com/viewtopic.php?p=68815&highlight=&sid=46046c8b5393bfcbf78e4ef0f154e876#68815

    Kind regards,
    Raja sekhar Kintali[/url]


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 4.  RE: Issue with Task API in webMethods 713

    Posted Mon June 27, 2011 05:24 PM


  • 5.  RE: Issue with Task API in webMethods 713

    Posted Wed June 29, 2011 04:13 PM

    Interresting Post Rajal and Mimel.

    Maybe will help us regarding the one I opened regarding AcceptedBy list

    regards


    #webMethods
    #webMethods-BPMS
    #MWS-CAF-Task-Engine