Community Edition related query on long running connector

Hello,

I am new to Bonita BPM and trying a small process with 6.1.1 Community Edition.
I am trying a very simple process with a Service task running a connector which is going to run a long running external activity.
The connector on finish will be setting an output variable which is mapped to a process variable.
The XOR gateway needs to test this process variable value and decide the right course to end the process.

In my case, after ~10secs, the process is ending with 'No task available for this process' message.
If the connector winds up in couple of secs, I can see correct node post XOR gateway checks.
There is no exception or failure in the connector code.

Why the process is behaving like that?
Please guide me if I am missing anything here.

 

I tried adding a timer to check status of process variable after 30secs, but with introduction of a timer it's always ending in 'No task available for this process' message.

Hi Nischal,

I believe that would be useful if you post a .png image of your process. It's hard to guess what could be happening.

Also, did you took a look at your Engine Log (Help Menu) ? Maybe your connect is failing at some point, so, he do not go to the next step of your process.

Also, you can log on the bonita portal and check if you step just finished or failed.

Link to the process png: https://dl.dropboxusercontent.com/u/87918803/trial.png

Engine log showing following warning:

Dec 4, 2013 4:13:07 PM org.bonitasoft.forms.server.accessor.impl.XMLApplicationFormDefAccessorImpl <init>
WARNING: The node for the form TestPool1--1.0$entry was not found in the forms definition file

Hi,

I guess that the 'Caused by' line is the more useful one. :)

Exactly that cause I am unable to understand. I created correct and simple process diagram with studio and not delete anything. Where is the missing node coming into picture?

That I am unable to understand and fix.

Where and how I can debug this issue?

Well, something is happening in your Log file for sure. :)

Can you share it with us?

Hello, I'm facing the same problem and here is the cause:

Caused by: java.net.SocketException: Software caused connection abort: socket write error

It seems the connexion is closed before any answer has been given for the request

 

Last time I had such a problem, it was one of my variables the problem. I had to use something to convert it first from BigInt to string if I remember well.

Maybe this help a little to search the problem in your log file.

I uninstalled and installed BPM cummunity edition 6.1.1 from scratch. Created same flow again and ensured added String type as return value from connector. Still the same result. Below are dumps of the studio and engine logs:

Studio logs:
-----------

!SESSION 2013-12-05 10:11:57.460 -----------------------------------------------
eclipse.buildId=6.1.1.
java.version=1.6.0_37
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  --launcher.XXMaxPermSize512m -groovy.compiler.level 18
Command-line arguments:  -os win32 -ws win32 -arch x86_64 --launcher.XXMaxPermSize512m -groovy.compiler.level 18

!ENTRY org.bonitasoft.studio.application 1 0 2013-12-05 10:12:22.373
!INFO Startup duration : 00:00:23

!ENTRY org.bonitasoft.studio.actors 1 0 2013-12-05 10:12:34.640
!INFO Loading organization ACME in portal...

!ENTRY org.codehaus.groovy.eclipse.core 1 0 2013-12-05 10:23:07.882
!INFO Oops...surroundWithFactory not initialized

!ENTRY org.bonitasoft.studio.engine 1 0 2013-12-05 10:29:27.658
!INFO Building bar for process VMProvisionPool (1.0 )...

!ENTRY org.bonitasoft.studio.engine 1 0 2013-12-05 10:29:31.293
!INFO Build complete for process VMProvisionPool (1.0 ).


===================================================================================================

Engine logs:
------------
Dec 5, 2013 10:12:33 AM org.bonitasoft.console.server.listener.StudioWatchdogListener$1 run
WARNING: Bonita Studio watchdog process has started on 6969 with a delay of 20000ms
Dec 5, 2013 10:29:41 AM org.bonitasoft.forms.server.accessor.impl.XMLApplicationFormDefAccessorImpl <init>
WARNING: The node for the form VMProvisionPool--1.0$entry was not found in the forms definition file
Dec 5, 2013 10:29:42 AM org.bonitasoft.forms.server.ApplicationResourceServlet doGet
SEVERE: Error while generating the response.
ClientAbortException:  java.net.SocketException: Software caused connection abort: socket write error
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:369)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:448)
    at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:318)
    at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:274)
    at org.apache.catalina.connector.CoyoteOutputStream.close(CoyoteOutputStream.java:104)
    at org.bonitasoft.forms.server.ApplicationResourceServlet.doGet(ApplicationResourceServlet.java:185)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.bonitasoft.forms.server.filter.ApplicationResourceCacheFilter.doFilter(ApplicationResourceCacheFilter.java:95)
    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:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.bonitasoft.console.security.SessionFixationValve.invoke(SessionFixationValve.java:77)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Software caused connection abort: socket write error
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(Unknown Source)
    at java.net.SocketOutputStream.write(Unknown Source)
    at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:761)
    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:368)
    at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:785)
    at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)
    at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:598)
    at org.apache.coyote.Response.doWrite(Response.java:560)
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:364)
    ... 23 more
