05-10-2014 02:41 PM
05-12-2014 06:42 AM
<value>\$\{selectSingleNode('workspace://SpacesStore', 'lucene', 'PATH:"/app:company_home/app:dictionary/app:scripts/cm:scriptTaskfolder.js"' )\}</value>
05-20-2014 09:49 AM
logger.log( "Begin script: scriptTaskFolder.js" );
var sourceFolder = companyhome.childByNamePath("Pruebas");
var histFolder = companyhome.childByNamePath("PruebasArchivos");
if(sourceFolder != null){
var i=0;
sourceChildren = sourceFolder.children;
for(i=0; i<sourceChildren.length;i++){
child = sourceChildren[i];
child.move(histFolder);
}
}
logger.log( "End script: scriptTaskFolder.js" );
12:46:22,861 DEBUG [org.alfresco.repo.jscript.ScriptLogger] Begin script: scriptTaskFolder.js
12:46:22,941 DEBUG [org.alfresco.repo.jscript.ScriptLogger] End script: scriptTaskFolder.js
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!–
Define the model factory used to generate object models suitable for use with freemarker templates.
–>
<bean id="templateActionModelFactory" class="org.alfresco.repo.action.scheduled.FreeMarkerWithLuceneExtensionsModelFactory">
<property name="serviceRegistry">
<ref bean="ServiceRegistry"/>
</property>
</bean>
<bean id="moverCarpeta_runScriptAction" class="org.alfresco.repo.action.scheduled.SimpleTemplateActionDefinition">
<property name="actionName">
<value>script</value>
</property>
<property name="parameterTemplates">
<map>
<entry>
<key>
<value>script-ref</value>
</key>
<value>\$\{selectSingleNode('workspace://SpacesStore','lucene','PATH:"/app:company_home/app:dictionary/app:scripts/cm:scriptTaskFolder.js"')\}
</value>
</entry>
</map>
</property>
<property name="templateActionModelFactory">
<ref bean="templateActionModelFactory"/>
</property>
<property name="dictionaryService">
<ref bean="DictionaryService"/>
</property>
<property name="actionService">
<ref bean="ActionService"/>
</property>
<property name="templateService">
<ref bean="TemplateService"/>
</property>
</bean>
<bean id="moverCarpeta_runScript" class="org.alfresco.repo.action.scheduled.CronScheduledQueryBasedTemplateActionDefinition">
<property name="transactionMode">
<value>UNTIL_FIRST_FAILURE</value>
</property>
<property name="compensatingActionMode">
<value>IGNORE</value>
</property>
<property name="searchService">
<ref bean="SearchService"/>
</property>
<property name="templateService">
<ref bean="TemplateService"/>
</property>
<property name="queryLanguage">
<value>lucene</value>
</property>
<property name="stores">
<list>
<value>workspace://SpacesStore</value>
</list>
</property>
<property name="queryTemplate">
<value>PATH:"/app:company_home"</value>
</property>
<property name="cronExpression">
<value>0 0/1 * * * ?</value>
</property>
<property name="jobName">
<value>jobD</value>
</property>
<property name="jobGroup">
<value>jobGroup</value>
</property>
<property name="triggerName">
<value>triggerD</value>
</property>
<property name="triggerGroup">
<value>triggerGroup</value>
</property>
<property name="scheduler">
<ref bean="schedulerFactory"/>
</property>
<property name="actionService">
<ref bean="ActionService"/>
</property>
<property name="templateActionModelFactory">
<ref bean="templateActionModelFactory"/>
</property>
<property name="templateActionDefinition">
<ref bean="moverCarpeta_runScriptAction"/>
<!– This is name of the action (bean) that gets run –>
</property>
<property name="transactionService">
<ref bean="TransactionService"/>
</property>
<property name="runAsUser">
<value>System</value>
</property>
</bean>
</beans>
2014-05-20 06:36:00,033 DEBUG [action.scheduled.AbstractScheduledAction] [DefaultScheduler_Worker-1] Found 1
2014-05-20 06:36:00,033 DEBUG [action.scheduled.AbstractScheduledAction] [DefaultScheduler_Worker-1] Executing in individual transaction
2014-05-20 06:36:00,044 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-1] Execute action impl action chain = null
2014-05-20 06:36:00,044 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-1] Current action = 33a43bbd-4b74-4216-904e-3b4b5bb88c46
2014-05-20 06:36:00,044 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-1] Doing executeActionImpl
2014-05-20 06:36:00,044 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-1] Adding script, 33a43bbd-4b74-4216-904e-3b4b5bb88c46 to action chain.
2014-05-20 06:36:00,044 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-1] All Condition Evaluation Result - true
2014-05-20 06:36:00,045 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-1] The action is being executed as the user: System
2014-05-20 06:36:00,045 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-1] Resetting the action chain.
2014-05-20 06:36:39,880 INFO [web.site.EditionInterceptor] [http-bio-80-exec-2] Unable to retrieve License information from Alfresco: 401
2014-05-20 06:37:00,018 DEBUG [action.scheduled.AbstractScheduledAction] [DefaultScheduler_Worker-4] Found 1
2014-05-20 06:37:00,018 DEBUG [action.scheduled.AbstractScheduledAction] [DefaultScheduler_Worker-4] Executing in individual transaction
2014-05-20 06:37:00,024 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-4] Execute action impl action chain = null
2014-05-20 06:37:00,024 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-4] Current action = 2891c8b0-31f4-47fd-bbbd-1bb5574f7094
2014-05-20 06:37:00,024 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-4] Doing executeActionImpl
2014-05-20 06:37:00,024 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-4] Adding script, 2891c8b0-31f4-47fd-bbbd-1bb5574f7094 to action chain.
2014-05-20 06:37:00,025 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-4] All Condition Evaluation Result - true
2014-05-20 06:37:00,025 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-4] The action is being executed as the user: System
2014-05-20 06:37:00,025 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-4] Resetting the action chain.
2014-05-20 06:38:00,015 DEBUG [action.scheduled.AbstractScheduledAction] [DefaultScheduler_Worker-5] Found 1
2014-05-20 06:38:00,016 DEBUG [action.scheduled.AbstractScheduledAction] [DefaultScheduler_Worker-5] Executing in individual transaction
2014-05-20 06:38:00,026 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-5] Execute action impl action chain = null
2014-05-20 06:38:00,026 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-5] Current action = 305adc5c-4235-423d-a7da-ef960bc76a45
2014-05-20 06:38:00,026 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-5] Doing executeActionImpl
2014-05-20 06:38:00,026 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-5] Adding script, 305adc5c-4235-423d-a7da-ef960bc76a45 to action chain.
2014-05-20 06:38:00,026 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-5] All Condition Evaluation Result - true
2014-05-20 06:38:00,026 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-5] The action is being executed as the user: System
2014-05-20 06:38:00,027 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-5] Resetting the action chain.
2014-05-20 06:39:00,014 DEBUG [action.scheduled.AbstractScheduledAction] [DefaultScheduler_Worker-10] Found 1
2014-05-20 06:39:00,014 DEBUG [action.scheduled.AbstractScheduledAction] [DefaultScheduler_Worker-10] Executing in individual transaction
2014-05-20 06:39:00,020 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-10] Execute action impl action chain = null
2014-05-20 06:39:00,021 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-10] Current action = f51dbc6c-dacd-460c-91a6-22b0db5e6cf9
2014-05-20 06:39:00,021 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-10] Doing executeActionImpl
2014-05-20 06:39:00,021 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-10] Adding script, f51dbc6c-dacd-460c-91a6-22b0db5e6cf9 to action chain.
2014-05-20 06:39:00,021 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-10] All Condition Evaluation Result - true
2014-05-20 06:39:00,021 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-10] The action is being executed as the user: System
2014-05-20 06:39:00,022 DEBUG [repo.action.ActionServiceImpl] [DefaultScheduler_Worker-10] Resetting the action chain.
The script is not executed and the files was not moving.Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.