7

I'm new to Alfresco/Activiti.

Our company is using Skelta BPM.NET (in integration with our self developed RMS) and now we would like to take a look into other BPM software.

I last days I found our how to create new workflow using Eclipse and Import them into standalone installation of Activiti.

Now I would like to publish this workflow into Alfresco share. Is there any easy way to do that? I was searching whole day on Google but didn't find anything useful.

And another question about installation: Is it possible to install Activiti with all it's webapps on the same tomcat, that alfresco is running on? That Apache Ant can build only standalone installation. So can this two application be merged?

Thanks for your info, Anze

AnzeR
  • 582
  • 4
  • 10
  • 23

2 Answers2

9

If you place your BPMN 2.0 process definition XML somewhere in the Alfresco classpath, you can use Alfresco's 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 I am using.

The workflow console is in 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 a process through the workflow console with this command:

    deploy activiti /alfresco/extension/workflows/activiti/activitiHelloWorld.activiti

You can see other helpful workflow console commands by typing help.

Alternatively, as Gagravarr suggests, you can use Spring to deploy your workflow when Alfresco starts up. The Spring config file must have a name ending with "-context.xml". I usually place 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'd like working examples of some simple workflows, with the same workflows implemented for both jBPM and Activiti for easy comparison, take a look at this blog post: http://ecmarchitect.com/archives/2011/04/27/1357

Jeff

Jeff Potts
  • 10,328
  • 14
  • 38
1

For the second part of your question:

If you want to use Alfresco with Activiti, then you should try the 3.4.e release (or a recently nightly build). 3.4.e has Activiti build in, so you don't need to do any merging of webapps. It's all already there for you.

For the first part, as long as you're using 3.4.e (or a later nightly build), then you ought to be able to deploy to Activiti in much the same way that you would previously deploy to JBMP. The Workflow With Activiti wiki page ought to help you with this too, as might this wiki too.

Gagravarr
  • 43,370
  • 9
  • 94
  • 140
  • We just installed .e version and also standalone Activiti na different machine. Now we would like to use all of activiti-* (probe, explorer, kickstart, cycle, modeler) and also Alfresco on the same Tomcat instance. Is it possible to achieve that? We user that only for development purpose. – AnzeR May 12 '11 at 06:45
  • jBPM has deploy functionality in Eclipse plug in. Activiti doesn't have it for now. Can someone provide step-by-step tutorial hot to deploy ZIP/BAR file (made in Eclipse plug-in for Activiti) to Alfresco? It's my 1st Alfresco installation, so I never use jBPM and Alfresco before; have read just some tutorials :( – AnzeR May 12 '11 at 06:50
  • Did you try following http://wiki.alfresco.com/wiki/Workflow_with_Activiti ? That should have all the steps required to deploy your workflow into Activiti in Alfresco – Gagravarr May 12 '11 at 08:52
  • As a said I'm new to Alfresco, so I don't know what workflowDeployer bean is. In wiki you provided there is nothing about that. There are only links to external resources (jBPM) and only couple of lines about Deploying a process definition – AnzeR May 12 '11 at 11:09
  • It's a spring bean. http://wiki.alfresco.com/wiki/Overriding_Spring_Configuration might help you with adding your own spring beans to alfresco – Gagravarr May 12 '11 at 11:29
  • I just deployed my dummy process using Workflow Console. Hope that one with .form files can be deployed the same way :) Unfortunately I don't have much knowledge about Java. I know that I have to learn for building my own processes :) – AnzeR May 12 '11 at 11:41