Error when trying to change invoice status to ready

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error when trying to change invoice status to ready

Christian Carlow-OFBizzer
This error occurs when trying to change an invoice status to ready:
Error calling event: org.ofbiz.webapp.event.EventHandlerException:
Service invocation error (No transaction manager or invalid status)

The setInvoiceStatus eca rule at
applications/accounting/servicedef/secas_olap.xml seems to be causing
the problem.  The event="global-commit-post-run" which is handled
differently by the runAction service of
framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java.
Events with prefix "global-" create a ServiceXaWrapper with its active
field set to false by default which is never set to true before the
enlist() method is called which requires the status to be active.

I'm not very familiar with what is going on in the code but according to
the GenericXaResource extended ServiceXaWrapper, the active field
doesn't get set to true unless the start method is called.  Should a
call to the start method of the ServiceXaWrapper be added after being
created?
Reply | Threaded
Open this post in threaded view
|

Re: Error when trying to change invoice status to ready

Christian Carlow-OFBizzer
To be more correct, the TransactionManager of the GenericXaResource
enlist() service is not set to the STATUS_ACTIVE value which causes the
error to be thrown.  The setInvoiceStatus eca works fine when called for
the auto-invoicing functions of the shipment status changing services.

On 04/09/2014 03:01 PM, Christian Carlow wrote:

> This error occurs when trying to change an invoice status to ready:
> Error calling event: org.ofbiz.webapp.event.EventHandlerException:
> Service invocation error (No transaction manager or invalid status)
>
> The setInvoiceStatus eca rule at
> applications/accounting/servicedef/secas_olap.xml seems to be causing
> the problem.  The event="global-commit-post-run" which is handled
> differently by the runAction service of
> framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java.
> Events with prefix "global-" create a ServiceXaWrapper with its active
> field set to false by default which is never set to true before the
> enlist() method is called which requires the status to be active.
>
> I'm not very familiar with what is going on in the code but according
> to the GenericXaResource extended ServiceXaWrapper, the active field
> doesn't get set to true unless the start method is called.  Should a
> call to the start method of the ServiceXaWrapper be added after being
> created?