BPEL Designer for Eclipse: how to debug a BPEL process - eclipse

I'm trying to debug a BPEL process. I made it using BPEL Designer for Eclipse (3.7.2), i'm using Ode 1.3 as engine.
I have no idea how to debug my process. I can deploy it on ode in a debug session but I don't really understand what can i do after that.

You can deploy BPEL processes developed in WS-BPEL 2.0 standard on WSO2 BPS server.
Once you deploy the BPEL process on WSO2 Business Process Server, you can use following mechanisms to debug/troubleshoot failures.
1.Using Message Tracer. This enables you to view the inbound and outbound messages to and from BPS server. To enable message trace logs for BPEL processes;
Add the following entries to the $CARBON-HOME/lib/log4j.properties
log4j.logger.org.apache.ode.bpel.messagetrace=TRACE log4j.logger.org.wso2.carbon.bpel.messagetrace=TRACE
The preferred log4j appender should be configured such that it has a threshold of TRACE level. If CARBON_LOGFILE is the log4j appender, it should be changed as follows. By default this is set to DEBUG.
eg - log4j.appender.CARBON_LOGFILE.threshold=TRACE
Re-start the server.
2.Using the Event table in the 'Instance Information' page (Figure 1). Each and every activity should have 3 events upon the successful execution. If an activity only has 2 events or if it has an "ActivityFailureEvent", then something must have gone wrong within that particular activity. You may need to refer the log file of WSO2 BPS server in-order to further investigate on the issue.

Unfortunately, the open source tools for BPEL debugging are very limited. Although ODE provides APIs to suspend and resume processes at break points, the current tools don't make use of it. I'd recommend to enable the DebugBpelEventListener, which outputs the execution events to the configured logger. This usually helps to understand what is going on.

Related

activemq-artemis log monitoring and alerting

I have been looking to find if there is an alternate way to monitor warning/errors that are in logs. Currently I am using the logs to know the error code which keeps on changing for every update. Is there an alternate way to know them?
Apache ActiveMQ Artemis uses the JBoss Logging framework to do its logging and is configurable via the logging.properties, see the documentation.
You could use a custom handler to intercept warning/errors.

Continuosly running mocks while executing tests with Citrus Framework

I need to write automated tests for Enterprise Service Bus (ESB). When ESB is running it performs different scheduled operations including DB queries, SOAP and TCP calls, etc. Also it periodically checks whether some services are active and stops flows in case it is not.
So in my case there will be some problems:
some flows will stop because service is not responding
another flows will continuously run in negative scenariuos producing errors
Is it possible to have mocks continuosly running while executing tests using Citrus Framework?
How else can I overcome this problems with Citrus?
Please note that all server components in Citrus do only live while tests are executed. This is because Citrus automatically starts and stops the server components before/after the test suite. When Citrus is inactive the server components are stopped.
If you want to break these limitations please have a look at the citrus-simulator side project which is a complete standalone simulator for different message transport types (still in beta phase though).
If the limitation mentioned before is Ok for you then you can use a combination of endpoint adapters on the server components in your Citrus project. You could have a static endpoint adapter that always sends a positive response for incoming health check requests.
Please see the documentation on endpoint adapters: http://www.citrusframework.org/reference/html/endpoint-adapter.html

WSO2 BPS - How can I create a human task instance using SOAP?

I need to create a task, as in start an instance of a human task, so it appears in the My Tasks list. Is this even possible without having it linked to a process instance? It's just that I only need the Human Task processor as I'm using another program to handle the process. So in my other program it'll go through the workflow and then when it reaches a user task it creates the task in WSO2 BPS so it can be completed.
I'm using generated stubs in Eclipse for the SOAP requests.
This is supported. Just invoke Task service as normal web service using stubs (wsdl2java) or any other way (like SOAPUI). It will create a Humantask.

How does an out-of-process semantic logging service receive events?

The reason I'm asking is I would like to use the out-of-proc mode, but I cannot install a service on each user's workstation, only on a central server. Is the communication between event source and listener service an ETW thing, or is there some kind of RPC I could use?
Yes, the out-of-process mode works by using ETW. All ETW events are system wide so the service just has to listen to ETW events.
ETW only works locally and does not offer a remote solution you could use. Your options are to install a service on each workstation, listen to ETW events (here or here) and forward them to your server with a RPC solution you build yourself. Using MSMQ comes to mind. Or have your application forward the events to your server directly so you don't need the service. Either way, you will have to build it yourself.
To add to Lars' answer, you could also log to SQL. There is a SQL sink you can use but like everything else, to get the most customized fit, you would build your own (or inherit from another class to give you a good starting point). Be careful though. Not all sinks are created the same. They all have their pros and cons. For example, with SQL and Azure sinks, you have to worry about high latency. The XML formatter doesn't write the root starting and ending node so it's not well-formed xml. Whatever reads that file would have to provide them. Good luck!

Connect to JMX using PowerShell

I am not a developer so please keep that in mind when reading the following message:
I need to be able to use Windows PowerShell to connect to a JMX RMI agent on a host, is this even possible ?
The example string from the java client I have been given is as below:
JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:7979/jmxrmi");
The reason for this is that I am doing other work in my PowerShell script and would like to keep it all in one place.
Thanks !
This is an unusual mix of two technologies, but it is possible.
On the off-chance that you are attempting to connect to a JBoss server, the quickest way may be for you to call twiddle, a command tool that will dispatch JMX requests to the target JBoss server and return the results to standard out.
Another way is to implement the Jolokia agent on the target servers. This will allow you to issue JMX requests using REST. Responses will also be returned in REST format which you can process in PowerShell using one of these solutions.
Thirdly, you can also deploy the JMX-WS service on your target servers which will allow you to communicate with the JMX server using web-services. This document provides some VBScript examples of this.
None of the above actually uses the JMXServiceURL syntax you outlined, and I cannot think of a way you could actually cleanly integrate this RMI based protocol into PowerShell, but hopefully one of the above will work for you.
========== UPDATE ==========
There may be a way to use the RMI implementation. Take a look at IKVM. It is a Java Byte Code to .NET compiler. I have successfully compiled JMX/RMI java code into a .Net assembly and used it from C#. I think PowerShell will do the same thing.