Hi Every One,
In this post, i am going to discuss what is workflow and how to create our own custom workflow in alfresco share
Workflow:
Files to edit
BidFlow.bpmn20.xml
This is the file where we add the actual workflow this has to be there in Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\workflow
custommodel.xml
this model contains all the types and its's aspects this has to be there in
In this post, i am going to discuss what is workflow and how to create our own custom workflow in alfresco share
Workflow:
A workflow consists of a sequence of connected steps where each step follows without delay or gap and ends just before the subsequent step may begin. It is a depiction of a sequence of operations, declared as work of a person or group, an organization of staff, or one or more simple or complex mechanisms. Workflow may be seen as any abstraction of real work. For control purposes, workflow may be a view of real work in a chosen aspect, thus serving as a virtual representation of actual work. The flow being described may refer to a document or product that is being transferred from one step to another.
Workflows may be viewed as one primitive building block to be combined with other parts of an organisation's structure such as information silos, teams, projects, policies and hierarchies.
In simple words flow where to go what and accepts and rejects, if accept it has to go some person ,rejects some other. these things will be there in workflow.
Adding new workflow in Alfresco:
For this you need to add some XML files and edit some XML files.
Files to be added
1)BidFlow.bpmn20.xml( file name can be any thing but extension has to be .bpmn20.xml)
2)CustomModel.xml (file name can be any thing but extension has to be .xml)
Files to edit
3)share-workflow-form-config.xml
4)bootstrap-context.xml
Files to be added
BidFlow.bpmn20.xml
<?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://www.activiti.org/test">
<process id="BidFlow" name="BidFlow" isExecutable="true">
<extensionElements>
<activiti:executionListener event="start"
class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
<activiti:field name="script">
<activiti:string>execution.setVariable('wf_EditorsGroup', groups.getGroup('Editors').getFullName());
execution.setVariable('wf_CollaboratorsGroup', groups.getGroup('Collaborators').getFullName());
execution.setVariable('wf_ContributorsGroup', groups.getGroup('Contributors').getFullName());
execution.setVariable('wf_CoordinatorsGroup', groups.getGroup('Coordinators').getFullName());
</activiti:string>
</activiti:field>
</activiti:executionListener>
</extensionElements>
<startEvent id="startevent1" name="Start" activiti:candidateGroups="${wf_ContributorsGroup}" activiti:formKey="wf:BidFlow"></startEvent>
<userTask id="EditorTask1" name="EditorTask1" activiti:candidateGroups="${wf_EditorsGroup}" activiti:formKey="wf:TestFloweditors">
<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 (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>execution.setVariable('bpm_assignee', task.getVariable('bpm_assignee'));
execution.setVariable('bpm_comment', task.getVariable('bpm_comment'));
execution.setVariable('wf_manager', person);
execution.setVariable('bpm_dueDate', task.dueDate);
execution.setVariable('bpm_priority', task.priority);
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="CollaboratorTask1" name="CollaboratorTask1" activiti:candidateGroups="${wf_CollaboratorsGroup}" activiti:formKey="wf:TestFlowcollaborators">
<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 (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>
execution.setVariable('bpm_assignee', task.getVariable('bpm_assignee'));
execution.setVariable('bpm_comment', task.getVariable('bpm_comment'));
execution.setVariable('wf_manager', person);
execution.setVariable('bpm_dueDate', task.dueDate);
execution.setVariable('bpm_priority', task.priority);
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="EditorTask2" name="EditorTask2" activiti:candidateGroups="${wf_EditorsGroup}" activiti:formKey="wf:TestFloweditors">
<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 (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>
execution.setVariable('bpm_assignee', task.getVariable('bpm_assignee'));
execution.setVariable('bpm_comment', task.getVariable('bpm_comment'));
execution.setVariable('wf_manager', person);
execution.setVariable('bpm_dueDate', task.dueDate);
execution.setVariable('bpm_priority', task.priority);
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="CollaboratorTask2" name="CollaboratorTask2" activiti:candidateGroups="${wf_CollaboratorsGroup}" activiti:formKey="wf:TestFlowcollaborators">
<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 (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>
execution.setVariable('bpm_assignee', task.getVariable('bpm_assignee'));
execution.setVariable('bpm_comment', task.getVariable('bpm_comment'));
execution.setVariable('wf_manager', person);
execution.setVariable('bpm_dueDate', task.dueDate);
execution.setVariable('bpm_priority', task.priority);
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="CoordinatorTask" name="CoordinatorTask" activiti:candidateGroups="${wf_CoordinatorsGroup}" activiti:formKey="wf:TestFlowcoordinators"></userTask>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="EditorTask1"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="EditorTask1" targetRef="CollaboratorTask1"></sequenceFlow>
<sequenceFlow id="flow3" sourceRef="CollaboratorTask1" targetRef="EditorTask2"></sequenceFlow>
<sequenceFlow id="flow4" sourceRef="EditorTask2" targetRef="CollaboratorTask2"></sequenceFlow>
<sequenceFlow id="flow5" sourceRef="CollaboratorTask2" targetRef="CoordinatorTask"></sequenceFlow>
<sequenceFlow id="flow6" sourceRef="CoordinatorTask" targetRef="endevent1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
<bpmndi:BPMNPlane bpmnElement="BidFlow" id="BPMNPlane_myProcess">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="50.0" y="80.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="EditorTask1" id="BPMNShape_EditorTask1">
<omgdc:Bounds height="55.0" width="105.0" x="84.0" y="150.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="EditorTask2" id="BPMNShape_EditorTask2">
<omgdc:Bounds height="55.0" width="105.0" x="400.0" y="320.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="CollaboratorTask1" id="BPMNShape_CollaboratorTask1">
<omgdc:Bounds height="55.0" width="105.0" x="220.0" y="240.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="CoordinatorTask" id="BPMNShape_CoordinatorTask">
<omgdc:Bounds height="55.0" width="105.0" x="680.0" y="123.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="CollaboratorTask2" id="BPMNShape_CollaboratorTask2">
<omgdc:Bounds height="55.0" width="105.0" x="580.0" y="240.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="770.0" y="46.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="85.0" y="97.0"></omgdi:waypoint>
<omgdi:waypoint x="136.0" y="97.0"></omgdi:waypoint>
<omgdi:waypoint x="136.0" y="150.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="189.0" y="177.0"></omgdi:waypoint>
<omgdi:waypoint x="272.0" y="177.0"></omgdi:waypoint>
<omgdi:waypoint x="272.0" y="240.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="272.0" y="295.0"></omgdi:waypoint>
<omgdi:waypoint x="272.0" y="347.0"></omgdi:waypoint>
<omgdi:waypoint x="400.0" y="347.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="452.0" y="320.0"></omgdi:waypoint>
<omgdi:waypoint x="452.0" y="267.0"></omgdi:waypoint>
<omgdi:waypoint x="580.0" y="267.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
<omgdi:waypoint x="685.0" y="267.0"></omgdi:waypoint>
<omgdi:waypoint x="731.0" y="267.0"></omgdi:waypoint>
<omgdi:waypoint x="732.0" y="178.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
<omgdi:waypoint x="732.0" y="123.0"></omgdi:waypoint>
<omgdi:waypoint x="732.0" y="63.0"></omgdi:waypoint>
<omgdi:waypoint x="770.0" y="63.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
<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://www.activiti.org/test">
<process id="BidFlow" name="BidFlow" isExecutable="true">
<extensionElements>
<activiti:executionListener event="start"
class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
<activiti:field name="script">
<activiti:string>execution.setVariable('wf_EditorsGroup', groups.getGroup('Editors').getFullName());
execution.setVariable('wf_CollaboratorsGroup', groups.getGroup('Collaborators').getFullName());
execution.setVariable('wf_ContributorsGroup', groups.getGroup('Contributors').getFullName());
execution.setVariable('wf_CoordinatorsGroup', groups.getGroup('Coordinators').getFullName());
</activiti:string>
</activiti:field>
</activiti:executionListener>
</extensionElements>
<startEvent id="startevent1" name="Start" activiti:candidateGroups="${wf_ContributorsGroup}" activiti:formKey="wf:BidFlow"></startEvent>
<userTask id="EditorTask1" name="EditorTask1" activiti:candidateGroups="${wf_EditorsGroup}" activiti:formKey="wf:TestFloweditors">
<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 (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>execution.setVariable('bpm_assignee', task.getVariable('bpm_assignee'));
execution.setVariable('bpm_comment', task.getVariable('bpm_comment'));
execution.setVariable('wf_manager', person);
execution.setVariable('bpm_dueDate', task.dueDate);
execution.setVariable('bpm_priority', task.priority);
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="CollaboratorTask1" name="CollaboratorTask1" activiti:candidateGroups="${wf_CollaboratorsGroup}" activiti:formKey="wf:TestFlowcollaborators">
<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 (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>
execution.setVariable('bpm_assignee', task.getVariable('bpm_assignee'));
execution.setVariable('bpm_comment', task.getVariable('bpm_comment'));
execution.setVariable('wf_manager', person);
execution.setVariable('bpm_dueDate', task.dueDate);
execution.setVariable('bpm_priority', task.priority);
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="EditorTask2" name="EditorTask2" activiti:candidateGroups="${wf_EditorsGroup}" activiti:formKey="wf:TestFloweditors">
<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 (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>
execution.setVariable('bpm_assignee', task.getVariable('bpm_assignee'));
execution.setVariable('bpm_comment', task.getVariable('bpm_comment'));
execution.setVariable('wf_manager', person);
execution.setVariable('bpm_dueDate', task.dueDate);
execution.setVariable('bpm_priority', task.priority);
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="CollaboratorTask2" name="CollaboratorTask2" activiti:candidateGroups="${wf_CollaboratorsGroup}" activiti:formKey="wf:TestFlowcollaborators">
<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 (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>
execution.setVariable('bpm_assignee', task.getVariable('bpm_assignee'));
execution.setVariable('bpm_comment', task.getVariable('bpm_comment'));
execution.setVariable('wf_manager', person);
execution.setVariable('bpm_dueDate', task.dueDate);
execution.setVariable('bpm_priority', task.priority);
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="CoordinatorTask" name="CoordinatorTask" activiti:candidateGroups="${wf_CoordinatorsGroup}" activiti:formKey="wf:TestFlowcoordinators"></userTask>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="EditorTask1"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="EditorTask1" targetRef="CollaboratorTask1"></sequenceFlow>
<sequenceFlow id="flow3" sourceRef="CollaboratorTask1" targetRef="EditorTask2"></sequenceFlow>
<sequenceFlow id="flow4" sourceRef="EditorTask2" targetRef="CollaboratorTask2"></sequenceFlow>
<sequenceFlow id="flow5" sourceRef="CollaboratorTask2" targetRef="CoordinatorTask"></sequenceFlow>
<sequenceFlow id="flow6" sourceRef="CoordinatorTask" targetRef="endevent1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
<bpmndi:BPMNPlane bpmnElement="BidFlow" id="BPMNPlane_myProcess">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="50.0" y="80.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="EditorTask1" id="BPMNShape_EditorTask1">
<omgdc:Bounds height="55.0" width="105.0" x="84.0" y="150.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="EditorTask2" id="BPMNShape_EditorTask2">
<omgdc:Bounds height="55.0" width="105.0" x="400.0" y="320.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="CollaboratorTask1" id="BPMNShape_CollaboratorTask1">
<omgdc:Bounds height="55.0" width="105.0" x="220.0" y="240.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="CoordinatorTask" id="BPMNShape_CoordinatorTask">
<omgdc:Bounds height="55.0" width="105.0" x="680.0" y="123.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="CollaboratorTask2" id="BPMNShape_CollaboratorTask2">
<omgdc:Bounds height="55.0" width="105.0" x="580.0" y="240.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="770.0" y="46.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="85.0" y="97.0"></omgdi:waypoint>
<omgdi:waypoint x="136.0" y="97.0"></omgdi:waypoint>
<omgdi:waypoint x="136.0" y="150.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="189.0" y="177.0"></omgdi:waypoint>
<omgdi:waypoint x="272.0" y="177.0"></omgdi:waypoint>
<omgdi:waypoint x="272.0" y="240.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="272.0" y="295.0"></omgdi:waypoint>
<omgdi:waypoint x="272.0" y="347.0"></omgdi:waypoint>
<omgdi:waypoint x="400.0" y="347.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="452.0" y="320.0"></omgdi:waypoint>
<omgdi:waypoint x="452.0" y="267.0"></omgdi:waypoint>
<omgdi:waypoint x="580.0" y="267.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
<omgdi:waypoint x="685.0" y="267.0"></omgdi:waypoint>
<omgdi:waypoint x="731.0" y="267.0"></omgdi:waypoint>
<omgdi:waypoint x="732.0" y="178.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
<omgdi:waypoint x="732.0" y="123.0"></omgdi:waypoint>
<omgdi:waypoint x="732.0" y="63.0"></omgdi:waypoint>
<omgdi:waypoint x="770.0" y="63.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
This is the file where we add the actual workflow this has to be there in Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\workflow
Description about this workflow: this workflow we are getting all the group names and assigning work as follows
1)contributor group fellow will stat the workflow.
2)in first step started work will assigned to all the fellows there in editor group.
3) from second step it will assigned to all the collaborator group fellows.
4)from third to it will assigned to all the editor group fellows.
5)from fourth to it will assigned to all the collaborator group fellows.
6)fifth to it will assigned to coordinator.
custommodel.xml
this model contains all the types and its's aspects this has to be there in
Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\workflow
This code needs to be added to corresponding files
share-workflow-form-config.xml
this file contains ShareUI for work flow, we need to add the UI components for our workflow this has to be there in
Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco
bootstrap-context.xml
this file contains code to our workflow in to server while starting the server
bootstrap-context.xml
Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco
Vikram Vanama
Good tutorial to create custom workflow.
ReplyDeleteHi, I put the files at the right location and I rebooted tomcat. I can't see the new workflow in the the workflow list. Is there anything else to do ?
ReplyDeleteplease share me more information how you doing and alfresco.log and share.log.
ReplyDeleteThankyouuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
ReplyDeletewhen u start the server it will deploy automatically through bootstrap-context.xml and u can deploy undeploy from this url
ReplyDelete"http://localhost:8080/alfresco/faces/jsp/admin/workflow-console.jsp"
Since I am using Alfresco Community Version,I couldn't find the file "share-workflow-form-config.xml" in the given path Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco.Could you please tell me how to deploy workflow in Alfresco community version?
ReplyDeleteyes, you recheck once file should be there in above location and which version of community edition you are using.
ReplyDeletegood artical.....
ReplyDeleteHi, I put the files at the right location and I rebooted tomcat.I see the new workflow in the workflow list but when I start the workflow ,there’s an error
ReplyDeleteThis is the error:
Workflow could not be started.
org.alfresco.scripts.ScriptException: 06080023 Failed to execute supplied script: 06080022 TypeError: Cannot call method "getFullName" of null (AlfrescoJS#2)
Thank you. Your help will be very much appreciated.
Hai Zeineb Akacha,
ReplyDeleteyou done every thing currect and you should create the groups in alfresco with name(Editors,Collaborators,Contributors,Coordinators). then you won't get above error.
-Vikram
Hi vikram vanama ,
ReplyDeleteI already create the groups in alfresco with name ((Editors,Collaborators,Contributors,Coordinators) but I still have the same error org.alfresco.scripts.ScriptException: 06080035 Failed to execute supplied script: 06080034 TypeError: Cannot call method "getFullName" of null (AlfrescoJS#2)
after creating group you need to redepoly the workflow
Deletefor redeploying login alfresco with admin and open this url in another tab localhost:8080/alfresco/faces/jsp/admin/workflow-console.jsp and in that give this command "undeploy definition name activiti$BidFlow" then restart the server. it will work for you and Re check the group names. you created.
This comment has been removed by the author.
DeleteHi, thank you but I couldn't find the two files in my Alfresco:
ReplyDelete- share-workflow-form-config.xml
- bootstrap-context.xml
I'm using Alfresco Community Edition 5.1 under Windows 8
Can I add those two files to My Alfresco ? If so, where can I find them ?
hello same problem can you help me
Deleteuj610 dr martens sklep,lasportivatenisice,dr martens botas,toms shoes,la sportiva hiking boots ireland,toms shoes,sanuk portugal,lululemonleggingsportugal,lasportivaschuheschweiz sj219
ReplyDelete