Why I want to write this?I wanted to find some quick start material for using BPEL deployment framework in 10.1.3.4
Damn I could not find any. Nothing that looked like a quick start thing.
And the worst part was the closest I could find was oracle documentation about it.
At least I could not google any thing even close
But neither of them helped me quick start like a quick list of things to do. :(
I hope this post comes up in google for the help of those who want it.
What is the first thing to do?The first thing to do is edit your build.xml file
If you open up your BPEL project you will find that in Folder called
ResourcesIf you are looking in the actual physical folder then you will find this in
${process.dir} (the bpel ant terminology)
Basically the top project folder where you find your jpr file.
Why build.xml first?Fundamentals first, as you are going to use ant to perform deployment automation, you need to edit the build.xml file that ant uses.
Do what in build.xml?You need to include the ant things that oracle has come up with.
Basically it has 4 things new
generateplan - to generate a brand new plan for you, isn't that cool
attachplan - to attach the plan to your jar while deplyoing
validateplan - to validate the plan, use for developement purpose only and disbale in PROD
extractplan - to extract the plan out from your jar file
Down to business in build.xmlhow the hell to use these.
First things first. You need to create plan file as a starting point.
generateplan is the good thing that help you do this.
Stick this piece of code before the
</project> <target name="generateMyPlanFromProjectFile">
<generateplan planfile="${process.dir}/MyPlanFile.xml" verbose="true"
overwrite="true" descfile="${process.dir}/bpel/bpel.xml"/>
</target>What this does is, generate a file called
MyPlanFile.xml in your
${process.dir}If you want to generate the plan file from jar file, you can stick this piece there as well.
<target name="GenerateMyPlanFromSuitcaseFile">
<generateplan planfile="${process.dir}/MyPlanFile.xml" verbose="true"
overwrite="true"
suitecase="${process.dir}/output/bpel_${BPELSuitcase.BPELProcess(id)}_${rev}.jar"/>
</target>What this does is, generate the plan fuile from jar file.
Here the use of some things like
${rev} etc can found some where below in build.properties
For now just know that this will pick the correct jar
Basically stick both the pieces there.
If you have not yet complied to generate the jar, do not be surprised to see the
GenerateMyPlanFromSuitcaseFile fail
What the hell do I do with this generateplan thing....Well what else but run as ANT
Right click the build.xml in Jdeveloper, Open up
Run Ant TargetChoose
generateMyPlanFromProjectFileJDeveloper should fire up and generate a file for you called
MyPlanFile.xmlIf you are not able to see that in Resources folder (same place where the build.xml is located) click refresh mate and you should see it
Congrats you have completed the first step easily
Changes in build.properties fileThere is a file called build.properties in the same good old folder
${process.dir}Open that up and see 2 properties called domain and rev
These are commented out by default
uncomment them and change them as below
#if domain name is "commmon" then type in common domain = ${enter the name of the domain yoiu want to deploy} #if revision is 2.0 then type in 2.0 rev = ${version number of the bpel process}
Good with all this but where is the search and replace thingOpen up the MyPlanFile.xml and you should see some thing there.
Some thing like
wsdlAndSchemaThere is a element called
search and
replaceNeed to fill this up to search and replace. Read the documentation to find how all to use it. This is the easy part aint it!! Just fill in some strings to test your code.
How to attach the planStick this thing into the build.xml file
<target name="AttachMyPlan">
<echo> -------------------------------------------------------------- | Attaching the plan file ------------------------------------------------ </echo>
<attachplan planfile="${process.dir}/MyPlanFile.xml" verbose="true"
overwrite="true"
suitecase="${process.dir}/output/bpel_${BPELSuitcase.BPELProcess(id)}_${rev}.jar"/>
</target>What this does is attach the plan file to your jar.
What about extract planI am not sure if you want this or not, but here is the piece of code
<target name="ExtractMyPlan">
<extractplan planfile="${process.dir}/MyPlanFile.xml" verbose="true"
overwrite="true"
suitecase="${process.dir}/output/bpel_${BPELSuitcase.BPELProcess(id)}_${rev}.jar"/>
</target>Ya ya I know that you know what this does.
Now what else?The last part, add the new target you added to the default target
process-deployIn the
depends part of
<target name="process-deploy"Add the target
AttachMyPlan after
complieSo the new target will look like
<target name="process-deploy"
depends="validateTask, compile, AttachMyPlan, deployProcess, deployTaskForm, deployDecisionServices"/>
Why Am I not adding the generateplan thing in thereWell you do not want to generate the plans always and over write the search and replace that you have read form the documentation and build
If you did then do not be surprised but only thing is I will be laughing ha ha ha :)
How to deploy to other EnvironmentsWell that is for you to discover and explore
Just that you need to run this in dev prompt. Go to the same old ${process.dir} directory and run the ANT as
command promt>ant process-deployCongrats mate you have done it.
There are other few things that you can learn from the documentation if you are interested at all
Links that I likedI could hardly google a lot of stuff for this.
The best is oracle documentation
http://download.oracle.com/docs/cd/E12524_01/relnotes.1013/e12523/bpelrn.htm#BABCEBAAThe next best I could find was
http://blogs.oracle.com/reynolds/2008/11/bpel_deployment_framework.html