Getting deployment package version (with Java)

1
Has anyone experience to retrieve (with Java) the version of the deployment package built on the Mendix cloud? I want to show the users which version of the application is running. The workaround is to create a functionality where you can store the version number, but it requires a manual action and I rather get it automatically.
asked
3 answers
1

Hi Joel,

You can build a java action for this. Use "Core.getModelVersion()".

answered
1

I think you can get this from the client api. I looked into this today:

https://apidocs.mendix.com/7/client/mx.html

You could build a simple widget.

On the server side it looks like there is a class called Runtime Version, which might have an action.

If you want to know the runtime version deployed on a server externally using the deploy API. I don't think it is currently possible to know the runtime from the deploy API at the moment. 

 

Regards

Simon

answered
1

Try to use the API for Retrieve Environment Package given the instance. 

You can probably ensure automatic update of the version to some NPE or even persistent entity if need.

The automatic version update can be triggered when the application starts using ASU (After Start Up)

answered