cancel
Showing results for 
Search instead for 
Did you mean: 

Document node in ServiceTask - not found

upforsin
Star Collaborator
Star Collaborator

Hello,

Thanks to the awesome Jeff Potts's tutorials i managed to create a simple workflow which starts when content is added to Draft folder and moves added document to Approved or Rejected folders accordingly to user task output.

Unfortunatelly, it throws an error and says that the 'document' is not found.

I'm using the newest version of Alfresco (6.0)

This is the fragment of my workflow.bpmn20.xml:

<serviceTask id="moveTask" name="Alfresco Move Script Task" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
    <extensionElements>
        <activiti:field name="script">
            <activiti:string>document.move("Accepted");</activiti:string>
        </activiti:field>
    </extensionElements>
</serviceTask>

Why document node has not been defined?

It might be better to use workflow_model variables, but 'userhome' node is working fine so why 'document' node is not?

Thanks in advance,

Mike

PS. Is there a way to simply debug Alfresco repo and list all workflow avaiable variables? (i know about workflow console but it does not seem to have such a capabilities)

howkymike
Alfresco Developer
1 ACCEPTED ANSWER

upforsin
Star Collaborator
Star Collaborator

If anyone had the same problem, here is a workaround:

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

Still, i do not understand why it the document node is not working.

howkymike
Alfresco Developer

View answer in original post

1 REPLY 1

upforsin
Star Collaborator
Star Collaborator

If anyone had the same problem, here is a workaround:

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

Still, i do not understand why it the document node is not working.

howkymike
Alfresco Developer