不能在 Activiti 的表达式中使用 bean(在 ServiceTask 中)。他写道,他没有看到这个垃圾箱。摘自 pom 按版本:
<springframework.version>5.0.2.RELEASE</springframework.version>
<springframework.boot>2.0.4.RELEASE</springframework.boot>
<activiti.version>6.0.0</activiti.version>
Bean 由类上的注释定义。bpmn 模式文件的摘录:
<serviceTask id="SendStatus104" name="Формирование и отправка статуса" activiti:expression="${sendService.sendStatusCode(104)}">
<documentation>Формирование и отправка статуса</documentation>
</serviceTask>
类声明:
@Service("sendService")
public class SendServiceImpl implements SendService {
//some code
}
您需要使用其他类来创建 Activity 配置 bean:
要创建 Activity 服务对象,您需要这样做(以服务为例
RepositoryService):