cancel
Showing results for 
Search instead for 
Did you mean: 

How about getting a previous version of a document?

pde74
Champ in-the-making
Champ in-the-making
Hi,
I'm trying to define a workflow to regress to a previous version of a document.  I've seen in Version Store Design and API  http://wiki.alfresco.com/wiki/Version_Store_Design_and_API#get  that exist a get method to do this; but in a workflow script this function seems to be not supported…

Someone can help me?
1 REPLY 1

davidc
Star Contributor
Star Contributor
We'll continue to expand the javascript api in each release, but if there's a function missing, you can fall back to java in a workflow process definition.

e.g.

  <task-node name="a">
        <task name="a" swimlane="assignee" />
        <transition name="approve" to="approved">
           <action class="my.JavaClass"/>
        </transition>
  </task-node>

class my.JavaClass implements ActionHandler
{
   public execute( ExecutionContext executionContext )
   {
       …
   }

}

If you want access to Alfresco services in your ActionHandler, then follow the pattern in the class AlfrescoJavaScript.java.