Showing posts with label Best Practices. Show all posts
Showing posts with label Best Practices. Show all posts

Friday, March 26, 2010

Oracle BPEL 11g Best Practices

  1. BPEL has to be primarily used for orchestrating the services. 
    • Do not add complex business logic here. It should belong to the service layer.
  2. Create scopes for each step of the flow in the process so as to make it modular.  This will help in creating local variables within that scope. Use Global variables when required(just like your java or C++ programming style). This will help in maintainability. Note : Adding too many scopes may affect the performance. In that case you may want top consider creating sequences.
  3. Adopt naming standards and comply to it. This should be part of the governance strategy. This looks trivial but is important if you want someone else to understand the code and make changes.
  4. It is good practice to have a Mediator in the Composite. Try to get most of the transformations done by the Mediator.
  5. Have all the business rules implemented by the Oracle Business Rules
  6. Handle all the exceptions
  7. Adopt test driven development. Create test cases with a tool like SoapUI for each process and make this part of your governance strategy.
  8. Instead of BPEL, you should consider implementing the process in BPM. This has the advantage of modeling it in BPMN so that it can be easily understood by the Business and also helps the model and implementation to be synchronized at all times. If you haven't considered it so far then it is time you take a look at 
  9. The flow of the BPEL process should be very intuitive.
    • The reason enterprises are investing heavily in this to be agile to change. So, to make this happen , make the steps in the flow linear as much as possible so that a new step can be added/reordered easily by just drag and drop. I have seen very complex nested creation of the following flow which after refactoring looks as below.

Friday, March 19, 2010

Oracle Business Rules 11g Best Practices

Oracle Business Rules underwent a lot of changes since 10g and looks more sophisticated now. The Rules designer is very elegant(bug free, nice user experience, fast) and so is the Composer.(though I would like to see the Composer and Designer have a single user experience)

Oracle has made available a very exhaustive guide on Oracle rules which is available at http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10228.pdf

Best Practices 
  • Try to model the rules as a "Decision Component". 
    • Each decision function in the component can be exposed as a Web Service with both stateless and stateful operations(I think that there should be an option to make it a separate webservice or to expose it as an operation). 
    • You may want to cleanup the stateful operations if you think that they should not be used. This will force the developers not to invoke the stateful operation accidentally as the unintended usage can create havoc.
    • This Decision Component then has multiple interfaces which can be used by the BPEL process. This will encapsulate all the rules in a single component and still be modular through Decision functions. 
    • This will greatly help in resuse of this component.
    • The Decision Component is also easily testable.
  • Try to use "Decision Table" as much as possible 
    • As it is very intuitive for the business analysts 
    • All the rules can be viewed in a single readable view. 
    • It also has the built in Gap analysis that will uncover any gaps or conflicts.
Tips
  • When you want to invoke the Rules Service, you should set the name of the Rules Service explicitly If not the rules service is not invoked. This seems to be a strange requirement.
  • The Oracle Rules Composer is available at http://host:[soa port]/soa/composer. I could not open this is IE7 and Chrome but could open in Mozilla Firefox.
  • The rules dictionary is stored in .rules file. This should be checked in the repository(CVS, etc) as a binary file. Please see the FAQ for the explanation.