Hi All and thanks in advance for your help,I am running Alfresco Community Edition 3.2, and I am trying to write a web script to list all workflows. I thought it would look like the script below, but workflow.latestDefinitions throws an exception:Expression workflow.latestDefinitions is undefined on line 14, column 10 in test/listWorkflows.get.html.ftlI've also tried using workflow.allDefinitions but it also throws undefined.Here's what I see in the Workflow Console, so this is what I expected to be returned by latestDefinitions:
id: jbpm$4 , name: jbpm$wcmwf:changerequest , title: Change Request , version: 1
id: jbpm$2 , name: jbpm$wf:adhoc , title: Adhoc Task , version: 1
id: jbpm$6 , name: jbpm$inwf:invitation-nominated , title: Invitation - Nominated , version: 1
id: jbpm$1 , name: jbpm$wf:review , title: Review & Approve , version: 1
id: jbpm$7 , name: jbpm$imwf:invitation-moderated , title: Invitation - Moderated , version: 1
id: jbpm$3 , name: jbpm$wcmwf:submit , title: Web Site Submission , version: 1
id: jbpm$5 , name: jbpm$wcmwf:submitdirect , title: Web Site Submission (Direct) , version: 1
Here is listWorkflows.get.html.ftl:
All active workflows:
<table cellspacing=0 cellpadding=2>
<tr>
<th>ID</th>
<th>Name</th>
<th>Description</th>
<th>Title</th>
<th>Version</th>
<th># active</th>
</tr>
<tr>
<td colspan="6"><hr/></td>
</tr>
<#list workflow.latestDefinitions as def>
<tr>
<td>${def.id}</td>
<td>${def.description}</td>
<td>${def.name}</td>
<td>${def.title}</td>
<td>${def.version}</td>
<td>${def.activeInstances}</td>
</tr>
</#list>
</table>
What did I do wrong?