<?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: Change made through a  webscript not reflected on ShareUI in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/change-made-through-a-webscript-not-reflected-on-shareui/m-p/253870#M207000</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad you got beyond last night's problems. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You are posting long posts containing many different issues which makes it difficult to respond.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps you could start by saying what are you trying to do?&amp;nbsp;&amp;nbsp; Rather than jumping to implementation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Apr 2011 08:03:10 GMT</pubDate>
    <dc:creator>mrogers</dc:creator>
    <dc:date>2011-04-15T08:03:10Z</dc:date>
    <item>
      <title>Change made through a  webscript not reflected on ShareUI</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/change-made-through-a-webscript-not-reflected-on-shareui/m-p/253868#M206998</link>
      <description>Hello all,I am trying to make changes to nodes through a webscript not although all API call are ok (not raising any error), NOTHING is translated in the shareUI.The exact same thing happens when I run code into the debugger evaluate console Taking a leaf from http://wiki.alfresco.com/wiki/JavaScrip</description>
      <pubDate>Thu, 14 Apr 2011 17:46:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/change-made-through-a-webscript-not-reflected-on-shareui/m-p/253868#M206998</guid>
      <dc:creator>annakan</dc:creator>
      <dc:date>2011-04-14T17:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Change made through a  webscript not reflected on ShareUI</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/change-made-through-a-webscript-not-reflected-on-shareui/m-p/253869#M206999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First things I was missing : &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;change in the debugger do not reflect in the repository, probably different transaction or thread+transactions&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second thing I was missing :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TargetFolder.addNode(actionedUponNodeRef)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SourceFolder.removeNode(actionedUponNodeRef)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;no need to fidle with the relationships.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I really need to wrap my head better around the alfresco content model beyond the "everything is a node" simple thing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The java and javascript API differs a bit too, in java you do nodeService.addChild(ParentNode, actionedUponNodeRef, AssocType, AssocQname), I suppose javascript does not support directly adding "typed" containment relationships.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Everything works but I still have a bug when I added a node to a folder, added it multiple parents, and then suppress the node, the folder it was added first seems to Keep a hidden reference to it that prevent adding it again. (many retries then ibatis sql error &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:&lt;BR /&gt;— The error occurred in alfresco/ibatis/#resource.dialect#/node-insert-SqlMap.xml.&lt;BR /&gt;— The error occurred while applying a parameter map.&lt;BR /&gt;— Check the alfresco.node.insert_ChildAssoc-InlineParameterMap.&lt;BR /&gt;— Check the statement (update failed).&lt;BR /&gt;— Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '4958-33-2164579964-c4_small.jpg' for key 'parent_node_id'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:393)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.springframework.orm.ibatis.SqlMapClientTemplate$8.doInSqlMapClient(SqlMapClientTemplate.java:366)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:200)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; … 129 more&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;/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;SPAN&gt;I don't know if it is an alfresco bug for being "on the fringe" with multiple parents, or something I induce by mis-using the API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Neither do I know if I should do some clean-up in the onBeforeDelete behavior ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 19:40:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/change-made-through-a-webscript-not-reflected-on-shareui/m-p/253869#M206999</guid>
      <dc:creator>annakan</dc:creator>
      <dc:date>2011-04-14T19:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Change made through a  webscript not reflected on ShareUI</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/change-made-through-a-webscript-not-reflected-on-shareui/m-p/253870#M207000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad you got beyond last night's problems. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You are posting long posts containing many different issues which makes it difficult to respond.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps you could start by saying what are you trying to do?&amp;nbsp;&amp;nbsp; Rather than jumping to implementation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 08:03:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/change-made-through-a-webscript-not-reflected-on-shareui/m-p/253870#M207000</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2011-04-15T08:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Change made through a  webscript not reflected on ShareUI</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/change-made-through-a-webscript-not-reflected-on-shareui/m-p/253871#M207001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Though everything is explained inline with references to my previous posts explaining both the problem and the context, I did not want to reproduce them and clutter even more the post or cross post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;Basically my post boils down to this :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;First part&lt;/EM&gt;&lt;SPAN&gt; is about the debugger obviously not allowing to experiment with the API because wathever call or change I make in it does not reflect on the repository I can browse through the web. Probably a transaction or session thing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could this be confirmed as a fact ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;The second part&lt;/EM&gt;&lt;SPAN&gt; is about the fact that this experience lead me to doubt about what I was experiencing while trying to build my webscript based action.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was trying to add and remove parents from a node to no avail, and my experiences in the debugger were, to say the least inconclusive too,&amp;nbsp; leading me to think that the API might be "faulty" in the way I used it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Later on I discovered there was a higher level API to add and remove parents with TargetFolder.addNode(actionedUponNodeRef) &amp;amp; SourceFolder.removeNode(actionedUponNodeRef)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that wraps the nodeService.addChild(ParentNode, actionedUponNodeRef, AssocType, AssocQname) with a "contains" kind of relationship.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It still does not explain why I could not do it "directly" through the nodeRef.parents property but I suspect the javascript wrapping does so many magic behind the scene that sometimes it get itself lost. At the very least the semantic is unclear, at least to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;My last problem &lt;/EM&gt;&lt;SPAN&gt;was when deleting a node some leftover datas were preventing me to add the same document again, I add to implement the beforeDelete behavior with the "NotificationFrequency.FIRST_EVENT" policy to be able to remove the non primary parents from the node before deletion.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why all this : because I want to properly support multiple parents for nodes, so that a document can &lt;/SPAN&gt;&lt;STRONG&gt;really&lt;/STRONG&gt;&lt;SPAN&gt; appears in multiple folders at once. I must say I constantly discovers new creative ways the "primary parent = container" is entrenched into the shareUI (for instance the "path webscript" that is used when constructing the crumb on a document detail page …. ), it is like the concept of "context" (where I came from as a user, where I am sited on as a document) is for now absent from share. Most assumption seems to be that the document is "self describing" in full, and that is not right neither in practice nor in the underlying model (where multiple parents ARE supported for the best).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope it answered your questions, I already have more to ask…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2011 14:41:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/change-made-through-a-webscript-not-reflected-on-shareui/m-p/253871#M207001</guid>
      <dc:creator>annakan</dc:creator>
      <dc:date>2011-04-19T14:41:49Z</dc:date>
    </item>
  </channel>
</rss>

