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.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Validation on async table before sending data to flow service

  • 1.  Validation on async table before sending data to flow service

    Posted Tue November 10, 2015 07:11 AM

    Hi,

    I am having an async table, it has three columns. There are few validations that are to be done before submitting the data to the flow service.

    proto | hName | qName -->columns [proto is dropdown, hname is textbox and qName is dropdown]

    validation required:
    There cannot be duplicate entries of proto, only in case of proto as ABC it can be duplicate.
    The hName cannot be blank in case if proto is ABC.
    If the proto is ABC then hname cannot be duplicate.

    Can you please help me on this. I am trying it using the content provider getResultsProvider().getArray() something like this in the save button action. I am unable to fetch the data from the table to do the validation.

    how to achieve this. Thanks


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


  • 2.  RE: Validation on async table before sending data to flow service

    Posted Tue November 10, 2015 09:52 AM

    Hi TeKnAs,

    For validation are you trying to use client side validation or server side validation.
    If you are looking for some client side validation ,you can use below sample code to get total table size.Then loop over the list and get the values for individual rows dropDown and test box values.

    var tableModel=CAF.model('#{activePageBean.clientIds["asyncTable1"]}');
    var rowModelList=tableModel.list();
    //rowModelList will return rows ID of table

    Please let us know if you are facing any problem in retrieving individual rows drop down or text box values.

    Thanks
    Baharul Islam


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


  • 3.  RE: Validation on async table before sending data to flow service

    Posted Tue November 17, 2015 06:55 AM

    Hi Baharul,

    Thanks for your reply.

    I want the validation to be done in the java service that is in the managed bean for this how can I traverse the table.

    Thanks again.


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


  • 4.  RE: Validation on async table before sending data to flow service

    Posted Sat November 21, 2015 09:40 AM

    Hi TeKnAs,

    To get all rows count in content provider you can use content provider row count.

    getTableValueDetailsProvider().getRowCount()

    Thanks
    Baharul Islam


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