工作流-服务任务
说明
- 通过执行实现 JavaDelegate 接口的类
public class MyServiceTask implements Serializable,JavaDelegate {
private static final long serialVersionUID = 1L;
@Override
public void execute(DelegateExecution execution) throws Exception {
System.out.println("MyServiceTask开始执行, 自动任务:自动执行一些用户自定义的逻辑");
String id = execution.getId();
String processInstanceId = execution.getProcessInstanceId();
String businessKey = execution.getProcessBusinessKey();
String currentActivityName = execution.getCurrentActivityName();
String processDefinitionId = execution.getProcessDefinitionId();
String key1 =execution.getVariable("key1",String.class);
System.out.println("key1:"+key1);
System.out.println("执行实例id:"+id);
System.out.println("流程实例id:"+processInstanceId);
System.out.println("流程实例businessKey:"+businessKey);
System.out.println("当前活动名称:"+currentActivityName);
System.out.println("流程定义id:"+processDefinitionId);
}
}
参考
作者:admin 创建时间:2022-12-05 17:02
最后编辑:texbox 更新时间:2024-10-17 08:28
最后编辑:texbox 更新时间:2024-10-17 08:28