6 Replies Latest reply on May 11, 2017 6:31 AM by Martien van den Akker

    Using DB Adapter within sub-process

    user12859640

      Hi,

      I am using a sub-process to iterate over the collection. For ever value of collection I need to perform a select from Database.

      When I tried to use XSLT in a sub process, I get the following error

       

      Invoking command: Changes in Get Sequence [ for ( Test Process, <none>, <none> ) ]

      Invoking command:  [ for ( Test Process, <none>, <none> ) ]

      May 10, 2017 12:02:01 PM oracle.ideimpl.feedback2.client.FeedbackManagerImpl uncaughtException

      SEVERE: Uncaught Exception

      1. java.lang.IllegalArgumentException: Type does not support schema conversion:Array(BusinessObjectRef(E|http://xmlns.oracle.com/bpm/bpmobject/Data/TestArr|TestArr))

                      at oracle.bpm.catalog.SchemaObjectFactory.create(SchemaObjectFactory.java:45)

                      at oracle.bpm.fusion.soa.transformation.XSLTransformationServiceImpl.isValidDeclaration(XSLTransformationServiceImpl.java:130)

                      at oracle.bpm.fusion.studio.dataassociation.TransformationCanvasEditor$TransformationCanvasEditorDialog.isValidDeclaration(TransformationCanvasEditor.java:200)

                      at oracle.bpm.fusion.studio.dataassociation.TransformationCanvasEditor$TransformationCanvasEditorDialog.access$000(TransformationCanvasEditor.java:125)

                      at oracle.bpm.fusion.studio.dataassociation.TransformationCanvasEditor$TransformationCanvasEditorDialog$1.check(TransformationCanvasEditor.java:145)

                      at oracle.bpm.fusion.studio.dataassociation.TransformationCanvasEditor$TransformationCanvasEditorDialog$1.check(TransformationCanvasEditor.java:142)

                      at oracle.bpm.collections.iterator.FilterIterator.advance(FilterIterator.java:63)

                      at oracle.bpm.collections.iterator.FilterIterator.next(FilterIterator.java:54)

                      at oracle.bpm.collections.CollectionUtils.toArray(CollectionUtils.java:963)

                      at oracle.bpm.collections.Sequence$Default.toArray(Sequence.java:191)

                      at oracle.bpm.fusion.studio.dataassociation.TransformationCanvasEditor$TransformationCanvasEditorDialog.createSourcesList(TransformationCanvasEditor.java:402)

                      at oracle.bpm.fusion.studio.dataassociation.TransformationCanvasEditor$TransformationCanvasEditorDialog.init(TransformationCanvasEditor.java:320)

                      at oracle.bpm.fusion.studio.dataassociation.TransformationCanvasEditor$TransformationCanvasEditorDialog.<init>(TransformationCanvasEditor.java:156)

                      at oracle.bpm.fusion.studio.dataassociation.TransformationCanvasEditor.createCanvasObject(TransformationCanvasEditor.java:98)

                      at oracle.tip.tools.ide.assign.panel.MapPanelTree$3.run(MapPanelTree.java:408)

                      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)

                      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)

                      at java.awt.EventQueue.access$500(EventQueue.java:97)

                      at java.awt.EventQueue$3.run(EventQueue.java:709)

                      at java.awt.EventQueue$3.run(EventQueue.java:703)

                      at java.security.AccessController.doPrivileged(Native Method)

                      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)

                      at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)

                      at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)

                      at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)

                      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)

                      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)

                      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)

                      at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)

                      at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)

                      at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)

                      at java.security.AccessController.doPrivileged(Native Method)

                      at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)

                      at java.awt.Dialog.show(Dialog.java:1084)

                      at java.awt.Component.show(Component.java:1671)

                      at java.awt.Component.setVisible(Component.java:1623)

                      at java.awt.Window.setVisible(Window.java:1014)

                      at java.awt.Dialog.setVisible(Dialog.java:1005)

                      at oracle.bpm.ui.peer.swing.SwingComponent.setVisible(SwingComponent.java:428)

                      at oracle.bpm.ui.UiComponent.setVisible(UiComponent.java:814)

                      at oracle.bpm.ui.OkCancelDialog.setVisible(OkCancelDialog.java:182)

                      at oracle.bpm.designer.flowpanels.DataAssociationsLinkEditor.editElements(DataAssociationsLinkEditor.java:118)

                      at oracle.bpm.designer.flowpanels.ElementsLinkEditor$1.run(ElementsLinkEditor.java:93)

                      at oracle.bpm.ui.action.BaseAction.actionPerformed(BaseAction.java:222)

                      at oracle.bpm.ui.action.BaseAction.actionPerformed(BaseAction.java:216)

                      at oracle.bpm.ui.peer.swing.SwingLink$JLinkLabel.fireActionPerformed(SwingLink.java:135)

       

       

      Please let me know how to use the service task inside a sub process.

       

      Thanks,Charanya

        • 1. Re: Using DB Adapter within sub-process
          Martien van den Akker

          Hi,

           

          I think that the problem is that you use complex variables as parameters to and fro your subprocess. Although the designer accepts it, I got the same problem. At least with embedded sub-processes.

          So try to do it with simple parameters (string, decimal, etc.)  Or put it in a separate BPEL process. That does accept complex types, of couse. Using a separate BPEL process does not have a performance penalty, since it does the call in Java (not a Soap/HTTP roundtrip). But it is a bit more build work.

           

          Regards,
          Martien

          1 person found this helpful
          • 2. Re: Using DB Adapter within sub-process
            user12859640

            Hi Martein,

            thanks. I am using BPM. so I will also create a BPM Process and make a process call using call activity.

            Does this also not have performance penalty with BPM?

             

            Thank you very much.

            • 3. Re: Using DB Adapter within sub-process
              Martien van den Akker

              Oh, I'm sorry, I mis-read, I thought you were doing BPEL. Which is in my opinion the better option.

              I'd build this in BPEL and call the main service from BPM.

               

              BPM runs on the same process engine as BPEL, thus there is no real performance penalty. But BPEL allows for scopes and local variables, and therefor better memory/resource handling.

               

              Regards,
              Martien

              1 person found this helpful
              • 4. Re: Using DB Adapter within sub-process
                Dan Atwood

                I think Marien is on the right track with BPEL in your case.

                 

                Understand what you are trying to do, but I avoid the Call activity for a couple reasons.  The activity you are calling has to be in the same project, and in the past it has had migration / versioning issues.  Go the BPEL route, but if you're not comfortable with that at least invoke the other process using a Send and Receive activity pair.

                 

                Dan

                1 person found this helpful
                • 5. Re: Using DB Adapter within sub-process
                  user12859640

                  thanks Martein and Dan.

                  hmm. I am using call activity for some of the reusable components in my process (like if a process has both automatic polling and initiation). though its a different issue, should I review the process call?

                   

                  Thanks,

                  Charanya

                  • 6. Re: Using DB Adapter within sub-process
                    Martien van den Akker

                    Hi Charanya,

                     

                    In principle call with reusable processes has its advantages. Especially because it removes clutter in your BPM process. Alternative is send/receive within an embedded subprocess. But thats a bit more work.

                     

                    If you have no problems with the call/reusable process then leave it and keep use it. But keep the Dan's note in mind: the reusable process is only reusable within the project, not between composites.

                     

                    Regards,
                    Martien