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.  Task Portlet initialize method

    Posted Mon October 19, 2009 05:12 PM

    [size=“16”]Hi,

    I’m having trouble understanding the event model of the portlets that are created using designer when implementing a human based task. I’m using the webMethods 7.1 Suite.

    I used to believe that the Initialize method that is already created when you create a portlet is fired when there is a “page load


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


  • 2.  RE: Task Portlet initialize method



  • 3.  RE: Task Portlet initialize method

    Posted Mon October 19, 2009 08:16 PM

    It is designed that way…

    Beans are supposed to be run once as needed. I ran into caching issues and they formally fixed it but didn’t fix it for other parts of the form that had more complicated child datasets/methods and their option is to clean out the values upon load of the page. i.e. what I do is check to see if the task(conflict id) is the same and if not then empty out the values in the initialize methods public String initialize() {
    relPartys=null;
    propertys=null;
    environmentsDataList=null;
    patents=null;
    trademarks=null;
    finders=null;
    adverseParties=null;
    lawFirms=null;
    clients=null;
    resolveDataBinding(INITIALIZE_PROPERTY_BINDINGS, this, “initialize.this”, true, false);
    return OUTCOME_OK;
    }


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


  • 4.  RE: Task Portlet initialize method

    Posted Tue October 20, 2009 08:35 PM

    beforeRenderResponse() is not working out

    Both the task IDs are coming out same. So I’m able to execute my condition.
    ----------------------CODE SNIPPET-------------
    protected void beforeRenderResponse() {
    super.beforeRenderResponse();

    //get new task Id
    String newTaskID = (String)resolveExpression(“#{activePreferencesBean.taskID}”);

    //check if we are in a new task
    if (newTaskID!= null && !this.getAviationInvoice().getTaskID().equals(newTaskID))
    {
    this.initilizeAuditTrail();
    }

    // force refresh of the Task Content Provider
    getAviationInvoice().refresh();


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


  • 5.  RE: Task Portlet initialize method

    Posted Wed October 21, 2009 05:47 PM

    if the task ids are the same, then that means they’re the same task instances. if you want to do different initialization for the same task instance, I think you probably can use the business data to determine how to initialize the instance according to the current process step.


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


  • 6.  RE: Task Portlet initialize method

    Posted Wed October 21, 2009 09:48 PM

    Thanks Wen!

    But the issue is I need to invoke a WS call on IS on the initialization of the each Task Instance. And in my case initialize() function is not working. And above function, beforeRenderResponse() was suggested by one of the forum member.

    Thanks,
    Jaimin


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


  • 7.  RE: Task Portlet initialize method

    Posted Fri October 30, 2009 07:09 PM

    Open an SR ticket - I had similiar problem - it was w/ data not web services specifically and as mentioned above workaround and here is the patch I think they released for it in fix #:
    1-1VWMAR : In My webMethods Server, Web services do not update correctly.
    It is part of the MWS_7-1-2_Fix6

    Also to get the other fixes that were aligned with this were:
    MWS_7-1-2_CL_Fix6.zip
    TE_7-1-2_Fix2.zip

    but I am sure if you get the latest it will fixes it will resolve the issue. Do you have ‘auto-refresh’ forced to true / ‘needs refresh’ to true? don’t know about the ‘needs refresh’ specifically but i know the auto refresh needs it. You probably have it set but just needed to ask.


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