<?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 evaluate cms from project without dependency</title><link>https://answers.axonivy.com/questions/2605/how-to-evaluate-cms-from-project-without-dependency</link><description>&lt;p&gt;hi ivyteam&lt;/p&gt;
&lt;p&gt;I have a project with structure like this:
&lt;img alt="alt text" src="http://answers.axonivy.com/upfiles/Untitled_v709RtK.png"&gt;&lt;/p&gt;
&lt;p&gt;There is three projects:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Project B is core project, it provide IService interface which is implemented by other sub Project, It also content a Map to store/cache instance of real service&lt;/li&gt;
&lt;li&gt;Project B': Implement interface from B with real implementation (Class MyService), it use ivy cms to look up some cms which are only available on project B'. &lt;/li&gt;
&lt;li&gt;Project A depend on Project B and consume interface IService (execute real implementation from B'). In order to register real implementation for that interface, in Project B' we have the EventStartBean will be run once when engine started, it will create instance of MyService and put to ServiceHolders map (a kind of service locator).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this structure, we can abstract the implementation of project A and B, it don't care what is real implementation, just work with interface and can be reusable for many customer (each customer will have something similar with B' )&lt;/p&gt;
&lt;p&gt;But one of the problem here is we execute the service from context of project A, it lead to issue that the api Ivy.cms().co(&amp;lt; uri of B' &amp;gt;) will return empty value. Go deeper into that api i see it will lookup cms from project where request has been started (project A), 
Another way that is triggering callable sub process from B' but i don't like that much.&lt;/p&gt;
&lt;p&gt;My question is: Can we evaluate cms from project B' when A can't see B' ? If not, is there any suggestions?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/2605/how-to-evaluate-cms-from-project-without-dependency" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 12 May 2017 04:24:02 -0400</lastBuildDate><item><title>Comment by trungdv on Genzer Hawker's answer</title><link>https://answers.axonivy.com/questions/2605/how-to-evaluate-cms-from-project-without-dependency#2622</link><description>&lt;p&gt;Thanks &lt;a href="http://answers.axonivy.com/users/157/genzer-hawker"&gt;&lt;a href="http://answers.axonivy.com/users/157/genzer-hawker"&gt;@Genzer Hawker&lt;/a&gt;&lt;/a&gt; :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">trungdv</dc:creator><pubDate>Fri, 12 May 2017 04:24:02 -0400</pubDate><guid>https://answers.axonivy.com/questions/2605/how-to-evaluate-cms-from-project-without-dependency#2622</guid></item><item><title>Answer by Genzer Hawker</title><link>https://answers.axonivy.com/questions/2605/how-to-evaluate-cms-from-project-without-dependency/2612</link><description>&lt;p&gt;Hi &lt;a href="http://answers.axonivy.com/users/118/trungdv"&gt;&lt;a href="http://answers.axonivy.com/users/118/trungdv"&gt;@trungdv&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You may want to try the solution proposed in Axon.ivy Discourse - &lt;a href="https://discourse.axonivy.io/t/is-there-a-way-to-obtain-all-cms-instances-of-all-deployed-modules/134"&gt;Is there a way to obtain all CMS instances of all deployed modules?&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The basic idea in the answer is we try to reach all CMS instances of all deployed and released &lt;code&gt;IProcessModelVersion&lt;/code&gt; of an &lt;code&gt;IApplication&lt;/code&gt; (you need SYSTEM permissions to do that). When you can get all CMS instances, start looking up the URI, once the search hit a available result, you will get your &lt;code&gt;IContentObject&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Hope it may help you resolve your problem.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Genzer Hawker</dc:creator><pubDate>Wed, 10 May 2017 06:09:51 -0400</pubDate><guid>https://answers.axonivy.com/questions/2605/how-to-evaluate-cms-from-project-without-dependency/2612</guid></item></channel></rss>