cancel
Showing results for 
Search instead for 
Did you mean: 

javascript code inside an activiti workflow

davidedge
Champ in-the-making
Champ in-the-making
Hi everybody,
i need to add a javascript code (in particulary javascript API) in my activiti wf. This code must implement a tag-search in Alfresco repository.

 <serviceTask id="alfrescoScripttask1" name="fornisce elenco aziende"     activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
       <extensionElements>
          <activiti:field name="script">
                <activiti:string>  ?????  </activiti:string>
           </activiti:field>
      </extensionElements>
</serviceTask>


How can i do??
1 REPLY 1

kaynezhang
World-Class Innovator
World-Class Innovator
search for all nodes with the given tag applied

var store = "workspace://SpacesStore";
var tag = "yourtag";
var taggedNodes = search.tagSearch(store, tag);
for (var i=0; i < taggedNodes.length; i++)
{
taggedNodes *****
}