08-01-2014 06:09 AM
08-01-2014 06:23 AM
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="apaVPAprocess" name="APA/VPA Freigabe Workflow" isExecutable="true">
<documentation>v.1.0</documentation>
<startEvent id="startEvent" name="Alfresco start" activiti:formKey="ktbwf:submitAPAtask"></startEvent>
<userTask id="qp_assignReviewTask" name="assign review" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="ktbwf:assignApaTask">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate;
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
if (typeof bpm_comment != 'undefined') task.setVariable('bpm_comment', bpm_comment);
]]></activiti:string>
</activiti:field>
</activiti:taskListener>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[execution.setVariable('bpm_assignee', task.getVariable('bpm_assignee'));
execution.setVariable('bpm_comment', task.getVariable('bpm_comment'));
execution.setVariable('abteilungsleiter', person);
execution.setVariable('bpm_dueDate', task.dueDate);
execution.setVariable('bpm_priority', task.priority);]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="abtL_reviewTask" name="abtl_review" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="ktbwf:reviewTask">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate;
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
if (typeof bpm_comment != 'undefined') task.setVariable('bpm_comment', bpm_comment);
]]></activiti:string>
</activiti:field>
</activiti:taskListener>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[execution.setVariable('av_kab', person);
execution.setVariable('bpm_comment', task.getVariable('bpm_comment'));
execution.setVariable('wf_ReviewOutcome', task.getVariable('wf_ReviewOutcome'));]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="av_reviewTask" name="av_review" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="ktbwf:reviewTask">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate;
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
if (typeof bpm_comment != 'undefined') task.setVariable('bpm_comment', bpm_comment);]]></activiti:string>
</activiti:field>
</activiti:taskListener>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[execution.setVariable('bpm_comment', task.getVariable('bpm_comment'));
execution.setVariable('wf_ReviewOutcome', task.getVariable('wf_ReviewOutcome'));]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="documentsApproved" name="approved" activiti:formKey="ktbwf:approveTask">
<documentation>Das Dokument wurde überprüft und genehmigt.
/ The document was reviewed and approved.</documentation>
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate;
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
if (typeof bpm_comment != 'undefined') task.setVariable('bpm_comment', bpm_comment);]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="flow1" name="1" sourceRef="startEvent" targetRef="qp_assignReviewTask"></sequenceFlow>
<sequenceFlow id="flow2" name="2" sourceRef="qp_assignReviewTask" targetRef="abtL_reviewTask"></sequenceFlow>
<exclusiveGateway id="reviewDecision1" name="Exclusive Gateway"></exclusiveGateway>
<sequenceFlow id="flow3" name="3" sourceRef="abtL_reviewTask" targetRef="reviewDecision1"></sequenceFlow>
<sequenceFlow id="flow4" name="4" sourceRef="reviewDecision1" targetRef="av_reviewTask">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${wf_ReviewOutcome == 'Approve'}]]></conditionExpression>
</sequenceFlow>
<exclusiveGateway id="reviewDecision2" name="Exclusive Gateway"></exclusiveGateway>
<sequenceFlow id="flow6" name="6" sourceRef="av_reviewTask" targetRef="reviewDecision2"></sequenceFlow>
<sequenceFlow id="flow7" name="7" sourceRef="reviewDecision2" targetRef="documentsApproved">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${wf_ReviewOutcome == 'Approve'}]]></conditionExpression>
</sequenceFlow>
<endEvent id="endEvent" name="End"></endEvent>
<sequenceFlow id="flow10" name="10" sourceRef="documentsApproved" targetRef="endEvent"></sequenceFlow>
<userTask id="rejected" name="rejected" activiti:formKey="ktbwf:rejectedTask">
<documentation>Das Dokument wurde überprüft und abgelehnt.
/ The document was reviewed and rejected.</documentation>
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate;
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
if (typeof bpm_comment != 'undefined') task.setVariable('bpm_comment', bpm_comment);]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="flow5" name="5" sourceRef="reviewDecision1" targetRef="rejected">
<!–conditionExpression xsi:type="tFormalExpression"><![CDATA[${wf_ReviewOutcome == 'Reject'}]]></conditionExpression–>
</sequenceFlow>
<sequenceFlow id="flow8" name="8" sourceRef="reviewDecision2" targetRef="rejected">
<!–conditionExpression xsi:type="tFormalExpression"><![CDATA[${wf_ReviewOutcome == 'Reject'}]]></conditionExpression–>
</sequenceFlow>
<sequenceFlow id="flow9" name="9" sourceRef="rejected" targetRef="qp_assignReviewTask"></sequenceFlow>
</process>
</definitions>
<!– Activiti Review and Approve Workflow Definition
Custom froms:
ktbwf:submitAPAtask
ktbwf:assignApaTask
ktbwf:reviewTask
ktbwf:reviewTask
ktbwf:approveTask
ktbwf:rejectedTask
–>
<config evaluator="task-type" condition="ktbwf:submitAPAtask">
<forms>
<form>
<field-visibility>
<show id="message" />
<show id="bpm:dueDate" />
<show id="bpm:priority" />
<show id="wf:workDescription" />
<show id="packageItems" />
<show id="bpm:assignee" />
<show id="bpm:comment" />
<show id="transitions" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.general" />
<set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="assignee" appearance="title" label-id="workflow.set.assignee" />
<set id="work" appearance="title" label-id="workflow.set.work" />
<set id="other" appearance="title" label-id="workflow.set.other" />
<set id="response" appearance="title" label-id="workflow.set.response" />
<field id="message" label-id="workflow.field.message">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="bpm:dueDate" label-id="workflow.field.due" set="info" />
<field id="bpm:priority" label-id="workflow.field.priority" set="info">
<control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
</field>
<field id="bpm:assignee" label-id="workflow.field.assign_to" set="assignee" />
<field id="packageItems" set="items" />
<field id="wf:workDescription" set="work">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="bpm:comment" label-id="workflow.field.comment" set="response">
<control template="/org/alfresco/components/form/controls/textarea.ftl" />
</field>
<field id="transitions" set="response" />
</appearance>
</form>
</forms>
</config>
<config evaluator="task-type" condition="ktbwf:assignApaTask">
<forms>
<form>
<field-visibility>
<show id="message" />
<show id="bpm:dueDate" />
<show id="bpm:priority" />
<show id="wf:workDescription" />
<show id="packageItems" />
<show id="bpm:assignee" />
<show id="bpm:comment" />
<show id="abtlReviewOutcome" />
<show id="transitions" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.general" />
<set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="assignee" appearance="title" label-id="workflow.set.assignee" />
<set id="work" appearance="title" label-id="workflow.set.work" />
<set id="other" appearance="title" label-id="workflow.set.other" />
<set id="response" appearance="title" label-id="workflow.set.response" />
<field id="message" label-id="workflow.field.message">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="bpm:assignee" label-id="workflow.field.assign_to" set="assignee" />
<!–field id="packageItems" set="items" /–>
<field id="wf:workDescription" set="work">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="bpm:comment" label-id="workflow.field.comment" set="response">
<control template="/org/alfresco/components/form/controls/textarea.ftl" />
</field>
<field id="transitions" set="response" />
</appearance>
</form>
</forms>
</config>
<config evaluator="task-type" condition="ktbwf:reviewTask">
<forms>
<form>
<field-visibility>
<show id="message" />
<show id="bpm:dueDate" />
<show id="bpm:priority" />
<show id="wf:workDescription" />
<show id="packageItems" />
<show id="bpm:assignee" />
<show id="bpm:comment" />
<show id="avReviewOutcome" />
<show id="transitions" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.general" />
<set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="assignee" appearance="title" label-id="workflow.set.assignee" />
<set id="work" appearance="title" label-id="workflow.set.work" />
<set id="other" appearance="title" label-id="workflow.set.other" />
<set id="response" appearance="title" label-id="workflow.set.response" />
<field id="message" label-id="workflow.field.message">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="bpm:dueDate" label-id="workflow.field.due" set="info" read-only="true">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="bpm:priority" label-id="workflow.field.priority"
set="info" read-only="true">
<control
template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
</field>
<field id="packageItems" set="items" />
<field id="wf:workDescription" set="work">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="bpm:assignee" label-id="workflow.field.assign_to" set="assignee" />
<field id="bpm:comment" label-id="workflow.field.comment" set="response">
<control template="/org/alfresco/components/form/controls/textarea.ftl" />
</field>
<field id="wf_ReviewOutcome" set="response" />
<field id="transitions" set="response" />
</appearance>
</form>
</forms>
</config>
<config evaluator="task-type" condition="ktbwf:approveTask">
<forms>
<form>
<field-visibility>
<show id="message" />
<show id="bpm:dueDate" />
<show id="bpm:priority" />
<show id="wf:workDescription" />
<show id="packageItems" />
<show id="bpm:comment" />
<show id="transitions" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.general" />
<set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="work" appearance="title" label-id="workflow.set.work" />
<set id="other" appearance="title" label-id="workflow.set.other" />
<set id="response" appearance="title" label-id="workflow.set.response" />
<field id="message" label-id="workflow.field.message">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="bpm:priority" label-id="workflow.field.priority"
set="info" read-only="true">
<control
template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
</field>
<field id="bpm:dueDate" set="info" label-id="workflow.field.due" read-only="true">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="packageItems" set="items" />
<field id="wf:workDescription" set="work">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="bpm:comment" label-id="workflow.field.comment"
set="response">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="transitions" set="response" />
</appearance>
</form>
</forms>
</config>
<config evaluator="task-type" condition="ktbwf:rejectedTask">
<forms>
<form>
<field-visibility>
<show id="message" />
<show id="bpm:dueDate" />
<show id="bpm:priority" />
<show id="wf:workDescription" />
<show id="packageItems" />
<show id="bpm:comment" />
<show id="transitions" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.general" />
<set id="info" appearance=""
template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="work" appearance="title" label-id="workflow.set.work" />
<set id="other" appearance="title" label-id="workflow.set.other" />
<set id="response" appearance="title" label-id="workflow.set.response" />
<field id="message" label-id="workflow.field.message">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="bpm:priority" label-id="workflow.field.priority"
set="info" read-only="true">
<control
template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
</field>
<field id="bpm:dueDate" set="info" label-id="workflow.field.due" read-only="true">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="packageItems" set="items" />
<field id="wf:workDescription" set="work">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="bpm:comment" label-id="workflow.field.comment"
set="response">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="transitions" set="response" />
</appearance>
</form>
</forms>
</config>
<?xml version="1.0" encoding="UTF-8"?>
<!– APA Workflow custom Model –>
<!– Note: This model is pre-configured to load at startup of the Repository. So, all custom –>
<!– types and aspects added here will automatically be registered –>
<model name="ktb:apaModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>APA Workflow Model</description>
<author>Karl Keller</author>
<version>1.0</version>
<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>
<!– Introduction of new namespaces defined by this model –>
<namespaces>
<namespace uri="http://ktbernt.de/model/content/1.0" prefix="ktb"/>
</namespaces>
<types>
<type name="ktbwf:submitAPAtask">
<parent>bpm:startTask</parent>
</type>
<type name="ktbwf:assignApaTask">
<parent>bpm_workflowTask</parent>
<!–mandatory-aspects>
<aspect>bpm:assignee</aspect>
</mandatory-aspects–>
</type>
<type name="ktbwf:reviewTask">
<parent>bpm:activitiOutcomeTask</parent>
<properties>
<property name="wf:reviewOutcome">
<type>d:text</type>
<default>Approve</default>
<constraints>
<constraint name="wf:reviewOutcomeOptions" type="LIST">
<parameter name="allowedValues">
<list>
<value>Approve</value>
<value>Reject</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
</properties>
</type>
<type name="ktbwf:approveTask">
<parent>ktbwf:activitiReviewTask</parent>
</type>
<type name="ktbwf:rejectTask">
<parent>bpm:workflowTask</parent>
</type>
</types>
</model>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– Registration of new models –>
<bean id="apaworkflow.workflowBootstrap" parent="workflowDeployer">
<property name="workflowDefinitions">
<list>
<props>
<prop key="engineId">activiti</prop>
<prop key="location">alfresco/extension/workflow/activiti-apa-worklfow-bpmn20.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">false</prop>
</props>
</list>
</property>
<property name="models">
<list>
<value>alfresco/extension/activiti-apa-worklfowModel.xml</value>
</list>
</property>
<property name="labels">
<list>
<value>alfresco/extension/activiti-apa-worklfow-messages</value>
</list>
</property>
</bean>
</beans>
# For APA VPW workflow
activitiAdhocTimer.workflow.title=APA/VPA Freigabe Workflow
08-01-2014 09:09 AM
08-01-2014 09:50 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.