Sunday, October 26, 2014

Oracle SOA 12c: How to create Standalone Bpel Subprocess

As from my previous blog post on Getting started with resuable bpel subprocesses, you get some basic idea of resuable subprocesses in Oracle SOA 12c. Here in this blog post I am going to show you how to create a standalone bpel subprocess in your soa composite application.

Scenario:

I am creating a Error handler service in which there two subprocess 
  • AlerNotificationProcess: In this process email notification is send to the user using the notificaiton service.
  • LogsProcess: In this process logs is written in the external file system using the file adapter
  • Error Process: This is a parent process which is calling both the above process. 
  • Finally this process is exposing the soap webservice which is called by external client.
Note: In similar way you can create more bpel process and you can use the subprocess in each of your bpel process if required.

Create standalone bpel process
  1. Create a soa project in soa application i.e. CommonComponents and in that create a bpel 2.0 process i.e. "ErrorProcess".
  2. Now drag n drop the subprocess from the components tab and create two sub processes i.e. "AlertNotificationProcess" and "LogsProcess". 
  3. Now implement the logic one by one in subprocess,
  4. In the AlertNotificaitonProcess, just drag and drop the email notification activity and configure it. 
  5. Similary in the LogsProcess, Just drag and drop the file adapter and configure it.
  6. Now in the parent process just drag and drop these subprocesses to call  where ever required.
  7. Map the parameters.
  8. Save, deploy and test the project.

Sunday, October 12, 2014

Oracle OSB 12c: Pipeline templates in Oracle Service Bus 12c

One of the best thing for any developer is to write a code which can be used as many times in an enterprise application. Pipeline templates is one of such capability in Oracle Service Bus in which developer create a prototype of a  pipeline called as pipeline template and include all the component which can be use across the enterprise services. One such example can be a Error handler.

Here in this post I will try to explain and give an idea of how one can use the pipeline templates in its Oracle Service Bus application. I am going to create template in which I will include these components:

  • Validation
  • Error Handler
  • Logging
  • Alerts
  • Reports
As you can see these are the common components which can be used across all the Services in OSB.
Let me start with the basic.

Pipeline:

Pipeline component in OSB provides message processing capability i.e. defines logic for routing, validation, manipulation of messages (transformation) or error handling etc.
Primary elements for Pipeline are:
  • Start Node: It is a by default node define automatically when you connect to proxy service.
  • Pipeline Pair: node for request & response pair processing.
  • Branch Node: node to route the message based on condition either on type of operation or values.
  • Route Node: this node set the destination of message otherwise by default echo the request i.e. request is passed to the response.
  • Error Handler: handle errors either on stage or node.

Note: Minimum start node and route node required for pipeline.

Pipeline Template:

A template in pipeline is a prototype of message flow for proxy services. It defines the reusable activities that are common across the business process for example validations on business messages, error handling, transformation of request and response messages etc.

How to create pipeline templates in Jdeveloper

1.       Right click on the projectà NewàPipeline_Template
2.       Template wizard appears, Enter all the information.
3.       Click Next to select service type.
4.       Finish.
5.       Now in the pipeline template add the route node, error handler or any logic which is common across the service. (follow the example)

Note: you cannot create pipeline templates in OSB console.

Pipeline Template Example

Code Structure
  • Two projects i.e. SharedSB and ConsumeTemplate.
  • SharedSB is project in which we store all the common resources that can be used in all the service bus application and In ConsumeTemplate I will create a pipeline on the basis of pipeline template.

Create Pipeline Template (CommonComponent.ptx)
  1. Create pipeline template CommonComponent.ptx

  2. Drag and drop all the components that you think can be re-used in many services. In this case I am using Validity, Error handler, reports, logging, Alerts.
  3. After configuring all the activities, you can lock the activities so that the same configuration can be used in all the concrete pipeline i.e. in the pipeline where you are importing the pipleline template.

Creating concrete pipeline using template
  1. Create proxy service.
  2. Create pipleline using the template and use same signature as of your proxy service.
  3. After importing template, implement message flow logic if required.
  4. Save and deploy both the projects SharedSB and ConsumeTemplate on Oracle Service Bus server.
  5. Test your application.
References:

  • http://docs.oracle.com/middleware/1213/osb/develop/title.htm#BEGIN

Oracle OSB 12c: Break the pipeline template link from the concrete pipeline

In Oracle Service Bus if template that you use to create a concrete pipeline is no longer required than there is an option to break the link between the template and concrete pipeline. But remember this is a irreversible action so you can't go back and link again the template and concrete pipeline.

Here are the steps:

  1. Open the configuration of concrete pipeline.
  2. In the configuration of template, click on the break button as shown below.
  3. Click yes.
  4. Now concrete pipeline is converted into regular pipeline.
Note: As this is an irreversible action so please think before doing it whether it is required or not.

Monday, September 8, 2014

Ten Useful Javascript Tips and Best Practices

In this presentation there are ten useful JavaScript techniques which can be included in your application easily with less friction along with some AngularJs tips and best practices as a bonus. These tips and best practices are accompanied by examples & will cover script loading, design pattern, performance optimization and other areas.

Since best practices are very subjective topics, proper benchmarking needs to be done.


Monday, August 25, 2014

Oracle Internet Directory: Not able to create OID while installing on windows server 2008

