startTransaction Errors with EDI documents

Hi I have a BIG!!! problem.
Working with the EDI package I have set up TN to correctly identify EDI X12 documents. I have my processing rule tied to the X12 Envelope document type. When I submit an EDI file (via ftp or http) to TN the file, which contains 2 or more envelopes is seprated into its different components:

X12 Envelope with unknown sender & receiver
X12 Envelope with known sender & receiver
X12 Group
X12 4010 850

I have a processing rule tied to the X12 Envelope with criterias set to known sender and receiver. The service is Service1

The execution is as follows
Service1: Loop over editn_env
Loop over editn_env/group
genreateFA
Loop over editn_env/group/transaction
Service2

Service2: ConvertToValues
MapEDISegments
Service3

Service3: Connect (to informix Database)
startTransaction
createTempTables
execute stored procedures

For some reason, when the purchase order of the second envelop is executed, there is an exception thrown that reads :
com.wm.app.b2b.server.DBException: Transaction already in progress.
at com.wm.app.b2b.server.JDBCConnection.startTransaction(JDBCConnection.java:410)
at pub.db.startTransaction(db.java:889)
at java.lang.reflect.Method.invoke(Native Method)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java(Compiled Code))

I am not sure why this happens.
Any help will be greatly appreciated.