02-19-2007 08:02 AM
02-19-2007 10:45 AM
02-19-2007 11:16 AM
02-19-2007 11:21 AM
02-19-2007 12:38 PM
02-23-2007 04:19 AM
<?xml version="1.0" encoding="UTF-8"?>
<model name="wf:workflowmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<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>
<namespaces>
<namespace uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf"/>
</namespaces>
<types>
<!– –>
<!– Basic Review & Approve Tasks –>
<!– –>
<type name="wf:submitReviewTask">
<parent>bpm:startTask</parent>
<mandatory-aspects>
<aspect>bpm:assignee</aspect>
</mandatory-aspects>
</type>
<type name="wf:reviewTask">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>edit_package_item_actions</default>
</property>
</overrides>
<mandatory-aspects>
<aspect>wf:from</aspect>
</mandatory-aspects>
</type>
<type name="wf:approvedTask">
<parent>bpm:workflowTask</parent>
<mandatory-aspects>
<aspect>bpm:assignee</aspect>
<aspect>wf:from</aspect>
</mandatory-aspects>
</type>
<type name="wf:rejectedTask">
<parent>bpm:workflowTask</parent>
<mandatory-aspects>
<aspect>bpm:assignee</aspect>
<aspect>wf:from</aspect>
</mandatory-aspects>
</type>
<!– –>
<!– Adhoc Tasks –>
<!– –>
<type name="wf:submitAdhocTask">
<parent>bpm:startTask</parent>
<properties>
<property name="wf:notifyMe">
<type>d:boolean</type>
<default>false</default>
</property>
</properties>
<mandatory-aspects>
<aspect>bpm:assignee</aspect>
</mandatory-aspects>
</type>
<type name="wf:adhocTask">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageActionGroup">
<default>add_package_item_actions</default>
</property>
<property name="bpm:packageItemActionGroup">
<default>edit_package_item_actions</default>
</property>
</overrides>
</type>
<type name="wf:completedAdhocTask">
<parent>bpm:workflowTask</parent>
</type>
</types>
<aspects>
<aspect name="wf:from">
<properties>
<property name="wf:from">
<type>d:noderef</type>
</property>
</properties>
</aspect>
</aspects>
</model>
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:review">
<swimlane name="initiator" />
<start-state name="start">
<task name="wf:submitReviewTask" swimlane="initiator" >
<event type="task-end">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<expression>wf_from = initiator.properties['cm:userName'];</expression>
<variable name="wf_from" access="write"/>
</script>
</action>
</event>
</task>
<transition name="" to="review" />
</start-state>
<swimlane name="reviewer">
<assignment actor-id="#{bpm_assignee.properties['cm:userName']}" />
</swimlane>
<task-node name="review">
<task name="wf:reviewTask" swimlane="reviewer">
<event type="task-create">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
</script>
</action>
</event>
<event type="task-end">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<expression>wf_from = bpm_assignee.properties['cm:userName'];</expression>
<variable name="wf_from" access="write"/>
</script>
</action>
</event>
</task>
<transition name="reject" to="rejected" />
<transition name="approve" to="approved" />
</task-node>
<task-node name="rejected">
<task name="wf:rejectedTask" swimlane="initiator" />
<transition name="" to="end" />
</task-node>
<task-node name="approved">
<task name="wf:approvedTask" swimlane="initiator" />
<transition name="" to="end" />
</task-node>
<end-state name="end" />
</process-definition>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<h:outputText value="#{msg.no_tasks}" rendered="#{empty WorkflowBean.tasksToDo}" />
<a:richList id="tasks-todo-list" viewMode="details" value="#{WorkflowBean.tasksToDo}" var="r"
styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow"
altRowStyleClass="recordSetRowAlt" width="100%" pageSize="10"
initialSortColumn="created" initialSortDescending="true"
rendered="#{not empty WorkflowBean.tasksToDo}">
<%– Primary column for details view mode –%>
<a:column id="col1" primary="true" width="200" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col1-sort" label="#{msg.description}" value="name" mode="case-insensitive" styleClass="header"/>
</f:facet>
<f:facet name="small-icon">
<a:actionLink id="col1-act1" value="#{r['bpm:description']}" image="/images/icons/workflow_task.gif" showLink="false"
actionListener="#{DialogManager.setupParameters}" action="dialog:manageTask">
<f:param name="id" value="#{r.id}" />
</a:actionLink>
</f:facet>
<a:actionLink id="col1-act2" value="#{r['bpm:description']}" actionListener="#{DialogManager.setupParameters}"
action="dialog:manageTask">
<f:param name="id" value="#{r.id}" />
</a:actionLink>
</a:column>
<%– Task type –%>
<a:column id="col2" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col2-sort" label="#{msg.type}" value="name" mode="case-insensitive" styleClass="header"/>
</f:facet>
<h:outputText id="col2-txt" value="#{r.name}" />
</a:column>
<%– Task id column –%>
<a:column id="col3" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col3-sort" label="#{msg.id}" value="bpm:taskId" styleClass="header"/>
</f:facet>
<h:outputText id="col3-txt" value="#{r['bpm:taskId']}" />
</a:column>
<%– Created Date column –%>
<a:column id="col4" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col4-sort" label="#{msg.created}" value="created" styleClass="header"/>
</f:facet>
<h:outputText id="col4-txt" value="#{r.created}">
<a:convertXMLDate type="both" pattern="#{msg.date_time_pattern}" />
</h:outputText>
</a:column>
<%– Due date column –%>
<a:column id="col5" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col5-sort" label="#{msg.due_date}" value="bpm:dueDate" styleClass="header"/>
</f:facet>
<h:outputText id="col5-txt" value="#{r['bpm:dueDate']}">
<a:convertXMLDate type="both" pattern="#{msg.date_pattern}" />
</h:outputText>
</a:column>
<%– Status column –%>
<a:column id="col6" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col6-sort" label="#{msg.status}" value="bpm:status" styleClass="header"/>
</f:facet>
<h:outputText id="col6-txt" value="#{r['bpm:status']}" />
</a:column>
<%– Priority column –%>
<a:column id="col7" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col7-sort" label="#{msg.priority}" value="bpm:priority" styleClass="header"/>
</f:facet>
<h:outputText id="col7-txt" value="#{r['bpm:priority']}" />
</a:column>
<%– Actions column –%>
<a:column id="col8" actions="true" style="padding:2px;text-align:left">
<f:facet name="header">
<h:outputText id="col8-txt" value="#{msg.actions}"/>
</f:facet>
<r:actions id="col8-actions" value="dashlet_todo_actions" context="#{r}" showLink="false"
styleClass="inlineAction" />
</a:column>
<%– From column –%>
<a:column id="col2_test" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col2_test-sort" label="#{msg.type}" value="name" mode="case-insensitive" styleClass="header"/>
</f:facet>
<h:outputText id="col2_test-txt" value="#{r['wf:from']}" />
</a:column>
<a:dataPager id="pager" styleClass="pager" />
</a:richList>
02-23-2007 05:50 AM
02-23-2007 06:22 AM
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.