I was trying to install Oracle Internet directory on Windows Server 2008 R2 64-bit, but at the configuration step where the all the components are created and installed the OID is not created and configurations fails and stops at that point.
Actually the main reason is OID is not able to start after creation and following error occurs:

Error creating ASComponent oid1.
Cause: 
An internal operation has failed: Failed to start the component
Action: 
See logs for more details.

oracle.as.config.ProvisionException: Failed to start the component
at oracle.as.provisioning.fmwadmin.ASComponentProv.createComponent(ASComponentProv.java:157)
at oracle.as.provisioning.fmwadmin.ASComponentProv.createComponent(ASComponentProv.java:73)
at oracle.as.provisioning.fmwadmin.ASInstanceProv._createComponent(ASInstanceProv.java:401)
at oracle.as.provisioning.fmwadmin.ASInstanceProv.createComponent(ASInstanceProv.java:364)
at oracle.as.provisioning.fmwadmin.ASInstanceProv.createInstanceAndComponents(ASInstanceProv.java:136)
at oracle.as.provisioning.engine.WorkFlowExecutor._createASInstancesAndComponents(WorkFlowExecutor.java:523)
at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:439)

Solution:
  1. Once the configurations failed, then closed the installation wizard.
  2. deinstall instance, domain and remove all the services.
  3. Create the directory in oracle home i.e Oracle/Middleware/Oracle_IDM1/log/diag/clients
  4. Add the parameter "DIAG_ADR_ENABLED = OFF" in sqlnet.ora present in the directory E:\Oracle\Middleware\Oracle_IDM1\network\admin
  5. Now run the OID setup.exe and select Install only if you want configure oid later or select Install and configure, you will not get the error again.
Note: For more information please follow the Oracle Support Document Doc ID 1561852.1

Saturday, August 23, 2014

Weblogic: Not able to start weblogic server with Ldap configuration

I was working with Microsoft AD Ldap and weblogic, after configuring the ad ldap in weblogic I have re-ordered the authenticator and after that while restarting the weblogic server I am getting the following error:

oracle.security.jps.service.idstore.IdentityStoreException: JPS-00056: Failed to create identity store service instance idstore.ldap.provider:idstore.ldap. Reason: oracle.security.jps.JpsRuntimeException: JPS-00027: internal error You configured a generic WLS LDAPAuthenticator. The identity store type cannot be determined. Please choose an LDAP Authentication provider that matches your LDAP server.

This error is coming because when you configured the AD Ldap and save the file then by default generic ldap authenticator is set in the configuration file.

Solution:
To solve this issue follow the steps

  1. Go to the config folder in domain directory i.e. Oracle/Middleware/user_projects/domain/domain_name/config/ and open config.xml.
  2. Now under security configuration you can see the generic ldap is configured.
  3. Now manually change authenication-provider type to "wls:active-directory-authenticatorType".
  4. Save the file and restart the server.

Note: Fore more information refer the oracle support document Doc ID 1331981.1

Oracle Webcenter Content: Could not start up IDC server deployment

Sometimes while starting the webcenter content server (UCM) in cluster mode we are getting the following error:

javax.servlet.ServletException: Could not start up IDC server deployment.
at idcservlet.ServletUtils.initializeContentServer(ServletUtils.java:1253)
at idcservlet.ServletUtils.startAndConfigureServer(ServletUtils.java:542)
at idcservlet.ServletUtils.initializeAllServers(ServletUtils.java:455)
at idcservlet.IdcFilter.initContentServer(IdcFilter.java:132)
at idcservlet.IdcFilter.init(IdcFilter.java:124)
Caused By: java.io.IOException: UCM Server failed to initialize inside its servlet environment.
at intradoc.idcwls.IdcIntegrateWrapper.initializeServer(IdcIntegrateWrapper.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
Caused By: intradoc.common.ServiceException: 
at intradoc.server.IdcServerManager.init(IdcServerManager.java:224)
at intradoc.idcwls.IdcServletRequestUtils.initializeServer(IdcServletRequestUtils.java:624)
at intradoc.idcwls.IdcServletRequestUtils.initializeServer(IdcServletRequestUtils.java:455)
at intradoc.idcwls.IdcIntegrateWrapper.initializeServer(IdcIntegrateWrapper.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Caused By: java.lang.NullPointerException
at intradoc.data.ResultSetUtils.getIndexMustExist(ResultSetUtils.java:445)
at intradoc.server.utils.ComponentInstallHistory.compareAndUpdateComponents(ComponentInstallHistory.java:139)
at intradoc.server.IdcInstallInfo.buildComponentList(IdcInstallInfo.java:874)
at intradoc.server.IdcSystemLoader.finishInit(IdcSystemLoader.java:354)
at intradoc.server.IdcSystemLoader.init(IdcSystemLoader.java:336)
at intradoc.server.IdcServerManager.init(IdcServerManager.java:120)
at intradoc.idcwls.IdcServletRequestUtils.initializeServer(IdcServletRequestUtils.java:624)


This error occurs due to missing idccs_components.hda file in the shared file directory or sometimes this file got corrupted and ucm server is not able to start.

Solution:
To solve this issue there is idccs_components.hda.old file in the same directory i.e. cs/data/components/ now just rename that file and restart the webcenter content server.

Note: This is bug 13877118 and already raised in oracle support. For more information about this bug and fixes please follow this oracle support document Doc ID 1512338.1