AnsweredAssumed Answered

Scheduler failed to find WCM path !!

Question asked by power on Sep 11, 2008
Friends,

on alfresco 2.2.0 ECM , I have following folder structure :

Company Home > Sportshub > Archived

and on WCM , I have following structure :

Web Projects > SportsHub >ROOT > sportshub > drop

Now My Scheduler having rule to move expired doc  from  WCM's drop space to ECM's Archived space. ( WCM to ECM move)
my scheduler file is as below.

Here my path given are correct but I am confused about WCM path I have given.
since my scheduler working fine, but my file not moving to the ECM 's Archived folder.

it shows my script and logger.log working fine but file inside that folder is not moving to Archived space.

I am giving my schedule file..

<?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>
   
    <!–
    My Action to run perticular script - from wcm to dm move on archieve condition   
    –>
    <bean id="myAction" 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:testx/cm:sportshub_archive.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>
   
  <!– ONE_TRANSACTION    ISOLATED_TRANSACTIONS      UNTIL_FIRST_FAILURE –>
   
    <!–
    Define a job for adding the classified aspect to nodes.
    –>
    <bean id="myCronJOB" 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>avm://SportsHub–admin</value>
            </list>
        </property>
        <!– Find all nodes that do not have the aspect –>
        <property name="queryTemplate">
            <value>PATH:"/{http://www.alfresco.org/model/content/1.0}www/cm:avm_webapps/cm:ROOT/cm:sportshub/cm:drop"</value>
        </property>
        <property name="cronExpression">
            <value>0/20 * * * * ?</value>
        </property>
        <property name="jobName">
            <value>jobA</value>
        </property>
        <property name="jobGroup">
            <value>jobGroup</value>
        </property>
        <property name="triggerName">
            <value>triggerA</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="myAction"/>
        </property>
        <property name="transactionService">
            <ref bean="TransactionService"/>
        </property>
        <property name="runAsUser">
            <value>System</value>
        </property>
    </bean>
   
   
   
</beans>

Help me… plz

Outcomes