cancel
Showing results for 
Search instead for 
Did you mean: 

Script to check out a content

anselmo_abadia
Champ in-the-making
Champ in-the-making
Hi, I'm using an advanced workflow in Alfresco and, when a task begins, I need to check out the resource associated to the workflow. Later, when the task finishes, I need to checkin it.

In my workflow definition, I want something like this:


   <task-node name="toModified">
      <task name="wf:toModified" swimlane="initiator">
          <event type="task-create">
                <script>
         document.checkout();
                </script>
            </event>
      
      </task>
      <transition to="toReview" name="edit"></transition>
   </task-node>


What do I do to check out a content?
Thanks, Anselmo
1 REPLY 1

jbarmash
Champ in-the-making
Champ in-the-making
Inside the workflow as you are showing, you are programming in JavaScript. 

Here is the relevant API:
   http://wiki.alfresco.com/wiki/JavaScript_API#Check_in.2FCheck_out_API