我正在进行jBpm流程。我已经为每个演员确定了车道,但是我没有看到如何在运行时找出哪个演员与任务相关的方法。
到目前为止,我所知道的是如何找出存在的车道:
@Override
public void beforeNodeTriggered(ProcessNodeTriggeredEvent event) {
WorkflowProcessInstance wpi = (WorkflowProcessInstance) event.getProcessInstance();
SwimlaneContextInstance slci = (SwimlaneContextInstance) wpi.getContextInstance(SwimlaneContext.SWIMLANE_SCOPE);
SwimlaneContext swimlaneContext = slci.getSwimlaneContext();
Collection<Swimlane> swimlanes = swimlaneContext.getSwimlanes();
}
但我无法找出目前属于哪条车道
关于如何获取任务的通道名称/演员的任何想法?
答案 0 :(得分:0)
好的,我在节点的元数据中找到了它......
event.getNodeInstance().getNode().getMetaData().get("Lane");
@Override
public void beforeNodeTriggered(ProcessNodeTriggeredEvent event) {
log.info("before node triggered " + event.getNodeInstance().getNodeName());
log.info(" in lane " + event.getNodeInstance().getNode().getMetaData().get("Lane"));
}