<?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: Accessing document type property in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/accessing-document-type-property/m-p/254636#M207766</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually there is no straight links or view where you can see the content type of document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is one template in the alfresco called doc_info.ftl, if you attach this template to your document and see it via custom view you will be able to see all the properties along with the content type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Else you can change the web-client-config-custom.xml to show the content type along with all other properties in document detail page.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jul 2011 04:48:30 GMT</pubDate>
    <dc:creator>mitpatoliya</dc:creator>
    <dc:date>2011-07-11T04:48:30Z</dc:date>
    <item>
      <title>Accessing document type property</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-document-type-property/m-p/254635#M207765</link>
      <description>Hi,I'm currently developing a workflow in which I need to identify the document type of each document in the workflow document package (bpm_package) so that I may deposit each document where it goes in the repository at the conclusion of the workflow.&amp;nbsp; Is there a wiki page that lists the document pr</description>
      <pubDate>Sat, 09 Jul 2011 00:20:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-document-type-property/m-p/254635#M207765</guid>
      <dc:creator>ericnk</dc:creator>
      <dc:date>2011-07-09T00:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing document type property</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-document-type-property/m-p/254636#M207766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually there is no straight links or view where you can see the content type of document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is one template in the alfresco called doc_info.ftl, if you attach this template to your document and see it via custom view you will be able to see all the properties along with the content type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Else you can change the web-client-config-custom.xml to show the content type along with all other properties in document detail page.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2011 04:48:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-document-type-property/m-p/254636#M207766</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2011-07-11T04:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing document type property</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-document-type-property/m-p/254637#M207767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your reply.&amp;nbsp; I'm not sure I made myself clear.&amp;nbsp; I will try again.&amp;nbsp; The workflow I'm developing works with custom document types, i.e.&amp;nbsp; mydomain&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;urchaseOrder.&amp;nbsp; This custom type is what I need to identify in the workflow package (bpm_package).&amp;nbsp; For example..&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 0; i &amp;lt; bpm_package.children.length; i++) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (bpm_package.children[i].properties["cm:type"] == "mydomain:purchaseOrder")&lt;BR /&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;nbsp;&amp;nbsp; bpm_package.children[i].move(bpm_context.childByNamePath("Purchase Orders"));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (bpm_package.children[i].properties["cm:type"] == "mydomain:check")&lt;BR /&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;nbsp;&amp;nbsp; bpm_package.children[i].move(bpm_context.childByNamePath("Checks"));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ….&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/action&amp;gt;&lt;BR /&gt;&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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;An extensive search through the alfresco wiki and documentation yielded cm:name, cm:type and sys:name as some of the properties available in the default content model.&amp;nbsp; Will any of these properties identify the custom type?&amp;nbsp; Is the information in the doc_info.ftl template you mentioned previously, available through the javascript API?&amp;nbsp; I look forward to and appreciate any replies on this subject.&amp;nbsp; Thank you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2011 17:17:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-document-type-property/m-p/254637#M207767</guid>
      <dc:creator>ericnk</dc:creator>
      <dc:date>2011-07-11T17:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing document type property</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-document-type-property/m-p/254638#M207768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Eric,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually the one which you are using right now is i.e. ["cm:type"] is a property of the dublincore aspect so that will not be helpful to you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to check the API's of document object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So try something like &lt;/SPAN&gt;&lt;STRONG&gt;document.type&lt;/STRONG&gt;&lt;SPAN&gt; which will returns you the fully qualified type QName then you need to convert that to string and then check you conditions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Refer :&lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/3.4_JavaScript_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/3.4_JavaScript_API&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 06:08:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-document-type-property/m-p/254638#M207768</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2011-07-12T06:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing document type property</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-document-type-property/m-p/254639#M207769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your reply.&amp;nbsp; Can you give me an example of what you're referring to using document.type?&amp;nbsp; Perhaps something within a beanshell or javascript statment.&amp;nbsp; The javascript api wiki page is a little bit vague on the specifics of how to retrieve the type.&amp;nbsp; The "document.type" statement implies a reference to a single document, i.e. bpm_package.children[0] .&amp;nbsp; But, what about multiple documents?&amp;nbsp; Can the type identification (qname) be retrieved as follows?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;…&lt;BR /&gt;for (var i = 0; i &amp;amp;lt; bpm_package.length; i++) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var type;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type = bpm_package.children[i].type;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(type);&lt;BR /&gt;}&lt;BR /&gt;…&lt;BR /&gt;&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I look forward to your reply.&amp;nbsp; Thank you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 17:29:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-document-type-property/m-p/254639#M207769</guid>
      <dc:creator>ericnk</dc:creator>
      <dc:date>2011-07-13T17:29:10Z</dc:date>
    </item>
  </channel>
</rss>

