AnsweredAssumed Answered

Still unable to move file

Question asked by e-no91 on May 7, 2014
This is edited from lifecycle_processdefinition.xml

<?xml version="1.0" encoding="UTF-8"?>

<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wfl:lifecycleapproval">

    <swimlane name="initiator" />

    <start-state name="start">
        <task name="wf:submitReviewTask" swimlane="initiator" />

        <event type="node-leave">
            <!– Call script once the workflow package exists i.e. on node-leave –>
            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                <!– Apply the Workflow Lifecycle Aspect (wfl:status) if not set already. Note: The default wfl:status property is draft –>
                <script>
                    for (var i = 0; i &lt; bpm_package.children.length; i++)
                    {
                       if (!bpm_package.children.hasAspect("wfl:status"))
                       {
                          bpm_package.children.addAspect("wfl:status");
                       }
                    }
                </script>
            </action>
        </event>

        <transition name="" to="review" />
    </start-state>

    <swimlane name="reviewer">
       <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
          <actor>#{bpm_assignee}</actor>
       </assignment>
    </swimlane>

    <task-node name="review">
        <event type="node-enter">
            <!– Update the status to In Review when we enter this task –>
            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                <script>
                    for (var i = 0; i &lt; bpm_package.children.length; i++)
                    {
                       bpm_package.children.properties["wfl:status"] = "In Review";
                       bpm_package.children.save();
                    }
                </script>
            </action>
        </event>

        <task name="wf:reviewTask" swimlane="reviewer">
            <event type="task-create">
                <script>
                    if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
                    if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
                </script>
            </event>
        </task>
       
        <transition name="approve" to="approved" />
        <transition name="reject" to="rejected" />
    </task-node>

    <task-node name="rejected">
        <event type="node-enter">
            <!– Update the status to Draft when we enter this task –>
            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                <script>
                    for (var i = 0; i &lt; bpm_package.children.length; i++)
                    {
                       bpm_package.children.properties["wfl:status"] = "Draft";
                       bpm_package.children.save();
                    }
                </script>
            </action>
        </event>

        <task name="wf:rejectedTask" swimlane="initiator" />
        <transition name="" to="end" />
    </task-node>

    <task-node name="approved">
        <event type="node-enter">
            <!– Update the status to Approved when we enter this task –>
            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<runas>admin</runas>
                <script>
                    for (var i = 0; i &lt; bpm_package.children.length; i++)
                    {
                       bpm_package.children.properties["wfl:status"] = "Approved";
                       bpm_package.children.save();
   
                    }
                      var dest = companyhome.childByNamePath("Sites/test-script/documentLibrary/kepada");

                      bpm_package.children[0].move(dest);

                </script>
            </action>
        </event>

        <task name="wf:approvedTask" swimlane="initiator" />
        <transition name="" to="end" />
    </task-node>

    <end-state name="end" />

    <event type="process-end">
        <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
                if (cancelled)
                {
                    for (var i = 0; i &lt; bpm_package.children.length; i++)
                    {
                       if (bpm_package.children[0].hasAspect("wfl:status"))
                       {
                          bpm_package.children.properties["wfl:status"] = "Draft";
                          bpm_package.children.save();
                       }
                    }
                    if (logger.isLoggingEnabled()) logger.log("Workflow cancelled, status reset to Draft");
                }
                else               
                {
                    if (logger.isLoggingEnabled()) logger.log("Workflow completed");
                }
            </script>
        </action>
    </event>

</process-definition>


This is from alfresco.log

