Skip navigation.

Darwin IT

Syndicate content
Darwin-IT professionals do ICT-projects based on a broad range of Oracle products and technologies. We write about our experiences and share our thoughts and tips.Martien van den Akkerhttps://plus.google.com/110503432901891966671noreply@blogger.comBlogger241125
Updated: 3 hours 32 min ago

BPM 12c BundelPatch1: InitiatorTask problem

Mon, 2015-01-26 06:38
 Last week we installed the new "SOA Bundle Patch 12.1.3.0.1 (Patch)" (19707784).
 Applying the patch went fine, no problem at all.

We have a process that is initiated by an Initiator Task, that can be started, I'm sure you're familiar with, using the link under 'Applications'. In our case, however, clicking it gives an exception in stead of opening the Task Form:

Unfortunately I have a Dutch version of my browser, but translated it states something like: "The task for the start of the process has no payload. The process instance is created and is given approval for startup."

Strange is that the task apparently is auto-submitted, since the process flows on causing, in  our process,  a  ACM Case started with empty data. A stacktrace we found in the server diagnostic log is:
[2015-01-26T09:28:58.517+01:00] [bpm_server1] [ERROR] [] [oracle.soa.services.workflow.task] [tid: [ACTIVE].ExecuteThread: '14' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: hans] [ecid: c7fc39f4-cf66-4d25-84e0-f1fd8eb550e5-000087b2,1:31540] [APP: soa-infra] [oracle.soa.tracking.FlowId: 700014] [oracle.soa.tracking.InstanceId: 760219] [oracle.soa.tracking.SCAEntityId: 210006] [FlowId: 0000Kg_MuAf5uX05zzS4yW1KlM_O00000c] <.> exception.code:30036[[
exception.type: ERROR
exception.severity: 2
exception.name: Invalid action on workflow task or user does not have privilege to perform this action.
exception.description: Action SUBMIT on task 1b51326d-a3be-4f9f-b055-b7b365ae2f3c cannot be performed by hans.
exception.fix: Make sure that the action is valid with respect to the current state of the task or ensure that the user has privilege to perform this action on the workflow task.
ORABPEL-30036

exception.code:30036
exception.type: ERROR
exception.severity: 2
exception.name: Invalid action on workflow task or user does not have privilege to perform this action.
exception.description: Action SUBMIT on task 1b51326d-a3be-4f9f-b055-b7b365ae2f3c cannot be performed by hans.
exception.fix: Make sure that the action is valid with respect to the current state of the task or ensure that the user has privilege to perform this action on the workflow task.

at oracle.bpel.services.workflow.task.impl.TaskService.performPreActionValidation(TaskService.java:8686)
at oracle.bpel.services.workflow.task.impl.TaskService.updateTaskOutcomeAndEvaluateRoutingSlip(TaskService.java:3929)
at oracle.bpel.services.workflow.task.impl.TaskService.updateTaskOutcome(TaskService.java:3725)
at oracle.bpel.services.workflow.task.impl.TaskService.updateTaskOutcome(TaskService.java:3701)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:124)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at oracle.bpel.services.workflow.common.WorkflowFabricInitCheckAdvice.invoke(WorkflowFabricInitCheckAdvice.java:26)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at oracle.bpel.services.workflow.common.WorkflowServiceCacheEventAdvice.invoke(WorkflowServiceCacheEventAdvice.java:114)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at oracle.bpel.services.workflow.test.workflow.ExceptionTestCaseBuilder.invoke(ExceptionTestCaseBuilder.java:155)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at oracle.bpel.services.common.dms.MethodEventAspect.invoke(MethodEventAspect.java:70)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at oracle.bpel.services.common.dms.MethodPhaseEventAspect.invoke(MethodPhaseEventAspect.java:82)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy407.updateTaskOutcome(Unknown Source)
at oracle.bpel.services.workflow.task.ejb.TaskServiceBean.updateTaskOutcome(TaskServiceBean.java:616)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:100)
at oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:131)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAs(JpsSubject.java:208)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:454)
at oracle.security.jps.ee.ejb.JpsAbsInterceptor.runJaasMode(JpsAbsInterceptor.java:118)
at oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:197)
at oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:112)
at sun.reflect.GeneratedMethodAccessor853.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:109)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(Unknown Source)
at com.sun.proxy.$Proxy413.updateTaskOutcome(Unknown Source)
at oracle.bpel.services.workflow.task.ejb.TaskServiceBean_399vcw_EOImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:34)
at oracle.bpel.services.workflow.task.ejb.TaskServiceBean_399vcw_EOImpl.updateTaskOutcome(Unknown Source)
at oracle.bpel.services.workflow.task.ejb.TaskServiceBean_399vcw_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:226)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:474)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:285)
at oracle.bpel.services.workflow.task.ejb.TaskServiceBean_399vcw_EOImpl_12130_WLStub.updateTaskOutcome(Unknown Source)
at oracle.bpel.services.workflow.task.client.TaskServiceRemoteClient.updateTaskOutcome(TaskServiceRemoteClient.java:2213)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at oracle.bpel.services.workflow.client.WFClientRetryInvocationHandler.invokeTarget(WFClientRetryInvocationHandler.java:141)
at oracle.bpel.services.workflow.client.WFClientRetryInvocationHandler.invoke(WFClientRetryInvocationHandler.java:80)
at com.sun.proxy.$Proxy579.updateTaskOutcome(Unknown Source)
at oracle.bpm.workspace.model.common.ExecutionBean.approveTask(ExecutionBean.java:311)
at oracle.bpm.workspace.model.common.ExecutionBean.handleExternalInstanceExecution(ExecutionBean.java:185)
at oracle.bpm.workspace.model.application.ApplicationBean.execute(ApplicationBean.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.el.parser.AstValue.invoke(AstValue.java:254)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:302)
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:189)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:170)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:189)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:170)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:189)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:170)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:111)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:168)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:510)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:171)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:115)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at oracle.adf.view.rich.event.ProxyEvent.broadcastWrappedEvent(ProxyEvent.java:72)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:124)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at oracle.adf.view.rich.event.ProxyEvent.broadcastWrappedEvent(ProxyEvent.java:72)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:124)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:168)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:510)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:171)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:111)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:168)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:510)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:171)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:115)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:168)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:510)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:171)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:111)
at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)
at org.apache.myfaces.trinidad.component.WrapperEvent.broadcastWrappedEvent(WrapperEvent.java:82)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:168)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:510)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:171)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:115)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:1074)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:402)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:225)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at oracle.help.web.rich.OHWFilter.doFilter(OHWFilter.java:189)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:502)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:502)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:327)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:229)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:202)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:137)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:137)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:220)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:137)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3436)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

]]

