Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/components/flow-engine-framework_FlowScriptContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ description: Groovy 脚本运行时的 $bind 上下文对象,为脚本提供
<dependency>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-framework</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/components/flow-engine-framework_GatewayContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ GatewayContext 是框架内部获取流程操作人(IFlowOperator)数据的
<dependency>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-framework</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/components/flow-engine-framework_GroovyScriptBind.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ GroovyScriptBind 是脚本编写者在流程 Groovy 脚本中通过 `$bind` 变
<dependency>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-framework</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ GroovyScriptRequest 是流程 Groovy 脚本中 `request` 参数的实际类型
<dependency>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-framework</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ GroovyWorkflowRequest 用于工作流级别(非会话级别)的脚本场景
<dependency>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-framework</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/components/flow-engine-framework_IFlowOperator.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ IFlowOperator 是流程引擎中对参与流程的用户(审批人、创建者
<dependency>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-framework</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RepositoryHolderContext 是流程引擎运行时的基础设施注册中心。
<dependency>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-framework</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ScriptRegistryContext 是流程引擎中所有默认 Groovy 脚本的注册中
<dependency>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-framework</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion flow-engine-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-parent</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion flow-engine-framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-parent</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
</parent>

<name>flow-engine-framework</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package com.codingapi.flow.node.nodes;

import com.codingapi.flow.builder.BaseNodeBuilder;
import com.codingapi.flow.node.BaseFlowNode;
import com.codingapi.flow.node.IBlockNode;
import com.codingapi.flow.node.IFlowNode;
import com.codingapi.flow.node.NodeType;
import com.codingapi.flow.node.*;
import com.codingapi.flow.session.FlowSession;
import com.codingapi.flow.utils.RandomUtils;

Expand All @@ -15,7 +12,7 @@
/**
* 人工控制节点
*/
public class ManualNode extends BaseFlowNode implements IBlockNode {
public class ManualNode extends BaseFlowNode implements IBlockNode , IDisplayNode {

public static final String NODE_TYPE = NodeType.MANUAL.name();
public static final String DEFAULT_NAME = "人工控制节点";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,7 @@ public boolean isHistory() {
return this.approveState == ApproveState.PASS || this.approveState == ApproveState.ERROR;
}

public void addFlowRecordOperator(FlowRecord record, IFlowOperator flowOperator) {
if (this.operators == null) {
this.operators = new ArrayList<>();
}
this.operators.add(new FlowOperatorBody(record, flowOperator));
}


public enum OperatorStrategy {
/**
Expand All @@ -83,7 +78,12 @@ public enum OperatorStrategy {
/**
* 审批人设定:当前节点审批时,审批人为下游该节点指定操作人
*/
APPROVER_SELECT
APPROVER_SELECT,

/**
* 无人员设置
*/
NO_OPERATOR
}

public enum ApproveState {
Expand Down Expand Up @@ -188,22 +188,24 @@ public static ProcessNode createByNode(IFlowNode flowNode, OperatorSelectType op
processNode.setApproveState(ApproveState.PENDING);
processNode.resetApproveStrategy(flowNode);

OperatorStrategy operatorStrategy = OperatorStrategy.NO_OPERATOR;

if (operators != null && !operators.isEmpty()) {
List<FlowOperatorBody> flowOperatorBodyList = new ArrayList<>();
for (IFlowOperator operator : operators) {
flowOperatorBodyList.add(new FlowOperatorBody(operator));
}
processNode.setOperators(flowOperatorBodyList);
processNode.setOperatorStrategy(OperatorStrategy.OPERATOR_LIST);
operatorStrategy = OperatorStrategy.OPERATOR_LIST;
} else {
if (operatorSelectType == OperatorSelectType.APPROVER_SELECT) {
processNode.setOperatorStrategy(OperatorStrategy.APPROVER_SELECT);
operatorStrategy = OperatorStrategy.APPROVER_SELECT;
}
if (operatorSelectType == OperatorSelectType.INITIATOR_SELECT) {
processNode.setOperatorStrategy(OperatorStrategy.INITIATOR_SELECT);
operatorStrategy = OperatorStrategy.INITIATOR_SELECT;
}
}

processNode.setOperatorStrategy(operatorStrategy);
return processNode;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,16 @@ private void addFlowNode(IFlowNode flowNode, FlowSession flowSession) {
operators.add(this.currentOperator);
this.nodeList.add(ProcessNode.createByNode(flowNode, OperatorSelectType.SCRIPT, operators));
} else {
OperatorLoadStrategy operatorLoadStrategy = flowNode.strategyManager().getStrategy(OperatorLoadStrategy.class);
OperatorSelectType operatorSelectType = operatorLoadStrategy.getSelectType();

OperatorManager operatorManager = flowNode.strategyManager().loadOperators(flowSession);
List<IFlowOperator> operators = operatorManager.getOperators();

OperatorSelectType operatorSelectType = null;
// 针对延迟节点、触发节点、子流程节点、路由节点、人工节点都没有设置流程审批人
OperatorLoadStrategy operatorLoadStrategy = flowNode.strategyManager().getStrategy(OperatorLoadStrategy.class);
if(operatorLoadStrategy!=null) {
operatorSelectType = operatorLoadStrategy.getSelectType();
}

this.nodeList.add(ProcessNode.createByNode(flowNode, operatorSelectType, operators));
}
}
Expand Down
2 changes: 1 addition & 1 deletion flow-engine-starter-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-parent</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
</parent>

<name>flow-engine-starter-api</name>
Expand Down
2 changes: 1 addition & 1 deletion flow-engine-starter-infra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-parent</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
</parent>

<name>flow-engine-starter-infra</name>
Expand Down
2 changes: 1 addition & 1 deletion flow-engine-starter-query/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-parent</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
</parent>

<name>flow-engine-starter-query</name>
Expand Down
2 changes: 1 addition & 1 deletion flow-engine-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-parent</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
</parent>

<name>flow-engine-starter</name>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.codingapi.flow</groupId>
<artifactId>flow-engine-parent</artifactId>
<version>0.0.34</version>
<version>0.0.35</version>
<packaging>pom</packaging>

<url>https://github.com/codingapi/flow-engine</url>
Expand Down