This discussion is archived
6 Replies Latest reply: Feb 18, 2013 1:25 PM by Timo Hahn RSS

ADF Bounded Task Flow

HDGeek Newbie
Currently Being Moderated
I have created a bounded task flow which has the following activities: Method Call (default activity and it calls a custom method in a request scoped backing bean), a controlFlow to a jsf page, a controlFlow to a Task Flow Return.

Here is the xml code for the Bounded Task Flow:
<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
<task-flow-definition id="fromviewprojlist-task-flow">
<default-activity>retrieveProjInfo</default-activity>
<managed-bean id="__5">
<managed-bean-name>backing_ViewProjList</managed-bean-name>
<managed-bean-class>com.dairynet.pts.controller.backing_ViewProjList</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<method-call id="retrieveProjInfo">
<method>#{backing_ViewProjList.retrieveSingleProjData}</method>
<outcome>
<fixed-outcome>toSummary</fixed-outcome>
</outcome>
</method-call>
<view id="summary">
<page>/projectRequest/projSummary.jsf</page>
</view>
<task-flow-return id="tfrViewProjList">
<outcome>
<name>tfrViewProjList</name>
</outcome>
</task-flow-return>
<control-flow-rule id="__1">
<from-activity-id>retrieveProjInfo</from-activity-id>
<control-flow-case id="__2">
<from-outcome>toSummary</from-outcome>
<to-activity-id>summary</to-activity-id>
</control-flow-case>
</control-flow-rule>
<control-flow-rule id="__3">
<from-activity-id>summary</from-activity-id>
<control-flow-case id="__4">
<from-outcome>toViewProjList</from-outcome>
<to-activity-id>tfrViewProjList</to-activity-id>
</control-flow-case>
</control-flow-rule>
</task-flow-definition>
</adfc-config>

I am calling this bounded task flow from a commandLink that is in an ADF table (partial code of the jsf page that has the commandLink):
<af:table value="#{bindings.VProjectlistQryVO1.collectionModel}" var="row"
rows="#{bindings.VProjectlistQryVO1.rangeSize}"
emptyText="#{bindings.VProjectlistQryVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.VProjectlistQryVO1.rangeSize}" rowBandingInterval="0"
filterModel="#{bindings.ImplicitViewCriteriaQuery.queryDescriptor}"
queryListener="#{bindings.ImplicitViewCriteriaQuery.processQuery}"
filterVisible="true" varStatus="vs"
selectedRowKeys="#{bindings.VProjectlistQryVO1.collectionModel.selectedRow}"
selectionListener="#{bindings.VProjectlistQryVO1.collectionModel.makeCurrent}"
id="resId1" width="100%">
<af:column sortProperty="#{bindings.VProjectlistQryVO1.hints.ProjShortDesc.name}"
filterable="true" sortable="true" width="169"
headerText="#{bindings.VProjectlistQryVO1.hints.ProjShortDesc.label}"
id="resId1c1">
<af:commandLink action="fromviewprojlist-task-flow" id="cl1"
text="#{row.ProjShortDesc}"/>

Here is my code in the adfc-config.xml file related to the page calling the bounded task flow and the bounded task flow:
<control-flow-rule id="__7">
<from-activity-id>masterList</from-activity-id>
<control-flow-case id="__5">
<from-outcome>fromviewprojlist-task-flow</from-outcome>
<to-activity-id>fromviewprojlist-task-flow</to-activity-id>
</control-flow-case>
</control-flow-rule>
<control-flow-rule id="__6">
<from-activity-id>fromviewprojlist-task-flow</from-activity-id>
<control-flow-case id="__9">
<from-outcome>tfrViewProjList</from-outcome>
<to-activity-id>masterList</to-activity-id>
</control-flow-case>
</control-flow-rule>

When I click the commandLink where the action is the bounded task flow (fromviewprojlist-task-flow), it does not go into the method I am specifying in the Method Call activitiy (the default activity) within the task flow. It does not error out, but it does not go anywhere. My objective is to go to the custom backing bean method so I can get some value of the row in the table I clicked on, then use this value to successfully load the projSummary.jsf page

I am new to this, and I can't figure out what I'm missing. I appreciate any ideas you may have to help me resolve this.

Thanks!
  • 1. Re: ADF Bounded Task Flow
    Puthanampatti Guru
    Currently Being Moderated
    Open project properties dialog. Click Edit button in the Run/Debug/Profile options.
    Put -Djbo.debugoutput=console in the Java Options and run it again. Check the console for exact issue...
  • 2. Re: ADF Bounded Task Flow
    HDGeek Newbie
    Currently Being Moderated
    I did as you suggested, but I see nothing in the console that indicates it's trying to run the bounded task flow. It's like it ignores it. No error, just redisplays the page I'm calling the bounded task flow from.

    Previously, in another application, I created a bounded task flow with the default activity which was a Method Call activity, but I dragged and dropped a createInsert operation onto the Method Call activity from the Data Control. This worked fine (for creating an inputForm).

    With this bounded task flow that is giving me problems, I'm not referencing the Data Control at all, I'm just referencing the method in the request-scoped backing bean. Is there something I don't have "wired up" correctly so that it's not even finding the bounded task flow the action attribute of my commandLink is referencing?

    I'm not referencing the model (or an application module) at all, but should this matter? It seems like it should just find my backing bean method, run it, and carry on!
  • 3. Re: ADF Bounded Task Flow
    Puthanampatti Guru
    Currently Being Moderated
    call the exact action outcome...
  • 4. Re: ADF Bounded Task Flow
    Timo Hahn Oracle ACE
    Currently Being Moderated
    When you run the application die the url you see in the console log window or the browser have'.jspx' or. '.jsf' in the url?

    If this is Terre car that it's your problem. It means Terre jdev only shows the page but the ADF faces stuff is not running. One of this features is the navigation.
    Remove this part and try again.

    Timo
  • 5. Re: ADF Bounded Task Flow
    HDGeek Newbie
    Currently Being Moderated
    So, in the bounded task flow, I have the Method Call activity as default, then a Control Flow to a Summary.jsf page. If I just set the exact outcome to that Summary.jsf page (which happens to be registered in a faces-config.xml file), it does navigate to that page.

    So with that said, maybe I should just call a method in the backing bean of the page the adf table with the command link in it is on and get the row values of the row in the table that was clicked on, then navigate to the Summary.jsf page.

    The table was created with a view object that I dragged and dropped from the Data Control palette. So, in the backing bean method, how would I get the row values from the table?

    When I'm not using ADFBC, I just do something like ViewTableInfo tblRow = (VTableInfo) table1.getRowData(). ViewTableInfo being a class that represents the database table where the table info is coming from.
  • 6. Re: ADF Bounded Task Flow
    Timo Hahn Oracle ACE
    Currently Being Moderated
    I'm not sure I understand your problems. If you want to use ADF and it's method of navigation you should use the adfc-config.xml file. This way the navigation using task flow works.

    Timo

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points