Showing posts with label MDS. Show all posts
Showing posts with label MDS. Show all posts

Thursday, July 11, 2013

How to do versioning with Oracle Business Rules

In one of my discussions on oracle business rules, one query that I got was on versioning, for example  a scenario in which clients major business rules are written in Oracle  business rules and  as per requirement it is modified at runtime using SOA composer. There were lot of transaction that happened in that period with new rules and later it was reverted back to old rules. How can we track the changes that went in so that it is easy for rolling back to previous versions, know how any versions/changes have been made on the initial business rules.
It is a valid query from the user perspective and oracle has the solution.
Runtime Versioning is supported in Oracle Business Rules using MDS. The rules dictionary is stored in MDS and if MDS has database as the backend instead file based repository then versioning is supported using MDS. Any changes made to dictionary are made visible to the application in MDS. The rule service engine (decision service) does this automatically.
There is also option of creating metadata labels for each release or each update which will be helpful (similar to tags in SVN). A metadata label is a means of selecting a particular version of each object from a metadata repository partition. This tag/label comprises of the document versions which were the latest versions at the time the label was created.
Labels that are created will be available till they are deleted explicitly using wlst commands. Automatic purging will not remove the labels. Same as versioning, labels are also supported only in database-based repositories. As a good deployment/promotion practice, you can create a label and then promote documents/rules associated with a metadata label. It will be easier to rollback to an earlier version in case you use create/promote label approach.
References

Thursday, June 23, 2011

How to remove unused files/artifacts from MDS?

          In development phase of project, we will be adding different artifacts to the MDS so that can be accessed by different processes. In course of development /design changes, applying best practices, there is bound to be lot of unused folders /artifacts lying around in the MDS store. So it is always advised to remove the unwanted artifacts, test the processes before we export them to other environments. I always used a workaround to remove the files, even though it was not the best approach.

Workaround
 There is a table called MDS_PATHS where there would be entries corresponding to each artifact. I used to delete the entries from the table and the artifacts never used to show up, even though there will be entries in other related tables.

BestApproach
The best approach/solution is to use WLST command for cleaning up the MDS store. There is a function called deleteMetadata in WLST which will do the job for you.
This is how Oracle documentation describes the command. It deletes the selected documents from the application repository. When this command is run against repositories that support versioning, that is a database-based repository, delete is logical and marks the tip version (the latest version) of the selected documents as "deleted" in the MDS repository partition.
For more attributes and options available with the command refer this doc

The WLST script is located at:

(UNIX) MIDDLEWARE_HOME/ORACLE_SOA1/common/bin/wlst.sh
(Windows) MIDDLEWARE_HOME\Oracle_SOA1\common\bin\wlst.cmd

Once the scripting tool is initialized, Connect to the server

offline>connect(‘username,’pwd’, ‘hostname:7001’)

For running deleteMetada function you need a minimum of 3 inputs
-          application  - since we are deleting from shared artifacts of soa-infra, the value should be soa-infra
-          server -  value should be ‘soa_server1’ or the server u use for SOA other than admin server.
-          docs – the folder path or artifact which you want to delete.

wls:/GEO_domain/serverConfig> deleteMetadata(application='soa-infra',server='soa
_server1',docs='/apps/dvm/oracle/dvm/*')

Executing operation: deleteMetadata.

Operation "deleteMetadata" completed. Summary of "deleteMetadata" operation is:

List of documents successfully deleted:
/apps/dvm/oracle/dvm/GeoXRef.dvm

1 documents successfully deleted.


This will be really useful in all projects as cleanup in mandatory in the MDS. Thanks to jithendra and Ram for their inputs.

Tuesday, June 7, 2011

Avoiding invalid composites at server startup -Abstract V/s Concrete WSDL

One year back I got a chance to help a team working on AIA PIP migration project, the team was stuck with compilation issues of processes that gets migrated to 11g. All processes were using concrete WSDL of dependent processes which were not even ready. That’s when as a best practice we replaced all concrete WSDL’s with Abstract WSDL. Similar issue happens during startup of the server. While loading processes from MDS, there used to be issues related services being unavailable due to the order of process loading. That’s when much emphasis was laid on using Abstract WSDL compared to Concrete WSDL .A nice article on why Abstract WSDL need to be used instead of using concrete WSDL during design time and how it works @ runtime.

Friday, May 27, 2011

How to add/modify BPEL /B2B/Mediator (component) properties – Where it gets stored?


In 11g first release there were properties which could be modified by navigating to $DOMAIN_HOME/soa_domain/config/soa-infra/configuration/ folder. All the config files related to different components used to be present in this folder.
But from subsequent releases the component properties were given an MBean interface for modifying the values. These values get directly updated in the MDS. This blog explains how to modify the values and where in turn it gets stored.
Properties for B2B, BPEL, Mediator, SOA-INFRA, Business rules, Adapter, EDN, workflow can be updated using the Mbeans. I will be taking the example of BPEL properties to show the way.
There are 2 ways of navigating to the properties via MBean.
1.    Soa-infra > Administration >  System MBean Browser



Application Defined MBeans >oracle.as.soainfra.config > Server :soa_server1
>B2BConfig >b2b
>BPELConfig >bpel



2.    Soa-infra > SOA Administration >BPEL Properties


Both the links will lead you to same MBean properties page.


Once you update the value, it gets directly updated in MDS. You can directly go and check in MDS.
Create a MDS connection.
The property files are available in
MDS  -- > soa > configuration >default > bpel –config.xml
                                                >b2b-config.xml
> soa-infra-config.xml
This will help you in verifying whether the values are updated properly.