<?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 How to init repository without restarting the Nuxeo instance and removing data in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-init-repository-without-restarting-the-nuxeo-instance-and/m-p/316699#M3700</link>
    <description>&lt;P&gt;I would like to reinitialize my Nuxeo instance repository (remove all data and play again structure template) without restarting my instance and removing data.&lt;/P&gt;
&lt;P&gt;I need that to test my structure template configuration.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Nov 2012 16:20:57 GMT</pubDate>
    <dc:creator>Benjamin_Jalon1</dc:creator>
    <dc:date>2012-11-13T16:20:57Z</dc:date>
    <item>
      <title>How to init repository without restarting the Nuxeo instance and removing data</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-init-repository-without-restarting-the-nuxeo-instance-and/m-p/316699#M3700</link>
      <description>&lt;P&gt;I would like to reinitialize my Nuxeo instance repository (remove all data and play again structure template) without restarting my instance and removing data.&lt;/P&gt;
&lt;P&gt;I need that to test my structure template configuration.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2012 16:20:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-init-repository-without-restarting-the-nuxeo-instance-and/m-p/316699#M3700</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-11-13T16:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to init repository without restarting the Nuxeo instance and removing data</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-init-repository-without-restarting-the-nuxeo-instance-and/m-p/316700#M3701</link>
      <description>&lt;P&gt;The following proposition must not be used for production server but only on development instance.
I suggest this proposition for advanced user that knows what he is doing. This is like manipulating the "rm -rf /*", that can be really problematic &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The structure template is called when the documentCreated on the root document is sent and if the root document have no child. Based on that information, we will implement a reinit button.&lt;/P&gt;
&lt;P&gt;Be careful this action will remove all data stored into the repository, especially workflows implemented through Studio and the default one. To re-enabled your own workflow, redeploy your studio project after the cleanup.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;CREATE THE BUTTON&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;In Automation &amp;gt; User Actions &amp;gt; New&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;Feature ID: initialize_repository&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;Category: Folder Toolbar&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;Label: Initialize repository&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;Order: -100&lt;/EM&gt; (to let it the first one)&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;Current document has one of the types: Root&lt;/EM&gt; (to display only on the root document)&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;Current user is administrator: checked&lt;/EM&gt; (to limit disasters)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;DECLARE THE ManagementRoot TYPE&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Go to Settings &amp;amp; Versioning &amp;gt; Registries &amp;gt; Document Types&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Copy the following content&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;{
  doctypes: {
    ManagementRoot: {
      parent: "Document",
    },
  }
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;CREATE THE BEHAVIOR&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Create a new operation and attach it the User Action&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;Operation ID: userAction_initialize_repository&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Fetch &amp;gt; Context Document(s)&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Fetch &amp;gt; Query&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;query: SELECT * FROM Document WHERE ecm:parentId = '@{Document.id}'&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Document &amp;gt; Delete&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Fetch &amp;gt; Document&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;value: /&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Notification &amp;gt; Send Event&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;name: documentCreated&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Document &amp;gt; Save&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Document &amp;gt; Create&lt;/STRONG&gt; (need that to have dashboards working)&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;type: ManagementRoot&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;name: management&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;User Interface &amp;gt; Refresh&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 13 Nov 2012 16:39:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-init-repository-without-restarting-the-nuxeo-instance-and/m-p/316700#M3701</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-11-13T16:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to init repository without restarting the Nuxeo instance and removing data</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-init-repository-without-restarting-the-nuxeo-instance-and/m-p/316701#M3702</link>
      <description>&lt;P&gt;All unit tests are started with an empty repository. In what way do you want to do your tests? If you're doing functional tests, why is restarting the server a problem?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2012 09:10:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-init-repository-without-restarting-the-nuxeo-instance-and/m-p/316701#M3702</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2012-11-14T09:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to init repository without restarting the Nuxeo instance and removing data</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-init-repository-without-restarting-the-nuxeo-instance-and/m-p/316702#M3703</link>
      <description>&lt;P&gt;No this is about Nuxeo Studio project test and development activity, on running Nuxeo instance.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2012 11:01:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-init-repository-without-restarting-the-nuxeo-instance-and/m-p/316702#M3703</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-11-14T11:01:44Z</dc:date>
    </item>
  </channel>
</rss>

