Tuesday, 24 February 2015

BPM12c Quickstart "invalid oramds url" solved; recommended patches

A few weeks ago I mentioned that I ran into a bug relating an invalid MDS url while trying to create an XSL based on the Case.xsd.

Just this morning got a notification on my Service Request that there is a patch for an invalid MDS url while creating an XSLT based on the Case management XSD: 19775314. There are two versions of the patch: one for the  12.1.3.0.0 and one for 12.1.3.0.1 for homes that have the bundle patch applied.


I tried the second one on my BPM QuickStart home that was patched with the bundle patch.

So currently the recommended patches on the BPM QuickStart are:
  • 20163149: (dataobject assignment lost after dehydration), this is mentioned as a prerequesite to the bundle patch, as alternative to the wrongly mentioned patch in the Readme.
  • 19707784: SOA Bundle Patch 12.1.3.0.1
  • 20440332: Initiator task form does not shown up on workspace and task is auto approved
  • 19775314: java.lang.IllegalStateException: Invalid url ERROR WHEN CREATING TRANSFORMATION (Patch) 
  • 19706799: db adapter wizard mappings and xsd file creation does not trigger event in win (Patch); choose the 12.1.3.0.1 version.

Tuesday, 17 February 2015

BPM 12c BundelPatch1: InitiatorTask problem: Solved!

Lately I wrote about the release of the BPM12c Bundelpatch 1 and the problems regarding Initiator tasks we were having: BPM 12c BundelPatch1: InitiatorTask problem.

I created a service request for it and now there is a patch for it: BPM 12c BP interim patch #20440332
This patch must be applied after applying the BundelPatch and it's recommended prereq-patch (p20163149).

The patch 20440332 is official hence for public download. With this patch it works for us.

Thanks to Gucci for his support.

Monday, 16 February 2015

Oracle SOASuite UMS: Deregister obsolete Messaging Client applications

There are already several blogs on how to receive and send email using the UMS email adapter. A few good starting points that use GMail as a provider are the ones written by our respected con-colleagues of Amis:
So I won't bother to do a how-to on that on my account. Although I manged to get that working with a local Exchange setup.

What I managed to do is to read e-mail and then process it to upload the attachments and body using BPEL and java in a Spring-Context to Adaptive Case Management. If you want to do something similar make sure you install the patch 18511990 for fetching the attachment-properties and -content, since without the patch the properties for inline attachements are not written properly to the soa-infra database. See my earlier blog-posts here and here.

Having it all setup and playing around with it, you might end up in the situation that the service won't listen to the actual email-address you reserved for it, as I did. This might be the case when you change the email address in your receiving adapter component in the composite. Or after deploying several versions of the composite, especially with different addresses.

It turns out that there is a panel to deregister Messaging Client Applications to cleanup the mess.
First go to the Enterprise Manager and under the Weblogic Domain navigate to the 'usermessagingserver' (there are also entries for the different usermessagingdriver's, but in this case you need the server itself):
 Right click on it and in the pop-up choose 'Messaging Client Applications':
 Here the registered Messaging Client Applications are registered with the particular endpoints.
In our case all the activation agents of the polling inbound email adapters are registered here and it the situation might occur that the composites are listening to wrong addresses. So select those you don't want anymore, and click on the De-register button.
You might need to re-deploy your composite and edit the component for the inbound email to have it listening to the proper address set-up for the particular environment (development, test, accepetance, production). And then it shoud work. Maybe a server restart is necessary to have the proper activation agent(s) started (and the unwanted shutdown).

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 process initiation task has no payload. The process instance has been created and has been approved."
The message in English:


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.

2015-02-03:  Update: I added the correct English message above. On the SOA Proactive Support blog is stated that there is a pre-requisite patch: "Patch 20163149: DATAOBJECT ASSIGNMENT LOST AFTER DEHYDRATION". The readme states 20333237, but this is incorrect. But unfortunately applying this patch does not solve the problem. So still be carefull with applying this bundle patch.

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