Monday, November 2, 2015

SOA 12.2.1- Step by Step Instruction for Patching Running Instances of a Sample SOA Composite

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.

  1. Create a simple BPEL Process. In my case a one way process which sleeps for five minutes and then adds 5 to the input.

  2. Input = 6 and 5 was added to it. Output = 11
  3. Steps to create a PATCH. Switch to the Role SOA Patch Developer as shown below.
  4. This opens up the composite in the SOA Patch mode as shown below. See top right corner
  5. 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.
  6. Open the transformation process and edit it
  7. Edit the transformation to add 55 to the input number.Save the transformation
  8. A patch file is then created at $Application-Home/$ProjectName/SOA/SCA-INF. This file has the information about the changed resource.
     
  9. File Contents
  10. 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.
  11. We need to validate the patch now using wlst. Run the wlst.cmd from $MW_HOME/oracle_common/common/bin
  12. Validate the patch using the command. sca_validatePatch('http://localhost:23001','weblogic','weblogic1','C:\JDeveloper\mywork\SOAPatchSetSampleApplication\SamplePatchSetProject\deploy\sca_SamplePatchSetProject_patch.jar')
  13. When the patch was being deployed a process was in running state. The input for this was 45
  14. 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'

  15. When the process completed it added 55 to the input as per the new transformation
  16. All the new instances would also take the new transformation.
  17. 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
  18. Patch Deleted
  19. Read more at Oracle SOA 12.2.1 Docs 

No comments:

Post a Comment