AnsweredAssumed Answered

How to deploy a simple java service workflow

Question asked by liuk88 on Feb 3, 2014
Latest reply on Feb 5, 2014 by martin.grofcik
Hi all, i am new on Activiti and i'm tring to deploy my first simple workflow with only a java service.
I saw the documentation and i downloaded the activiti war, tomcat and java.
The first workflow i am doing is a simple xml that calls a java class, that create a file in a my desktop folder.
My idea is to create a new java project(on eclipse) with the .xml and the relative java class.
The xml is like this:

<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"

  <process id="CreateFile">

    <startEvent id="start" />
    <serviceTask id="servicetask1" name="Service Task" activiti:class="CreateFile"></serviceTask> 
    <endEvent id="theEnd" />
    <sequenceFlow id="flow1" sourceRef="start" targetRef="servicetask1"></sequenceFlow>
    <sequenceFlow id="flow2" sourceRef="servicetask1" targetRef="theEnd" />

The java class is a simple class like this:

public class CreateFile implements JavaDelegate
   public void execute(DelegateExecution execution) throws Exception
      //create the file…

Done this, i don't know how to deploy the "package" of this two files.
My questions are:

-Is right to make a java project like this?
-If yes, how i can deploy all to test it? (i know that i can deploy the xml with activiti explorer but the related java class?)

Thanks all!