Is it possible to read Runtime Mode from Mendix application?

0
Hi Community,   I'd appreciate some guidance on accessing the runtime mode information of a Mendix application.     As I've understood it was available through `System.LicenseInformation` entity, but that was removed long time ago, back in version 5.1.1, so I'm looking for an alternative method to retrieve runtime mode.   Is it possible to do this using a Java call?   I'm aware that there would be other options to determine the environment type, but I want this to make as automatic as possible to be based on the actual runtime mode.   Thanks in advance!
asked
2 answers
0

Create a constant in your model for instance called Environment. We gave that the default value local so then when running local it will have that value. In your accp en prod environment you set this constant in your environment to the correct value like accp and prod. You can then use a rule to check in what environment you are like this:

2025-01-20 16_30_23-Master Daywize (Main line).png

 

And for accp and production you could check the values that you have set in the environments.

Now you can use this flow to check if you are currently working local.

 

Regards,

Ronald

answered
0

Thank you Ronald!

 

Yes, that was my first idea, and might be our fallback solution, but I'm courious whether we can handle those rare issues when license is not read correctly, so even on Acceptance or Production environment the application starts in a different (e.g. developer/Unspecified) mode.

 

(Another idea would be to determine environment from URL, which would be one step more automatic, but still not handle the runtime mode question.)

answered