<?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 Re: How to update the properties of a aspect on an existing docu in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236234#M189364</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Koen,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;afaik, there is no specific 'save' precedure for objects in the web services api.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;im doing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- fetching the proerties of a node via Repository.get(predicate);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- going through the namedValues of node.properties&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- changing the value of a property in my custom aspect&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- writing the data back via Repository.update(cml)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the code is pretty straight forward…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe the problem is the id of the aspect - i'm using "1" as if you would add a new aspect. As I understood, this is a internal value and should always be "1" - but I'm not sure…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;CMLAddAspect aspect = new RepositoryWebService.CMLAddAspect();&lt;BR /&gt;aspect.aspect = "{&lt;A href="http://mydomain.com/model/content/1.0}myAspect" rel="nofollow noopener noreferrer"&gt;http://mydomain.com/model/content/1.0}myAspect&lt;/A&gt;";&lt;BR /&gt;aspect.property = properties; // my changed set of properties&lt;BR /&gt;aspect.where = predicate; // points to the document, the aspect is attached to&lt;BR /&gt;aspect.where_id = "1";&lt;BR /&gt;&lt;BR /&gt;cml.addAspect = new RepositoryWebService.CMLAddAspect[] { aspect };&lt;BR /&gt;Repository.update(cml);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2009 08:21:12 GMT</pubDate>
    <dc:creator>mightycoco</dc:creator>
    <dc:date>2009-07-24T08:21:12Z</dc:date>
    <item>
      <title>How to update the properties of a aspect on an existing docu</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236230#M189360</link>
      <description>Hi,I can upload a document and add a custom aspect without issues.Now i try to download the aspect information of a node, update the values and re-apply the aspect to the existing document. This throws an SoapException without further details…at System.Web.Services.Protocols.SoapHttpClientProtocol.R</description>
      <pubDate>Tue, 21 Jul 2009 10:01:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236230#M189360</guid>
      <dc:creator>mightycoco</dc:creator>
      <dc:date>2009-07-21T10:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the properties of a aspect on an existing docu</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236231#M189361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since i'm not a java developer, just a generic answer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the aspect is already present, you cant add it another time. You just have to change the properties that come from the aspect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does that help?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2009 08:42:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236231#M189361</guid>
      <dc:creator>kbonnet</dc:creator>
      <dc:date>2009-07-22T08:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the properties of a aspect on an existing docu</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236232#M189362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Koen,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the additional info. At least, I'm on the right track using AddAspect…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code is a C# snipped - but looks pretty the same, though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I came as far as i get no more exceptions, when adding the aspect a second time. However, the changed value of the property isn't applied.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The funny thing is, that the versioning aspect is setting the 'modified' property to the time, when i did the web service request - something must had happen - but still: the values in the custom aspect aren't updated… Somehow i'm running out of ideas…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-coco&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 10:03:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236232#M189362</guid>
      <dc:creator>mightycoco</dc:creator>
      <dc:date>2009-07-23T10:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the properties of a aspect on an existing docu</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236233#M189363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think you should try to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- check if the aspect is already applied&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; - if not, add it&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; - if so, do nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- change the properties&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- save the object&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you aware of the last point, that if you change properties, you need to save the object? At least that's needed via the ECMA/Javascript API. Probably the same via your API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 10:06:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236233#M189363</guid>
      <dc:creator>kbonnet</dc:creator>
      <dc:date>2009-07-23T10:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the properties of a aspect on an existing docu</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236234#M189364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Koen,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;afaik, there is no specific 'save' precedure for objects in the web services api.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;im doing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- fetching the proerties of a node via Repository.get(predicate);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- going through the namedValues of node.properties&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- changing the value of a property in my custom aspect&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- writing the data back via Repository.update(cml)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the code is pretty straight forward…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe the problem is the id of the aspect - i'm using "1" as if you would add a new aspect. As I understood, this is a internal value and should always be "1" - but I'm not sure…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;CMLAddAspect aspect = new RepositoryWebService.CMLAddAspect();&lt;BR /&gt;aspect.aspect = "{&lt;A href="http://mydomain.com/model/content/1.0}myAspect" rel="nofollow noopener noreferrer"&gt;http://mydomain.com/model/content/1.0}myAspect&lt;/A&gt;";&lt;BR /&gt;aspect.property = properties; // my changed set of properties&lt;BR /&gt;aspect.where = predicate; // points to the document, the aspect is attached to&lt;BR /&gt;aspect.where_id = "1";&lt;BR /&gt;&lt;BR /&gt;cml.addAspect = new RepositoryWebService.CMLAddAspect[] { aspect };&lt;BR /&gt;Repository.update(cml);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 08:21:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236234#M189364</guid>
      <dc:creator>mightycoco</dc:creator>
      <dc:date>2009-07-24T08:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the properties of a aspect on an existing docu</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236235#M189365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I never worked with C# and the web service before. May be you're helped with examples? The current Kofax Release script is written in VB (not sure if its VB6 or C#. This release script is also capable of adding aspects and setting properties. You can download it from the Alfresco Forge.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 08:34:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236235#M189365</guid>
      <dc:creator>kbonnet</dc:creator>
      <dc:date>2009-07-24T08:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the properties of a aspect on an existing docu</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236236#M189366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Koen, thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the Kofax Release Script is written in C#. It's a bit of a mess, but I found the isssue:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was using CMLAddAspect - to update an aspect you need to use CMLUpdate of course.&amp;nbsp; &lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;ops: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sometimes you don't need a developer to help out, but only a second insight ;o)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pepkac…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;coco&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 09:41:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-update-the-properties-of-a-aspect-on-an-existing-docu/m-p/236236#M189366</guid>
      <dc:creator>mightycoco</dc:creator>
      <dc:date>2009-07-24T09:41:14Z</dc:date>
    </item>
  </channel>
</rss>