Dec 5, 2013 10:29:42 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet org.bonitasoft.forms.server.ApplicationResourceServletconsole/applicationResource threw exception
java.net.SocketException: Software caused connection abort: socket write error
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(Unknown Source)
    at java.net.SocketOutputStream.write(Unknown Source)
    at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:761)
    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:368)
    at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:785)
    at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)
    at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:598)
    at org.apache.coyote.Response.doWrite(Response.java:560)
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:364)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:448)
    at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:318)
    at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:274)
    at org.apache.catalina.connector.CoyoteOutputStream.close(CoyoteOutputStream.java:104)
    at org.bonitasoft.forms.server.ApplicationResourceServlet.doGet(ApplicationResourceServlet.java:185)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.bonitasoft.forms.server.filter.ApplicationResourceCacheFilter.doFilter(ApplicationResourceCacheFilter.java:95)
    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:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.bonitasoft.console.security.SessionFixationValve.invoke(SessionFixationValve.java:77)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Unknown Source)
Dec 5, 2013 10:29:47 AM org.bonitasoft.forms.server.accessor.impl.XMLApplicationFormDefAccessorImpl <init>
WARNING: The node for the form VMProvisionPool--1.0$entry was not found in the forms definition file

 

Hi Nischal,

Seems pretty clear to me: The code in your connector (?) is calling a component that makes you network to abort the connection.

Something like that:  http://stackoverflow.com/questions/2126607/official-reasons-for-software-caused-connection-abort-socket-write-error

Not sure what your connector does, but the problem is in his code, probably.

Hi Rafael,

Just to debug this issue, I stripped my connector to a dummy code as below. Added  some sleep for few secs to see if it works:

 

package org.mycompany.connector;
import org.bonitasoft.engine.connector.ConnectorException;

public class ESXConnectorImpl extends AbstractESXConnectorImpl {
    
    @Override
    protected void executeBusinessLogic() throws ConnectorException{
        //Get access to the connector input parameters
        //TODO execute your business logic here     
        //WARNING : Set the output of the connector execution. If outputs are not set, connector fails
        try
        {
            Thread.sleep(1000 * 12);
            boolean result = true;
            if (result)
            {
                setResult("success");                
            }
            else
            {
                setResult("failure");                
            }        
        }
        catch (Exception exp)
        {
            setResult("failure");
            throw new ConnectorException(exp);
        }    
     }

    @Override
    public void connect() throws ConnectorException{
        //[Optional] Open a connection to remote server
    
    }

    @Override
    public void disconnect() throws ConnectorException{
        //[Optional] Close connection to remote server
    
    }
}

 

But still I get same error, if the sleep is more than ~10secs.

Dude... what a Dummy...hehe

Well, I'm not an expert but I'd say to simplify your test. However, if you simplify it too much, maybe it becomes useless for you.

Based on the error, I keep my thought thet is one of the elements of your code that is causing this issue, unfortunatelly I'm not skilled enough to say to you which one. =/

Hope somene else can.

Exactly for the reason to not have any frills so that this simple code can help me unravel the mistery :)

The code is infact useless but I need to understand why its failing for basic flow. Then only I can create my real flow with all complexity.

Thanks for all the help and efforts...

No problem, hope you find the solution.

If any bell rings over here, I'll tell you.

Is it a limitation with Bonita BPM where we cannot have a long waiting background task execute via connector?
As a simple connector with just a sleep of > 10s is failing, can anyone share some insight here.
My process design has lot of steps with this kind of wait, so I am stuck due to this issue.

Please advice if I am missing anything.

 

Hi,
Has this been resolved? I’m having the same problem with the XOR gateway making a “No task available for this process” instead of redirecting to the right task.

When I have two tasks one after another in the process, they both work fine. If I add the XOR gateway after the first, the first task works and then it says: “No task available for this process”.

I’m using bonita 6.2.2