This discussion is archived
2 Replies Latest reply: May 17, 2011 11:24 AM by polo RSS

Bounded taskflow --> calling storeprocedure

polo Newbie
Currently Being Moderated

I have a taskflow with jsf pages, where i am creating..... one master record and in next page i am creating child record. At the end i need to call the stored procedure for validation and another for creating related records in another table based on this master-child record types.

Is there any way i can setup taskflow to create master child record and then add those record to tables and then call stored procedure? (i would love to have everything done in one transaction.....)

something like-- create master--> create child --> add records to table (from taskfow) --> call stored procedure --> commit

your suggestion will be greatly appreciated...

I am using Jdev

Thank you,
  • 1. Re: Bounded taskflow --> calling storeprocedure
    Frank Nimphius Employee ACE
    Currently Being Moderated

    the task flow does not own the transaction. So its the DataControl that exposes the business service and the transaction. To create m/d in a task flow, you create the page fragments and then drag master and detail collections onto the page fragments. You then can access the entered data from the binding layer and call the stored procedure. For this you access the transaction from BindingContext.getCurrent().findDataControl('name as in DataBindings.cpx').getApplicationModule() --> get transaction and issue a prepared statement

  • 2. Re: Bounded taskflow --> calling storeprocedure
    polo Newbie
    Currently Being Moderated
    Thank you Frank for your prompt response.

    Since I am new to bounded task flow (and adf as well) I have some question regarding your suggested approach.

    Your suggested approach is to add task flow to the page fragments and access the bindings.

    But can this be implemented on page based bounded task flow with multiple pages without using pagefragments? (I have one pages for adding master records and its related entities) and the bounded task flow is something like this

    Create row -->page one -->create row --> page one -->*(method call to execute prepared statement for stored procedure)?* -->*(commit return)?*

    in the stored procedure i need to pass the newly created ids of two master records and their child records ids (dbsequence/trigger assigned)

    please let me know your suggestion.....or any example pointer would be greatly appreciated....


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