<?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 Problema al ejecutar un JS que lanza un workflow simple in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186215#M139345</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;He construido un JS para asociar a un workflow a un documento cuando entra en una carpeta (lo llamo desde una regla).&lt;/P&gt;&lt;P&gt;Uso esto en lugar de asociar a la regla el workflow simple estándar porque necesito en el futuro utilizar esta regla desde varios portales y tendré que hacer que la carpeta de destino apunte al portal desde donde el JS es llamado.&lt;/P&gt;&lt;P&gt;Cuando incorporo un documento a la carpeta el JS se ejectuta y produce el siguiente error en alfresco.log:&lt;/P&gt;&lt;P&gt;========================&lt;/P&gt;&lt;P&gt;ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-6] Exception from executeScript - redirecting to status template error: 09270010 Failed to execute script 'workspace://SpacesStore/4130be6d-1408-4001-ba98-6706567f6879': 09270009 A value for the mandatory parameter approve-step has not been set on the rule item simple-workflow&lt;/P&gt;&lt;P&gt;========================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Este es el código del JS:&lt;/P&gt;&lt;P&gt;========================&lt;/P&gt;&lt;P&gt;var workflow = actions.create("simple-workflow");&lt;/P&gt;&lt;P&gt;if(!document.hasAspect("app:simpleworkflow")){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; document.addAspect("app:simpleworkflow");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;document.properties.approveStep = "Approve";&lt;/P&gt;&lt;P&gt;document.properties.approveMove = "true";&lt;/P&gt;&lt;P&gt;document.properties.approveFolder = companyhome.childByNamePath("Pruebas/" + "Para Revisión 2");&lt;/P&gt;&lt;P&gt;document.properties.rejectStep = "Reject";&lt;/P&gt;&lt;P&gt;document.properties.rejectMove = "true";&lt;/P&gt;&lt;P&gt;document.properties.rejectFolder = companyhome.childByNamePath("Pruebas/" + "Para Revisión 1 (rechazos)");&lt;/P&gt;&lt;P&gt;document.save();&lt;/P&gt;&lt;P&gt;workflow.parameters["bpm:workflowDescription"] = document.name;&lt;/P&gt;&lt;P&gt;var poolGroup = people.getGroup("GROUP_Revisores");&lt;/P&gt;&lt;P&gt;workflow.parameters["bpm:groupAssignee"] = poolGroup;&lt;/P&gt;&lt;P&gt;workflow.parameters.workflowName = "activiti$activitiReviewPooled";&lt;/P&gt;&lt;P&gt;workflow.execute(document); &lt;/P&gt;&lt;P&gt;========================&lt;/P&gt;&lt;P&gt;Estoy buscando y, aunque veo el problema reportado varias veces, no encuentro ningún post que lo solucione o explique.&lt;/P&gt;&lt;P&gt;Agradezco anticipadamente cualquier ayuda.&lt;/P&gt;&lt;P&gt;Un cordial saludo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Oct 2016 19:11:35 GMT</pubDate>
    <dc:creator>pecdesarrollo</dc:creator>
    <dc:date>2016-10-27T19:11:35Z</dc:date>
    <item>
      <title>Problema al ejecutar un JS que lanza un workflow simple</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186215#M139345</link>
      <description>He construido un JS para asociar a un workflow a un documento cuando entra en una carpeta (lo llamo desde una regla).Uso esto en lugar de asociar a la regla el workflow simple estándar porque necesito en el futuro utilizar esta regla desde varios portales y tendré que hacer que la carpeta de destino</description>
      <pubDate>Thu, 27 Oct 2016 19:11:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186215#M139345</guid>
      <dc:creator>pecdesarrollo</dc:creator>
      <dc:date>2016-10-27T19:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problema al ejecutar un JS que lanza un workflow simple</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186216#M139346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lo cierto es que te he enlazado un ejemplo sin verificarlo...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Puedes consultar cómo funciona esta acción en &lt;A href="http://jared.ottleys.net/alfresco/alfresco-simple-workflow/" title="http://jared.ottleys.net/alfresco/alfresco-simple-workflow/" rel="nofollow noopener noreferrer"&gt;Alfresco: Simple Workflow – I exist as I am&amp;nbsp; &lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Los workflows simples se basan en la asignación de un aspecto que establece las propiedades para la Aprobación / Rechazo. Una vez que el nodo tiene ese aspecto y esas propiedades informadas, los botones de "Aprobación" y "Rechazo" aparecen en la Biblioteca de Documentos y el usuario puede lanzar el workflow simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Por tanto, para tu regla lo único que necesitas es asignar el aspecto y asignar esas propiedades. El código sería similar a éste:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;if(!document.hasAspect("app:simpleworkflow")){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;&amp;nbsp;&amp;nbsp; document.addAspect("app:simpleworkflow");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.properties["app:approveStep"] = "Approve";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.properties["app:approveMove"] = "true";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.properties["app:approveFolder"] = companyhome.childByNamePath("/Compartido/Regla/Aprobado");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.properties["app:rejectStep"] = "Reject";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.properties["app:rejectMove"] = "true";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.properties["app:rejectFolder"] = companyhome.childByNamePath("/Compartido/Regla/Rechazado");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.save();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Te faltaría calcular la carpeta de aprobación y rechazo en función de la ubicación en la que te encuentres.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 20:22:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186216#M139346</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2016-10-27T20:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problema al ejecutar un JS que lanza un workflow simple</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186217#M139347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Buenos días Ángel,&lt;/P&gt;&lt;P&gt;He probado y parece que no soy capaz de asignar la carpeta de destino.&lt;/P&gt;&lt;P&gt;El site se llama "Pruebas".&lt;/P&gt;&lt;P&gt;La carpeta dónde cargo el documento se llama "Para Revisión 1".&lt;/P&gt;&lt;P&gt;La carpeta dónde deben ir los documentos que son aprobadosse llama "Para revisión 2".&lt;/P&gt;&lt;P&gt;La carpeta dónde deben ir los documentos que son rechazados se llama "Para revisión 1 (rechazados)".&lt;/P&gt;&lt;P&gt;Con el JS cosnsigo que el documento cargado tenga las opciones de "Aprobar" y "Rechazar".&lt;/P&gt;&lt;P&gt;Pero al pincharlas siempre obtengo este error:&lt;/P&gt;&lt;P&gt;==================================&lt;/P&gt;&lt;P&gt;2016-10-28 11:29:36,761 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-12] Exception from executeScript - redirecting to status template error: 09280008 Wrapped Exception (with status template): 09280028 No folder was specified for the simple workflow step.&lt;/P&gt;&lt;P&gt;==================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;El JS es éste:&lt;/P&gt;&lt;P&gt;============================&lt;/P&gt;&lt;P&gt;if(!document.hasAspect("app:simpleworkflow")){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; document.addAspect("app:simpleworkflow");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;document.properties["app:approveStep"] = "Approve";&lt;/P&gt;&lt;P&gt;document.properties["app:approveMove"] = "true";&lt;/P&gt;&lt;P&gt;document.properties["app:approveFolder"] = companyhome.childByNamePath("../Para Revisión 2");&lt;/P&gt;&lt;P&gt;document.properties["app:rejectStep"] = "Reject";&lt;/P&gt;&lt;P&gt;document.properties["app:rejectMove"] = "true";&lt;/P&gt;&lt;P&gt;document.properties["app:rejectFolder"] = companyhome.childByNamePath("../Para Revisión 1 (rechazos)");&lt;/P&gt;&lt;P&gt;document.save();&lt;/P&gt;&lt;P&gt;============================&lt;/P&gt;&lt;P&gt;para "companyhome.childByNamePath" he probado todas estas opciones:&lt;/P&gt;&lt;P&gt;"Para Revisión 2"&lt;/P&gt;&lt;P&gt;"Pruebas/Para Revisión 2"&lt;/P&gt;&lt;P&gt;"Pruebas/Documentos/Para revisión 2"&lt;/P&gt;&lt;P&gt;"../Para Revisión 2"&lt;/P&gt;&lt;P&gt;y todas producen el mismo error.&lt;/P&gt;&lt;P&gt;¿Qué estoy haciendo mal?&lt;/P&gt;&lt;P&gt;Muchas gracias, un cordial saludo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 09:41:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186217#M139347</guid>
      <dc:creator>pecdesarrollo</dc:creator>
      <dc:date>2016-10-28T09:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problema al ejecutar un JS que lanza un workflow simple</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186218#M139348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Para indicar rutas no puedes emplear los puntos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prueba algo parecido a esto, asume que las carpetas Aceptado y Rechazado están en el mismo nivel que el documento al que le aplicas el aspecto.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;// Child folders from document parent folder&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;var folders = document.parent.getChildren();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;// Find accept and reject folder in relation to document location&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;var acceptFolder, rejectFolder;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;for (var i = 0; i &amp;lt; folders.length; i++) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (folders[i].properties["cm:name"] == "Aceptado") acceptFolder = folders[i];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (folders[i].properties["cm:name"] == "Rechazado") rejectFolder = folders[i];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;if(!document.hasAspect("app:simpleworkflow")){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;&amp;nbsp;&amp;nbsp; document.addAspect("app:simpleworkflow");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.properties["app:approveStep"] = "Approve";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.properties["app:approveMove"] = "true";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.properties["app:approveFolder"] = acceptFolder;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.properties["app:rejectStep"] = "Reject";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.properties["app:rejectMove"] = "true";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.properties["app:rejectFolder"] = rejectFolder;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;document.save();&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 09:58:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186218#M139348</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2016-10-28T09:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problema al ejecutar un JS que lanza un workflow simple</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186219#M139349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hola Ángel:&lt;/P&gt;&lt;P&gt;El código es claro y simple.&lt;/P&gt;&lt;P&gt;Lo he adaptado y al probarlo se mantiene el error.&lt;/P&gt;&lt;P&gt;He quitado, por las dudas, espacios y acentos del nombre de las carpetas.&lt;/P&gt;&lt;P&gt;No entiendo que puede estar pasando porque cuando cargo el documento en la carpeta "ParaRevision1" el documento se carga, la regla se ejecuta y el JS también.&lt;/P&gt;&lt;P&gt;El documento aparece con las opciones "Aprobar" y "Rechazar" activas.&lt;/P&gt;&lt;P&gt;Lo que pasa es que al intentar aprobarlo o rechazarlo da el mismo error que antes.&lt;/P&gt;&lt;P&gt;Y la verdad es que no lo entiendo, porque está todo bien.&lt;/P&gt;&lt;P&gt;Te detallo todo por si se te ocurre alguna idea que me ayude.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actualmente el Site tiene en su Biblioteca de Documentos tres carpetas:&lt;/P&gt;&lt;P&gt;&amp;nbsp; ParaRevision1&lt;/P&gt;&lt;P&gt;&amp;nbsp; ParaRevision1_Rechazados&lt;/P&gt;&lt;P&gt;&amp;nbsp; ParaRevision2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;El código es el siguiente:&lt;/P&gt;&lt;P&gt;=====================================&lt;/P&gt;&lt;P&gt;// Child folders from document parent folder&lt;/P&gt;&lt;P&gt;var folders = document.parent.getChildren();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Find accept and reject folder in relation to document location&lt;/P&gt;&lt;P&gt;var acceptFolder, rejectFolder;&lt;/P&gt;&lt;P&gt;for (var i = 0; i &amp;lt; folders.length; i++) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (folders[i].properties["cm:name"] == "ParaRevision2") acceptFolder = folders[i];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (folders[i].properties["cm:name"] == "ParaRevision1_Rechazos") rejectFolder = folders[i];&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(!document.hasAspect("app:simpleworkflow")){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; document.addAspect("app:simpleworkflow");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;document.properties["app:approveStep"] = "Approve";&lt;/P&gt;&lt;P&gt;document.properties["app:approveMove"] = "true";&lt;/P&gt;&lt;P&gt;document.properties["app:approveFolder"] = acceptFolder;&lt;/P&gt;&lt;P&gt;document.properties["app:rejectStep"] = "Reject";&lt;/P&gt;&lt;P&gt;document.properties["app:rejectMove"] = "true";&lt;/P&gt;&lt;P&gt;document.properties["app:rejectFolder"] = rejectFolder;&lt;/P&gt;&lt;P&gt;document.save();&lt;/P&gt;&lt;P&gt;=====================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Y el mensaje de error cuando se intenta aprobar o rechazar es el siguiente:&lt;/P&gt;&lt;P&gt;=====================================&lt;/P&gt;&lt;P&gt;2016-10-28 14:20:44,706 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-5] Exception from executeScript - redirecting to status template error: 09280003 Wrapped Exception (with status template): 09280001 No folder was specified for the simple workflow step.&lt;/P&gt;&lt;P&gt;org.springframework.extensions.webscripts.WebScriptException: 09280003 Wrapped Exception (with status template): 09280001 No folder was specified for the simple workflow step.&lt;/P&gt;&lt;P&gt;=====================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Muchas gracias, un cordial saludo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 12:24:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186219#M139349</guid>
      <dc:creator>pecdesarrollo</dc:creator>
      <dc:date>2016-10-28T12:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problema al ejecutar un JS que lanza un workflow simple</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186220#M139350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cuando ejecutas una acción, el &lt;STRONG&gt;document&lt;/STRONG&gt; es el nodo sobre el que se ejecuta.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;En tu caso, &lt;STRONG&gt;document.parent&lt;/STRONG&gt; devolverá "ParaRevision1" y ninguno de sus hijos se llama como estás esperando.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Puedes utilizar la Javascript Console para desarrollar, junto con las trazas de sistema, por ejemplo pon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;logger.log(acceptFolder["cm:name"]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;después del bucle para verificar si ha encontrado la carpeta.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JavaScript Console es un addon de Alfresco que puedes descargar en &lt;A href="https://github.com/share-extras/js-console" title="https://github.com/share-extras/js-console" rel="nofollow noopener noreferrer"&gt;GitHub - share-extras/js-console: Administration Console component for Alfresco Share, that enables the execution of arb…&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 12:33:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186220#M139350</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2016-10-28T12:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problema al ejecutar un JS que lanza un workflow simple</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186221#M139351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Buenas tardes Ángel,&lt;/P&gt;&lt;P&gt;Muchas gracias otra vez.&lt;/P&gt;&lt;P&gt;Te aseguro que antes de consultarte le echo un par de horas a tratar de encontrar la solución (con eso también aprendo mucho).&lt;/P&gt;&lt;P&gt;Pero no he sido capaz de encontrar cómo modificar el script para que "folders" le apunte al "padre" de "ParaRevision1" en lugar de a "ParaRevision1".&lt;/P&gt;&lt;P&gt;Si puedes echarme una mano te lo agradezco.&lt;/P&gt;&lt;P&gt;Un cordial saludo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 16:09:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186221#M139351</guid>
      <dc:creator>pecdesarrollo</dc:creator>
      <dc:date>2016-10-28T16:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problema al ejecutar un JS que lanza un workflow simple</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186222#M139352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suponiendo que tienes la siguiente estructura:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #727174;"&gt;&amp;nbsp; ParaRevision1&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #727174;"&gt;&amp;nbsp; ParaRevision1_Rechazados&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #727174;"&gt;&amp;nbsp; ParaRevision2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Entiendo que asignas la regla a la carpeta "ParaRevision1", por lo que los documentos que entren en esa carpeta serán los "document" del script. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;De acuerdo a esto, "document.parent" devolverá "ParaRevision1", por lo que tendrás que usar "document.parent.parent" para estar en la carpeta padre de "ParaRevision1", "ParaRevision1_Rechazados" y "ParaRevision". Una vez ahí ya puedes iterar para buscar la carpeta que quieres o buscarla por nombre.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 18:28:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186222#M139352</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2016-10-28T18:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problema al ejecutar un JS que lanza un workflow simple</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186223#M139353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfecto!!!&lt;/P&gt;&lt;P&gt;Otro tema cerrado.&lt;/P&gt;&lt;P&gt;Muchísimas gracias.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Oct 2016 01:11:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problema-al-ejecutar-un-js-que-lanza-un-workflow-simple/m-p/186223#M139353</guid>
      <dc:creator>pecdesarrollo</dc:creator>
      <dc:date>2016-10-29T01:11:35Z</dc:date>
    </item>
  </channel>
</rss>