I tried it with a "stripped-down-to-the-bone" simple BPM project with only a simple HumanTask based on a simple DataObject with only 2 string attributes. And a auto-generated taskform. And again the fault occurs. When we rollback the patch the initiator functionality work again.

So be carefull applying this patch when using Initiator Tasks.


BPM12c Quickstart invalid oramds url

Tue, 2015-01-20 08:25
In a BPM process that starts an Adaptive Case Management Case, I tried to create an XSL based on the Case.xsd that is found in the oramds. I choose the input of the startCase message of the wsdl of the ACM Case.

But I kept running into the following message:
Invalid url: oramds:/soa/shared/casemgmt/Case.xsd
java.lang.IllegalStateException: Invalid url: oramds:/soa/shared/casemgmt/Case.xsd

I tested this in both a WIndows and a Linux (under VirtualBox) installation. Through a question on the BPM Suite - forum, I was confirmed that others hit this as well.

I also saw errors indicating that the 'oracle.home' reference in the adf-config was not found. So I tried to add it as a VMOption in the jdev.conf. But that did not help so far.

Also refering to the a live MDS on a server did not help. When I create a MDS connection to a database in JDev I don't see all the entries I expect from my 11g experiences.

So it seems that the MDS functionality (partly) broke in the 12.1.3 release.
Since I did not found any patches relating the MDS problems I created an SR and got this reply 'The bug have already been raised on which the Development is working and one-Off BackPort has been raised related to this SR.This is fixed in the latest version , we will update you once the patch is ready for this version.'

So we may expect a patch in the near future. If you run in to the same error, you can stop searching. I'll report here as soon as a patch gets available.

BPM12c: Patch for 'ora:getAttachmentProperty: Failed to decode properties string '

Tue, 2015-01-20 08:17
Last december I reported running into a problem getting attachments and attachments properties in this blog-post. I created a Service Request for it and last week it resulted in a one-off patch:

  • Patch 18511990 VITAL INFORMATION LOST WHEN RECEIVING EMAILS WITH CONTENT-TYPE MULTIPART/RELATED (Patch)
Because there are multiple versions available for download, you should make sure to download the appropriate version; in my case it was 12.1.3.


Adaptive Case Mgt: Cleanup cases without Flow-Instances

Tue, 2015-01-20 04:57
Recently we encountered problems with cases that are related to a composite that somehow got corrupted in the MDS. This was possibly due to a failing deployment, which suggests a bug, since you don't want to have composite artifacts of an earlier version removed only after a succesful deployment of the new version.

