If you place the BPMN 2.0 process XML definition somewhere in the path of the Alfresco class, you can use the Alfresco Workflow console to deploy the definition.
For example, I always place my workflows under WEB-INF / classes / alfresco / extension / workflows / someFolder, where someFolder is a unique folder for each process definition that I use.
The workflow console is located at http: // localhost: 8080 / alfresco / faces / jsp / admin / workflow-console.jsp . Assuming you are using 3.4.e, which is a preview release showing Activiti integration, you can deploy the process through the workflow console using this command:
deploy activiti /alfresco/extension/workflows/activiti/activitiHelloWorld.activiti
You can see other useful workflow console commands by typing help.
Alternatively, as Gagravarr suggests, you can use Spring to deploy your workflow when Alfresco starts up. Spring configuration file must have a name ending in "-context.xml". Usually I put mine in WEB-INF / classes / alfresco / extension.
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'> <beans> <bean id="someco.workflowBootstrap" parent="workflowDeployer"> <property name="workflowDefinitions"> <list> <props> <prop key="engineId">activiti</prop> <prop key="location">alfresco/extension/workflows/activiti/activitiHelloWorld.bpmn20.xml</prop> <prop key="mimetype">text/xml</prop> <prop key="redeploy">false</prop> </props> </list> </property> <property name="models"> <list> <value>alfresco/extension/model/scWorkflowModel.xml</value> </list> </property> <property name="labels"> <list> <value>alfresco.extension.messages.scWorkflow</value> </list> </property> </bean> </beans>
If you need work examples of some simple workflows, with the same workflows that were implemented for both jBPM and Activiti for easy comparison, check out this blog post: http://ecmarchitect.com/archives/2011/04 / 27/1357
Jeff
Jeff potts
source share