Expression to use in a Microflow Decision determining if the App is running Locally or on a specific Cloud

0
We are Mendix makers in a very restrictive workplace environment. For REST API’s to work, we use the proxy configuration settings in the general tab of the Call REST Action. However, the proxy settings should differ depending on the network the App is running in.  Is there a variable I can use in the Decision to determine the characteristics of the environment it is running in?   If not, I would probably create a Microflow looking at the IP address of the Web Server and have different Call REST actions triggered. Any better suggestion is welcome too.
asked
3 answers
1

Marco,

Similar to the suggestions from David and Robert, I’ve used this module in the past → https://marketplace.mendix.com/link/component/110921

Easy to use functionality to accomplish what you are describing.

answered
0

You could create a Constant in your application holding a value (L for local, T for test, P for production). This constant can be different on each environment. in your flow just check on the value in that constant to use the correct settings for your API calls.

answered
0

I would echo David’s suggestion of using Constants. These are meant for values that change on an environment level. This would make the most sense as it would switch automatically based on the value of the Constants.

Another alternative may be to look at the isInDevelopment and getApplicationUrl actions in Community Commons.

Good luck

answered