我正在实现自己的Activiti命令拦截器,如下所示:
render(){
{this.state.image ? <img src={`data:image/png;base64,${this.state.image}`}/>: ''}
}
在.list1:
only:
changes: &list1
- file1
- file2
.list2:
only:
changes: &list2
- file3
- file4
job1:
only:
changes: *list1
job2:
only:
changes: *list2
job3:
only:
changes:
# How can I include list1 and list2????
方法中,我需要从与此命令相关的执行上下文中检索一个变量。
要做到这一点,我需要拥有public class ActivitiCommandInterceptor extends AbstractCommandInterceptor {
private RuntimeService runtimeService;
private CommandInterceptor delegate;
public ActivitiSpringTxCommandInterceptor(RuntimeService runtimeService, CommandInterceptor delegate) {
this.runtimeService = runtimeService;
this.delegate=delegate;
}
@Override
public <T> T execute(CommandConfig config, Command<T> command) {
String myVariable = runtimeService.getVariable(<missingExecutionId>, "myVariableName");
...
}
}
,但找不到找到它的方法。
如何从此拦截器获取变量?
谢谢
答案 0 :(得分:0)
您可以创建一个nativeExecutionQuery 这使我们可以使用SQL直接在数据库上执行操作。
对于您的情况,只需找到包含变量的所有执行ID,然后根据需要对其进行过滤。