11-22-2011 05:02 AM
var infoWorklow= workflow.getAssignedTasks();
var outputRows="";
for each (var task in infoWorklow){
outputRows +="<br>";
outputRows += "<td>"+task.getId() +"</td>";
outputRows += "<td>"+task.getName() +"</td>";
outputRows += "<td>" + task.getProperties() + "</td>";
}
3. Custom Webscript, with FTL
<table cellspacing=0 cellpadding=2>
<#list workflow.completedTasks as t>
<tr>
<td>${t.id}</td>
<td>${t.type}</td>
<td>${t.name}</td>
<td>${t.description}</td>
<td>${t.properties["cm:created"]?datetime}</td>
<td><#if t.properties["bpm:startDate"]?exists>${t.properties["bpm:startDate"]?datetime}<#else><i>None</i></#if></td>
<td><#if t.properties["bpm:dueDate"]?exists>${t.properties["bpm:dueDate"]?datetime}<#else><i>None</i></#if></td>
<td>${t.properties["bpm:priority"]}</td>
<td>${t.properties["bpm:percentComplete"]}</td>
<td>${t.properties["bpm:status"]}</td>
<td>${t.isCompleted?string("Yes", "No")}</td>
<td>${t.properties["sgfwf:montant1"]}</td>
</tr>
</#list>
</table>
<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of a Workflow –>
<model name="sgfwf:workflowModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Custom Workflow Model for Finance</description>
<author>Custom</author>
<version>1.0</version>
<!–
Imports are required to allow references to definitions in other
models
–>
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0"
prefix="d" />
<import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
</imports>
<!– Introduction of new namespaces defined by this model –>
<namespaces>
<namespace uri="http://www.custom.ch/model/workflow/finance/1.0"
prefix="sgfwf" />
</namespaces>
<types>
<type name="sgfwf:submitStart">
<parent>bpm:startTask</parent>
<properties>
<property name="sgfwf:account1">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:centre1">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:genre1">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:montant1">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:libelle1">
<type>d:text</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:account2">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:centre2">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:genre2">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:montant2">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:libelle2">
<type>d:text</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:account3">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:centre3">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:genre3">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:montant3">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:libelle3">
<type>d:text</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:account4">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:centre4">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:genre4">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:montant4">
<type>d:int</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:libelle4">
<type>d:text</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
<property name="sgfwf:approveRejectOutcome">
<type>d:text</type>
<default>Reject</default>
<constraints>
<constraint name="sgfwf:approveRejectOutcomeOptions" type="LIST">
<parameter name="allowedValues">
<list>
<value>Approve</value>
<value>Reject</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
</properties>
<!– To select a user –>
<mandatory-aspects>
<aspect>bpm:assignee</aspect>
</mandatory-aspects>
</type>
<type name="sgfwf:modifyReviewTask">
<parent>sgfwf:submitStart</parent>
</type>
<type name="sgfwf:reviewByBoss">
<parent>sgfwf:submitStart</parent>
</type>
<type name="sgfwf:approvedTask">
<parent>sgfwf:submitStart</parent>
</type>
<type name="sgfwf:rejectedTask">
<parent>sgfwf:submitStart</parent>
</type>
</types>
</model>
11-22-2011 08:33 AM
var infoWorklow= workflow.getAssignedTasks();
var outputRows="";
for each (var task in infoWorklow){
outputRows +="<br>";
outputRows += "<td>"+task.getId() +"</td>";
outputRows += "<td>"+task.getName() +"</td>";
outputRows += "<td>" + task.properties["sgfwf:montant1"] + "</td>";
}
11-22-2011 09:01 AM
<#list results?sort_by(["properties","cm:created"]) as child>
…
<url>${docUrl}</url>
<cifsUrl>\Alfresco${relativePath}</cifsUrl>
<fileName>${child.name}</fileName>
<created>${child.properties["cm:created"]?datetime}</created>
<modified>${child.properties["cm:modified"]?datetime}</modified>
<nodeReference>${child.nodeRef}</nodeReference>
<ticket>${session.ticket}</ticket>
<type>${child.type}</type>
<properties>
<#if child.properties['sg:documentNb']?exists & (child.properties['sg:documentNb']?length !=0)>
<#assign val = "${child.properties['sg:documentNb']?c}"/>
<documentNb>${val}</documentNb>
</#if>
…
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.