17:09:14,005 DEBUG [org.alfresco.repo.jscript.ScriptLogger] Generating form for item:
17:09:14,006 DEBUG [org.alfresco.repo.jscript.ScriptLogger]    kind = workflow
17:09:14,006 DEBUG [org.alfresco.repo.jscript.ScriptLogger]    id = activiti$activitiLifecycleApproval
17:09:14,007 DEBUG [org.alfresco.repo.jscript.ScriptLogger] fields = bpm:workflowDescription,bpm:workflowDueDate,bpm:workflowPriority,bpm:assignee,packageItems,bpm:sendEMailNotifications
17:09:14,071 DEBUG [org.alfresco.repo.jscript.ScriptLogger] formModel = {"formData": {"prop_bpm_sendEMailNotifications": "false", "assoc_bpm_assignee": "", "prop_bpm_packageActionGroup": "add_package_item_actions", "assoc_packageItems": "", "prop_bpm_packageItemActionGroup": "start_package_item_actions", "prop_bpm_workflowPriority": "2"}, "item": "api\/workflow-definitions\/activiti$activitiLifecycleApproval:1:2703", "type": "activiti$activitiLifecycleApproval", "submissionUrl": "\/api\/workflow\/activiti%24activitiLifecycleApproval\/formprocessor", "fields": "[Lorg.alfresco.repo.forms.FieldDefinition;@1d93b82"}
17:09:17,355 DEBUG [org.alfresco.repo.jscript.ScriptLogger] #items = 1, #results = 1
17:09:24,977 DEBUG [org.alfresco.repo.jscript.ScriptLogger] children type = authority
17:09:24,980 DEBUG [org.alfresco.repo.jscript.ScriptLogger] argsSelectableType = cm:person
17:09:24,980 DEBUG [org.alfresco.repo.jscript.ScriptLogger] argsFilterType = null
17:09:24,980 DEBUG [org.alfresco.repo.jscript.ScriptLogger] argsSearchTerm = us2
17:09:24,980 DEBUG [org.alfresco.repo.jscript.ScriptLogger] argsMaxResults = 1000
17:09:24,980 DEBUG [org.alfresco.repo.jscript.ScriptLogger] argsXPath = null
17:09:24,980 DEBUG [org.alfresco.repo.jscript.ScriptLogger] lastPathElement = children
17:09:25,147 DEBUG [org.alfresco.repo.jscript.ScriptLogger] Found 1 results
17:09:35,785 DEBUG [org.alfresco.repo.jscript.ScriptLogger] json form submission for item:
17:09:35,786 DEBUG [org.alfresco.repo.jscript.ScriptLogger]    kind = workflow
17:09:35,786 DEBUG [org.alfresco.repo.jscript.ScriptLogger]    id = activiti$activitiLifecycleApproval
17:09:40,088 ERROR [org.alfresco.repo.action.executer.MailActionExecuter] Failed to send email to [us2]
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Exception reading response;
  nested exception is:
   java.net.SocketException: Software caused connection abort: recv failed. Failed messages: javax.mail.MessagingException: Exception reading response;
  nested exception is:
   java.net.SocketException: Software caused connection abort: recv failed; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: Exception reading response;
  nested exception is:
   java.net.SocketException: Software caused connection abort: recv failed
   at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)
   at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:848)
   at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:373)
   at javax.mail.Service.connect(Service.java:275)
   at org.alfresco.repo.mail.AlfrescoJavaMailSender$TransportFactory.makeObject(AlfrescoJavaMailSender.java:71)
   at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1190)
   at org.alfresco.repo.mail.AlfrescoJavaMailSender$PooledTransportWrapper.protocolConnect(AlfrescoJavaMailSender.java:205)
   at javax.mail.Service.connect(Service.java:275)
   at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336)
   at org.alfresco.repo.action.executer.MailActionExecuter.sendEmail(MailActionExecuter.java:929)
   at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:490)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:258)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:72)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at com.sun.proxy.$Proxy312.execute(Unknown Source)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:838)
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:738)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1$1.execute(AsynchronousActionExecutionQueueImpl.java:428)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:452)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:323)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:437)
   at org.alfresco.repo.tenant.TenantUtil.runAsWork(TenantUtil.java:119)
   at org.alfresco.repo.tenant.TenantUtil.runAsTenant(TenantUtil.java:88)
   at org.alfresco.repo.tenant.TenantUtil$1.doWork(TenantUtil.java:62)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
   at org.alfresco.repo.tenant.TenantUtil.runAsUserTenant(TenantUtil.java:58)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:440)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:724)
Caused by: java.net.SocketException: Software caused connection abort: recv failed
   at java.net.SocketInputStream.socketRead0(Native Method)
   at java.net.SocketInputStream.read(SocketInputStream.java:168)
   at java.net.SocketInputStream.read(SocketInputStream.java:121)
   at sun.security.ssl.InputRecord.readFully(InputRecord.java:442)
   at sun.security.ssl.InputRecord.read(InputRecord.java:480)
   at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927)
   at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884)
   at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
   at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
   at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
   at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
   at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75)
   at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440)
   … 36 more
