How to Call DML Operation from BPEL
In this article we will discuss how to create a BPEL process to insert some data into a table.
Step -1 # Consider a table with 26 columns , and the requirement is to insert all 26 columns manually.
Step -2 # To design a BPEL process that takes 26 arguments as input variables, need to design an XML Schema document with 26 elements and make sure that datatype of elements is same as the datatype of the columns in table where the data needs to be inserted.
Below is the XSD that has been created as a test case.
Step -3 # Once XSD created , import the schema that was created above into BPEL process , as shown below.
Step -4 # – BPEL Process has a Request Message as well as a Response Message. Request Message allows the input with 1 argument (by default). Assign the imported XML schema to the Request Message as shown below.
Step -5 # – BPEL process receives the activity.
Step -6 # – Drag the Database Adapter and configure it to insert /update data into table (26 columns).
NOTE – Refer to a note, in Oracle BPEL section, for more information on Setting up of Database Adapter
In step 7 configure the database adapter to insert data into table so_order_info.
Please note that in the above steps , Request Message is configured with 26 input variables.
Step -7 # - Add the Transform activity in the BPEL Process . Transform activity will define the mapping that is required.
Step -8 # – Configure the Transform activity.
Step -9# – Map the Request Message Type Variable with the Input Variable of the Invoke activity (Invoke activity will call the database adapter).
Step -10# – Add a Dummy Assign activity .This activity prints the Order # that has been inserted into the so_order_info table.
Step -11# – Complete the Process.
Step -13 # -Compile/Deploy and Run the Process.
There are no comments yet.