<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: event handler create new Domain in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/event-handler-create-new-domain/m-p/318529#M5530</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have no idea why the &lt;CODE&gt;WorkspaceRoot&lt;/CODE&gt; creation event handler is called before the &lt;CODE&gt;Domain&lt;/CODE&gt; one in Web UI, it doesn't make a lot of sense. That said, I strongly advice you to use automation scripting instead of automation chains for this kind of logic. In automation scripting, you can add a condition to understand which event is invoking the automation scripting like here &lt;A href="https://github.com/nuxeo/nuxeo-studio-community-cookbook/blob/master/modules/nuxeo/custom-views/modeler/AS_AddCustomView.js#L7" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-studio-community-cookbook/blob/master/modules/nuxeo/custom-views/modeler/AS_AddCustomView.js#L7&lt;/A&gt; or there &lt;A href="https://github.com/nuxeo/nuxeo-studio-community-cookbook/blob/5af93593688d42286a8441f6eff473aec55228a0/modules/nuxeo/modeler-tips-tricks/README.md" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-studio-community-cookbook/blob/5af93593688d42286a8441f6eff473aec55228a0/modules/nuxeo/modeler-tips-tricks/README.md&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Tue, 17 May 2022 18:06:44 GMT</pubDate>
    <dc:creator>Gregory_Carlin</dc:creator>
    <dc:date>2022-05-17T18:06:44Z</dc:date>
    <item>
      <title>event handler create new Domain</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/event-handler-create-new-domain/m-p/318528#M5529</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I created a event handler to be executed after document creation.
It works for type Domain, WorkspaceRoot and Workspace.
It executes a custom chain with 2 operations : Context.FetchDocument then Database.InsertData (my custom operation).&lt;/P&gt;
&lt;P&gt;When I create a new Domain with Web UI, I see the logs server.log, I noticed thar event handler for WorkspaceRoot is executed before event handler for Domain !&lt;/P&gt;
&lt;P&gt;It's strange because the Domain is created before the Workspaces folder.&lt;/P&gt;
&lt;P&gt;How can I fix that please ?&lt;/P&gt;
&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 16:34:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/event-handler-create-new-domain/m-p/318528#M5529</guid>
      <dc:creator>Ghazi_HAKIM</dc:creator>
      <dc:date>2022-04-27T16:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: event handler create new Domain</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/event-handler-create-new-domain/m-p/318529#M5530</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have no idea why the &lt;CODE&gt;WorkspaceRoot&lt;/CODE&gt; creation event handler is called before the &lt;CODE&gt;Domain&lt;/CODE&gt; one in Web UI, it doesn't make a lot of sense. That said, I strongly advice you to use automation scripting instead of automation chains for this kind of logic. In automation scripting, you can add a condition to understand which event is invoking the automation scripting like here &lt;A href="https://github.com/nuxeo/nuxeo-studio-community-cookbook/blob/master/modules/nuxeo/custom-views/modeler/AS_AddCustomView.js#L7" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-studio-community-cookbook/blob/master/modules/nuxeo/custom-views/modeler/AS_AddCustomView.js#L7&lt;/A&gt; or there &lt;A href="https://github.com/nuxeo/nuxeo-studio-community-cookbook/blob/5af93593688d42286a8441f6eff473aec55228a0/modules/nuxeo/modeler-tips-tricks/README.md" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-studio-community-cookbook/blob/5af93593688d42286a8441f6eff473aec55228a0/modules/nuxeo/modeler-tips-tricks/README.md&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 18:06:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/event-handler-create-new-domain/m-p/318529#M5530</guid>
      <dc:creator>Gregory_Carlin</dc:creator>
      <dc:date>2022-05-17T18:06:44Z</dc:date>
    </item>
  </channel>
</rss>

