AnsweredAssumed Answered

Call jar from alfresco workflow

Question asked by biker89 on May 25, 2017
Latest reply on Jun 1, 2017 by biker89

I have a jar file with this structure:









package com.mycompany.activiti;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;

public class Decision implements JavaDelegate
     public void execute(DelegateExecution execution) throws Exception
          System.out.println("success test");



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

   <bean id="custom-action" parent="JavaDelegate" class="com.mycompany.activiti.Decision"/>


I stop alfresco, add this jar to alfresco-community\tomcat\webapps\alfresco\WEB-INF\lib

Then in my workflow I add 

<serviceTask id="alfrescoStartScripttask" activiti:class="com.mycompany.activiti.Decision"/>

I start alfresco without any errors in log, deploy my workflow successfull, but when I try to start workflow I have this error in log:

Caused by: java.lang.ClassNotFoundException: com.mycompany.activiti.Decision
     at org.apache.catalina.loader.WebappClassLoader.loadClass(
     at org.apache.catalina.loader.WebappClassLoader.loadClass(
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Unknown Source)
     at org.activiti.engine.impl.util.ReflectUtil.loadClass(
     at org.activiti.engine.impl.util.ReflectUtil.loadClass(
     ... 153 more


Can anybody help me with this problem? Or maybe there are another ways to call external jars from workflow?
Thank you