cancel
Showing results for 
Search instead for 
Did you mean: 

Add lifecycle state to document template

cuyo_
Confirmed Champ
Confirmed Champ

Hi,

I am trying to construct a template that displays the current lifecycle status but I do not manage to do it. What is the right property? Where can I find the complete dublincore set?

So far I have unsuccessfully tried: ${Document['dc:lifeCycle']}; ${Document.lifeCycle}; ${ecm:LifeCycleState}; ${ecm:currentLifeCycleState}; ${doc:LifeCycleState}; ${doc['dc:LifeCycleState']}; ${doc['dc:lifeCycle']}; ${doc.lifeCycle}

Thank you,

Cuyo using Nuxeo platform 5.9.2

1 ACCEPTED ANSWER

adam_bo_
Star Contributor
Star Contributor

You can try ${doc.lifeCycleState}

LifeCycle is not in the dublincore schema, it is more crucial in Nuxeo and it is defined in org.nuxeo.ecm.core.storage.sql.Model.

You can look for the dublincore.xsd file.

<?xml version="1.0"?>
<xs:schema
    targetNamespace="http://www.nuxeo.org/ecm/schemas/dublincore/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:nxs="http://www.nuxeo.org/ecm/schemas/dublincore/">

    <xs:simpleType name="subjectList">
        <xs:list itemType="xs:string" />
    </xs:simpleType>

    <xs:simpleType name="contributorList">
        <xs:list itemType="xs:string" />
    </xs:simpleType>

    <xs:element name="title" type="xs:string"/>
    <xs:element name="description" type="xs:string"/>
    <xs:element name="subjects" type="nxs:subjectList"/>
    <xs:element name="rights" type="xs:string"/>
    <xs:element name="source" type="xs:string"/>
    <xs:element name="coverage" type="xs:string"/>
    <xs:element name="created" type="xs:date"/>
    <xs:element name="modified" type="xs:date"/>
    <xs:element name="issued" type="xs:date"/>
    <xs:element name="valid" type="xs:date"/>
    <xs:element name="expired" type="xs:date"/>
    <xs:element name="format" type="xs:string"/>
    <xs:element name="language" type="xs:string"/>
    <xs:element name="creator" type="xs:string"/>
    <xs:element name="contributors" type="nxs:contributorList"/>
    <xs:element name="lastContributor" type="xs:string"/>

    <!-- Corresponds to the dublincore type element,
    but renamed to avoid conflicts -->
    <xs:element name="nature" type="xs:string"/>

    <!-- @Since 5.5 -->
    <xs:element name="publisher" type="xs:string"/>

</xs:schema>

All the best

View answer in original post

2 REPLIES 2

adam_bo_
Star Contributor
Star Contributor

You can try ${doc.lifeCycleState}

LifeCycle is not in the dublincore schema, it is more crucial in Nuxeo and it is defined in org.nuxeo.ecm.core.storage.sql.Model.

You can look for the dublincore.xsd file.

<?xml version="1.0"?>
<xs:schema
    targetNamespace="http://www.nuxeo.org/ecm/schemas/dublincore/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:nxs="http://www.nuxeo.org/ecm/schemas/dublincore/">

    <xs:simpleType name="subjectList">
        <xs:list itemType="xs:string" />
    </xs:simpleType>

    <xs:simpleType name="contributorList">
        <xs:list itemType="xs:string" />
    </xs:simpleType>

    <xs:element name="title" type="xs:string"/>
    <xs:element name="description" type="xs:string"/>
    <xs:element name="subjects" type="nxs:subjectList"/>
    <xs:element name="rights" type="xs:string"/>
    <xs:element name="source" type="xs:string"/>
    <xs:element name="coverage" type="xs:string"/>
    <xs:element name="created" type="xs:date"/>
    <xs:element name="modified" type="xs:date"/>
    <xs:element name="issued" type="xs:date"/>
    <xs:element name="valid" type="xs:date"/>
    <xs:element name="expired" type="xs:date"/>
    <xs:element name="format" type="xs:string"/>
    <xs:element name="language" type="xs:string"/>
    <xs:element name="creator" type="xs:string"/>
    <xs:element name="contributors" type="nxs:contributorList"/>
    <xs:element name="lastContributor" type="xs:string"/>

    <!-- Corresponds to the dublincore type element,
    but renamed to avoid conflicts -->
    <xs:element name="nature" type="xs:string"/>

    <!-- @Since 5.5 -->
    <xs:element name="publisher" type="xs:string"/>

</xs:schema>

All the best

cuyo_
Confirmed Champ
Confirmed Champ

${doc.lifeCycleState} worked perfectly. Thank you so much for your response and the information.