05-21-2015 02:13 PM
<userTask id="iniciar" name="Revisar JefeDpto" activiti:assignee="gestor" activiti:formKey="wf:activitiReviewTask">
<extensionElements>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[var test = bpm_package;
var doc = test.children[0];
if(task.getVariableLocal('wf_reviewOutcome') == 'Approve') {
doc.properties["hula:estado"]="Revision_Gerencia";
doc.save();
}
else
{
doc.properties["hula:estado"]="Cancelado";
doc.save();
}]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
05-22-2015 05:40 AM
05-22-2015 06:25 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="aprobacionAgenda" name="Aprobacion Agenda" isExecutable="true">
<startEvent id="startevent1" name="Start"></startEvent>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="entrada"></sequenceFlow>
<serviceTask id="entrada" name="Mover a Departamento" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
<extensionElements>
<activiti:field name="script">
<activiti:string><![CDATA[var test = bpm_package;
var doc = test.children[0];
var departamento = doc.properties["hula:departamento"];
doc.properties["hula:estado"]="Revision_Jefe_servicio";
doc.save();
var myNode = companyhome.childByNamePath("Departamentos Jefes/"+departamento);]]></activiti:string>
</activiti:field>
</extensionElements>
</serviceTask>
<sequenceFlow id="flow2" sourceRef="entrada" targetRef="iniciar"></sequenceFlow>
<userTask id="iniciar" name="Revisar JefeDpto" activiti:assignee="Jefe_Cardiologia1" activiti:formKey="wf:activitiReviewTask">
<extensionElements>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[var test = bpm_package;
var doc = test.children[0];
if(task.getVariableLocal('wf_reviewOutcome') == 'Approve') {
doc.properties["hula:estado"]="Revision_Gerencia";
doc.save();
}
else
{
doc.properties["hula:estado"]="Cancelado";
doc.save();
}]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow3" sourceRef="iniciar" targetRef="endevent1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_aprobacionAgenda">
<bpmndi:BPMNPlane bpmnElement="aprobacionAgenda" id="BPMNPlane_aprobacionAgenda">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="6.0" y="37.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="entrada" id="BPMNShape_entrada">
<omgdc:Bounds height="55.0" width="105.0" x="70.0" y="27.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="iniciar" id="BPMNShape_iniciar">
<omgdc:Bounds height="55.0" width="105.0" x="250.0" y="27.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="490.0" y="37.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="41.0" y="54.0"></omgdi:waypoint>
<omgdi:waypoint x="70.0" y="54.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="175.0" y="54.0"></omgdi:waypoint>
<omgdi:waypoint x="250.0" y="54.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="355.0" y="54.0"></omgdi:waypoint>
<omgdi:waypoint x="490.0" y="54.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
<?xml version="1.0" encoding="UTF-8"?>
<model name="scwf:workflowmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Workflow Lifecycle Model</description>
<author>smveritas</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" />
<import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
</imports>
<!– Introduction of new namespaces defined by this model –>
<namespaces>
<namespace uri="workflowmodel.model" prefix="scwf" />
</namespaces>
<types>
<type name="scwf:activitiReviewTask">
<parent>bpm:activitiOutcomeTask</parent>
<properties>
<property name="scwf:AprobarResp">
<type>d:text</type>
<default>Reject</default>
<constraints>
<constraint type="LIST">
<parameter name="allowedValues">
<list>
<value>Aprobar</value>
<value>Rechazar</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
<property name="scwf:AprobarOT">
<type>d:text</type>
<default>Reject</default>
<constraints>
<constraint type="LIST">
<parameter name="allowedValues">
<list>
<value>Aprobar</value>
<value>Rechazar</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
</properties>
</type>
</types>
</model>
05-22-2015 09:09 AM
<startEvent id="startevent1" name="Start" activiti:formKey="bpm:startTask"></startEvent>
.05-25-2015 07:35 AM
05-25-2015 12:28 PM
05-26-2015 08:09 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.