AnsweredAssumed Answered

Move files workflow

Question asked by msvoren on Oct 21, 2008
Latest reply on Dec 2, 2008 by msvoren
I need to create workflow which will be initiated with rules. Workflow simply needs to move document to another folder. I need little help. Here is what I have so far:


<model name="owf:MoveData" xmlns="">
   <import uri="" prefix="d"/>
   <import uri="" prefix="bpm"/>
   <import uri="" prefix="wf" />
   <import uri="" prefix="cm" />

<namespaces>    <namespace uri="oawf" prefix="owf"/> </namespaces>

   <type name="owf:startMove">
           <property name="owf:whereTo">


<process-definition xmlns="" name="owf:moveFiles">
   <swimlane name="initiator"/>
   <start-state name="start">
      <task name="owf:startMove" swimlane="initiator"/>
      <transition name="" to="end">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
      var dest = companyhome.childByNamePath("Dest");
<end-state name="end"/>

Rule script which i execute when file comes to folder:

          var workflow = actions.create("start-workflow");
          workflow.parameters.workflowName = "jbpm$owf:moveFiles"; 

When executed, i get:

org.alfresco.scripts.ScriptException: Failed to execute script 'workspace://SpacesStore/a8a9950c-939c-11dd-9e2e-5be0a253008d': Failed to execute script 'workspace://SpacesStore/a8a9950c-939c-11dd-9e2e-5be0a253008d': Wrapped org.springframework.orm.hibernate3.HibernateSystemException: null index column for collection: org.jbpm.graph.def.ProcessDefinition.definitions; nested exception is org.hibernate.HibernateException: null index column for collection: org.jbpm.graph.def.ProcessDefinition.definitions (AlfrescoScript#3)
What am I doing wrong? Thanks