1 Reply Latest reply on Mar 13, 2019 8:40 AM by Daniel Merchán

    taskflow

    user1254328

      hello,

       

      we are on jdev 12.2.1 and portal 12.2.1

       

      top will be search form 3 input text fields. bottom will be a adf table display records after executing the cmis query over the inputted value on search form.

       

      In Jdev we created a bounded TF (myTaskFlow ) that has default jsff view activity. this jsff has search form on top and bottom portion of same jsff we dragged and dropped a content presenter within jdev ( we already have multi item CP template deployed to remote development box as portal Asset and we tested with hard coded cmis and this template nicely displays the nodes in a adf table.)  as region. we will right click and in pageDef --> edit this CP TF and put all the values in such as  dataSourceType,  dataSource (this wil be cmis query ) , templateCategory, templateView etc.

       

      Question : when we dragged the CP taskflow the taskflowInstId is empty. i was made aware that during design time it is ok to keep this taskFlowInstId value blank as it is and when we deploy this application as adf shared lib to  remote dev portal and drag the myTaskFlow  from resource catalog this CP taskflow automatically gets assigned the taskFlowUInstId ?

       

      Question : we have just 3 input fields in search form. so we are going to plug in the inputted values into CMIS where clause dynamically by making use of variable bindings just like how a value has been plugged in where clause  ( one of the search input fields is called Location and there are 2 more input fields )

       

      <parameter id="datasource" value="${'SELECT * FROM ora:t:IDC:GlobalProfile WHERE ora:p:xLocation = \''}${bindings.Location1}${'\''}"/>

       

      But how do we create above query if we want to plugin other 2 search field bindings in above where clause ? we were having construction correct syntax of query when trying to plus in all 3 inputted values in where clause. sample query with multiple variables will be great help for reference.

       

      Last - we know we are on 12c and we should not drop the CP TF during jdev design time. But if u see above by having search form and CP taskflow on same JSFF .. that will enable us to refer to ${bindings.Location1} in the CMIS query ( since both search and CP TF are part of same pageDef of the jsff ). so when we deploy to remote server and RUN the page

      1> user inputs 3 testfields on search, submit and CP taskflow CMIS gets those values in WHERE clause and execute to show the adf table on the botton of jsff

       

      On the contrary, if we do not put the CP TF on this JSFF page durig design time ( jsff has only search form ) and we deploy myTaskFlow to remote portal server and drag and drop from resource catalog on the Test1.jspx as region. Then again we click "Add Content" and from Resource Catalog we drag CP TF on this JSPX.

       

      now u see Test1.jspx has 2 taskflows. One is our own custom myTaskFlow ( has search form ) and another is Out Of Box CP TF ( this refers the CP template and CMIS etc ). Now in this scenario challenge is since these are 2 bounded taskflows ... we are not able to grab the Search form inputted values  and Plug In in to another taskflows CMIS where clause ( this is what we are talking   WHERE ora:p:xLocation = \''}${bindings.Location1}${'\''}  these are 2 independent bounded taskflows. This becomes challenge especially to achieve at Portal run time - meaning when u drop CP TF in portal builder at run time. Please let us know if we can pass these values in this runtime scenario. how. If yes, then we will prefer this approach over design time approach.

       

      Thanks.

        • 1. Re: taskflow
          Daniel Merchán

          Hi,

           

          Question : when we dragged the CP taskflow the taskflowInstId is empty. i was made aware that during design time it is ok to keep this taskFlowInstId value blank as it is and when we deploy this application as adf shared lib to  remote dev portal and drag the myTaskFlow  from resource catalog this CP taskflow automatically gets assigned the taskFlowUInstId ?

          This I have already explained in a separate Thread, the TaskFlowInstanceId is used when Content Presenter is configured via Wizard to know the exact path in the MDS where the properties are stored. As you are configured via Input Parameters it is not needed.

          Question : we have just 3 input fields in search form. so we are going to plug in the inputted values into CMIS where clause dynamically by making use of variable bindings just like how a value has been plugged in where clause  ( one of the search input fields is called Location and there are 2 more input fields )

          For complicated EL Expressions I always recommend you have your own Java Managed Bean which will have the logic to generate the CMIS Query String. It makes everything much simpler to build the query like this.

          Just make StringBuilder and append step by step your full query and then configure datasource=#{myQueryBean.myQuery}

           

          If you want to still try building your EL Expression in the fly:

           

          This is a EL Expression complex of a previous project I've been using, but hardly recommend is easier to mount a String in a Managed Bean

          ${'select * from ora:t:IDC!;GlobalProfile where ora:p:xMetadataOne = '}${backingBeanScope.MyBean.tipoNews}${' and ora:p:Language = \''}${languageBean.language}${'\' and ora:p:xVisible= TRUE and ANY ora:p:xChannel IN (\''}${backingBeanScope.MyBean.intranet}${'\') and ANY ora:p:xImportant IN (\''}${backingBeanScope.MyBean.network}${'\')'}${' and ora:p:xInitDate <= '}${backingBeanScope.MyBean.today}${' and ora:p:xEndDate >= '}${backingBeanScope.MyBean.today}${' order by ora:p:xInitDate desc'}

           

          Kind regards.