Wednesday, August 10, 2011

Adding ADF BC components to a BPM Human Task Form

Here is what we need to do...
The BPM process only contains the orderID in the payload. We will need to retrieve the order details from the database via ADF BC and display them on the task form page. My table is called am_order and is defined as follows -

Thanks to Mireille D. and Angelo S. for their input!

The high level steps are as follows –

Auto-generate the Human Task form from the BPM task definition.
- This creates a new project in your JDeveloper application.

In the new project, expose the am_order table as an ADF BC
- Tailor it to add a View Criteria
- e.g. Am_order.order_id = orderID

Add a new bounded ADF task flow to the project
- Here we will display the order details
- The task flow will include a parameter (#pageFlowScope.in_orderID)
-- The view used will be a page fragment

Add the new bounded ADF task flow to the auto-generated taskDetails.jspx
- It will be dropped as a Region
-- Specify the bindings to orderID

Auto-generating the task form is a piece of cake - the real "baking" (pardon the pun) is in the creation of the extra ADF Task form to display the order details.

Amend the ADF BC View as follows -

1. Add a bind variable e.g. (bpm_orderID)
2. Add a new View Criteria that will leverage it.

3. Specify use at app module level

So to execute a query on the view we need to pass in a value for

Create the new task flow

This bounded task flow will have the following parameter-

So the task flow expects to be passed in a String (orderID). We call this in_orderID and it is stored in the variable pageFlowScope.in_orderID

Drop the ExecuteWithParams operation from the ViewObject on to the task flow diagram.

Here we specify the value for the view bind variable (bpm_orderID). Naturally this is set to pageFlowScope.in_orderID

We then add a view to the task flow to display the order details

That's it for the task flow.

Now open the auto-generated task form and drop in the new task flow as a region.

I position it after after the orderID.

When dropping we will need to bind the input parameter (in_orderID) we defined earlier. So we bind it to the the existing orderID on the page -

1 comment:

Anubha said...

Could you please help me with a step by step explanation of the above example since I am just a beginner in this field. It will really helpful for me.