Skip to content

Commit

Permalink
修正withdraw和reject动作实现
Browse files Browse the repository at this point in the history
  • Loading branch information
entropy-cloud committed Nov 17, 2023
1 parent ae69e3a commit be618a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ private boolean isForStatus(IWorkflowStepImplementor step, WfActionModel actionM
} else if (status == NopWfCoreConstants.WF_STEP_STATUS_WAITING) {
return actionModel.isForWaiting();
} else if (step.isHistory()) {
return actionModel.isForHistory();
return actionModel.isForHistory() || actionModel.isForWithdraw();
}
// 所有其他状况都不允许
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import io.nop.wf.core.store.IWorkflowStepRecord;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

@DataBean
Expand Down Expand Up @@ -69,6 +70,10 @@ public WorkflowStepLinkBean addNextStepLink(String nextStepId) {
link.setWfId(getWfId());
link.setStepId(getStepId());
link.setNextStepId(nextStepId);

if (nextStepLinks == null)
this.nextStepLinks = new ArrayList<>();
this.nextStepLinks.add(link);
return link;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ public void testReject() {
assertNotNull(rejectAction);

ysh.invokeAction("_rejectAction", null, context);
workflow.runAutoTransitions(context);

List<? extends IWorkflowStep> activeSteps = workflow.getSteps(false);
assertEquals(1, activeSteps.size());
Expand Down

0 comments on commit be618a8

Please sign in to comment.