Tuesday, February 10, 2015

Friday, February 6, 2015

Oracle SOA BPM : Get list of faulted BPMN instances using SOA managment API's

Below is the code to get list of BPMN instances which are faulted.



Libraries :


Oracle SOA : Get list of instances that are recoverable using SOA managment api's Ver2

There are five message states

1. Undelivered
2. Resolved
3. Delivered
4. Cancelled
5. Exhausted

The int value for the above state is as below
0 for Undelivered
1 for Resolved
2 for delivered
3 for Cancelled
4 for exhausted
This is set in the mfilter.setState(0);




Jdev libraries



Note :
If you get "org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0  completed: No" exceptions then use weblogic.jar instead of wlclient.jar

Oracle SOA : Get Composite instance details based on Sensor value

Below is the java code to retrieve composite instance data based on sensor value.



Libraries

Oracle SOA : Getting default revision and deployment times from SOA managment api's

Below is the code to retrieve default revision and deployment dates for a given composite.
Other operations that you can perform is
1. activate();
2. getFaultCount();
3. getInstanceCount();
4. isShutdown();
5.retire();
6.setAsDefaultRevision();
7.start();
8.stop();



Libraries


Thursday, February 5, 2015

Oracle SOA : Get composite instance state using SOA Management api's

The below code is used to get composite instances state



Libraries




Note : If the state comes as STATE_UNKNOWN then enable the instance capture option in EM console 



Oracle SOA : Get instance details for composites using SOA management api's

Below is the code to get instance details for composites and by applying filters you can retrieve at composite level and sensor level.




Libraries :


Oracle SOA : Get list of composites deployed using SOA management api's

Use the below code to get the list of composites and other information about the composites deployed into the server.



Libraries





Oracle SOA : Get Task service and Task Query service

Below is the java code and screenshot for getting task query service and Task service to query and update tasks





Libraries




Wednesday, February 4, 2015

Oracle SOA : Get list of instances that are recoverable using SOA managment api's Ver1

There are five message states

1. Undelivered
2. Resolved
3. Delivered
4. Cancelled
5. Exhausted

The int value for the above state is as below
0 for Undelivered
1 for Resolved
2 for delivered
3 for Cancelled
4 for exhausted
This is set in the mfilter.setState(0);





Jdev libraries



Note :
If you get "org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0  completed: No" exceptions then use weblogic.jar instead of wlclient.jar

Oracle BPM ; Get Process text audit trail using BPM api's

Using the below code you can get text audit trail details of a process instance using process id.



Libraries used : 




Audit trail : 




Oracle BPM : Determine the current task and next task using BPM Api

Below is the java code which will show you the current task and next task for a given process id .






Libraries and jar files required are as shown in the below screen shot 



Tuesday, February 3, 2015

Oracle BPM : Generate process audit and process model image

There might be some requirements from the customer to generate BPMN process image or Audit image. This can be achieved by using BPM api's .




The libraries need to be added in the classpath of the project is as follows :





Monday, February 2, 2015

Oracle BPM : Splitting the process into Different Composites

If you have multiple processes in a single composite and you want to split each process into single composite then follow the below steps

     Split the processes into multiple composites to enable modularity and developer productivity.
     Reducing developer job in recreation of process again.

     Cloning the BPM project.


a.       Take the project which has  multiple  process



  Export the current project to a file.






An .exp file will be created.





Creating multiple projects out of the .exp file by selecting Fileà Import




Select import BPM project



Select .exp file which was generated earlier




Give the process name as a project name.







New project will be created and will have all the process of the one exported earlier





Delete the process which is not required






Expose the process as a web service.




Define arguments and click on OK.




A Web service interface would be created.






Repeat the same procedure to create another project for process 2.




Delete the process which is not required and enable the process to be invoked through web service.





After separating out the processes into different composites deploy the different projects into the server. Then you can invoke this individual process through web service call. This way modularity is achieved and every developer can work on individual process.

Oracle BPM : How to use MDS for using XSD as Business objects

Creating BUSINESS OBJECTS using MDS as reference




Click on BPM project navigator for the particular BPM project and click on Business Catalog


  
 Create new Module




 Create new Business object in the new module.


Give a proper name to Business object and select “Based on external Schema” and click on the magnifying glass.




Click on OK




      Click on “Import schema file”








Click on magnifying glass again




      Select Resource palette



From the SOA resource browseràResource palette select the MDS and select the xsd you want to refer and click on OK.




 Do NOT select the option  “Copy to Project “  and click on OK



 Select the appropriate element for the particular data type and click on OK.





 After click on OK similar pop up box will appear and click on OK.




 A Business object will be created based on external schema



 Now you can create Project data objects or Process data objects based on this Business object.

   Create a process




 Click on next



       Create an input argument based on external schema by clicking on “+” sign 



 Select “Component”



   Click on magnifying glass


 Select the Business object created earlier or you can create by clicking on “New” for creating new Business object.





      Click on OK



       Similar way you can create for Output also



 Creating  project data objects from Business objects.

 Click on the process



Navigate to Structure window









    Right click on the  “Project data objects”  and click on new





Click on Component



 Click on Magnifying glass




   Select the Business object  and click on OK.


 Project data object would have been created and ready to use in the process.  Usually appending variables with abcBO(Business object ) , abcPDO(Project data object) or abcPO(Process objects).  



Similarly the variables can be created for Process data objects.