Tuesday, September 9, 2014

Testing your REST service in JDeveloper - How to access the sample data form

Oracle SOA Suite 12c does not only come around with support for RESTful Web services, but also provides extensive capabilities to test Web services directly from JDeveloper.

When trying to test a RESTful Web service endoint based on the Web Application Description Language (WADL) file, it is a bit less obvious what to do.

  1. Get the WADL from Enterprise Manager. Your WADL will look similar to https://localhost:7102/soa-infra/resources/default/ValidatePayment!1.0/validatePaymentRESTService/application.wadl where ValidatePayment is the SCA application name, 1.0 is the version of the SCA application and validatePaymentRESTService is operation name.
    Get WADL for RESTful Web service from Enterprise Manager
  2.  In JDeveloper, select Tools > HTTP Analyzer
  3. Create a new REST request in the HTTP Analyzer
    Create New REST Request in HTTP Analyzer
  4. Paste WADL to the URL input field and confirm by tabbing out of the line. You will end up with the WADL URI and the  Operations available on the WADL ... which is actually only to retrieve the WADL content.
    Request to retrieve WADL
  5. This is actually not what we want. What we expect to get a a form where we can enter test values for all (or at least some) of the parameters of the REST operation. What you actually need to do to get the WADL analyzed and a form created is to edit the WADL. Remove the last part of the WADL, in my case application.wadl.
    Manipulate WADL URI
  6. Confirm and you will end up with the expected form.
    Form to test endpoint of a RESTful Web service
  7. Including parameters and parameter values will add those to the URL of the HTTP request.
    Example of HTTP request parameterization
  8. Enjoy testing from JDeveloper!

Property Window of Pipeline Component not showing in JDeveloper 12c

Oracle SOA Suite 12c introduces a new development environment for Oracle Service Bus (OSB). While OSB development was supported by the web-based SB Console and an Eclipse Plugin in 11g, the development has been moved to JDeveloper in 12c. This is done by introduction of a new OSB editor, which looks quite similar to the SCA application composite editor.
OSB Editor in JDeveloper 12c


Externally exposed Proxy Services (PS) are shown on the left column while the Business Service (BS) references show up on the right column ("External Services"). The central column shows OSB Resources such as Pipelines and Split/Joins. The above example shows an externally exposed SOAP Web service ("ProcessPS") referring to a SOAP based Web service ("ProcessBS") wired by a pipeline (ProcessPP).The new Pipeline Editor is actually used to configure this central OSB resource.
Pipeline Editor in JDeveloper 12c
The above screenshot shows the ProcessPP pipeline from the above example. When selecting a component of the pipeline, in the properties window below all properties to be defined will appear.
Properties of a Pipeline Component in JDeveloper 12c Pipeline Editor
However, sometimes the properties will not show up when selecting the pipeline component in the pipeline editor.
Missing Properties of Pipeline Component in JDeveloper 12c Pipeline Editor
This behavior has been reported with JDeveloper 12c installed with QuickStart on a Microsoft Windows 7 x64 machine running JDK 1.7.0 Update 67 (x64). The properties windows actually does not capture the selection of the component in the main windows. The workaround is simply to close and reopen JDeveloper ... which might be annoying if you are running the integrated WebLogic Server.

Monday, August 18, 2014

ACM Stakeholder and SCA Organization out of sync

Upon case design for Oracle Adaptive Case Management 12c, included in Oracle Business Process Management 12c, you need to take care that the application role table (organization.xml) of the BPM/ACM service component application and case stakeholder table of the case.

In Oracle BPM Studio 12c, create a new SCA application, e.g. called MyAcmApplication.
Add a BPM project (e.g. MyAcmProject) whose composite contains case management.
Since you selected Composite with Case Management, you will be asked to provide a case name, e.g. MyCase.
Now check for the details of organization.xml of the BPM project from the Applications navigator.
Applications navigator in Oracle BPM Studio 12c

