Merge branch 'feature/countersign_ext' into dev
This commit is contained in:
commit
c4701c1bd3
@ -6,11 +6,11 @@ import cn.axzo.workflow.core.engine.cmd.helper.CustomBpmnModelHelper;
|
||||
import cn.axzo.workflow.core.repository.entity.ExtAxDynamicSignRecord;
|
||||
import cn.axzo.workflow.core.service.ExtAxDynamicSignRecordService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.flowable.bpmn.model.BpmnModel;
|
||||
import org.flowable.bpmn.model.Process;
|
||||
import org.flowable.bpmn.model.UserTask;
|
||||
import org.flowable.engine.RepositoryService;
|
||||
import org.flowable.engine.RuntimeService;
|
||||
import org.flowable.engine.impl.persistence.deploy.DeploymentManager;
|
||||
import org.flowable.engine.repository.ProcessDefinition;
|
||||
import org.flowable.engine.runtime.ProcessInstance;
|
||||
import org.flowable.spring.SpringProcessEngineConfiguration;
|
||||
import org.springframework.context.SmartLifecycle;
|
||||
@ -83,13 +83,13 @@ public class RecoverDynamicCounterSignProcess implements SmartLifecycle {
|
||||
)
|
||||
));
|
||||
|
||||
DeploymentManager deploymentManager = springProcessEngineConfiguration.getDeploymentManager();
|
||||
RepositoryService repositoryService = springProcessEngineConfiguration.getRepositoryService();
|
||||
grouped.forEach((k, v) -> {
|
||||
if (runningProcessIds.contains(k)) {
|
||||
log.info("recover dynamic counter sign process instance id: {}", k);
|
||||
BpmnModel bpmnModel = repositoryService.getBpmnModel(v.get(0).getProcessDefinitionId());
|
||||
Process process = bpmnModel.getMainProcess();
|
||||
|
||||
ProcessDefinition processDefinitionEntity = deploymentManager.findDeployedProcessDefinitionById(v.get(0).getProcessDefinitionId());
|
||||
Process process = deploymentManager.resolveProcessDefinition(processDefinitionEntity).getProcess();
|
||||
v.forEach(sign -> {
|
||||
UserTask originalUserTask = (UserTask) process.getFlowElement(sign.getOriginalActivityId());
|
||||
BpmnFlowNodeMode nodeMode = Objects.equals(originalUserTask.getLoopCharacteristics().getCompletionCondition(), AND_SIGN_EXPRESSION) ? BpmnFlowNodeMode.AND : BpmnFlowNodeMode.OR;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user