1 of 1 people found this helpful
I found the problem. In org.overlord.sramp.governance.Governance, the output is wrong:
public static String NOTIFICATION_ERROR = GovernanceConstants.GOVERNANCE + ".<email|..> should be of the format <groupName>|<fromAddress>|<destination1>,<destination2>\nCheck\n";
I checked org.overlord.sramp.governance.NotificationDestinations and it should be <groupName>|<fromAddress>|<destination1>::<destination2>
works fine. Also documentation needs to be updated, so that two colons are used, not one.
As for CLI, it is related to this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1153831
The bug is specific not only to FSW, but also to EAP.
As I already mentioned, adding this to EAP standalone.xml is working
But I still have not figured out what to do in case of several email groups. I tried adding this as well
This issues error, since governance.email property cannot be defined twice in EAP configuration.xml.
Any help would be much appreciated.
After looking briefly at the code on the master branch, I believe there is a bug in this capability when using standalone.xml as the source of dtgov configuration properties. The standalone.xml approach does not support multiple properties with the same name (as you've observed). If you use dtgov.properties instead of standalone.xml, you *can* in fact use multiple properties with the same name. When we implemented the config support in standalone.xml we apparently forgot (didn't realize) that the email notification system required multiple properties with the same name.
The offending code is here:
This could be fixed easily by changing the standalone.xml config support to be a Map<String, List<String>> instead of Map<String, String>. The above code reads the values in standalone.xml and then binds the result to JNDI, where it is later look it up here:
Looking at the implementation of MapConfiguration in apache commons, it seems to already handle Maps of Lists - so nothing should need to change here.
Note: a possible workaround that does not require any code changes, after looking at the MapConfiguration code, is to try this:
The MapConfiguration class seems to automatically support comma-separated values, unless list parsing is explicitly disabled (which I don't think is happening in overlord). Obviously supporting multiple values in standalone.xml is a better solution, but the above might work today.
I just tested the workaround that you suggested and it works like a charm. I am unable to edit the code now, since overlord is up and running already. Later I may test it with jboss overlay.
For now, workaround is great. Thanks a lot.