I have recently started working on mirth channel and I was to asked to update mirth connect from 2.21 to 3.6.1(latest mirth version). The problem I was facing was If success destination status is returned as SUCCESS for version 2.2.1 and SENT for version 3.6.1. We are updating our DB based on the status sent. Because of this difference I have to change code in all my channels. Is there any other way to avoid code change?
-
Can you post a snippet of the status checks your channels are running? – Freiheit Aug 24 '18 at 21:47
1 Answers
I think you will have to change your channels.
The upgrade guide does not specifically address your problem.
The message status is represented by the class com.mirth.connect.donkey.model.message.Status
which no longer has a SUCCESS element.
This JIRA entry for Mirth Connect has a comment covering the same problem:
Overrode ScriptRuntime in Rhino so that we can check when a user is trying to compare a Donkey Status with a string. If they are trying to compare the status to SUCCESS or FAILURE, the correct strings are used instead (SENT/ERROR), and a server error is logged. If they are trying to compare with ACCEPTED or UNKNOWN, a server error is logged but the equality will always return false (because those statuses no longer exist).
If I am reading this correctly, you can retain some older functions by importing a package. So even if you want to keep your code you still have to make changes to import that package. If you have to touch the code anyway it is best to update to the modern 3.x status codes.

- 8,408
- 6
- 59
- 101