Skip to content

Commit

Permalink
Merge pull request alibaba#40 from coyote-wang/master
Browse files Browse the repository at this point in the history
增加流程id查询参数
  • Loading branch information
vavi authored Apr 18, 2021
2 parents 6389328 + 71597c9 commit fdf9309
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ void update(ExecutionInstance executionInstance,
ExecutionInstance find(String executionInstanceId,
ProcessEngineConfiguration processEngineConfiguration);

ExecutionInstance find(String processInstanceId, String executionInstanceId,
ProcessEngineConfiguration processEngineConfiguration);

void remove(String executionInstanceId,
ProcessEngineConfiguration processEngineConfiguration);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,11 @@ public ProcessInstance signal(String processInstanceId, String executionInstance
}

protected ExecutionInstance queryExecutionInstance(String processInstanceId, String executionInstanceId) {
List<ExecutionInstance> executionInstances = executionInstanceStorage
.findByActivityInstanceId(processInstanceId, executionInstanceId, processEngineConfiguration);
if(CollectionUtil.isEmpty(executionInstances)) {
ExecutionInstance executionInstance = executionInstanceStorage.find(processInstanceId,executionInstanceId,processEngineConfiguration);

if (null == executionInstance) {
throw new EngineException("No executionInstance found for id " + executionInstanceId);
}
ExecutionInstance executionInstance = executionInstances.get(0);

if (!executionInstance.isActive()) {
throw new ConcurrentException("The status of signaled executionInstance should be active");
Expand All @@ -176,7 +175,6 @@ protected ExecutionInstance queryExecutionInstance(String executionInstanceId) {

if (!executionInstance.isActive()) {
throw new ConcurrentException("The status of signaled executionInstance should be active");

}
return executionInstance;
}
Expand Down

0 comments on commit fdf9309

Please sign in to comment.