We have an issue where if Biztalk updates an order and the next order update is from biztalk, the update may fail due to a lock. I attempted to do the following.
- After constructing the message to in the orchestration, I added a message assignment Msg_To_SAP(Microsoft.Adapters.SAP.BiztalkPropertySchema.ConnectionState)=”OPEN”;
- After sending and receiving the message, I added a second construction message to BAPI_TRANSACTION_COMMIT and then addded a message assignment of Msg_Bapi_Commit(Microsoft.Adapters.SAP.BiztalkPropertySchema.ConnectionState) = “CLOSE”;
- I sent the second message to the same Send/Recieve port with a second send receive pointing to BAPI_TRANSACTION_COMMIT. The Wait parameter was set to Y
After the change, I have a good new/bad new situation. good news is I can now do multiple updates without the lock problem. bad news is every transaction gets suspended due to the following error.
Error Description: System.InvalidOperationException: The Inner Channel to use was not found for the key
I would be interested in hearing a different solution if somebody has an idea.