17:09:41,855 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - NodeRef: null Query: +PATH:"/app:company_home/st:sites/cm:test-script/cm:documentLibrary/cm:dari/*" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post"
17:09:41,907 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - query results: 4
17:09:41,909 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - totalRecords: 4
17:10:16,813 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - NodeRef: alfresco://company/home Query:  +@cm\:modified:[2014\-4\-30T00\:00\:00.000 TO 2014\-5\-7T23\:59\:59.999] +@cm\:modifier:"us2" +TYPE:"cm:content" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post" +(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")
17:10:16,934 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - query results: 1
17:10:16,937 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - totalRecords: 1
17:10:20,645 DEBUG [org.alfresco.repo.jscript.ScriptLogger] Generating form for item:
17:10:20,646 DEBUG [org.alfresco.repo.jscript.ScriptLogger]    kind = task
17:10:20,646 DEBUG [org.alfresco.repo.jscript.ScriptLogger]    id = activiti$3515
17:10:20,649 DEBUG [org.alfresco.repo.jscript.ScriptLogger] fields = message,taskOwner,bpm:priority,bpm:dueDate,bpm:taskId,bpm:status,packageItems,bpm:comment,wf:reviewOutcome
17:10:20,856 DEBUG [org.alfresco.repo.jscript.ScriptLogger] formModel = {"formData": {"assoc_packageItems": "workspace:\/\/SpacesStore\/d62ae113-c942-485b-a02d-076713631bcb", "prop_bpm_taskId": "3515", "prop_bpm_priority": 2, "prop_bpm_packageItemActionGroup": "edit_package_item_actions", "prop_bpm_status": "Not Yet Started", "prop_message": "Review Task", "prop_wf_reviewOutcome": "Reject", "prop_taskOwner": "us2|US2|us2", "prop_bpm_packageActionGroup": ""}, "item": "api\/task-instances\/activiti$3515", "type": "wf:activitiReviewTask", "submissionUrl": "\/api\/task\/activiti%243515\/formprocessor", "fields": "[Lorg.alfresco.repo.forms.FieldDefinition;@1028a96"}
17:10:24,020 DEBUG [org.alfresco.repo.jscript.ScriptLogger] #items = 1, #results = 1
17:10:26,500 DEBUG [org.alfresco.repo.jscript.ScriptLogger] json form submission for item:
17:10:26,503 DEBUG [org.alfresco.repo.jscript.ScriptLogger]    kind = task
17:10:26,503 DEBUG [org.alfresco.repo.jscript.ScriptLogger]    id = activiti$3515
17:10:36,268 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - NodeRef: alfresco://company/home Query:  +@cm\:modified:[2014\-4\-30T00\:00\:00.000 TO 2014\-5\-7T23\:59\:59.999] +@cm\:modifier:"us2" +TYPE:"cm:content" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post" +(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")
17:10:36,292 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - query results: 1
17:10:36,296 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - totalRecords: 1
17:12:59,414 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - NodeRef: alfresco://company/home Query:  +@cm\:modified:[2014\-4\-30T00\:00\:00.000 TO 2014\-5\-7T23\:59\:59.999] +@cm\:modifier:"us1" +TYPE:"cm:content" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post" +(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")
17:12:59,541 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - query results: 0
17:12:59,541 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - totalRecords: 0
17:16:04,585 DEBUG [org.alfresco.repo.jscript.ScriptLogger] Generating form for item:
17:16:04,585 DEBUG [org.alfresco.repo.jscript.ScriptLogger]    kind = task
17:16:04,586 DEBUG [org.alfresco.repo.jscript.ScriptLogger]    id = activiti$3559
17:16:04,587 DEBUG [org.alfresco.repo.jscript.ScriptLogger] fields = message,taskOwner,bpm:priority,bpm:dueDate,bpm:taskId,bpm:status,packageItems,bpm:comment,transitions
17:16:04,955 DEBUG [org.alfresco.repo.jscript.ScriptLogger] formModel = {"formData": {"assoc_packageItems": "workspace:\/\/SpacesStore\/d62ae113-c942-485b-a02d-076713631bcb", "prop_bpm_taskId": "3559", "prop_bpm_priority": 2, "prop_bpm_packageItemActionGroup": "read_package_item_actions", "prop_transitions": "Next|Task Done", "prop_bpm_status": "Not Yet Started", "prop_message": "Document Approved", "prop_taskOwner": "us1|US1|us1", "prop_bpm_packageActionGroup": ""}, "item": "api\/task-instances\/activiti$3559", "type": "wf:approvedTask", "submissionUrl": "\/api\/task\/activiti%243559\/formprocessor", "fields": "[Lorg.alfresco.repo.forms.FieldDefinition;@3f5517"}
17:16:11,406 DEBUG [org.alfresco.repo.jscript.ScriptLogger] #items = 1, #results = 1
17:16:14,317 DEBUG [org.alfresco.repo.jscript.ScriptLogger] json form submission for item:
17:16:14,320 DEBUG [org.alfresco.repo.jscript.ScriptLogger]    kind = task
17:16:14,321 DEBUG [org.alfresco.repo.jscript.ScriptLogger]    id = activiti$3559
17:16:20,853 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - NodeRef: alfresco://company/home Query:  +@cm\:modified:[2014\-4\-30T00\:00\:00.000 TO 2014\-5\-7T23\:59\:59.999] +@cm\:modifier:"us1" +TYPE:"cm:content" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post" +(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")
17:16:20,884 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - query results: 0
17:16:20,885 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - totalRecords: 0
17:16:42,583 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - NodeRef: alfresco://company/home Query: +PATH:"/app:company_home/*" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post"
17:16:42,651 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - query results: 7
17:16:42,655 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - totalRecords: 7
17:16:55,533 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - NodeRef: alfresco://company/home Query: +PATH:"/app:company_home/app:dictionary/*" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post"
17:16:55,608 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - query results: 19
17:16:55,612 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - totalRecords: 19
17:16:59,234 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - NodeRef: alfresco://company/home Query: +PATH:"/app:company_home/app:dictionary/app:email_templates/*" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post"
17:16:59,854 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - query results: 6
17:16:59,857 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - totalRecords: 6
17:17:02,612 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - NodeRef: alfresco://company/home Query: +PATH:"/app:company_home/app:dictionary/*" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post"
17:17:02,691 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - query results: 19
17:17:02,698 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - totalRecords: 19
17:17:06,305 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - NodeRef: alfresco://company/home Query: +PATH:"/app:company_home/*" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post"
17:17:06,343 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - query results: 7
17:17:06,345 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - totalRecords: 7
17:17:24,802 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - NodeRef: null Query: +PATH:"/app:company_home/st:sites/cm:test-script/cm:documentLibrary//*" +@cm\:modified:[2014\-4\-30T00\:00\:00.000 TO 2014\-5\-7T23\:59\:59.999] +@cm\:modifier:"us1" +TYPE:"cm:content" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post" +(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")
17:17:24,913 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - query results: 0
17:17:24,913 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.get.js - totalRecords: 0
17:17:35,631 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - NodeRef: null Query: +PATH:"/app:company_home/st:sites/cm:test-script/cm:documentLibrary/*" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post"
17:17:35,662 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - query results: 2
17:17:35,687 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - totalRecords: 2
17:17:38,722 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - NodeRef: null Query: +PATH:"/app:company_home/st:sites/cm:test-script/cm:documentLibrary/cm:dari/*" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post"
17:17:38,781 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - query results: 4
17:17:38,783 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - totalRecords: 4
17:17:47,018 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - NodeRef: null Query: +PATH:"/app:company_home/st:sites/cm:test-script/cm:documentLibrary/*" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post"
17:17:47,040 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - query results: 2
17:17:47,041 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - totalRecords: 2
17:17:49,166 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - NodeRef: null Query: +PATH:"/app:company_home/st:sites/cm:test-script/cm:documentLibrary/cm:kepada/*" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post"
17:17:49,180 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - query results: 0
17:17:49,180 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - totalRecords: 0
17:17:51,782 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - NodeRef: null Query: +PATH:"/app:company_home/st:sites/cm:test-script/cm:documentLibrary/*" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post"
17:17:51,806 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - query results: 2
17:17:51,807 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - totalRecords: 2
17:18:33,342 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - NodeRef: null Query: +PATH:"/app:company_home/st:sites/cm:test-script/cm:documentLibrary/*" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post"
17:18:33,370 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - query results: 2
17:18:33,371 DEBUG [org.alfresco.repo.jscript.ScriptLogger] doclist.lib.js - totalRecords: 2

If this still cant work, I'm thinking about checking the document status ("Draft,"Approved","Rejected"). How do I code this in javascript? I will assign it as rule when document is updated.

Need this urgently
Thanks in advance!

Outcomes