<?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: System created nodes in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/system-created-nodes/m-p/63232#M39626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Currently, there's no support for "run as" in a workflow definition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A workaround is to develop a Java action which creates the folder.&amp;nbsp; With our Java API, you can "run as".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or you could extend our Javascript action to add a "run as" parameter.&amp;nbsp; Take a look at the class:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Mar 2007 12:12:57 GMT</pubDate>
    <dc:creator>davidc</dc:creator>
    <dc:date>2007-03-20T12:12:57Z</dc:date>
    <item>
      <title>System created nodes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/system-created-nodes/m-p/63229#M39623</link>
      <description>Good day,two questions:First: is there a way to have the system creating folders during a workflow? If yes, how?Second: I built up this process definition:&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&amp;lt;process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:goprocessdefinition"&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;swiml</description>
      <pubDate>Fri, 16 Mar 2007 15:02:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/system-created-nodes/m-p/63229#M39623</guid>
      <dc:creator>blackout</dc:creator>
      <dc:date>2007-03-16T15:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: System created nodes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/system-created-nodes/m-p/63230#M39624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;First: is there a way to have the system creating folders during a workflow? If yes, how?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes - you can write Javascript to create folders.&amp;nbsp; Javascript may be placed into the workflow definition wherever an action is allowed e.g. on transitions, on events, or on node entry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To define system steps i.e. steps which are automatically entered, executed and exited by the system without user intervention, use the following pattern:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; &amp;lt;node name="auto"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;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;&amp;nbsp;&amp;nbsp;&amp;nbsp; // some arbitrary javascript e.g. create folder&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // exit node - here we exit via the default transition&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // or executionContext.leaveNode(transitionName)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; executionContext.leaveNode();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;lt;/action&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;transition name="" to="next"/&amp;gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/node&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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Replace your &amp;lt;state&amp;gt; entries with the above.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 18:59:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/system-created-nodes/m-p/63230#M39624</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2007-03-16T18:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: System created nodes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/system-created-nodes/m-p/63231#M39625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your answer,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it works with &amp;lt;node&amp;gt; instead of &amp;lt;state&amp;gt;, but if I check the Space Details of the folder created by that node, the Creator is always the user in the current swimlane (if you read the process definition above, the addCustomerProjectFolders is performed by the user of the sales swimlane), so the problem of the permissions on folder stands still.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me try to be more clear: I need the System itself (or an admin user) to be the Creator of the folders, so that I can set permissions as I prefere.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the above definition, the receptionuser1 decides if the variable wf_handleable is true or false, if is true, the same receptionuser1 (during the execution of the addDDGOTEFolders) creates the folders and modifies the permissions (everyone can read, only salesuser1 has write permission over "Offerta Tecnico Economica" folder). Later in the workflow, a folder is created under "Offerta Tecnico Economica", and it has to be accessible to an assigned user, but is impossible for planneruser1 to set permission since he has only read access on the folder. I thought that if the System could create the folders instead of the current user I could avoid problems as this. Is this possible?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.S.: please, let me know if I was not clear enaugh, is quite hard for me to explain this problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 10:47:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/system-created-nodes/m-p/63231#M39625</guid>
      <dc:creator>blackout</dc:creator>
      <dc:date>2007-03-20T10:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: System created nodes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/system-created-nodes/m-p/63232#M39626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Currently, there's no support for "run as" in a workflow definition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A workaround is to develop a Java action which creates the folder.&amp;nbsp; With our Java API, you can "run as".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or you could extend our Javascript action to add a "run as" parameter.&amp;nbsp; Take a look at the class:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 12:12:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/system-created-nodes/m-p/63232#M39626</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2007-03-20T12:12:57Z</dc:date>
    </item>
  </channel>
</rss>

