Page 1 of 1
script that distributes files in different folders from workflow
Posted: Wed Jul 04, 2018 4:25 am
by jeyhber
You can help me with a script that distributes files to me in different folders, called files with an attribute assigned with the name "type" in the template and that moves them to different folders when a transition is executed in the workflow.
Re: script that distributes files in different folders from workflow
Posted: Mon Jul 16, 2018 3:55 pm
by agaspa
Hi Jeyhber,
using the foreach instruction in a script you can cycle throu the documents involved in a task/transition, then using the move tool you can move them in a different fodler
examples:
Code: Select all
#foreach( $doc in $documents )
$DocTool.move($doc, "InApprovazione")
#end
#foreach( $doc in $documents )
$DocTool.move($doc, "/LogicalDOC Mobile/demo/Approvati")
#end
The getValue can be use to get the vale of a field, then yous can use it combined with the if and set instructions
See also the Javadoc documentation of
AbstractDocument and
ExtensibleObject classes
For a custom consulting however I suggest you to contact the sales service of LogicalDOC, since the Workflow is an Enterprise feature
bR.
aLEX