<?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 Changing dynamic models? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/changing-dynamic-models/m-p/208957#M162087</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm prototyping a solution and thought I would take advantage of dynamic models to avoid continuous server restarting while I develop and debug my content model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However I've found that even the simplest change to a model is triggering errors when I try to save it where Alfresco claims the model is invalid because it "found non-incrementally updated TYPE".&amp;nbsp; Here's a sample exception snippet:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;02:30:28,587 ERROR [org.alfresco.webdav.protocol] Internal Server Error: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;org.alfresco.error.AlfrescoRuntimeException: Failed to validate model update - found non-incrementally updated TYPE '{my.new.model}sop'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.alfresco.repo.dictionary.DictionaryDAOImpl.validateModel(DictionaryDAOImpl.java:1192)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.alfresco.repo.dictionary.DictionaryModelType$DictionaryModelTypeTransactionListener$1.doWork(DictionaryModelType.java:465)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:437)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an example of what caused this I used the standard example model with the my:sop type - everything works fine until I tried to make one of the SOP type properties mandatory so that the meta-data property sheet would require it of new documents.&amp;nbsp; Specifically I tried changing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;properties&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="my&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ublishedDate"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;type&amp;gt;d:datetime&amp;lt;/type&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;properties&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="my&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ublishedDate"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;type&amp;gt;d:datetime&amp;lt;/type&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mandatory enforced="true"&amp;gt;true&amp;lt;/mandatory&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;which triggered the above exception.&amp;nbsp; Now if I make the mandatory element say false (both the attribute and value part - its not clear why we need both or what the distinction) then I can save.&amp;nbsp; But as soon as I try to make them true again I get the exception all over.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought it might be because I already had some content without the publisedDate set - so I set the date and saved that document then treid the model change again.&amp;nbsp; No such luck.&amp;nbsp; Then I thought maybe I should be making the model inactive while I make the change but it wont let you inactivate a model that you instances of kicking around. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I up against a bug, a genuine restriction (which seems pretty darned limiting!) or is there some other way to change the model like this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: Adding additional info…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've verified this is nothing to do with content using the model already existing - I added a new model and got the same problem without creating any docs using it as their content type.&amp;nbsp; I was also able to create a model where one parameter already had a mandatory =&amp;gt; true element.&amp;nbsp; When I did that I could set the value to false or delete the mandatory element,&amp;nbsp; but once I did I couldn't put it back.&amp;nbsp; An parameter that already had a mandatory =&amp;gt; false element when the model was added wouldn't let me set it to true.&amp;nbsp; So it seems like the checking lets you relax the constraints but not increase them. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also found I could add parameters to my models content types but could not remove them - even if no content used them yet.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm pretty sure these restrictions do not apply when you do not use dynamic models - you just edit the files in the classes/alfresco/extensions dir and restart the server.&amp;nbsp; In that case am I risking breaking something further down the line?&amp;nbsp; I know the docs warn of breaking your repository with model changes and being ready to throw stuff away until you've done with content model definition but surely non-conflicting changes (at least in respect to existing content) like this should be possible?&amp;nbsp; I would love to know if there is a flag to disable some of these checks when using dynamic models - or at least get warning instead of errors - and how to set it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jan 2009 10:58:13 GMT</pubDate>
    <dc:creator>moschops</dc:creator>
    <dc:date>2009-01-29T10:58:13Z</dc:date>
    <item>
      <title>Changing dynamic models?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/changing-dynamic-models/m-p/208957#M162087</link>
      <description>I'm prototyping a solution and thought I would take advantage of dynamic models to avoid continuous server restarting while I develop and debug my content model.However I've found that even the simplest change to a model is triggering errors when I try to save it where Alfresco claims the model is i</description>
      <pubDate>Thu, 29 Jan 2009 10:58:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/changing-dynamic-models/m-p/208957#M162087</guid>
      <dc:creator>moschops</dc:creator>
      <dc:date>2009-01-29T10:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Changing dynamic models?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/changing-dynamic-models/m-p/208958#M162088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have encountered this same problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can it be avoided?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 02:04:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/changing-dynamic-models/m-p/208958#M162088</guid>
      <dc:creator>slothrop</dc:creator>
      <dc:date>2009-02-06T02:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Changing dynamic models?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/changing-dynamic-models/m-p/208959#M162089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My solution was to spend more time on design of the model up front so it doesn't change, and stop using any of the dynamic features except for ui customization.&amp;nbsp; Its a shame because prototyping is definitely a time when you don't want to be starting and resatarting the server.&amp;nbsp; Also you definitely don't want to add much content at all (unless you have an automated process to do it) until you have really nailed own your model.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In theory alfresco could add modelling level ui features and tools to make it easier tto migrate data between content models, but for now I think its not a priority - you'll just have to write your own scripts.&amp;nbsp; That's assuming you can even change the model at all, which you can't.&amp;nbsp; If you want to look at the source code it is pretty obvious what to change to sidetrack this constraint check…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My theory is that experienced alfresco users and content management designers don't need this flexibility anyway. So really having the model in the ui for anything other than reference is a gimmick to them.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 02:35:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/changing-dynamic-models/m-p/208959#M162089</guid>
      <dc:creator>moschops</dc:creator>
      <dc:date>2009-02-06T02:35:16Z</dc:date>
    </item>
  </channel>
</rss>

