Workflow Checkpoint:

- BPM Model (xml & QName definitions)
- Getting / Setting / Updating Task Properties

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3470 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2006-08-08 17:35:50 +00:00
parent 499367c4e9
commit 47833426ca
9 changed files with 891 additions and 59 deletions

View File

@@ -0,0 +1,280 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="bpm:businessprocessmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Business Process Model</description>
<author>Alfresco</author>
<version>1.0</version>
<!-- Imports are required to allow references to definitions in other models -->
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>
<namespaces>
<namespace uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm"/>
</namespaces>
<constraints>
<constraint name="bpm:allowedPriority" type="LIST">
<parameter name="allowedValues">
<!-- TODO: Determine if priority values can be mapped to human-readable strings -->
<list>
<value>1</value>
<value>2</value>
<value>3</value>
</list>
</parameter>
</constraint>
<constraint name="bpm:allowedStatus" type="LIST">
<parameter name="allowedValues">
<!-- TODO: Determine if status values can be mapped to human-readable strings -->
<list>
<value>Not Yet Started</value>
<value>In Progress</value>
<value>On Hold</value>
<value>Cancelled</value>
<value>Completed</value>
</list>
</parameter>
</constraint>
<constraint name="bpm:percentage" type="MINMAX">
<parameter name="minValue"><value>0</value></parameter>
<parameter name="maxValue"><value>100</value></parameter>
</constraint>
</constraints>
<types>
<!-- -->
<!-- Base definition for all Tasks -->
<!-- -->
<type name="bpm:task">
<title>Task</title>
<description>Task</description>
<parent>cm:content</parent>
<properties>
<!-- -->
<!-- Assignment -->
<!-- -->
<!-- Note: Implemented via cm:ownable aspect -->
<!-- -->
<!-- Task Identifier -->
<!-- -->
<property name="bpm:taskId">
<title>Task Identifier</title>
<type>d:long</type>
<protected>true</protected>
</property>
<!-- -->
<!-- Task Dates -->
<!-- -->
<property name="bpm:startDate">
<title>Start Date</title>
<type>d:date</type>
<protected>true</protected>
</property>
<property name="bpm:completionDate">
<title>End Date</title>
<type>d:date</type>
<protected>true</protected>
</property>
<property name="bpm:dueDate">
<title>Due Date</title>
<type>d:date</type>
</property>
<!-- -->
<!-- Task Progress -->
<!-- -->
<property name="bpm:status">
<title>Status</title>
<type>d:text</type>
<protected>true</protected>
<constraints>
<constraint ref="bpm:allowedStatus"/>
</constraints>
</property>
<property name="bpm:priority">
<title>Priority</title>
<type>d:int</type>
<constraints>
<constraint ref="bpm:allowedPriority"/>
</constraints>
</property>
<property name="bpm:percentComplete">
<title>Percentage Complete</title>
<type>d:int</type>
<constraints>
<constraint ref="bpm:percentage"/>
</constraints>
</property>
<!-- -->
<!-- Task Notes -->
<!-- -->
<!-- Note: Implemented via cm:content property : see 'fm:post' -->
</properties>
<associations>
<!-- List of users who may potentially get assigned to the task -->
<association name="bpm:pooledActors">
<title>Pooled Users</title>
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>cm:person</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
<mandatory-aspects>
<aspect>cm:ownable</aspect>
</mandatory-aspects>
</type>
<!-- -->
<!-- The base for all Ad-hoc Tasks as created by Users -->
<!-- -->
<type name="bpm:adhocTask">
<title>Ad-hoc Task</title>
<description>Task assigned by User</description>
<parent>bpm:task</parent>
<mandatory-aspects>
<aspect>cm:attachable</aspect>
</mandatory-aspects>
</type>
<!-- -->
<!-- The base for all Tasks assigned via a Workflow -->
<!-- -->
<type name="bpm:workflowTask">
<title>Workflow Task</title>
<description>Task assigned via Workflow</description>
<parent>bpm:task</parent>
<properties>
<!-- -->
<!-- Task Context -->
<!-- e.g. Space, Document -->
<!-- -->
<property name="bpm:context">
<title>Task Context</title>
<type>d:noderef</type>
</property>
</properties>
<associations>
<association name="bpm:package">
<title>Workflow Package</title>
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>bpm:workflowPackage</class>
<mandatory>true</mandatory>
<many>false</many>
</target>
</association>
</associations>
</type>
<!-- -->
<!-- An Alfresco Space for managing ad-hoc Tasks -->
<!-- -->
<type name="bpm:taskspace">
<title>Task Space</title>
<parent>cm:folder</parent>
</type>
</types>
<aspects>
<!-- -->
<!-- A collection of content routed through a workflow. -->
<!-- -->
<!-- Note: this aspect should be applied to a container such as -->
<!-- a folder, versioned folder or layered folder. -->
<!-- -->
<aspect name="bpm:workflowPackage">
<title>Workflow Package</title>
<properties>
<!-- Items within package that have been marked as complete -->
<property name="bpm:completedItems">
<type>d:noderef</type>
<multiple>true</multiple>
</property>
<!-- TODO: Define properties (replicated from Workflow/Task Engine) for -->
<!-- search within Alfresco e.g. task info, workflow info ... -->
</properties>
<!-- Commentary -->
<!-- Note: Implement tracking of comments via fm:discussable aspect -->
<!-- Note: Haven't made this aspect mandatory as this would force creation -->
<!-- of forum folder against each package, even if there aren't any -->
<!-- comments -->
</aspect>
<!-- Capability for adding a task management space to any entity in the system, -->
<!-- in particular, folders and content -->
<aspect name="bpm:tasks">
<associations>
<child-association name="bpm:tasks">
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>bpm:taskspace</class>
<mandatory>true</mandatory>
<many>false</many>
</target>
<duplicate>false</duplicate>
</child-association>
</associations>
</aspect>
</aspects>
</model>

View File

@@ -3,6 +3,18 @@
<beans>
<!-- -->
<!-- Workflow Model -->
<!-- -->
<bean id="workflow.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/model/bpmModel.xml</value>
</list>
</property>
</bean>
<!-- -->
<!-- Workflow Service Implementation -->
<!-- -->