【发布时间】:2017-05-14 19:03:55
【问题描述】:
我设计了一个 bpmn(在 eclipse 中使用 activiti)并成功部署在 BPS 服务器上,但是现在当我尝试在 BPMN 资源管理器中启动该流程时,我遇到了这个问题: 错误启动过程:无法实例化类 org.wso2.Mymaven.App。
我在BPMN中使用了两个用户任务,一个服务任务和一个邮件任务,服务任务使用的是上述类。
我已按照本教程“http://wso2.com/library/tutorials/2016/03/tutorial-how-to-model-your-business-processes-with-wso2-business-process-server/”中提到的所有步骤进行操作。直到第 10 步(图 26),一切正常,但在那之后,我遇到了“错误启动过程:无法实例化类 org.wso2.Mymaven.App”的问题
使用的java代码是:
package org.wso2.Mymaven;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
import java.lang.Long;
import java.util.Random;
public class App implements JavaDelegate{
public void execute(DelegateExecution execution) throws Exception {
int billAmount = Integer.parseInt((String)execution.getVariable("amount"));
Random randomGenerator = new Random();
int value = randomGenerator.nextInt(20);
int result = (billAmount * value);
execution.setVariable("result", "" + result);
}
}
【问题讨论】:
标签: java wso2 wso2carbon wso2bps