kpalang / mirth-plugin-guide

A plugin guide for NextGen Connect
35 stars 11 forks source link

Update README to account for XStream requirements introduced in MC 4.4.1 #7

Open jonbartels opened 12 months ago

jonbartels commented 12 months ago

Slack thread: https://mirthconnect.slack.com/archives/C01QLL13HNU/p1699966150315059

Quoting relevant parts:

I am having troubles with the XStream Allowlist introduced in Mirth 4.4.1.
https://github.com/nextgenhealthcare/connect/wiki/4.4.1---Upgrade-Guide
I am using the docker image nextgenhealthcare/connect:4.4.1  and I read that I can add lines to mirth.properties by adding ENV variables to my container (https://hub.docker.com/r/nextgenhealthcare/connect/#other-mirth-properties-options). So I used _MP_XSTREAM_ALLOWTYPES to set the list of classes to allow. It transforms correctly, so the classes are added to the right key (xstream.allowtypes) in mirth.properties, but it just doesn't take any effect it seems. When loading up the plugins, I still get a ForbiddenClassException from the Serializer... (edited) 

...

jpufler
  [44 minutes ago](https://mirthconnect.slack.com/archives/C01QLL13HNU/p1699969292242059?thread_ts=1699966150.315059&cid=C01QLL13HNU)
So the way to go for me right now is to use com.mirth.connect.model.[MYPLUGINSLUG].[CLASSNAME].java
...

kayyagari
  [17 minutes ago](https://mirthconnect.slack.com/archives/C01QLL13HNU/p1699970825687789?thread_ts=1699966150.315059&cid=C01QLL13HNU)
I had to do two things:
for the server-side plugin update mirth.properties with xstream.allowtypes set to the wildcard package CSV
for the client-plugin call ObjectXMLSerializer.allowTypes method in the start method

The README should be updated showing the engineer how to handle these changes.