The particular composite was listed in the deployed composites list, but it lacked the artifacts and therefor marked as invalid. Using the tip in this blog I was able to remove the composite. In fact it comes down to do an export of the MDS, openup the zip and browse to the folder ‘deployed—composites’. This contains an xml file named ‘deployed-composites.xml’. This gives a summary of deployed composites. Delete the entry of the composite you want to have removed. Besides the xml file, there is a folder per soa-partition with a sub-folder per composite containing the artefacts. In our case however the particular composite was stated in the deployed-composites.xml but did not have a folder here. If the folder consists removed it. Pack the zip again (or if you use a tool like TotalCommander, 7-Zip, WinRar or the like, you could do the removal directly from the tool. The resulting zip can then be imported. After a server restart the composite version is removed.

So far so good, however, we still had the composite instances and the cases. Well the flow-instances  can be purged from Enterprise Manager. It turned out however that we still had cases in the database, without flow instances. You could check this with the query:

select count(*) from cm_case cse join sca_partition ptn on ptn.id = cse.sca_partition_id where not exists (select fie.flow_id from sca_flow_instance fie where fie.flow_id = cse.flow_id);
This got me 213 cases. Possibly this is kind of designed, however we could get not into the caselist in the workspace without errors anymore. The caselist was empty, but we got a list of errors.
In the diagnostics log we got errors like:
 
[2015-01-19T14:34:37.764+01:00] [bpm_server1] [ERROR] [] [oracle.bpm.casemgmt.instance] [tid: [ACTIVE].ExecuteThread: '14' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: hans] [ecid: 60f546bd-50c5-445a-9a6d-1a72f364d5a9-00004adc,0] [APP: soa-infra] [DSID: 0000Kg2NM3f5uX05zzS4yW1KjBH400000x] Exception[[
BPM-72802

Missing resource bundle in project.
The resource bundle {2} was not found in case project identified by metadata Id default/{composite-name}!1.1-MA/{case-name} for nl locale .
Create a resource bundle for nl locale in project and re-deploy the project to server.

at oracle.bpm.casemgmt.resource.Casei18nUtil.getCaseResourceBundle(Casei18nUtil.java:142)
at oracle.bpm.casemgmt.resource.Casei18nUtil.getValue(Casei18nUtil.java:55)
at oracle.bpm.casemgmt.resource.Casei18nUtil.getValue(Casei18nUtil.java:40)
at sun.reflect.GeneratedMethodAccessor1371.invoke(Unknown Source)
...
I apparently have cases that lack composite instances and I indeed removed the composite artifacts, because of the invalid composite.

To solve this I created the following delete script:
declare
cursor c_cse
is select cse.case_id
, cse.flow_id
, cse.sca_partition_id
, cse.partition_date
, ptn.name partition_name
from cm_case cse
join sca_partition ptn on ptn.id = cse.sca_partition_id
where not exists ( select flow_id from sca_flow_instance fie where fie.flow_id = cse.flow_id);
-- and flow_id = 20006;
procedure pl(p_text in varchar2)
is
begin
dbms_output.put_line(p_text);
end;
procedure del_case_header(p_flow_id in number)
is
cursor c_hdr
is SELECT ID,
CASE_NUMBER,
TITLE,
SHORT_SUMMARY,
LONG_SUMMARY,
CASE_NAMESPACE,
CASE_DEFINITION_ID,
CASE_DEFINITION_NAME,
composite_name,
composite_version
FROM CM_CASE_HEADER hdr
where hdr.flow_id = p_flow_id;
r_hdr c_hdr%rowtype;
begin
open c_hdr;
fetch c_hdr into r_hdr;
close c_hdr;
pl('Delete case header for flow_id '||p_flow_id||' case_number '||r_hdr.case_number||', from definition: '||r_hdr.CASE_DEFINITION_NAME||', composite_name: '||r_hdr.composite_name ||', composite_version: '||r_hdr.composite_version||'.');
delete from cm_case_header where flow_id = p_flow_id;
end;
procedure del_case_data(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_case_data where flow_id = p_flow_id;
pl('Delete '||l_count||' case_data rows for flow_id '||p_flow_id||'.');
delete from cm_case_data where flow_id = p_flow_id;
end;
procedure del_case_object(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_case_object where flow_id = p_flow_id;
pl('Delete '||l_count||' case_object rows for flow_id '||p_flow_id||'.');
delete from cm_case_object where flow_id = p_flow_id;
end;
procedure del_case_document(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_case_document where flow_id = p_flow_id;
pl('Delete '||l_count||' case_document rows for flow_id '||p_flow_id||'.');
delete from cm_case_document where flow_id = p_flow_id;
end;
procedure del_case_milestones(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_case_milestone where flow_id = p_flow_id;
pl('Delete '||l_count||' case_milestone rows for flow_id '||p_flow_id||'.');
delete from cm_case_milestone where flow_id = p_flow_id;
end;
procedure del_case_events(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_case_event where flow_id = p_flow_id;
pl('Delete '||l_count||' case_event rows for flow_id '||p_flow_id||'.');
delete from cm_case_event where flow_id = p_flow_id;
end;
procedure del_case_flex_fields(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_case_flex_field where flow_id = p_flow_id;
pl('Delete '||l_count||' case_flex_field rows for flow_id '||p_flow_id||'.');
delete from cm_case_flex_field where flow_id = p_flow_id;
end;
procedure del_case_stake_holders(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_case_stake_holder where flow_id = p_flow_id;
pl('Delete '||l_count||' case_stake_holder rows for flow_id '||p_flow_id||'.');
delete from cm_case_stake_holder where flow_id = p_flow_id;
end;
procedure del_case_stake_holder_members(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_case_stake_holder_member where flow_id = p_flow_id;
pl('Delete '||l_count||' case_stake_holder_member rows for flow_id '||p_flow_id||'.');
delete from cm_case_stake_holder_member where flow_id = p_flow_id;
end;
procedure del_case_comments(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_comment where flow_id = p_flow_id;
pl('Delete '||l_count||' case_comment rows for flow_id '||p_flow_id||'.');
delete from cm_comment where flow_id = p_flow_id;
end;
procedure del_fabric_header_property(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_fabric_header_property where flow_id = p_flow_id;
pl('Delete '||l_count||' fabric_header_property rows for flow_id '||p_flow_id||'.');
delete from cm_fabric_header_property where flow_id = p_flow_id;
end;
procedure del_linked_cases(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_linked_case where flow_id = p_flow_id;
pl('Delete '||l_count||' linked_case rows for flow_id '||p_flow_id||'.');
delete from cm_linked_case where flow_id = p_flow_id;
end;
procedure del_property_bag(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_property_bag where flow_id = p_flow_id;
pl('Delete '||l_count||' property_bag rows for flow_id '||p_flow_id||'.');
delete from cm_property_bag where flow_id = p_flow_id;
end;
procedure del_translation(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_translation where flow_id = p_flow_id;
pl('Delete '||l_count||' translation rows for flow_id '||p_flow_id||'.');
delete from cm_translation where flow_id = p_flow_id;
end;
procedure del_case(p_flow_id in number)
is
l_count number;
begin
select count(*) into l_count from cm_case where flow_id = p_flow_id;
pl('Delete '||l_count||' case rows for flow_id '||p_flow_id||'.');
delete from cm_case where flow_id = p_flow_id;
end;
begin
pl('Purge cases without SCA flow');
for r_cse in c_cse loop
pl(r_cse.case_id || ' - ' || r_cse.flow_id|| ' - '||r_cse.partition_name||' - '||r_cse.partition_date);
del_case_header( r_cse.flow_id);
del_case_data( r_cse.flow_id);
del_case_object( r_cse.flow_id);
del_case_document( r_cse.flow_id);
del_case_milestones( r_cse.flow_id);
del_case_events( r_cse.flow_id);
del_case_flex_fields( r_cse.flow_id);
del_case_stake_holders( r_cse.flow_id);
del_case_stake_holder_members( r_cse.flow_id);
del_case_comments( r_cse.flow_id);
del_fabric_header_property( r_cse.flow_id);
del_linked_cases( r_cse.flow_id);
del_property_bag( r_cse.flow_id);
del_translation( r_cse.flow_id);
del_case( r_cse.flow_id);
end loop;
end;
/
A few remarks:
  • Use this at your own risk: make sure you have database backup. I must admit I actually didn't (shame), but I have to mention it.
  • This script is created by analysing the datamodel of SOA BPM 12c. It is not supported by Oracle of course. I won't take any responsibility of damage caused by using this script (of course). See my advise to take a backup in the previous bullet.
  • I assume that it is as designed that cases aren't deleted at purging of the instances: a case is an administrative entity containing data and audit-logs that are related to customer interacts.You might adapt the driving query with an extra where-condition to only select the cases relating to the removed composites.
  • Case definitions are not removed.
  • Case documents are not removed from WebCenter Content, only the register in the CM_CASE_DOCUMENT table.
To remove case definitions use something like:
create table cm_case_definition_bck as
select * from cm_case_definition
where composite_name = '{your composite}'
and composite_version != '{composite version you want to keep}';

delete from cm_case_definition
where composite_name = '{your composite}'
and composite_version != '{composite version you want to keep}';;

JDeveloper 12c: Resolving 'MDS-01368: Variable "oracle.home" used in configuration document is not defined' error

Tue, 2015-01-13 04:02
 When I started up my Integrated Domain I encountered loads of errors in the log regarding the starting of my ADF application:

...
Caused By: oracle.mds.config.MDSConfigurationException: MDS-01330: Kan MDS-configuratiedocument niet laden.    
MDS-01329: Kan element "persistence-config" niet laden.
MDS-01370: Configuratie van MetadataStore voor metadata-store-usage "mstore-usage_1" is ongeldig.   
MDS-01368: Variabele "oracle.home" in het configuratiedocument is niet gedefinieerd als systeemeigenschap of omgevingsvariabele.

...

I found several questions on the oracle community about this, but none answers. Yet the answer turns out to be quite simple.

It is apparently caused by the adf-config.xml in the workspace where you'll find a snippet like:
                    <metadata-store-usage id="mstore-usage_1">
<metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
<property name="metadata-path" value="${oracle.home}/integration"/>
<property name="partition-name" value="seed"/>
</metadata-store>
</metadata-store-usage>

Here you see that in the metadata-path a reference to the oracle.home property is made.

It turns out that Oracle lacked to add this property in the startup script of the integrated weblogic default domain.

So open the setDomainEnv.cmd (Windows) or setDomainEnv.sh (Linux) script. Under Window for the DefaultDomain of the Integrated Weblogic, it is found in your Roaming Application data similar to: c:\Users\martien\AppData\Roaming\JDeveloper\system12.1.3.0.41.140521.1008\DefaultDomain\bin\

Then find the setting for EXTRA_JAVA_PROPERTIES and add the property -Doracle.home=%SOA_ORACLE_HOME%
Like:
set EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -Dsoa.archives.dir=%SOA_ORACLE_HOME%\soa -Doracle.home=%SOA_ORACLE_HOME% -Dsoa.oracle.home=%SOA_ORACLE_HOME% -Dsoa.instance.home=%DOMAIN_HOME% -Dtangosol.coherence.log=jdk -Djavax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.MessageFactoryImpl -Dweblogic.transaction.blocking.commit=true -Dweblogic.transaction.blocking.rollback=true -Djavax.net.ssl.trustStore=%WL_HOME%\server\lib\DemoTrust.jks -Doracle.xml.schema\Ignore_Duplicate_Components=true -Doracle.xdkjava.compatibility.version=11.1.1 -Doracle.soa.compatibility.version=11.1.1

Refire your domain and it should startup smoothly, regarding this issue. Probably it saves you some startup time too.

Build failed: where's my bc4j.xcfg?

Tue, 2015-01-13 02:30

Yesterday and this morning I lost a lot of time with building failures, trying to build our ADF HumanTask forms. We used a adf-lib for amongst others XML DataControls, and reusable page-comoponents.

Trying to build the ear file, and actually that adf-lib, I got an error stating 'Unable to copy to output directory ... <default-package>/common/bc4j.xcfg not found'. Indeed in that default ADFBc folder the bc4j.xcfg is not available, nor anywhere in our whole project or workspace.

After a while of searching on our friend Google, I found this post of Andrejus Baranovski.

Apparently in Jdeveloper 11gR2 Oracle introduced a caching mechanism for the IDE.Probably some paging mechanism where Jdeveloper pages files in memory to disk. It's, to be honest, actually one of the behaviours I did not like in Eclipse. I liked the 'what you see is what you edit' approach of JDeveloper.

And since I'm mostly a SOA and BPM developer, I was stuck in JDeveloper 11gR1, never go to R2. But now in 12c I ran into this behaviour of JDeveloper. Anyway, JDeveloper does this caching on Application level, thus on a per Application basis. So go to Application Properties:
 Then to the node IDE Performance Cache:
 There you'll find the default location of your cache. In that folder you'll find a .data subfolder, containing caching data of all or some of your Application projects. Close JDeveloper (since under Windows it locks those files) and clear that folder.
Since this folder is a subfolder of the application, by default, you should make sure to ignore it with versioning, override the folder with a path outside of your subversion working copy.

Change Subversion password in Jdeveloper

Wed, 2015-01-07 01:50
On most projects I used TortoiseSVN voor versioning with Subversion. It gives me a feeling of being more in control of my working copy. In the past I used JDevelopers built in versioning tool on a project, due to lack of administrator rights for installing Tortoise. And although you need to give it some time to get used to it, the versioning is pretty good actually.

On my current project I gave it a go again, since the customer is used to do versioning from inside the IDE (be it Eclipse or JDeveloper).

One thing that I remember to be hard to do was changing your subversion password. I remember that I could not find it in Jdeveloper 11g. And again in Jdeveloper 12c it was hard to find as well. So I started getting affraid to have to hack in the preference or property files. But it turns out that you can do it pretty easy from the tool. Be it that it is at a less obvious place.

In Jdeveloper go to the Team menu and choose Versions.

It will open the Versions Browser or Navigator:
You can right click on the particular connection (in my example the blurred one):

And here you can change your password.
You can also add or remove repository connections, import and export them. Which is handy because in SQLDeveloper there's also a Subversion client. Of course, since it's based on the same framework.


Some versioning features I'm happy about in JDeveloper:
  • The pending changes tools is neat: it gives a nice overview of pending changes divided over tabs with incoming outgoing (your own changes), (updates from coworkers), and candidates (added files that are not versioned yet)
  • Integrated in project navigator in JDeveloper, where you can do changes on file, project and application level.
I'm less happy about or getting used to:
  • Versioning functionality is pretty much scattered over the IDE in different context menu's. Not only because of the different versioning levels, but the preferences are done at different places. See the Versions Navigator above, but I tend to search for preferences in the Preferences menu.
  • There are folders that you don't want to have versioned, for example: files generated at build like compiled classes, processes and jar/war/ear files. You want to be able to set the 'svn:ignore' property for those. But those folders and files tend to be invisible in the project navigator. So you have to add the parent folders of those files and folders as a resource, set the property, commit and remove them as a resource again. 
  • When I want to set keywords (like Id, author, etc.) for svn keyword replacement, JDeveloper doesn't know of the possible values. 
But for most jobs the SVN integration is impressing complete.

Happy versioning in JDeveloper!

It's Spring for Oracle ACM API's

Tue, 2015-01-06 08:24
Before the holiday season I was working on a service to receive e-mails in BPM using the UMS-email-adapter. Then process the attachments and the body and upload them to the Oracle ACM-case the email was meant for.

I won't get in too much detail here, since there are some articles on the use of ACM-API's like the ones of Niall Comminsky.

Unfortunately, until now, there are no WSDL/SOAP or REST services available on the ACM-API's, as they are on the Workflow Task API's.

However, it is not so hard to make the API's available as services. The trick is to wrap them up in a set of Java-beans, with one class with methods that do the jobs and create 'request and response beans' for the input parameters of the methods and the response.

A few years ago I wrote an article on using Spring components in SOA Suite 11g. This approach is still perfectly usable for SOA/BPM12c. And gives you a WSDL interface on the API's in near to no time.

There is one remark on the API's, though. That is on the creation of the the ACM Stream Service, or actually the creation of the BPMServiceClientFactory to get the context.

In the blog of Niall you'll read that you need to set the following context-properties:

        Map properties =
new HashMap();
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.CLIENT_TYPE,
BPMServiceClientFactory.REMOTE_CLIENT);
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_PROVIDER_URL,
"t3://localhost:7001");
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_CREDENTIALS,
cPwd);
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_PRINCIPAL,
cUser);
caseMgtAPI.mServiceClientFactory =
BPMServiceClientFactory.getInstance(properties, "default",
null);
Since in my case the service is running on the same server as the BPEL/BPM/ACM Process Engine is running, there's no need to create a connection (and thus provide an URL) and to authenticate as EJB_SECURITY_PRINCIPAL. So I found that the following suffices:
        Map properties =
new HashMap();
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.CLIENT_TYPE,
WorkflowServiceClientFactory.REMOTE_CLIENT);
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
BPMServiceClientFactory factory = BPMServiceClientFactory.getInstance(properties, null, null);
I would expect that  'WorkflowServiceClientFactory.REMOTE_CLIENT' should be'WorkflowServiceClientFactory.LOCAL_CLIENT', but need to verify that. The code above works in my case.
Update 12-1-2015: When using LOCAL_CLIENT I get the exception:
oracle.bpm.client.common.BPMServiceClientException: Cannot lookup Local EJB from a client. Try annotating it in the referred EJB. Veroorzaakt door: oracle.bpm.client.common.BPMServiceClientException: Cannot lookup Local EJB from a client. Try annotating it in the referred EJB.
So apparently you need to use REMOTE_CLIENT.

You do need to authenticate with the BPM user that is allowed to query the case, upload documents  etc. as follows:
 context = bpmFactory.getBPMUserAuthenticationService().authenticate(userName, userPassword.toCharArray(), null);
Hope this helps a little further in creating services on ACM.

Send HTML Formatted email using SoaSuite 11g/12c

Wed, 2014-12-17 09:41
This week I stumbled upon a question on the SOASuite forum, on the Oracle communities, that where the questioner wanted to send HTML-formatted emails.

It happens that I was busy with the email-adapter myself, and it would be nice to have neatly formatted email. It took me some time, but I managed to do it.
It basically consist of:
  1. Define an outbound email adapter config, with Opaque element. This expects an Base64 encoded payload, which enables you to put in everything you want (given it is valid for your receiver)
  2. Create an HTML payload as a string, simply by concatenating all the html code, your content and probaly variable-content.
  3. Use an embedded java activity to unencode the XML encodings and Base64 encode it.
  4. Copy the Base64 encoded payload to the opaque message payload, fill in the subject and the to-email-adres
  5. Invoke the email adapter, with the following properties on the invoke activity:
    1. jca.ums.to -> based on a variable
    2. jca.ums.subject -> based on a variable
    3. jca.ums.msg.content-type -> based on an expression: "text/html"
The last-property is important: it tells the receiving application to interpret the message as html.

Read the complete how-to here.

When I have time, in a later stage I'll update this message to transfer the content to this page.

ora:getAttachmentProperty: Failed to decode properties string

Mon, 2014-12-15 11:40
Last week I created a process that polls the usermessagingservice-email adapter to read emails and store the email with attachments as Oracle ACM case documents.

For simple e-mails this works fine, but with some emails I get the error:
0An error occurs while processing the XPath expression; the expression is ora:getAttachmentProperty('Content-Type', 'ReceiveMessage_ReceiveNotification_InputVariable','body', '/ns2:message/ns2:attachment[$AttachmentId]').XPath expression failed to execute.

An error occurs while processing the XPath expression; the expression is ora:getAttachmentProperty('Content-Type', 'ReceiveMessage_ReceiveNotification_InputVariable','body', '/ns2:message/ns2:attachment[$AttachmentId]').

The XPath expression failed to execute; the reason was: java.lang.RuntimeException: Failed to decode properties string ,att.contentId=1,Content-Type=multipart/related;

boundary "---- _Part_188_790028878.1418047669530",.

Check the detailed root cause described in the exception message text and verify that the XPath query is correct.

XPath expression failed to execute

This occurs with both the functions ora:getAttachmentProperty and ora:getAttachmentContent.

It turns out that attachements that fail, are embedded attachments, like company logo's in autographs. They have a content-type like: "multipart/related", see the propertie string like:
,att.contentId=1,Content-Type=multipart/alternative; 
boundary "---- _Part_21_137200243.1418648527909",/related;
But 'real' attachments did work, and had a properties string like:
Content-Transfer-Encoding=base64,Content-Disposition=attachment,att.contentId=2,Content-ID=<58BB5695B386104EA778D6E3C982C79D@caci.nl>,Content-Type=image/jpeg; name DataSources.jpg,

Apparently, if the content-type in the properties string does not start with 'multipart', then the attachment is processable.
When you open the BPEL ReceiveMessage_ReceiveNotification_InputVariable input variable I got something like:
  <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="body">
<message xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata/SWKInboundEmail">
<attachment href="409425ae-8448-11e4-a413-000c297d0a6d"/>
<attachment href="409907af-8448-11e4-a413-000c297d0a6d"/>
<attachment href="4099a3f0-8448-11e4-a413-000c297d0a6d"/>
<attachment href="409a4031-8448-11e4-a413-000c297d0a6d"/>
<opaqueElement xmlns="http://xmlns.oracle.com/pcbpel/adapter/opaque/">PGh0bWwgeG1sbnM6dj0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTp2bWwiIHhtbG5zOm89InVy
bjpzY2hlbWFzLW1pY3Jvc29mdC1jb206b2ZmaWNlOm9mZmljZSIgeG1sbnM6dz0idXJuOnNjaGVt
YXMtbWljcm9zb2Z0LWNvbTpvZmZpY2U6d29yZCIgeG1sbnM6bT0iaHR0cDovL3NjaGVtYXMubWlj
cm9zb2Z0LmNvbS9vZmZpY2UvMjAwNC8xMi9vbW1sIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
VFIvUkVDLWh0bWw0MCI+DQo8aGVhZD4NCjxtZXRhIGh0dHAtZXF1aXY9IkNvbnRlbnQtVHlwZSIg
...
.

In the Soa Infra database a table exists named 'ATTACHMENTS', with three columns: 'KEY', 'ATTACHMENT' and 'PROPERTIES'.

When you do a select on that table where the key the @href attribute, then you'll find the attachment. The PROPERTIES column contains the properties string like mentioned above.

So I created a DB Adapter config, with JNDI name 'eis/DB/SOA' (referring to already configured datasource in the DB Adapter), on this table. In the for-each loop I first query the attachment using the href attribute.

Then I extract the content-type using the expression
substring-before(substring-after($InvokeQuerySoaInfraAttachments_QuerySoaInfraAttachmentsSelect_OutputVariable.AttachmentCollection/ns6:Attachment/ns6:properties, 'Content-Type='),';')

In an IF statement using an expression like
not(starts-with($contentType, 'multipart'))
I only process those attachments that has content-type that is not multipart.

Probably a more sophisticated expression can be found.I could check on a list of only supporting mime-types.

To me this seems like a bug: SOASuite should be able to get the available properties out of the string to be able to process this.The main problem is also that the BPEL fault-handler is ignored: when the error occurs, the process fails! So I can't catch the exception and act on it. And honestly: I should not query the table myself, using the DB adapter, do I?

By the way: working with 12c (12.1.3), but I assume the same will occur in 11g.

Integrating BPM12c with BAM

Wed, 2014-12-03 07:21
In BPM12c there is a tight integration with BAM, like it was with 11g. However, BAM is not automatically installed in BPM. You need to do that seperately. But having done that, you need to get BPM acquainted with BAM and instruct it to enable process analytics.

For a greater part the configuration is similar to the 11g story. My former oracle colleague wrote a blog about it: 'Configuration of BAM and BPM for process analytics'.
There is a little difference, because in 12c you won't find the mentioned property 'DisableActions' under the 'oracle.as.soainfra.config' -> 'BPMNConfig'. But you have to enable process analytics on the bpm-server(s). The 12c docs tell you how: '11.1 Understanding Oracle BAM and BPM Integration'.
Taken from that document here a short step-list:
  1. Log in to the Fusion Middleware Control (http:Adminserver-host:port/em) console. 
  2. In the Target Navigation pane, expand the Weblogic Domain node. 
  3. Select the domain in which the Oracle BAM server is installed. 
  4. Open the MBean Browser by right-clicking on the domain and select System MBean Browser. 
  5. Expand the Application Defined MBeans node. 
  6. Navigate to oracle.as.soainfra.config node -> 'Server: server_name' -> AnalyticsConfig -> analytics.
  7. Disable the 'DisableProcessMetrics'-property by setting the value to false. 
  8. You might want to do the same with the 'DisableMonitorExpress'-property.
  9. Click Apply.

Using DB Adapter to connect to DB2 on AS400

Tue, 2014-11-25 04:37
In my current project I need to connect to a DB2 database on an AS400. To do so is no rocket science, but not exactly a NNF (Next-Next-Finish) config.

First you need to download the IBM JDBC adapter for DB2, which is open souce. Download the JT400.jar  from http://jt400.sourceforge.net/. Place it in a folder on your server. Since it's not an Oracle driver, I don't like to have it placed in the Oracle-Home, so I would put it on a different lib folder, where it is recognisable. Create a logical one, where you place other shared libs as well.

There are several methods to add the lib to your weblogic class path. What worked for me was to add it to the 'setDomainEnv.cmd'/'setDomainEnv.sh' file in the domain home.

(The Default Domain of the integrated weblogic of JDeveloper 12.1.3 under Windows can be found in: “c:\Users\%USER%\AppData\Roaming\JDeveloper\system12.1.3.0.41.140521.1008\DefaultDomain”)
Search for the keyword ‘POST_CLASSPATH’ and add the following at the end of the list of POST_CLASSPATH-additions:
set POST_CLASSPATH=c:\Oracle\lib\jtopen_8_3\lib\jt400.jar;%POST_CLASSPATH%
Where 'c:\Oracle\lib\jtopen_8_3' was the folder where I put it under windows. Then restart your server(s), and create a DataSource. For 'Database Type' as well as for 'Driver' choose 'Other' in the wizard. Then for the following fields enter the corresponding values in the given format (see also the doc.):
FieldValue/FormatURLjdbc:as400://hostname/Schema-Name;translate binary=trueDriver Class
com.ibm.as400.access.AS400JDBCDriver
or
com.ibm.as400.access.AS400JDBCXADataSource
Driver Jar
jt400.jar
or
jt400Native.jar

Since in our case the database apparently has a time out (don't know it this is default behaviour with DB2-AS400), I put in a one-row-query in the Test Table Name-field. And I checked the Test Connections On Reserve-checkbox, because I don't know the time-out frequency.

A description of configuring the library and connection in JDeveloper and the DBAdapter can be found in section 9.6.2 of this doc.

Having the DataSource in Weblogic setup, you can register it in de Database Adapter. Besides provinding the DataSourceName or XADataSourceName you should adapt the PlatformClassName:

The default is 'org.eclipse.persistence.platform.database.oracle.Oracle10Platform' (It only now strikes me that it contains 'org.eclipse.persistence' in the package name). Leaving it like this could have you running in the exception:
ConnectionFactory property platformClassName was set to org.eclipse.persistence.platform.database.oracle.Oracle10Platform but the database you are connecting to is DB2 UDB for AS/400
For DB2 on AS/400, the value should be: 'oracle.tip.adapter.db.toplinkext.DB2AS400Platform', see the docs here.

Reminder to myself: turn off felix service urlhandlers in combined BPM & OSB12c installation

Mon, 2014-11-24 05:12
Last week I started with creating a few OSB services for my current project, which is in fact a BPM12c project that needs to be interated with database services on an AS400, thus DB2. Firstly I found that when I tried to deploy on a standalone wls domain (created with the qs_config script), it lacks an OSB installation. Whereas the integrated weblogic default domain has one.

But when I try to deploy to a pretty simple project I ran into the fault 'The WSDL is not semantically valid: Failed to read wsdl file from url due to -- java.net.MalformedURLException: Unknown protocol: servicebus.'

I even tried to do an import of a configuration.jar into the sbconsole, but same error here.

Frustration all over the place: how hard can it be, beïng quite an experienced osb developer on 11g?

Luckily I wasn't the only frustrated chap in the field: Lucas Jellema already ran into it and found a solution, where he credited Daniel Dias from Middleware by Link Consulting.

OSB12c: Errorhandling in REST

Fri, 2014-10-31 03:39
Yesterday, I had an OSB consulting day at a customer. We looked into a REST service that was to be extended with update functionality. Since calling an update service of an EIS (Enterprise Information System) can go wrong with all sorts of errors, it is important to be able to return a fault-message with the errors, jason format.

Now in OSB12c it's very apparent how you define possible fault-messages and even how the should be formatted in JSON:

In this sample case we created a more or less simple xsd for faults (dutch: fouten). To test with different fault messages we simply duplicated the 'fouten' element in the xsd to 'fouten2'. You can assign different HTTP-status codes to the different fault.

So this is configuration is pretty simple and straight forward. But it is not quite clear in the documents how you would return a specific fault within your error-handlers in the pipeline.

Internally OSB works not only 'XML'-based but actually SOAP-based. So the trick in the end is to replace the body with a soap-fault message and the selection of the REST/JSON errormessage is done based on the structure of the document in the details-section of the SOAP-Fault. In the screen above, you would define for each fault message an xsd-element and apparently it validates the soap-fault-details content against each XSD defined, and the xsd against which the detail-content is valid points to the returned fault, with the corresponding HTTP Status.

So we created a XQuery transformation as follows:
xquery version "1.0" encoding "utf-8";

(:: OracleAnnotationVersion "1.0" ::)

declare namespace ns2="http://darwin-it.nl/doe/mobile/fouten";
(:: import schema at "../PS/Schemas/fouten.xsd" ::)
declare namespace ns1="http://xmlns.oracle.com/adf/svc/errors/";
(:: import schema at "../BS/Schemas/XMLSchema_-130439696.xsd" ::)
declare namespace soap-env="http://schemas.xmlsoap.org/soap/envelope/";

declare variable $input as element() (:: schema-element(ns1:ServiceErrorMessage) ::) external;

declare function local:func($input as element() (:: schema-element(ns1:ServiceErrorMessage) ::)) as element() (:: schema-element(ns2:fouten) ::) {
<soap-env:Fault>
<faultcode>fault</faultcode>
<faultstring></faultstring>
<detail>
<ns2:fouten>
{
for $detail in $input/ns1:detail
return
<ns2:ErrorMessages>
<ns2:ErrorLevel>{fn:data($detail/ns1:severity)}</ns2:ErrorLevel>
<ns2:ErrorMessage>{fn:concat("ERROR: ", fn:data($detail/ns1:message))}</ns2:ErrorMessage></ns2:ErrorMessages>
}
</ns2:fouten>
</detail>
</soap-env:Fault>
};

local:func($input)
Of course the actual fault detail must follow the xsd for that particular fault. We tested but the faultcode or fault string does not have any affect in selection of the REST-fault or HTTP statuscode.
With the xquery above we got the 'fault' returned as defined in the REST definition, as shown in the screendump above.
 In our example, if we would changed the contents of this xquery and replace the tag <ns2:fouten> to <ns2:fouten2> then we got the other fault (fault2), with the corresponding HTTP-status.
A detail with contents that does not correspond to any of the defined fault-xsd's would result in HTTP-status 500: internal server error. So it is important to have a proper transformation where the returning fault-detail is valid to at least one of the fault-xsd's.

Another conclusion is that since the fault selection is apparently based on the detail-contents against the registered fault-xsd-elements, you apperently can't have different faults with the same xsd. Since JSON is 'namespace-less', you probably can solve this by defining several copies of the same xsd with a different namespace, one for each fault. The choosen namespace in the xquery would then be the selector for the fault. But since the underlying element names are the same, it would not differ in the resulting JSON-message. Of course in an XML result it would differ.

BPM & SOA Application missing in JDeveloper 12c gallery

Wed, 2014-10-29 13:48
A few weeks ago I did a BPM12c Quickstart Installation under Oracle Linux 6. Everything went smoothly, as described in the install guide as well as on many blogs already.
But I found that most of those blogs did an installation under Windows, where I did it under Oracle Linux in Virtualbox.

You would think (as I did) that it shouldn't matter. However, it turns out that in JDeveloper I was missing the 'BPM Application' amongst others in the JDeveloper New Gallery. Very inconvenient. I couldn't find any hints on the big internet. My friend Google wasn't very helpful in this.

But I wouldn't write this blog if I did not solve it. It turns out that with an update I got it solved.

It turns out that I lacked the 'Spring & Oracle Weblogic SCA' extension. Using the Help->Update functionality I downloaded and installed that and after restarting JDeveloper my 'New Gallery' was properly filled.

For those not so familiar with the JDeveloper update mechanism, here a step by step guide:
  1. Choose Help->Update:
  2.  Leave the Update Centers checked as default and click Next:
  3. Check 'Spring & Oracle Weblogic SCA' and click Next:
  4. Click Finish:
  5. Confirm when asked for restarting JDeveloper.
Update 2014-12-01, last week I also found this document on oracle support to do a clean of your jdeveloper.

    Demo User Community in BPM 12c Quickstart

    Tue, 2014-10-28 05:34
    When you want to do demo-ing or perform the BPM12c workshops on a BPM12c QuickStart developers installation you'll need the Oracle BPM Demo User community. You know: with Charles Dickens, John Steinbeck and friends.

    How to do so, you can find on the page following this link. You'll need the demo-community scripting that can be found following this link, and then download 'workflow-001-DemoCommunitySeedApp'.

    However, besides adapting the build.properties file, there are a few changes to make in the build.xml.


    First, find the property declaration for 'wls.home', and change it to:
    <property name="wls.home" value="${bea.home}/wlserver"/>
    This is needed, since they renamed the folder for the weblogic server in the FMW12c home. Then, after the comment of 'End Default values for params', add the following

    <!-- Import task def for antcontrib functions as if -->
    <property name="ant-contrib.jar" value="${bea.home}/oracle_common/modules/net.sf.antcontrib_1.1.0.0_1-0b3/lib/ant-contrib.jar"/>
    <taskdef resource="net/sf/antcontrib/antlib.xml">
    <classpath>
    <pathelement location="${ant-contrib.jar}"/>
    </classpath>
    </taskdef>
    This is because the script lacks a definition for the ant-contrib lib, needed amongst others for the 'if' activities. After this change, it worked for me.