(If the Applications navigator is not already open, in 12c you can find it under Windows menu from the main navigation of BPM Studio. This is different from 11g where it was under View menu.)
Once organization.xml opened, you will notice that so fare, ony the Process Owner and the Process Reviewer application role are present for this project.
Now, go to the Stakeholder property page of the case. Open the case file from the Applications navigator (MyAcmProject > BPM > Case > MyCase). Add a new stakeholder (e.g. MyStakeholder) to the stakeholder list. Don't forget to save.
New stakeholder added to case
Switch back to Organizations tab and notice that the new stakeholder has also been added as BPM application role.
Now, go back to the case definition and delete the prior created stakeholder. Save all. Switch back to the BPM application roles. You will notice that the according application role for your stakeholder did not get deleted aswell. At this point, you are out of sync between you case definitions stakeholders and you BPM applocation roles.

Since BPM application roles are global in the OracleBPMProcessRolesApp, this makes somehow sence to prevent deletion active application roles on redeployment of BPM/ACM applications. On the other hand, deployment won't ever delet application roles from OracleBPMRolesApp. Only updation association of user and groups is possible. Therefore, during design time, this behavior is somehow unexpected.
In the end, it is no big deal since you can still manually delete the application roles. This can be done prior to deployment (so that the application roles doesn't even get propagated to OracleBPMProcessRolesApp) or on runtime using BPM Workspace. It is just something you need to be aware of.

Friday, April 25, 2014

Upgrade your Oracle BPM Studio 11g (11.1.1.7)

Just in case some of you might have missed this: When Oracle BPM 11g's MLR3 came out (finally providing a basic OOTB UI for Case Management included in the Business Process Workspace application), also Oracle BPM Studio 11g (hence: Oracle JDeveloper with the extensions SOA Composite Editor and BPMN Editor) got an update:

  • SOA Composite Editor: 11.1.1.7.0.00.08 11.1.1.7.0.00.97
  • BPMN Editor: 11.1.1.7.0.0.8 11.1.1.7.0.0.97
For example, this upgrade includes components to work with Case Management UI, e.g. to generate case data.

Just upgrade your JDeveloper with the integrated update functionality Help > Check for updates ... and reduce the selection in step 3 to Shop upgrades only.

You cannot upgrade both extensions the same time (unless JDeveloper won't warn you on that). Make sure to first upgrade the SOA extension. (Otherwise, when first upgrading BPM, you won't be able to apply the SOA update afterwards.)

You can also download the extension sources first and upgrade the extensions with the integrated functionality Help > Check for updates ... and the Install from local file in step 2.

Tuesday, April 8, 2014

OPatch'ing Pre-built Virtual Machine for SOA Suite and BPM Suite 11g

In March 2014, Oracle released an updated version of its Pre-built Virtual Machine for SOA Suite and BPM Suite 11g for Patchset 6 (11.1.1.7). The bundle patch 17014142 for Oracle BPM 11.1.1.7.1 is already installed. However, most of you will like to upgrade to bundle patch 17584181 directly (11.1.1.7.2). By using the installed version of OPatch in /oracle/fmwhome/Oracle_SOA1/OPatch directory, you will run into an opatch error 70:

[ Error during Patch conflict resolution for apply patch phase ] Detail: OUI-67073:OPatch failed: ApplySession failed in system modification phase... 'Current access level does not allow writing to the inventory'
OPatch will attempt to restore the system...


The reason is that the OPatch version installed in /oracle/fmwhome/Oracle_SOA1/OPatch is 11.2.0.3.5. However, for any opatch application on Oracle Fusion Middleware 11.1.x, the most recent version of OPatch 11.1.x is recommended (at the time of writing OPatch version 11.1.0.10.3).

  1. Download most recent version of OPatch 11.1.x
  2. Copy it to /oracle/fmwhome/Oracle_SOA1/OPatch_11.1.0.10.3
  3. Apply opatch by using absolute path:
    $ sh /oracle/fmwhome/Oracle_SOA1/OPatch_11.1.0.10.3/opatch apply
 OPatch will then work correctly.

Tuesday, February 18, 2014

Case UI browser compatibility

For Oracle Patners, Oracle provides a non-productive patch that enables an OOTB case UI in Oracle Business Process Composer 11g for Adaptive Case Management (cf. notice by Jürgen Kress).

Testing around a bit on my local environment, I was wondering why I could access this case UI but none of my case instances showed up.
Fig. 1: Case UI in Firefox 27.0 without case instances shown

Finally testing in the web browser on my linux VM where the server is running, indeed everything was there!
 Fig. 2: Case UI in IE 11 mode IE 8 showing case instances

So I guess it's about browser compatibility issues ... which is pretty much ok since the case UI is still in beta stage. Following settings have been tested by me so fare:

BrowserOSRemote/HostResult
Firefox 26.0 x86Windows 7 x64RemoteFail
Firefox 27.0 x86Windows 7 x64RemoteFail
IE 11.0.9600.16476 in Document Mode = IE 5 and User Agent = Standard (IE 6)Windows 7 x64RemoteBPM Workspace not supported
IE 11.0.9600.16476 in Document Mode = IE 7 and User Agent = Standard (IE 7)Windows 7 x64RemoteWorking, but rendering issues
IE 11.0.9600.16476 in Document Mode = IE 8 and User Agent = Standard (IE 8)Windows 7 x64RemoteWorking
IE 11.0.9600.16476 in Document Mode = IE 9 and User Agent = Standard (IE 9)Windows 7 x64RemoteWorking
IE 11.0.9600.16476 in Document Mode = IE 10 and User Agent = Standard (IE 10)Windows 7 x64RemoteWorking
IE 11.0.9600.16476 Document Mode = Standard (IE 11) and User Agent = Standard (IE 11)Windows 7 x64RemoteFailed to load Case UI, Worklist loeded
SRWare Iron 32.0.1750.1 (Chrome)Windows 7 x64RemoteFail
Firefox 24.3.0 x32OEL 6.5 x64HostWorking

Friday, February 7, 2014

Test Case Initialization with Web Service end point

The Oracle Adaptive Case Management Demo for HelloWorld introduces how to test a Case Management application by invoking a web service end point. This web service on the other hand will initiate a case instance.
Oracle promotes to invoke this web service using the test end point available at http://<your-server>:<your-port>/soa-infra/ This cause a little bit of frustration to me since this end point did not show the web service payload attributes unless I knew I implemented them.

Checking forth and back, reimplementing the web service again and again, I finally had the idea to check in Enterprise Manager ... and voila: everything there!

I don't really know why the test end point at soa-infra doesn't do the job any more or even if others faced the problem. But if ever, you run into it, you'll at least have a workaround by now.

Thursday, January 30, 2014

JBO-29114 / JBO-25004 with Oracle BPM 11g - Workspace does not load UI for Human Task

A while back, I struggled with the UI of a POC not coming up in Oracle Business Process Workspace. The following has been tested with Oracle BPM 11.1.1.7.0 / 11.1.1.7.2 but may be the same for other releases. To spoil a bit: It's a system fault and once understood, no big deal. However, I passed some time on that since all related sources I found (e.g. on OTN Forums) didn't not exactly cover this context with BPM involved.

Checking the stack trace, I found the following:

Root cause of ServletException.
oracle.jbo.InvalidDefNameException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25004. Error message parameters are {0=Package, 1=poc-bpm-002_ui.DataBindings}
    at oracle.jbo.mom.DefinitionManager.loadProjectDefinition(DefinitionManager.java:1801)
    at oracle.jbo.uicli.mom.JUMetaObjectManager.findCpx(JUMetaObjectManager.java:667)
    at oracle.jbo.uicli.mom.JUMetaObjectManager.loadCpx(JUMetaObjectManager.java:748)
    at oracle.adf.model.BindingContext.initialize(BindingContext.java:402)
    at oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:238)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:203)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.bpel.services.workflow.client.worklist.util.WorkflowFilter.doFilter(WorkflowFilter.java:175)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.bpel.services.workflow.client.worklist.util.DisableUrlSessionFilter.doFilter(DisableUrlSessionFilter.java:70)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)


JBO-29114 doesn't say much and JBO-25004 pointing us to the involved package (poc-bpm-002_ui in my case) only helps when we understand where it comes from. Actually, this package for the DataBindings will be generated by Oracle BPM Studio 11.1.1.7 if you auto-generate the Task Form for a Human Task component. On generation, the package name is taken from the ADF project name you are choosing for the UI project. Unless ADF Naming Conventions (v2.00) do not impose any restrictions on ADF project names, this generation procedure requires that you do not use the minus sign "-" in the ADF UI project name. However, the underscore doesn't impose any problems.

Summery: No minus sign in ADF UI project names if you use Oracle BPM Studio 11g auto-generation of Task Flows!