JBPM-将可重用的子流程节点映射到实际的子流程

JBPM- mapping reusable sub process node with the actual sub process

我有一个模板 P(Process instance id: 0000),带有两个可重用的子流程节点,假设 R1(Unique id: 1) 和 R2(Unique id: 2) 将调用子流程 CP1 (Process instance id: 1111) 和 CP2(Process instance id: 2222) 分别,我想知道有什么方法可以知道 R1 在父进程的 beforeNodeTriggered 事件 / beforeProcessStarted 事件中触发了 pid 1111 和 R2子进程。

我正在使用 jbpm 5.5。

无法在可重用子进程节点的beforeNodeTriggered事件中获取可重用子进程节点与子进程之间的link,因为子进程将在该事件后触发。我能够使用以下代码在可重用子进程节点的 afterNodeTriggered 事件中获取子进程的 pid

((SubProcessNodeInstance)processNodeTriggeredEvent.getNodeInstance()).getProcessInstanceId()