You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Erwan Guiochet (JIRA)" <ji...@apache.org> on 2013/09/13 17:07:55 UTC

[jira] [Created] (SM-2215) Servicemix-drools - exchange submited two times, second raise error in logs

Erwan Guiochet created SM-2215:
----------------------------------

             Summary: Servicemix-drools - exchange submited two times, second raise error in logs
                 Key: SM-2215
                 URL: https://issues.apache.org/jira/browse/SM-2215
             Project: ServiceMix
          Issue Type: Bug
          Components: servicemix-drools
    Affects Versions: archetypes-2013.01
         Environment: Servicemix 3.3.2/3.4.1 in WAR mode in Tomcat 6, JRE 6 / x64 on Windows
            Reporter: Erwan Guiochet
            Priority: Minor


Related to this topic : http://servicemix.396122.n5.nabble.com/Servicemix-3-3-2-drools-2010-01-Received-exchange-problem-td3325976.html

A message is normally submitted two times to drools component:
- first as Active
- second as Done

A filter exist in DroolsEndPoint.handleProviderExchange in order to process only Active message but not enough in my case.

In my case the first pass was processed correctly the exchange then and in DroolsEndPoint.handleProviderExchange the second pass was still Active not DONE... then it fire the rule and when it arrive in jbiHelper.answer the exchange was passed to DONE, so when it try to set the OUT message it failed.

Solution is to add the same filter in jbiHelper.answer as it was done in DroolsEndPoint.handleProviderExchange like this :
public void answer(Source content) throws Exception {         
        MessageExchange me = this.exchange.getInternalExchange();               
        if (me.getStatus() == ExchangeStatus.ACTIVE) 
        { 
          ...
        }
}



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira