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.comBlogger244125
Updated: 4 hours 20 min ago

BPM12c Quickstart "invalid oramds url" solved; recommended patches

Wed, 2015-02-25 01:53
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.

BPM 12c BundelPatch1: InitiatorTask problem: Solved!

Tue, 2015-02-17 05:23
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.

Oracle SOASuite UMS: Deregister obsolete Messaging Client applications

Mon, 2015-02-16 02:38
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).

    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 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.

    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.