cancel
Showing results for 
Search instead for 
Did you mean: 

While moving article on approval

naval
Champ in-the-making
Champ in-the-making
I am moving content to the other folder on approval:

<task-node name="completed">
      <task name="wfat:myCompleteReviewTask" swimlane="initiator" />
      <transition name="" to="end">
      <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
     <runas>admin</runas>
            <script>
         <variable name="bpm_package" access="read" />
            <expression>
            
            var myRoot=bpm_context.parent;
            var destination = myRoot.childByNamePath("Test_Folder");
            for (var i=0; i &lt; bpm_package.children.length; i++)
            {
                                var srcPath=bpm_package.children.displayPath;
                                var destPath=srcPath.replace("Current_Path_Str","Destination_path_str");
                                var destPathStr=destPath.replace("/Company Home/","");
            var destFolder = companyhome.childByNamePath(destPathStr);
            bpm_package.children.move(destFolder);
            }
            </expression>
            </script>
         </action>
    </transition>
   </task-node>

I am getting Log as:
WARN : org.apache.myfaces.shared_impl.util.LocaleUtils - Locale name in faces-config.xml null or empty, setting locale to default locale : en_US
WARN : org.springframework.beans.GenericTypeAwarePropertyDescriptor - Invalid JavaBean property 'baseUrl' being accessed! Ambiguous write methods found next to actually used [public void org.alfresco.wcm.client.impl.WebScriptCallerImpl.setBaseUrl(java.net.URI)]: [public void org.alfresco.wcm.client.impl.WebScriptCallerImpl.setBaseUrl(java.lang.String) throws java.net.URISyntaxException]
20:31:54,724 User:admin WARN  [repo.dictionary.DictionaryDAO] Type not found: {http://www.alfresco.org/model/workflow/wfaTest}submitReviewTask
1 REPLY 1

mitpatoliya
Star Collaborator
Star Collaborator
Could you post your full process defination and workflow model files.
as from error it looks like the task called
submitReviewTask
is not defined in you workflow model where you are using it in your process-definition file.