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
Expand all | Collapse all

Calling an action for every row of task inbox result table

  • 1.  Calling an action for every row of task inbox result table

    Posted Mon September 05, 2011 08:14 AM

    I have a common task inbox results table (many task types but single task inbox results). In that task results table, I have created a column.

    For every row in the table, i want to call an action which will then take taskdata (documentlist) and loop over the list and concatenate all the items and then populate the column in that row.

    How to do that ?


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


  • 2.  RE: Calling an action for every row of task inbox result table

    Posted Tue September 06, 2011 04:09 AM

    Hi,

    I got some clue with the help of my old project mates.

    Here it goes :

    1. Add an action (say flattenDocList() ).
    2. Add a data variable of type string in the managed bean
    3. In the beforeRenderResponse() method call this action
    4. In this action created in step 1, iterate over the taskSearchProvider and get the taskdata and convert the doclist to a string.
    5. set the variable created in step 2 with the value got in step 4
    6. Add the data variable as one of the columns of the task list results table

    Please do this only if you expect low task volumes. As this is going to evaluate for each row in the task which may have performance hit.

    
    
    public void flattenDocList() {
    String strDocListString = "";
    int rowList = this.getTaskSearchProvider().getRowCount();
    try{
    for(int i=0;i<rowList;i++) &#123;			   
    this.taskSearchProvider.setRowIndex(i);
    if(this.taskSearchProvider.isRowAvailable()) &#123;
    strDocListString = <<logic>>
    }
    }
    }catch(Exception eException)&#123;
    error(eException);
    log(eException);		
    }
    this.setStrVariable(strDocListString);  // set the data variable created
    }
    
    
    protected void beforeRenderResponse() &#123;
    // add to refresh task inbox results 
    this.getTaskSearchProvider().refresh();
    this.flattenDocList();
    //----------------------------
    
    super.beforeRenderResponse();
    try &#123;
    PrincipalPickerModalDialog dialog = getDelegatePrincipalPicker(); 
    ...
    ...
    ...
    // add to refresh task inbox results 
    getTaskDisplayProvider().reset();
    //----------------------------
    
    }
    catch (Exception ex) &#123;
    ...
    ...
    }
    
    // reset the display providers so they reload fresh task info 
    // if we ask for task info that the provider is alreayd aligned on
    getTaskDisplayProvider().reset();
    getTaskDisplayProviderForDialog().reset();
    }
    

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


  • 3.  RE: Calling an action for every row of task inbox result table

    Posted Sat August 02, 2014 06:44 AM

    Hi smk,
    you can show me how to create common task inbox results table (many task types but single task inbox results) - in step by step
    I’m new member in Software ag.
    thanks you so much!


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