Monday, 26 January 2015

BPM 12c BundelPatch1: InitiatorTask problem

 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.


Tuesday, 20 January 2015

BPM12c Quickstart invalid oramds url

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 '

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

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}';;

Tuesday, 13 January 2015

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

 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?


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.

Tuesday, 6 January 2015

Change Subversion password in Jdeveloper

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!