<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to check environment is ivy?</title><link>https://answers.axonivy.com/questions/2429/how-to-check-environment-is-ivy</link><description>&lt;p&gt;Hi all,
Is there any official API to know whether we're running on Ivy environment or not?
for checking 'server' or 'designer', we can use this API:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; ivy.wf.getApplication().getName().equalsIgnoreCase("designer")
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but what if i want to check is it ivy env or not?&lt;/p&gt;
&lt;p&gt;For the moment, i just have a temporary solution where i try to invoke some ivy command in try catch block then see if it throw exception of not. but i need a better solution. :)&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/2429/how-to-check-environment-is-ivy" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 09 Feb 2017 10:21:17 -0500</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/2429/how-to-check-environment-is-ivy/2434</link><description>&lt;p&gt;Currently this is only possible by using internal, but accessible API.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;boolean ivyEnvironment = ch.ivyteam.ivy.request.metadata.MetaData.getRequest() != null;
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Thu, 09 Feb 2017 10:21:17 -0500</pubDate><guid>https://answers.axonivy.com/questions/2429/how-to-check-environment-is-ivy/2434</guid></item><item><title>Comment by trungdv on trungdv's question</title><link>https://answers.axonivy.com/questions/2429/how-to-check-environment-is-ivy#2433</link><description>&lt;p&gt;hi &lt;a href="http://answers.axonivy.com/users/17/reguel-wermelinger"&gt;&lt;a href="http://answers.axonivy.com/users/17/reguel-wermelinger"&gt;@Reguel&lt;/a&gt;&lt;/a&gt; Werme... ♦♦
yes, i want to check whether i can run any command which is started with &lt;em&gt;ivy&lt;/em&gt; or not.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">trungdv</dc:creator><pubDate>Thu, 09 Feb 2017 08:57:04 -0500</pubDate><guid>https://answers.axonivy.com/questions/2429/how-to-check-environment-is-ivy#2433</guid></item><item><title>Comment by Reguel Wermelinger on trungdv's question</title><link>https://answers.axonivy.com/questions/2429/how-to-check-environment-is-ivy#2432</link><description>&lt;p&gt;what exactly means ivy env or not? are you talking about java code that must determine whether it is executed by the Axon.ivy BPM engine or if it runs in plain java ?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Thu, 09 Feb 2017 08:47:56 -0500</pubDate><guid>https://answers.axonivy.com/questions/2429/how-to-check-environment-is-ivy#2432</guid></item><item><title>Comment by Reguel Wermelinger on trungdv's question</title><link>https://answers.axonivy.com/questions/2429/how-to-check-environment-is-ivy#2431</link><description>&lt;p&gt;you can improve the designer/engine check by using a constant which is available from the core API:
&lt;code&gt;ivy.wf.getApplication().getName().equals(IApplication.DESIGNER_APPLICATION_NAME)&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Thu, 09 Feb 2017 08:45:21 -0500</pubDate><guid>https://answers.axonivy.com/questions/2429/how-to-check-environment-is-ivy#2431</guid></item></channel></rss>