Modifications on openlmis-fulfillment core

Hello @Klaudia_Palkowska, @Sebastian_Brudzinski, I have made minor changes to openlmis-fulfillment and would like to hear from the core team on how i can have my changes patched into distro. The context, We need to generate a CSV from order on requisition-to-order conversion for the TZUP project. This feature is already available in openlmis, but the workflow is slightly different. In openlmis after generating the csv, it’s saved in a local directory, transferred to a remote directory via ftp and lastly an email send to the user doing the conversion. The last two steps are not needed in our use case; we only want to store the csv file in a local directory. I unsuccessfully attempted to resolve this through db configurations without any code changes. So i made minor changes to OrderService checking for certain conditions before performing ftp transfers and sending emails. The branch is GitHub - OpenLMIS/openlmis-fulfillment at TZUP-169. I will be glad to hear your feedback.

Hello Elly,

thanks for letting us know. I don’t have any objections to having those two things configurable, but I do have suggestions on how to approach it differently.

It seems that your current approach is to keep those two settings in the database, but you don’t give any ability to modify those values other than manually running SQL queries on the database. If this setting doesn’t need to be editable in the runtime (which I believe is the case) you could use environment variables for this purpose. Here’s how the env variables are configured for a ref distro:

and here are the current env variable for fulfillment service:

The default behavior should likely remain unchanged. In your current solution, you seem to modify the default flow which may impact implementations without their knowledge.

Kind regards,

@Sebastian_Brudzinski I get your suggested approach to save the configs as environment variables and not in the db, however how will I use the the environment variables without changing the default flow?

Simply by setting the values to “true” by default (I understand that up to now the e-mails and FTP transfers were always executed). If the variables are not set, they should also default to true (which means the final behavior will not change when upgrading from 3.10 do 3.11).


I will update my team on your suggestions and hear their views, thanks.