09-27-2012 01:51 PM
Hello
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 ?
We tried setting the property ecm:currentLifeCycleState and using followTransition method but without any success (exceptions encountered).
Thanks
09-28-2012 11:07 AM
When creating a document through the CoreSession.createDocument(DocumentModel)
method, you can set in the DocumentModel
context data an indication of which initial lifecycle state it should be in instead of the default.
doc.putContextData(LifeCycleConstants.INITIAL_LIFECYCLE_STATE_OPTION_NAME, "yourInitialState")
BUT note that this is only possible for lifecycle states that have been marked as initial="true"
in the lifecycle state definition.
09-27-2012 02:52 PM
CoreSession expose the following method: reinitLifeCycleState that move the document to the initial state. Lifecycle is specifically design to manage it through available transitions.
But for mass import I suggest you to use our framework for import explain here. The github repository is here and you can look the project that is well explained.
You can create importer with the number of thread and the frequency for committing , etc...
Hope this will help.
09-28-2012 11:07 AM
When creating a document through the CoreSession.createDocument(DocumentModel)
method, you can set in the DocumentModel
context data an indication of which initial lifecycle state it should be in instead of the default.
doc.putContextData(LifeCycleConstants.INITIAL_LIFECYCLE_STATE_OPTION_NAME, "yourInitialState")
BUT note that this is only possible for lifecycle states that have been marked as initial="true"
in the lifecycle state definition.
09-28-2012 01:05 PM
Thanks a lot ! That's exactly what I was asking for.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.