1 2 Previous Next 25 Replies Latest reply: Mar 3, 2011 7:07 AM by Laura Simona RSS

    Logging/monitoring application for BPEL processes

    John Lennon Newbie
      Hello.

      I have to develop a logging/monitoring application for BPEL processes deployed on the RiftSaw engine.

      My question is: how can I access the BPEL engine and query/inspect the deployed processes? I need a starting point in this regard.

      Thanks in advance.

      Kind regards, John
        • 1. Re: Logging/monitoring application for BPEL processes
          Gary Brown Master

          Hi John

           

          We don't currently offer a public API to the management capabilities because we are in the process of integrating management capabilities (initially at a console level) across the 'process execution' technologies within JBoss - so this is for RiftSaw, DroolsFlow and jBPM. So it is likely that the next step will then be to provide a Web Service or possibly REST API to this unified management capability.

           

          Best thing would be to create a jira in the RiftSaw project outlining your requirements, and we can then take these into account when building the unified management API.

           

          As a possible interim solution, have you had a look at: http://ode.apache.org/user-guide.html#UserGuide-Eventlisteners

           

          The only difference in RiftSaw is that the property name is called 'bpel.event.listeners', and should be configured in the riftsaw.sar/bpel.properties file.

           

          Regards

          Gary

          • 2. Re: Logging/monitoring application for BPEL processes
            John Lennon Newbie

            Thanks for your reply, Gary.

             

             

            I found the following sample CustomEventListener, registered it like you said in riftsaw.sar/bpel.properties file (bpel.event.listeners=org.mpathirage.bpel.CustomEventListener) and placed the jar file in the server's classpath (..\server\lib).

            After restarting the server and running some BPEL processes i haven´t noticed any new messages. Then I tried to place the jar file into  "...\riftsaw.sar\lib" and got the same result.

             

             

            What am i doing wrong?

             

             

             

            package org.mpathirage.bpel.event;
            
            import org.apache.ode.bpel.iapi.BpelEventListener;
            import org.apache.ode.bpel.evt.BpelEvent;
            
            import java.util.Properties;
            
            public class CustomEventListener implements BpelEventListener {
                public void onEvent(BpelEvent bpelEvent) {
                    System.out.println("Event Notification: " +
                            bpelEvent.getType().toString() +
                            ", " + bpelEvent.getTimestamp()+
                            ", " + bpelEvent.toString());
                }
            
                public void startup(Properties properties) {
                    System.out.println("Custom Event Listner:"+ CustomEventListener.class +" startup!");
                }
            
                public void shutdown() {
                    System.out.println("Custom Event Listner:"+ CustomEventListener.class +" shutdown!");
                }
            }
            
            • 3. Re: Logging/monitoring application for BPEL processes
              Gary Brown Master

              Hi John

               

              If the bpel.properties entry is (bpel.event.listeners=org.mpathirage.bpel.CustomEventListener) then the class name is missing the 'event' part of the package. It should be: bpel.event.listeners=org.mpathirage.bpel.event.CustomEventListener

               

              The jar should be fine in the riftsaw.sar/lib.

               

              Regards

              Gary

              • 4. Re: Logging/monitoring application for BPEL processes
                John Lennon Newbie

                Thank you Gary,

                 

                The evenlistener works fine now and gives a lot of useful information besides the values of variables of BPEL processes, and that’s the main point. Is there a possibility to use ProcessManagement and InstanceManagement interfaces (described in ODE Management API) with RiftSaw? I need it for debugging and can’t wait until this feature will be implemented in newer RiftSaw releases. So I have to implement it myself… =)

                 

                Regards

                John

                • 5. Re: Logging/monitoring application for BPEL processes
                  Gary Brown Master

                  Hi John

                   

                  Currently its not possible to get access to these APIs, due to the intended longer term strategy - so we don't want to be having to support an ODE specific API in the long term. However I understand your more immediate need.

                   

                  Best thing is if you could raise a jira asking for access to this API and we will discuss internally if there is a short term solution we could offer until the longer term solution is available.

                   

                  Regards

                  Gary

                  • 6. Re: Logging/monitoring application for BPEL processes
                    John Lennon Newbie

                    Hi Gary,

                     

                     

                    according to the screenshots from RiftSaw RC2 User Guide, the new BPEL console is already able to show the “Process Instance Data”.

                     

                    But I get the following warnings when opening the console and “Process Overview” doesn’t work:

                     

                    WARN  [PluginMgr] Unable to load plugin: 'org.jboss.bpm.console.server.plugin.FormDispatcherPlugin'

                    WARN  [PluginMgr] Unable to load plugin: 'org.jboss.bpm.console.server.plugin.GraphViewerPlugin'

                    INFO  [PluginMgr] Successfully loaded plugin 'org.jboss.bpm.console.server.plugin.ProcessEnginePlugin': class org.jboss.soa.bpel.console.ProcessEnginePluginImpl

                     

                     

                    Do you have any idea why the FormDispatcherPlugin and GraphViewerPlugin are not loading?

                     

                    Best Regards

                    John

                    • 7. Re: Logging/monitoring application for BPEL processes
                      Gary Brown Master

                      The BPM console is used for jBPM and Drools Flow aswell - I think when used with these projects it makes use of FormDesigner and GraphViewer plugins, but as these are not used in RiftSaw, it just generates a warning.

                       

                      The BPM console has recently added instance data viewing for RiftSaw - but at the moment there is no programming API to this information.

                      • 8. Re: Logging/monitoring application for BPEL processes
                        Heiko Braun Master

                        Gary is right. These are plugins not used by riftsaw.

                        • 9. Re: Logging/monitoring application for BPEL processes
                          John Lennon Newbie

                          I thought, that these unloaded plugins are the reason why my console doesn’t look like in RiftSaw 2.0-CR2 User Manual. If I choose some process, there is no information available at all. Maybe these screenshots was taken from other project or do I have some problems with my console?

                           

                          console.JPG

                          • 10. Re: Logging/monitoring application for BPEL processes
                            Gary Brown Master

                            Hi John

                             

                            I don't think there is anything wrong with your configuration. The console only shows 'active' process instances - so one way to see process instances in the console would be to use the 'simple_correlation' quickstart sample, send a 'hello' message to start the process, and then look at the console (or press the refresh button if already running).

                             

                            Regards

                            Gary

                            • 11. Re: Logging/monitoring application for BPEL processes
                              John Lennon Newbie

                              Hi Gary,

                               

                              I get the following error by selecting that sample process in "Process Overview":


                              
                              13:55:09,838 INFO  [AbstractServer] JBossAS [6.0.0.M1 (build: SVNTag=JBoss_6_0_0_M1 date=200912040958)] Started in 1m:27s:41ms
                              
                              13:57:12,518 WARN  [PluginMgr] Unable to load plugin: 'org.jboss.bpm.console.server.plugin.FormDispatcherPlugin'
                              
                              13:57:12,529 WARN  [PluginMgr] Unable to load plugin: 'org.jboss.bpm.console.server.plugin.GraphViewerPlugin'
                              
                              13:57:12,548 INFO  [PluginMgr] Successfully loaded plugin 'org.jboss.bpm.console.server.plugin.ProcessEnginePlugin': class org.jboss.soa.bpel.console.ProcessEng
                              
                              inePluginImpl
                              
                              13:58:09,748 INFO  [STDOUT] Retrieving document at 'file:/D:/jboss-6.0.0.M1/server/default/tmp/a3k8a-seb1cf-g73a2pkr-1-g73a40bg-b1/Quickstart_bpel_simple_correl
                              
                              ation-1.jar/HelloGoodbye.wsdl'.
                              
                              13:58:09,836 INFO  [WatchDog] [Endpoint files for {DeploymentUnit Quickstart_bpel_simple_correlation-1.jar}] updated
                              
                              13:59:36,118 ERROR [BpelManagementFacadeImpl] Exception while listing instances
                              
                              java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
                              
                                      at org.apache.ode.daohib.bpel.ProcessInstanceDaoImpl.getEventsFirstLastCount(ProcessInstanceDaoImpl.java:433)
                              
                                      at org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl.fillInstanceInfo(ProcessAndInstanceManagementImpl.java:925)
                              
                                      at org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl.access$000(ProcessAndInstanceManagementImpl.java:140)
                              
                                      at org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl$1.run(ProcessAndInstanceManagementImpl.java:296)
                              
                                      at org.apache.ode.bpel.engine.BpelDatabase$1.call(BpelDatabase.java:76)
                              
                                      at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:218)
                              
                                      at org.apache.ode.bpel.engine.BpelDatabase.exec(BpelDatabase.java:74)
                              
                                      at org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl.listInstances(ProcessAndInstanceManagementImpl.java:292)
                              
                                      at org.jboss.soa.bpel.console.ProcessMgmtImpl.getProcessInstances(ProcessMgmtImpl.java:87)
                              
                                      at org.jboss.bpm.console.server.ProcessMgmtFacade.getInstancesJSON(ProcessMgmtFacade.java:173)
                              
                                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              
                                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              
                                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              
                                      at java.lang.reflect.Method.invoke(Method.java:597)
                              
                                      at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
                              
                                      at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
                              
                                      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
                              
                                      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
                              
                                      at org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
                              
                                      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
                              
                                      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
                              
                                      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
                              
                                      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
                              
                                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                              
                                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                              
                                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                              
                                      at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
                              
                                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                              
                                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                              
                                      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                              
                                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                              
                                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                              
                                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
                              
                                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                              
                                      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
                              
                                      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
                              
                                      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
                              
                                      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                              
                                      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                              
                                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                              
                                      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                              
                                      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                              
                                      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                              
                                      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                              
                                      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
                              
                                      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
                              
                                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                              
                                      at java.lang.Thread.run(Thread.java:619)
                              
                              13:59:36,283 ERROR [[Resteasy]] Servlet.service() for servlet Resteasy threw exception
                              
                              org.jboss.resteasy.spi.UnhandledException: org.apache.ode.bpel.pmapi.ProcessingException: Exception while listing instances: java.lang.ClassCastException: java.
                              
                              lang.Long cannot be cast to java.lang.Integer
                              
                                      at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)
                              
                                      at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)
                              
                                      at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)
                              
                                      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)
                              
                                      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
                              
                                      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
                              
                                      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
                              
                                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                              
                                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                              
                                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                              
                                      at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
                              
                                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                              
                                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                              
                                      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                              
                                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                              
                                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                              
                                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
                              
                                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                              
                                      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
                              
                                      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
                              
                                      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
                              
                                      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                              
                                      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                              
                                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                              
                                      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                              
                                      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                              
                                      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                              
                                      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                              
                                      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
                              
                                      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
                              
                                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                              
                                      at java.lang.Thread.run(Thread.java:619)
                              
                              Caused by: org.apache.ode.bpel.pmapi.ProcessingException: Exception while listing instances: java.lang.ClassCastException: java.lang.Long cannot be cast to java
                              
                              .lang.Integer
                              
                                      at org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl.listInstances(ProcessAndInstanceManagementImpl.java:303)
                              
                                      at org.jboss.soa.bpel.console.ProcessMgmtImpl.getProcessInstances(ProcessMgmtImpl.java:87)
                              
                                      at org.jboss.bpm.console.server.ProcessMgmtFacade.getInstancesJSON(ProcessMgmtFacade.java:173)
                              
                                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              
                                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              
                                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              
                                      at java.lang.reflect.Method.invoke(Method.java:597)
                              
                                      at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
                              
                                      at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
                              
                                      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
                              
                                      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
                              
                                      at org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
                              
                                      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
                              
                                      ... 28 more
                              
                               
                              
                              
                              

                               

                               

                              Regards

                              John

                              • 12. Re: Logging/monitoring application for BPEL processes
                                Gary Brown Master

                                Hi John

                                 

                                Could you raise a jira outlining your environment and versions, and also what steps are required to reproduce the problem.

                                 

                                Thanks

                                Gary

                                • 13. Re: Logging/monitoring application for BPEL processes
                                  John Lennon Newbie

                                  Everyone who needs this feature please vote here: https://jira.jboss.org/jira/browse/RIFTSAW-191

                                   

                                  Thanks

                                  John

                                  • 14. Re: Logging/monitoring application for BPEL processes
                                    Christy Christy Novice

                                    Hi!

                                    I am using Riftsaw 2.1.0 Filnal and I want to use :

                                     

                                    package bpel.handlers.event;

                                     

                                    import javax.naming.*;
                                    import javax.jws.WebService;
                                    import javax.jws.WebMethod;
                                    import org.apache.ode.bpel.pmapi.ProcessInfoListDocument;
                                    import java.util.List;

                                     

                                    @WebService
                                    public class MeinJndiContext {
                                        @WebMethod
                                        public String getCtx() {
                                            String res = "";
                                            InitialContext ctx = null;
                                            try {
                                                ctx = new InitialContext();

                                     

                                                // BpelManagementFacadeImpl bpelMmgtFacade = (BpelManagementFacadeImpl) ctx.lookup("bpel/PMAPI");
                                                Object bpelMmgtFacade = ctx.lookup("bpel/PMAPI");
                                                org.apache.ode.bpel.engine.BpelManagementFacadeImpl facade = (org.apache.ode.bpel.engine.BpelManagementFacadeImpl) bpelMmgtFacade;

                                     

                                                System.out.println("bpelMmgtFacade.getClass() = " + bpelMmgtFacade.getClass());
                                                ProcessInfoListDocument BPEL_LIST = facade.listAllProcesses();
                                                List processes = BPEL_LIST.getProcessInfoList().getProcessInfoList();
                                                if (processes != null && processes.size() > 0) {
                                                    for (int i = 0; i < processes.size(); i++) {
                                                        Object o = processes.get(i);
                                                        System.out.println("o.getClass() = " + o.getClass());

                                     

                                                    }
                                                }
                                            ctx.close();
                                            } catch (NamingException e) {
                                            }
                                            return res;
                                        }
                                    }

                                     

                                    But I have strange error:

                                    java.lang.ClassCastException: org.apache.ode.bpel.engine.BpelManagementFacadeImpl cannot be cast to org.apache.ode.bpel.engine.BpelManagementFacadeImpl
                                        at bpel.handlers.event.MeinJndiContext.getCtx(MeinJndiContext.java:24)

                                     

                                    Any suggestions?

                                    Many thanks,

                                    Kristina

                                    1 2 Previous Next