Oracle SOA Suite 12c (12.2.1)
supports Composite Instance Patching, which helps us to patch running instances
of a composite and recover faulted instances after patching the runtime. Not
all type of fixes are possible in a patch. In Jdeveloper the SOA Patch role is
to be used for creating patches. Then wlst is used to deploying the patches.
I tried to create a sample BPEL
process for testing the composite patching and below is outline and steps for
the same. I created a simple BPEL process which sleeps for two minutes and then
adds 5 to it. We will then patch it to add 55 to the input number. During the patching
process there was a BPEL Instance in running state, once the patching was completed
the BPEL process picked up the latest transformation.
Please note that for this Sample the
integrated WebLogic domain will not work because the DB for MDS in this domain
does not support versioning. I used XE database.
- Create a simple BPEL Process. In my case a one way
process which sleeps for five minutes and then adds 5 to the input.
- Input = 6 and 5 was added to it. Output = 11
- Steps to create a PATCH. Switch to the Role SOA Patch Developer as shown below.
- This opens up the composite in the SOA Patch mode as shown below. See top right corner
- Open the BPEL process. The only activity which we can edit is a transformation in this case. The other activities like WAIT was like disabled state. This helps us in deciding what components can be edited.
- Open the transformation process and edit it
- Edit the transformation to add 55 to the input number.Save the transformation
- A patch file is then created at $Application-Home/$ProjectName/SOA/SCA-INF. This file has the information about the changed resource.
- File Contents
- Next we need to create the PATCH jar file. Right click on the project and choose deploy to SAR file. Deploy to Server will not work. For deploying we need to use WLST.
- We need to validate the patch now using wlst. Run the wlst.cmd from $MW_HOME/oracle_common/common/bin
- Validate the patch using the command. sca_validatePatch('http://localhost:23001','weblogic','weblogic1','C:\JDeveloper\mywork\SOAPatchSetSampleApplication\SamplePatchSetProject\deploy\sca_SamplePatchSetProject_patch.jar')
- When the patch was being deployed a process was in running state. The input for this was 45
- Deploy the Patch Jar file using the command. sca_patchComposite('http://localhost:23001','weblogic','weblogic1','C:\JDeveloper\mywork\SOAPatchSetSampleApplication\SamplePatchSetProject\deploy\sca_SamplePatchSetProject_patch.jar'
- When the process completed it added 55 to the input as per the new transformation
- All the new instances would also take the new transformation.
- In case you want to go back to the original project, come out of the patch mode you will need to delete the patch file. Choose delete the patch to work again on the project
- Patch Deleted
- Read more at Oracle SOA 12.2.1 Docs
No comments:
Post a Comment