<?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 directly change lifecycle state in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-directly-change-lifecycle-state/m-p/321661#M8662</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Before our customers can work with Nuxeo DM we must import all the xml files and set them to a lifecycle state which is not the initial state. How can we do it ?&lt;/P&gt;
&lt;P&gt;We tried setting the property ecm:currentLifeCycleState and using followTransition method but without any success (exceptions encountered).&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 27 Sep 2012 17:51:20 GMT</pubDate>
    <dc:creator>Lto_gripoche</dc:creator>
    <dc:date>2012-09-27T17:51:20Z</dc:date>
    <item>
      <title>How to directly change lifecycle state</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-directly-change-lifecycle-state/m-p/321661#M8662</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Before our customers can work with Nuxeo DM we must import all the xml files and set them to a lifecycle state which is not the initial state. How can we do it ?&lt;/P&gt;
&lt;P&gt;We tried setting the property ecm:currentLifeCycleState and using followTransition method but without any success (exceptions encountered).&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2012 17:51:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-directly-change-lifecycle-state/m-p/321661#M8662</guid>
      <dc:creator>Lto_gripoche</dc:creator>
      <dc:date>2012-09-27T17:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to directly change lifecycle state</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-directly-change-lifecycle-state/m-p/321662#M8663</link>
      <description>&lt;P&gt;CoreSession expose the following method: reinitLifeCycleState that move the document to the initial state.
Lifecycle is specifically design to manage it through available transitions.&lt;/P&gt;
&lt;P&gt;But for mass import I suggest you to use our framework for import explain &lt;A href="http://doc.nuxeo.com/x/zQQz"&gt;here&lt;/A&gt;.
The github repository is &lt;A href="https://github.com/nuxeo/nuxeo-platform-importer"&gt;here&lt;/A&gt; and you can look the project that is well explained.&lt;/P&gt;
&lt;P&gt;You can create importer with the number of thread and the frequency for committing , etc...&lt;/P&gt;
&lt;P&gt;Hope this will help.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2012 18:52:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-directly-change-lifecycle-state/m-p/321662#M8663</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-09-27T18:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to directly change lifecycle state</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-directly-change-lifecycle-state/m-p/321663#M8664</link>
      <description>&lt;P&gt;When creating a document through the &lt;CODE&gt;CoreSession.createDocument(DocumentModel)&lt;/CODE&gt; method, you can set in the &lt;CODE&gt;DocumentModel&lt;/CODE&gt; context data an indication of which initial lifecycle state it should be in instead of the default.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;doc.putContextData(LifeCycleConstants.INITIAL_LIFECYCLE_STATE_OPTION_NAME, "yourInitialState")
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;BUT&lt;/STRONG&gt; note that this is only possible for lifecycle states that have been marked as &lt;CODE&gt;initial="true"&lt;/CODE&gt; in the lifecycle state definition.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2012 15:07:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-directly-change-lifecycle-state/m-p/321663#M8664</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2012-09-28T15:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to directly change lifecycle state</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-directly-change-lifecycle-state/m-p/321664#M8665</link>
      <description>&lt;P&gt;Thanks a lot ! That's exactly what I was asking for.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2012 17:05:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-directly-change-lifecycle-state/m-p/321664#M8665</guid>
      <dc:creator>Lto_gripoche</dc:creator>
      <dc:date>2012-09-28T17:05:12Z</dc:date>
    </item>
  </channel>
</rss>

