05-19-2014 04:23 AM
05-19-2014 06:41 AM
<process id="<id>" name="<name>">
<extensionElements>
<activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
<activiti:field name="script">
<activiti:string>
for(var j=0; j<bpm_package.children.length; j++){
bpm_package.children[j].properties["preifx:status"]="In Review";
bpm_package.children[j].save();
}
</activiti:string>
</activiti:field>
</activiti:executionListener>
</extensionElements>
<userTask id="<id>" name="<name>" activiti:formKey="<formKey>">
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if(task.getVariableLocal('reviewBNOutcome') == 'Approve') {
for(var j=0; j<bpm_package.children.length; j++){
bpm_package.children[j].properties["preifx:status"]="Approved";
bpm_package.children[j].save();
}
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
05-19-2014 08:54 AM
05-19-2014 09:00 AM
05-19-2014 09:54 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: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://alfresco.org">
<process isExecutable="true" id="activitiAdhoc" name="Adhoc Activiti Process">
<startEvent id="start"
activiti:formKey="wf:submitAdhocTask" />
<sequenceFlow id='flow1'
sourceRef='start'
targetRef='adhocTask' />
<userTask id="adhocTask" name="Adhoc Task"
activiti:formKey="wf:adhocTask">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${bpm_assignee.properties.userName}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id='flow2'
sourceRef='adhocTask'
targetRef='verifyTaskDone' />
<userTask id="verifyTaskDone" name="Verify Adhoc Task Completed."
activiti:formKey="wf:completedAdhocTask" >
<documentation>
Verify the task was completed.
</documentation>
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
if (wf_notifyMe)
{
var mail = actions.create("mail");
mail.parameters.to = initiator.properties.email;
mail.parameters.subject = "Adhoc Task " + bpm_workflowDescription;
mail.parameters.from = bpm_assignee.properties.email;
mail.parameters.text = "It's done";
mail.execute(bpm_package);
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id='flow3' sourceRef='verifyTaskDone'
targetRef='theEnd' />
<endEvent id="theEnd" />
</process>
<process id="WorkflowDesc" name="Workflow Description">
<extensionElements>
<activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
<activiti:field name="script">
<activiti:string>
for(var j=0; j<bpm_package.children.length; j++){
bpm_package.children[j].properties["preifx:status"]="In Review";
bpm_package.children[j].save();
}
</activiti:string>
</activiti:field>
</activiti:executionListener>
</extensionElements>
<userTask id="TaskDesc" name="Task Desc" activiti:formKey="wf:completedAdhocTask">
<extensionElements>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if(task.getVariableLocal('reviewBNOutcome') == 'Approve') {
for(var j=0; j<bpm_package.children.length; j++){
bpm_package.children[j].properties["preifx:status"]="Approved";
bpm_package.children[j].save();
}
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
</process>
<!– Graphical representaion of diagram –>
<bpmndi:BPMNDiagram id="BPMNDiagram_activitiAdhoc">
<bpmndi:BPMNPlane bpmnElement="activitiAdhoc" id="BPMNPlane_activitiAdhoc">
<bpmndi:BPMNShape bpmnElement="start"
id="BPMNShape_start">
<omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="adhocTask"
id="BPMNShape_adhocTask">
<omgdc:Bounds height="55" width="105" x="130"
y="190"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="verifyTaskDone"
id="BPMNShape_verifyTaskDone">
<omgdc:Bounds height="55" width="105" x="290"
y="190"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="theEnd"
id="BPMNShape_theEnd">
<omgdc:Bounds height="35" width="35" x="455" y="200"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="65" y="217"></omgdi:waypoint>
<omgdi:waypoint x="130" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="235" y="217"></omgdi:waypoint>
<omgdi:waypoint x="290" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="395" y="217"></omgdi:waypoint>
<omgdi:waypoint x="455" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
<bean id="workflowBootstrap" parent="workflowDeployer">
<!– Activiti Review workflow definition –>
<props>
<prop key="engineId">activiti</prop>
<prop key="location">alfresco/workflow/review.bpmn20.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">false</prop>
</props>
05-20-2014 01:41 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: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://alfresco.org">
<process isExecutable="true" id="activitiAdhoc" name="Adhoc Activiti Process">
<startEvent id="start"
activiti:formKey="wf:submitAdhocTask" />
<extensionElements>
<activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
<activiti:field name="script">
<activiti:string>
for(var j=0; j<bpm_package.children.length; j++){
bpm_package.children[j].properties["<customStatusProperty>"]="In Review";
bpm_package.children[j].save();
}
</activiti:string>
</activiti:field>
</activiti:executionListener>
</extensionElements>
<sequenceFlow id='flow1'
sourceRef='start'
targetRef='adhocTask' />
<userTask id="adhocTask" name="Adhoc Task"
activiti:formKey="wf:adhocTask">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${bpm_assignee.properties.userName}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id='flow2'
sourceRef='adhocTask'
targetRef='verifyTaskDone' />
<userTask id="verifyTaskDone" name="Verify Adhoc Task Completed."
activiti:formKey="wf:completedAdhocTask" >
<documentation>
Verify the task was completed.
</documentation>
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
if (wf_notifyMe)
{
var mail = actions.create("mail");
mail.parameters.to = initiator.properties.email;
mail.parameters.subject = "Adhoc Task " + bpm_workflowDescription;
mail.parameters.from = bpm_assignee.properties.email;
mail.parameters.text = "It's done";
mail.execute(bpm_package);
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
for(var j=0; j<bpm_package.children.length; j++){
bpm_package.children[j].properties["<customStatusProperty>"]="Approved";
bpm_package.children[j].save();
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id='flow3' sourceRef='verifyTaskDone'
targetRef='theEnd' />
<endEvent id="theEnd" />
</process>
<!– Graphical representaion of diagram –>
<bpmndi:BPMNDiagram id="BPMNDiagram_activitiAdhoc">
<bpmndi:BPMNPlane bpmnElement="activitiAdhoc" id="BPMNPlane_activitiAdhoc">
<bpmndi:BPMNShape bpmnElement="start"
id="BPMNShape_start">
<omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="adhocTask"
id="BPMNShape_adhocTask">
<omgdc:Bounds height="55" width="105" x="130"
y="190"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="verifyTaskDone"
id="BPMNShape_verifyTaskDone">
<omgdc:Bounds height="55" width="105" x="290"
y="190"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="theEnd"
id="BPMNShape_theEnd">
<omgdc:Bounds height="35" width="35" x="455" y="200"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="65" y="217"></omgdi:waypoint>
<omgdi:waypoint x="130" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="235" y="217"></omgdi:waypoint>
<omgdi:waypoint x="290" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="395" y="217"></omgdi:waypoint>
<omgdi:waypoint x="455" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
<customStatusProprty>
with your custom model property or some property to save the status.<prop key="redeploy">true</prop>
in corrresponding bpmn20.xml entry i.e
<props>
<prop key="engineId">activiti</prop>
<prop key="location">alfresco/workflow/adhoc.bpmn20.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">false</prop>
</props>
05-19-2014 10:14 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: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://alfresco.org">
<process isExecutable="true" id="activitiAdhoc" name="Adhoc Activiti Process">
<startEvent id="start"
activiti:formKey="wf:submitAdhocTask" />
<sequenceFlow id='flow1'
sourceRef='start'
targetRef='adhocTask' />
<userTask id="adhocTask" name="Adhoc Task"
activiti:formKey="wf:adhocTask">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${bpm_assignee.properties.userName}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id='flow2'
sourceRef='adhocTask'
targetRef='verifyTaskDone' />
<userTask id="verifyTaskDone" name="Verify Adhoc Task Completed."
activiti:formKey="wf:completedAdhocTask" >
<documentation>
Verify the task was completed.
</documentation>
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
if (wf_notifyMe)
{
var mail = actions.create("mail");
mail.parameters.to = initiator.properties.email;
mail.parameters.subject = "Adhoc Task " + bpm_workflowDescription;
mail.parameters.from = bpm_assignee.properties.email;
mail.parameters.text = "It's done";
mail.execute(bpm_package);
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id='flow3' sourceRef='verifyTaskDone'
targetRef='theEnd' />
<endEvent id="theEnd" />
</process>
<process id="WorkflowDesc" name="Workflow Description">
<extensionElements>
<activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
<activiti:field name="script">
<activiti:string>
for(var j=0; j<bpm_package.children.length; j++){
bpm_package.children[j].properties["preifx:status"]="In Review";
bpm_package.children[j].save();
}
</activiti:string>
</activiti:field>
</activiti:executionListener>
</extensionElements>
<userTask id="TaskDesc" name="Task Desc" activiti:formKey="wf:completedAdhocTask">
<extensionElements>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if(task.getVariableLocal('reviewBNOutcome') == 'Approve') {
for(var j=0; j<bpm_package.children.length; j++){
bpm_package.children[j].properties["preifx:status"]="Approved";
bpm_package.children[j].save();
}
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
</process>
<!– Graphical representaion of diagram –>
<bpmndi:BPMNDiagram id="BPMNDiagram_activitiAdhoc">
<bpmndi:BPMNPlane bpmnElement="activitiAdhoc" id="BPMNPlane_activitiAdhoc">
<bpmndi:BPMNShape bpmnElement="start"
id="BPMNShape_start">
<omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="adhocTask"
id="BPMNShape_adhocTask">
<omgdc:Bounds height="55" width="105" x="130"
y="190"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="verifyTaskDone"
id="BPMNShape_verifyTaskDone">
<omgdc:Bounds height="55" width="105" x="290"
y="190"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="theEnd"
id="BPMNShape_theEnd">
<omgdc:Bounds height="35" width="35" x="455" y="200"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="65" y="217"></omgdi:waypoint>
<omgdi:waypoint x="130" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="235" y="217"></omgdi:waypoint>
<omgdi:waypoint x="290" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="395" y="217"></omgdi:waypoint>
<omgdi:waypoint x="455" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
<!– Activiti Parallel Review workflow definition –>
<props>
<prop key="engineId">activiti</prop>
<prop key="location">alfresco/workflow/parallel-review.bpmn20.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">true</prop>
</props>
05-20-2014 01:47 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: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://alfresco.org">
<process isExecutable="true" id="activitiAdhoc" name="Adhoc Activiti Process">
<startEvent id="start"
activiti:formKey="wf:submitAdhocTask" />
<extensionElements>
<activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
<activiti:field name="script">
<activiti:string>
for(var j=0; j<bpm_package.children.length; j++){
bpm_package.children[j].properties["<customStatusProperty>"]="In Review";
bpm_package.children[j].save();
}
</activiti:string>
</activiti:field>
</activiti:executionListener>
</extensionElements>
<sequenceFlow id='flow1'
sourceRef='start'
targetRef='adhocTask' />
<userTask id="adhocTask" name="Adhoc Task"
activiti:formKey="wf:adhocTask">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${bpm_assignee.properties.userName}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id='flow2'
sourceRef='adhocTask'
targetRef='verifyTaskDone' />
<userTask id="verifyTaskDone" name="Verify Adhoc Task Completed."
activiti:formKey="wf:completedAdhocTask" >
<documentation>
Verify the task was completed.
</documentation>
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
if (wf_notifyMe)
{
var mail = actions.create("mail");
mail.parameters.to = initiator.properties.email;
mail.parameters.subject = "Adhoc Task " + bpm_workflowDescription;
mail.parameters.from = bpm_assignee.properties.email;
mail.parameters.text = "It's done";
mail.execute(bpm_package);
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
for(var j=0; j<bpm_package.children.length; j++){
bpm_package.children[j].properties["<customStatusProperty>"]="Approved";
bpm_package.children[j].save();
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id='flow3' sourceRef='verifyTaskDone'
targetRef='theEnd' />
<endEvent id="theEnd" />
</process>
<!– Graphical representaion of diagram –>
<bpmndi:BPMNDiagram id="BPMNDiagram_activitiAdhoc">
<bpmndi:BPMNPlane bpmnElement="activitiAdhoc" id="BPMNPlane_activitiAdhoc">
<bpmndi:BPMNShape bpmnElement="start"
id="BPMNShape_start">
<omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="adhocTask"
id="BPMNShape_adhocTask">
<omgdc:Bounds height="55" width="105" x="130"
y="190"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="verifyTaskDone"
id="BPMNShape_verifyTaskDone">
<omgdc:Bounds height="55" width="105" x="290"
y="190"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="theEnd"
id="BPMNShape_theEnd">
<omgdc:Bounds height="35" width="35" x="455" y="200"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="65" y="217"></omgdi:waypoint>
<omgdi:waypoint x="130" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="235" y="217"></omgdi:waypoint>
<omgdi:waypoint x="290" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="395" y="217"></omgdi:waypoint>
<omgdi:waypoint x="455" y="217"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
<customStatusProprty>
with your custom model property or some property to save the status.<prop key="redeploy">true</prop>
in corrresponding bpmn20.xml entry i.e
<props>
<prop key="engineId">activiti</prop>
<prop key="location">alfresco/workflow/adhoc.bpmn20.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">false</prop>
</props>
05-19-2014 09:54 PM
05-20-2014 09:34 AM
<process isExecutable="true" id="activitiParallelReview" name="Parallel Review And Approve Activiti Process">
<extensionElements>
<activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
<activiti:field name="script">
<activiti:string>
execution.setVariable('wf_approveCount', 0);
execution.setVariable('wf_rejectCount', 0);
execution.setVariable('wf_actualPercent', 0);
execution.setVariable('wf_actualRejectPercent', 0);
execution.setVariable('wf_reviewerCount', bpm_assignees.size());
execution.setVariable('wf_requiredPercent', wf_requiredApprovePercent);
for(var j=0; j<bpm_package.children.length; j++){
var doc = bpm_package.children[j];
doc.properties['cm:description'] = "EN COURS DE REVISION";
doc.save();
}
</activiti:string>
</activiti:field>
</activiti:executionListener>
</extensionElements>
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.