AnsweredAssumed Answered

using Activiti as war or source

Question asked by honor on Oct 24, 2016
we're using Activiti Community for out BPM in our Project and we need to create some custom tasks for some kind of business like Rest calls and Database specific operations. I followed section "12.5. Extending Activiti Designer"  on and managed to  create new eclipse extension jar for new Database Task Service on eclipse designer. I added that jar to Activiti Extension on Eclipse and then into WEB-INF/lib I also was able to import new workflow with Database Task Service. But i saw the following info on userguide and it was little bit confusing for me.

Note that the runtime class shouldn’t be in your extension JAR, as it’s dependent on the Activiti libraries. Activiti needs to be able to find it at runtime, so it needs to be on the Activiti engine’s classpath

in that case i have 2 classes for eclipse extension jar. They look like following.

@org.activiti.designer.integration.servicetask.annotation.Runtime(javaDelegateClass =
@Help(displayHelpShort = "Creates Database Task", displayHelpLong = "Create new Database Task")
public class DatabaseServiceTask extends AbstractCustomServiceTask {

   private static final String HELP_ACCOUNT_NUMBER_LONG = "Provide a number that is suitable as an account number.";

   @Property(type = PropertyType.TEXT, displayName = "Account Number", required = false)
   @Help(displayHelpShort = "Provide an account number", displayHelpLong = HELP_ACCOUNT_NUMBER_LONG)
   private String accountNumber;

public class DatabaseServiceDelegate implements JavaDelegate  {

   public void execute(DelegateExecution arg0) throws Exception {

it was a little bit confusing for me. so it means that i shouldnt add DatabaseServiceTask and DatabaseServiceDelegate classes  in extension jar and then into WEB-INF/lib for activiti-rest and activiti-app. instead i should download activiti source code and do customizing directly on source for activiti-rest and activiti-app on go on like this ?

i think that it can be problematic if we working with given war's due to possible classpath and dependency problems. And it could be hard for managing jars and versions.  I also read that we can create own project depending on maven rest dependencies. what is best practice for using Activiti in own Project ? using given war files or creating own with given dependencies. What is your suggestions ? Thanks in Advance.