cancel
Showing results for 
Search instead for 
Did you mean: 

Error - on change my custom content model

fuad_gafarov
Champ in-the-making
Champ in-the-making
Hi. If I want to change code alfresco says - Unable to check in Content Node due to system error:08080084 Failed to parse model

This error appear when I add <files> tags

This is my custom model code.

<?xml version="1.0" encoding="UTF-8"?>

<model name="wfl:workflowlifecyclemodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

    <!– Optional meta-data about the model –>
    <description>Workflow Lifecycle Model</description>
    <author></author>
    <version>1.0</version>

    <!– Imports are required to allow references to definitions in other models –>
    <imports>
        <!– Import Alfresco Dictionary Definitions –>
        <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
        <!– Import Alfresco Content Domain Model Definitions –>
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
    </imports>

    <namespaces>
        <namespace uri="wfl.model" prefix="wfl" />
    </namespaces>

    <types>
          <type name="wfl:reviewTask">
             <parent>bpm:startTask</parent>
             <mandatory-aspects>
                <aspect>wfl:assignee1</aspect>
             </mandatory-aspects>
             <mandatory-aspects>
                <aspect>wfl:assignee2</aspect>
             </mandatory-aspects>
          </type>
    </types>

    <constraints>
        <constraint name="wfl:status" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Draft</value>
                    <value>In Review</value>
                    <value>Approved</value>
                </list>
            </parameter>
        </constraint>
    </constraints>


    <aspects>

        <!– Status property is used to manage workflow approval –>
        <aspect name="wfl:status">
            <title>Status</title>
            <properties>
                <property name="wfl:status">
                    <title>Status</title>
                    <type>d:text</type>
                    <default>Draft</default>
                    <constraints>
                        <constraint ref="wfl:status" />
                    </constraints>
                </property>
            </properties>
        </aspect>

        <aspect name="wfl:assignee">
            <associations>

                <association name="wfl:assignee">
                    <source>
                        <mandatory>false</mandatory>
                        <many>false</many>
                    </source>
                    <target>
                        <class>cm:person</class>
                        <mandatory>false</mandatory>
                        <many>false</many>
                    </target>
                </association>
            </associations>
        </aspect>

        <aspect name="wfl:assignee1">
            <associations>

                <association name="wfl:assigneeWork1">
                    <source>
                        <mandatory>false</mandatory>
                        <many>false</many>
                    </source>
                    <target>
                        <class>cm:person</class>
                        <mandatory>false</mandatory>
                        <many>false</many>
                    </target>
                </association>
            </associations>
        </aspect>

        <aspect name="wfl:assignee2">
            <associations>

                <association name="wfl:assigneeWork2">
                    <source>
                        <mandatory>false</mandatory>
                        <many>false</many>
                    </source>
                    <target>
                        <class>cm:person</class>
                        <mandatory>false</mandatory>
                        <many>false</many>
                    </target>
                </association>
            </associations>
        </aspect>

    </aspects>


</model>

Thanks
2 REPLIES 2

openpj
Elite Collaborator
Elite Collaborator
If you want to change your custom content model you have to know that you can change the model only incrementally.
This means that you can't remove any properties, types or aspect at definition level of the model, you only can add new definition in the content model of Alfresco.

If you want to remove a model, you have to remove all the nodes that are referenced by that namespace and then you can remove completely the model.

Hope this helps.

fuad_gafarov
Champ in-the-making
Champ in-the-making
thanks.