flow
This commit is contained in:
parent
d6517cfcb8
commit
e4d8dc7cad
|
|
@ -5,6 +5,8 @@ import com.google.common.collect.Maps;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import lombok.Generated;
|
||||||
import net.xnzn.framework.flow.exception.TerminateStateException;
|
import net.xnzn.framework.flow.exception.TerminateStateException;
|
||||||
import net.xnzn.framework.flow.exception.UnmatchedScopeException;
|
import net.xnzn.framework.flow.exception.UnmatchedScopeException;
|
||||||
import net.xnzn.framework.flow.instance.Event;
|
import net.xnzn.framework.flow.instance.Event;
|
||||||
|
|
@ -25,6 +27,7 @@ import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class Flow implements BeanPostProcessor {
|
public class Flow implements BeanPostProcessor {
|
||||||
|
@Generated
|
||||||
private static final Logger log = LoggerFactory.getLogger(Flow.class);
|
private static final Logger log = LoggerFactory.getLogger(Flow.class);
|
||||||
private static final ExpressionParser EXPRESSION_PARSER = new SpelExpressionParser();
|
private static final ExpressionParser EXPRESSION_PARSER = new SpelExpressionParser();
|
||||||
private static final Map<String, EventCallback> EVENT_CALLBACK = Maps.newHashMap();
|
private static final Map<String, EventCallback> EVENT_CALLBACK = Maps.newHashMap();
|
||||||
|
|
@ -146,12 +149,20 @@ public class Flow implements BeanPostProcessor {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
||||||
if (bean instanceof RedissonClient) {
|
Objects.requireNonNull(bean);
|
||||||
redissonClient = (RedissonClient)bean;
|
byte var4 = 0;
|
||||||
} else if (bean instanceof FlowService) {
|
switch (((Class)bean).typeSwitch<invokedynamic>(bean, var4)) {
|
||||||
flowService = (FlowService)bean;
|
case 0:
|
||||||
} else if (bean instanceof EventCallback) {
|
RedissonClient client = (RedissonClient)bean;
|
||||||
EVENT_CALLBACK.put(((EventCallback)bean).supportedType(), (EventCallback)bean);
|
redissonClient = client;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
FlowService service = (FlowService)bean;
|
||||||
|
flowService = service;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
EventCallback eventCallback = (EventCallback)bean;
|
||||||
|
EVENT_CALLBACK.put(eventCallback.supportedType(), eventCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.postProcessAfterInitialization(bean, beanName);
|
return super.postProcessAfterInitialization(bean, beanName);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package net.xnzn.framework.flow;
|
package net.xnzn.framework.flow;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.Generated;
|
||||||
|
|
||||||
public class FlowNode {
|
public class FlowNode {
|
||||||
private long flowId;
|
private long flowId;
|
||||||
|
|
@ -36,78 +37,95 @@ public class FlowNode {
|
||||||
return this.isTask() ? this.logical : null;
|
return this.isTask() ? this.logical : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public FlowNode() {
|
public FlowNode() {
|
||||||
this.logical = AuditLogical.OR;
|
this.logical = AuditLogical.OR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public long getFlowId() {
|
public long getFlowId() {
|
||||||
return this.flowId;
|
return this.flowId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public NodeType getType() {
|
public NodeType getType() {
|
||||||
return this.type;
|
return this.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String getExpression() {
|
public String getExpression() {
|
||||||
return this.expression;
|
return this.expression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Long getTo() {
|
public Long getTo() {
|
||||||
return this.to;
|
return this.to;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public List<Scope> getScope() {
|
public List<Scope> getScope() {
|
||||||
return this.scope;
|
return this.scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public FlowNode setFlowId(final long flowId) {
|
public FlowNode setFlowId(final long flowId) {
|
||||||
this.flowId = flowId;
|
this.flowId = flowId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public FlowNode setId(final Long id) {
|
public FlowNode setId(final Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public FlowNode setName(final String name) {
|
public FlowNode setName(final String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public FlowNode setType(final NodeType type) {
|
public FlowNode setType(final NodeType type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public FlowNode setExpression(final String expression) {
|
public FlowNode setExpression(final String expression) {
|
||||||
this.expression = expression;
|
this.expression = expression;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public FlowNode setTo(final Long to) {
|
public FlowNode setTo(final Long to) {
|
||||||
this.to = to;
|
this.to = to;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public FlowNode setScope(final List<Scope> scope) {
|
public FlowNode setScope(final List<Scope> scope) {
|
||||||
this.scope = scope;
|
this.scope = scope;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public FlowNode setLogical(final AuditLogical logical) {
|
public FlowNode setLogical(final AuditLogical logical) {
|
||||||
this.logical = logical;
|
this.logical = logical;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public boolean equals(final Object o) {
|
public boolean equals(final Object o) {
|
||||||
if (o == this) {
|
if (o == this) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -203,10 +221,12 @@ public class FlowNode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
protected boolean canEqual(final Object other) {
|
protected boolean canEqual(final Object other) {
|
||||||
return other instanceof FlowNode;
|
return other instanceof FlowNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int PRIME = true;
|
int PRIME = true;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
|
|
@ -229,6 +249,7 @@ public class FlowNode {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String toString() {
|
public String toString() {
|
||||||
long var10000 = this.getFlowId();
|
long var10000 = this.getFlowId();
|
||||||
return "FlowNode(flowId=" + var10000 + ", id=" + this.getId() + ", name=" + this.getName() + ", type=" + String.valueOf(this.getType()) + ", expression=" + this.getExpression() + ", to=" + this.getTo() + ", scope=" + String.valueOf(this.getScope()) + ", logical=" + String.valueOf(this.getLogical()) + ")";
|
return "FlowNode(flowId=" + var10000 + ", id=" + this.getId() + ", name=" + this.getName() + ", type=" + String.valueOf(this.getType()) + ", expression=" + this.getExpression() + ", to=" + this.getTo() + ", scope=" + String.valueOf(this.getScope()) + ", logical=" + String.valueOf(this.getLogical()) + ")";
|
||||||
|
|
@ -258,42 +279,51 @@ public class FlowNode {
|
||||||
this.scope = scope;
|
this.scope = scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Long getFlowId() {
|
public Long getFlowId() {
|
||||||
return this.flowId;
|
return this.flowId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Long getNodeId() {
|
public Long getNodeId() {
|
||||||
return this.nodeId;
|
return this.nodeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String getScope() {
|
public String getScope() {
|
||||||
return this.scope;
|
return this.scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Scope setFlowId(final Long flowId) {
|
public Scope setFlowId(final Long flowId) {
|
||||||
this.flowId = flowId;
|
this.flowId = flowId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Scope setNodeId(final Long nodeId) {
|
public Scope setNodeId(final Long nodeId) {
|
||||||
this.nodeId = nodeId;
|
this.nodeId = nodeId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Scope setName(final String name) {
|
public Scope setName(final String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Scope setScope(final String scope) {
|
public Scope setScope(final String scope) {
|
||||||
this.scope = scope;
|
this.scope = scope;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public boolean equals(final Object o) {
|
public boolean equals(final Object o) {
|
||||||
if (o == this) {
|
if (o == this) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -353,10 +383,12 @@ public class FlowNode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
protected boolean canEqual(final Object other) {
|
protected boolean canEqual(final Object other) {
|
||||||
return other instanceof Scope;
|
return other instanceof Scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int PRIME = true;
|
int PRIME = true;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
|
|
@ -371,14 +403,17 @@ public class FlowNode {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String toString() {
|
public String toString() {
|
||||||
Long var10000 = this.getFlowId();
|
Long var10000 = this.getFlowId();
|
||||||
return "FlowNode.Scope(flowId=" + var10000 + ", nodeId=" + this.getNodeId() + ", name=" + this.getName() + ", scope=" + this.getScope() + ")";
|
return "FlowNode.Scope(flowId=" + var10000 + ", nodeId=" + this.getNodeId() + ", name=" + this.getName() + ", scope=" + this.getScope() + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Scope() {
|
public Scope() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Scope(final Long flowId, final Long nodeId, final String name, final String scope) {
|
public Scope(final Long flowId, final Long nodeId, final String name, final String scope) {
|
||||||
this.flowId = flowId;
|
this.flowId = flowId;
|
||||||
this.nodeId = nodeId;
|
this.nodeId = nodeId;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import lombok.Generated;
|
||||||
import net.xnzn.framework.flow.definition.Definition;
|
import net.xnzn.framework.flow.definition.Definition;
|
||||||
import net.xnzn.framework.flow.definition.DefinitionFilter;
|
import net.xnzn.framework.flow.definition.DefinitionFilter;
|
||||||
import net.xnzn.framework.flow.definition.DefinitionMapper;
|
import net.xnzn.framework.flow.definition.DefinitionMapper;
|
||||||
|
|
@ -28,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class FlowService {
|
public class FlowService {
|
||||||
|
@Generated
|
||||||
private static final Logger log = LoggerFactory.getLogger(FlowService.class);
|
private static final Logger log = LoggerFactory.getLogger(FlowService.class);
|
||||||
@Autowired
|
@Autowired
|
||||||
InstanceMapper instanceMapper;
|
InstanceMapper instanceMapper;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package net.xnzn.framework.flow.definition;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.Generated;
|
||||||
|
|
||||||
public class Definition {
|
public class Definition {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
@ -10,51 +11,62 @@ public class Definition {
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
private List<Node> node;
|
private List<Node> node;
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return this.type;
|
return this.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public LocalDateTime getCreateTime() {
|
public LocalDateTime getCreateTime() {
|
||||||
return this.createTime;
|
return this.createTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public List<Node> getNode() {
|
public List<Node> getNode() {
|
||||||
return this.node;
|
return this.node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Definition setId(final Long id) {
|
public Definition setId(final Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Definition setName(final String name) {
|
public Definition setName(final String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Definition setType(final String type) {
|
public Definition setType(final String type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Definition setCreateTime(final LocalDateTime createTime) {
|
public Definition setCreateTime(final LocalDateTime createTime) {
|
||||||
this.createTime = createTime;
|
this.createTime = createTime;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Definition setNode(final List<Node> node) {
|
public Definition setNode(final List<Node> node) {
|
||||||
this.node = node;
|
this.node = node;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public boolean equals(final Object o) {
|
public boolean equals(final Object o) {
|
||||||
if (o == this) {
|
if (o == this) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -128,10 +140,12 @@ public class Definition {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
protected boolean canEqual(final Object other) {
|
protected boolean canEqual(final Object other) {
|
||||||
return other instanceof Definition;
|
return other instanceof Definition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int PRIME = true;
|
int PRIME = true;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
|
|
@ -148,6 +162,7 @@ public class Definition {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String toString() {
|
public String toString() {
|
||||||
Long var10000 = this.getId();
|
Long var10000 = this.getId();
|
||||||
return "Definition(id=" + var10000 + ", name=" + this.getName() + ", type=" + this.getType() + ", createTime=" + String.valueOf(this.getCreateTime()) + ", node=" + String.valueOf(this.getNode()) + ")";
|
return "Definition(id=" + var10000 + ", name=" + this.getName() + ", type=" + this.getType() + ", createTime=" + String.valueOf(this.getCreateTime()) + ", node=" + String.valueOf(this.getNode()) + ")";
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,33 @@
|
||||||
package net.xnzn.framework.flow.definition;
|
package net.xnzn.framework.flow.definition;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.Generated;
|
||||||
|
|
||||||
public class DefinitionFilter {
|
public class DefinitionFilter {
|
||||||
private String name;
|
private String name;
|
||||||
private Set<String> types;
|
private Set<String> types;
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Set<String> getTypes() {
|
public Set<String> getTypes() {
|
||||||
return this.types;
|
return this.types;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public void setName(final String name) {
|
public void setName(final String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public void setTypes(final Set<String> types) {
|
public void setTypes(final Set<String> types) {
|
||||||
this.types = types;
|
this.types = types;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public boolean equals(final Object o) {
|
public boolean equals(final Object o) {
|
||||||
if (o == this) {
|
if (o == this) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -57,10 +63,12 @@ public class DefinitionFilter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
protected boolean canEqual(final Object other) {
|
protected boolean canEqual(final Object other) {
|
||||||
return other instanceof DefinitionFilter;
|
return other instanceof DefinitionFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int PRIME = true;
|
int PRIME = true;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
|
|
@ -71,6 +79,7 @@ public class DefinitionFilter {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String toString() {
|
public String toString() {
|
||||||
String var10000 = this.getName();
|
String var10000 = this.getName();
|
||||||
return "DefinitionFilter(name=" + var10000 + ", types=" + String.valueOf(this.getTypes()) + ")";
|
return "DefinitionFilter(name=" + var10000 + ", types=" + String.valueOf(this.getTypes()) + ")";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package net.xnzn.framework.flow.definition;
|
package net.xnzn.framework.flow.definition;
|
||||||
|
|
||||||
|
import lombok.Generated;
|
||||||
import net.xnzn.framework.flow.FlowNode;
|
import net.xnzn.framework.flow.FlowNode;
|
||||||
|
|
||||||
public class Node extends FlowNode {
|
public class Node extends FlowNode {
|
||||||
|
|
@ -14,6 +15,7 @@ public class Node extends FlowNode {
|
||||||
return !this.isTask() && !this.isForward() ? null : this.participantFrom;
|
return !this.isTask() && !this.isForward() ? null : this.participantFrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public boolean equals(final Object o) {
|
public boolean equals(final Object o) {
|
||||||
if (o == this) {
|
if (o == this) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -51,10 +53,12 @@ public class Node extends FlowNode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
protected boolean canEqual(final Object other) {
|
protected boolean canEqual(final Object other) {
|
||||||
return other instanceof Node;
|
return other instanceof Node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int PRIME = true;
|
int PRIME = true;
|
||||||
int result = super.hashCode();
|
int result = super.hashCode();
|
||||||
|
|
@ -65,20 +69,24 @@ public class Node extends FlowNode {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Node() {
|
public Node() {
|
||||||
this.participantDirection = Node.ParticipantDirection.BOTTOM_TO_TOP;
|
this.participantDirection = Node.ParticipantDirection.BOTTOM_TO_TOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Node setParticipantFrom(final String participantFrom) {
|
public Node setParticipantFrom(final String participantFrom) {
|
||||||
this.participantFrom = participantFrom;
|
this.participantFrom = participantFrom;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Node setParticipantDirection(final ParticipantDirection participantDirection) {
|
public Node setParticipantDirection(final ParticipantDirection participantDirection) {
|
||||||
this.participantDirection = participantDirection;
|
this.participantDirection = participantDirection;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String toString() {
|
public String toString() {
|
||||||
String var10000 = this.getParticipantFrom();
|
String var10000 = this.getParticipantFrom();
|
||||||
return "Node(participantFrom=" + var10000 + ", participantDirection=" + String.valueOf(this.getParticipantDirection()) + ")";
|
return "Node(participantFrom=" + var10000 + ", participantDirection=" + String.valueOf(this.getParticipantDirection()) + ")";
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package net.xnzn.framework.flow.instance;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Generated;
|
||||||
import net.xnzn.framework.flow.FlowNode;
|
import net.xnzn.framework.flow.FlowNode;
|
||||||
|
|
||||||
public class Event {
|
public class Event {
|
||||||
|
|
@ -28,75 +29,91 @@ public class Event {
|
||||||
return this.triggerNode.isState() ? null : this.operatorName;
|
return this.triggerNode.isState() ? null : this.operatorName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Long getInstanceId() {
|
public Long getInstanceId() {
|
||||||
return this.instanceId;
|
return this.instanceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public FlowNode getTriggerNode() {
|
public FlowNode getTriggerNode() {
|
||||||
return this.triggerNode;
|
return this.triggerNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public FlowNode getNextNode() {
|
public FlowNode getNextNode() {
|
||||||
return this.nextNode;
|
return this.nextNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Operation getOperatorResult() {
|
public Operation getOperatorResult() {
|
||||||
return this.operatorResult;
|
return this.operatorResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public LocalDateTime getOperatorTime() {
|
public LocalDateTime getOperatorTime() {
|
||||||
return this.operatorTime;
|
return this.operatorTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Event setId(final Long id) {
|
public Event setId(final Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Event setInstanceId(final Long instanceId) {
|
public Event setInstanceId(final Long instanceId) {
|
||||||
this.instanceId = instanceId;
|
this.instanceId = instanceId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Event setTriggerNode(final FlowNode triggerNode) {
|
public Event setTriggerNode(final FlowNode triggerNode) {
|
||||||
this.triggerNode = triggerNode;
|
this.triggerNode = triggerNode;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Event setNextNode(final FlowNode nextNode) {
|
public Event setNextNode(final FlowNode nextNode) {
|
||||||
this.nextNode = nextNode;
|
this.nextNode = nextNode;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Event setOperatorResult(final Operation operatorResult) {
|
public Event setOperatorResult(final Operation operatorResult) {
|
||||||
this.operatorResult = operatorResult;
|
this.operatorResult = operatorResult;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Event setOperatorRemark(final String operatorRemark) {
|
public Event setOperatorRemark(final String operatorRemark) {
|
||||||
this.operatorRemark = operatorRemark;
|
this.operatorRemark = operatorRemark;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Event setOperatorId(final Long operatorId) {
|
public Event setOperatorId(final Long operatorId) {
|
||||||
this.operatorId = operatorId;
|
this.operatorId = operatorId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Event setOperatorName(final String operatorName) {
|
public Event setOperatorName(final String operatorName) {
|
||||||
this.operatorName = operatorName;
|
this.operatorName = operatorName;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Event setOperatorTime(final LocalDateTime operatorTime) {
|
public Event setOperatorTime(final LocalDateTime operatorTime) {
|
||||||
this.operatorTime = operatorTime;
|
this.operatorTime = operatorTime;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public boolean equals(final Object o) {
|
public boolean equals(final Object o) {
|
||||||
if (o == this) {
|
if (o == this) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -222,10 +239,12 @@ public class Event {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
protected boolean canEqual(final Object other) {
|
protected boolean canEqual(final Object other) {
|
||||||
return other instanceof Event;
|
return other instanceof Event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int PRIME = true;
|
int PRIME = true;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
|
|
@ -250,11 +269,13 @@ public class Event {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String toString() {
|
public String toString() {
|
||||||
Long var10000 = this.getId();
|
Long var10000 = this.getId();
|
||||||
return "Event(id=" + var10000 + ", instanceId=" + this.getInstanceId() + ", triggerNode=" + String.valueOf(this.getTriggerNode()) + ", nextNode=" + String.valueOf(this.getNextNode()) + ", operatorResult=" + String.valueOf(this.getOperatorResult()) + ", operatorRemark=" + this.getOperatorRemark() + ", operatorId=" + this.getOperatorId() + ", operatorName=" + this.getOperatorName() + ", operatorTime=" + String.valueOf(this.getOperatorTime()) + ")";
|
return "Event(id=" + var10000 + ", instanceId=" + this.getInstanceId() + ", triggerNode=" + String.valueOf(this.getTriggerNode()) + ", nextNode=" + String.valueOf(this.getNextNode()) + ", operatorResult=" + String.valueOf(this.getOperatorResult()) + ", operatorRemark=" + this.getOperatorRemark() + ", operatorId=" + this.getOperatorId() + ", operatorName=" + this.getOperatorName() + ", operatorTime=" + String.valueOf(this.getOperatorTime()) + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Event() {
|
public Event() {
|
||||||
this.operatorResult = Event.Operation.PASS;
|
this.operatorResult = Event.Operation.PASS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,13 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import lombok.Generated;
|
||||||
import net.xnzn.framework.flow.FlowNode;
|
import net.xnzn.framework.flow.FlowNode;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class Instance {
|
public class Instance {
|
||||||
|
@Generated
|
||||||
private static final Logger log = LoggerFactory.getLogger(Instance.class);
|
private static final Logger log = LoggerFactory.getLogger(Instance.class);
|
||||||
@TableId
|
@TableId
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
@ -99,182 +101,222 @@ public class Instance {
|
||||||
return flowNode;
|
return flowNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance() {
|
public Instance() {
|
||||||
this.state = Instance.State.DRAFT;
|
this.state = Instance.State.DRAFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return this.type;
|
return this.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Long getCurrentNodeId() {
|
public Long getCurrentNodeId() {
|
||||||
return this.currentNodeId;
|
return this.currentNodeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public List<Context> getContext() {
|
public List<Context> getContext() {
|
||||||
return this.context;
|
return this.context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public List<? extends FlowNode> getNode() {
|
public List<? extends FlowNode> getNode() {
|
||||||
return this.node;
|
return this.node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Long getCreatorId() {
|
public Long getCreatorId() {
|
||||||
return this.creatorId;
|
return this.creatorId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String getCreatorName() {
|
public String getCreatorName() {
|
||||||
return this.creatorName;
|
return this.creatorName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public LocalDateTime getCreateTime() {
|
public LocalDateTime getCreateTime() {
|
||||||
return this.createTime;
|
return this.createTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Long getUpdatorId() {
|
public Long getUpdatorId() {
|
||||||
return this.updatorId;
|
return this.updatorId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String getUpdatorName() {
|
public String getUpdatorName() {
|
||||||
return this.updatorName;
|
return this.updatorName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public LocalDateTime getUpdateTime() {
|
public LocalDateTime getUpdateTime() {
|
||||||
return this.updateTime;
|
return this.updateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public List<Event> getEvent() {
|
public List<Event> getEvent() {
|
||||||
return this.event;
|
return this.event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public State getState() {
|
public State getState() {
|
||||||
return this.state;
|
return this.state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Boolean getCreated() {
|
public Boolean getCreated() {
|
||||||
return this.created;
|
return this.created;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Boolean getWaiting() {
|
public Boolean getWaiting() {
|
||||||
return this.waiting;
|
return this.waiting;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Boolean getProcessed() {
|
public Boolean getProcessed() {
|
||||||
return this.processed;
|
return this.processed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Boolean getUpComing() {
|
public Boolean getUpComing() {
|
||||||
return this.upComing;
|
return this.upComing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Boolean getForward() {
|
public Boolean getForward() {
|
||||||
return this.forward;
|
return this.forward;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setId(final Long id) {
|
public Instance setId(final Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setName(final String name) {
|
public Instance setName(final String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setType(final String type) {
|
public Instance setType(final String type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
|
@Generated
|
||||||
public Instance setCurrentNodeId(final Long currentNodeId) {
|
public Instance setCurrentNodeId(final Long currentNodeId) {
|
||||||
this.currentNodeId = currentNodeId;
|
this.currentNodeId = currentNodeId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setContext(final List<Context> context) {
|
public Instance setContext(final List<Context> context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setNode(final List<? extends FlowNode> node) {
|
public Instance setNode(final List<? extends FlowNode> node) {
|
||||||
this.node = node;
|
this.node = node;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setCreatorId(final Long creatorId) {
|
public Instance setCreatorId(final Long creatorId) {
|
||||||
this.creatorId = creatorId;
|
this.creatorId = creatorId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setCreatorName(final String creatorName) {
|
public Instance setCreatorName(final String creatorName) {
|
||||||
this.creatorName = creatorName;
|
this.creatorName = creatorName;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setCreateTime(final LocalDateTime createTime) {
|
public Instance setCreateTime(final LocalDateTime createTime) {
|
||||||
this.createTime = createTime;
|
this.createTime = createTime;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setUpdatorId(final Long updatorId) {
|
public Instance setUpdatorId(final Long updatorId) {
|
||||||
this.updatorId = updatorId;
|
this.updatorId = updatorId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setUpdatorName(final String updatorName) {
|
public Instance setUpdatorName(final String updatorName) {
|
||||||
this.updatorName = updatorName;
|
this.updatorName = updatorName;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setUpdateTime(final LocalDateTime updateTime) {
|
public Instance setUpdateTime(final LocalDateTime updateTime) {
|
||||||
this.updateTime = updateTime;
|
this.updateTime = updateTime;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setEvent(final List<Event> event) {
|
public Instance setEvent(final List<Event> event) {
|
||||||
this.event = event;
|
this.event = event;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setState(final State state) {
|
public Instance setState(final State state) {
|
||||||
this.state = state;
|
this.state = state;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setCreated(final Boolean created) {
|
public Instance setCreated(final Boolean created) {
|
||||||
this.created = created;
|
this.created = created;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setWaiting(final Boolean waiting) {
|
public Instance setWaiting(final Boolean waiting) {
|
||||||
this.waiting = waiting;
|
this.waiting = waiting;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setProcessed(final Boolean processed) {
|
public Instance setProcessed(final Boolean processed) {
|
||||||
this.processed = processed;
|
this.processed = processed;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setUpComing(final Boolean upComing) {
|
public Instance setUpComing(final Boolean upComing) {
|
||||||
this.upComing = upComing;
|
this.upComing = upComing;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Instance setForward(final Boolean forward) {
|
public Instance setForward(final Boolean forward) {
|
||||||
this.forward = forward;
|
this.forward = forward;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public boolean equals(final Object o) {
|
public boolean equals(final Object o) {
|
||||||
if (o == this) {
|
if (o == this) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -516,10 +558,12 @@ public class Instance {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
protected boolean canEqual(final Object other) {
|
protected boolean canEqual(final Object other) {
|
||||||
return other instanceof Instance;
|
return other instanceof Instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int PRIME = true;
|
int PRIME = true;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
|
|
@ -564,6 +608,7 @@ public class Instance {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String toString() {
|
public String toString() {
|
||||||
Long var10000 = this.getId();
|
Long var10000 = this.getId();
|
||||||
return "Instance(id=" + var10000 + ", name=" + this.getName() + ", type=" + this.getType() + ", currentNodeId=" + this.getCurrentNodeId() + ", context=" + String.valueOf(this.getContext()) + ", node=" + String.valueOf(this.getNode()) + ", creatorId=" + this.getCreatorId() + ", creatorName=" + this.getCreatorName() + ", createTime=" + String.valueOf(this.getCreateTime()) + ", updatorId=" + this.getUpdatorId() + ", updatorName=" + this.getUpdatorName() + ", updateTime=" + String.valueOf(this.getUpdateTime()) + ", event=" + String.valueOf(this.getEvent()) + ", state=" + String.valueOf(this.getState()) + ", created=" + this.getCreated() + ", waiting=" + this.getWaiting() + ", processed=" + this.getProcessed() + ", upComing=" + this.getUpComing() + ", forward=" + this.getForward() + ")";
|
return "Instance(id=" + var10000 + ", name=" + this.getName() + ", type=" + this.getType() + ", currentNodeId=" + this.getCurrentNodeId() + ", context=" + String.valueOf(this.getContext()) + ", node=" + String.valueOf(this.getNode()) + ", creatorId=" + this.getCreatorId() + ", creatorName=" + this.getCreatorName() + ", createTime=" + String.valueOf(this.getCreateTime()) + ", updatorId=" + this.getUpdatorId() + ", updatorName=" + this.getUpdatorName() + ", updateTime=" + String.valueOf(this.getUpdateTime()) + ", event=" + String.valueOf(this.getEvent()) + ", state=" + String.valueOf(this.getState()) + ", created=" + this.getCreated() + ", waiting=" + this.getWaiting() + ", processed=" + this.getProcessed() + ", upComing=" + this.getUpComing() + ", forward=" + this.getForward() + ")";
|
||||||
|
|
@ -582,6 +627,7 @@ public class Instance {
|
||||||
this.terminal = terminal;
|
this.terminal = terminal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public boolean isTerminal() {
|
public boolean isTerminal() {
|
||||||
return this.terminal;
|
return this.terminal;
|
||||||
}
|
}
|
||||||
|
|
@ -597,33 +643,40 @@ public class Instance {
|
||||||
private String key;
|
private String key;
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Long getInstanceId() {
|
public Long getInstanceId() {
|
||||||
return this.instanceId;
|
return this.instanceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String getKey() {
|
public String getKey() {
|
||||||
return this.key;
|
return this.key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
return this.value;
|
return this.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Context setInstanceId(final Long instanceId) {
|
public Context setInstanceId(final Long instanceId) {
|
||||||
this.instanceId = instanceId;
|
this.instanceId = instanceId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Context setKey(final String key) {
|
public Context setKey(final String key) {
|
||||||
this.key = key;
|
this.key = key;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Context setValue(final String value) {
|
public Context setValue(final String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public boolean equals(final Object o) {
|
public boolean equals(final Object o) {
|
||||||
if (o == this) {
|
if (o == this) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -673,10 +726,12 @@ public class Instance {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
protected boolean canEqual(final Object other) {
|
protected boolean canEqual(final Object other) {
|
||||||
return other instanceof Context;
|
return other instanceof Context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int PRIME = true;
|
int PRIME = true;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
|
|
@ -689,17 +744,20 @@ public class Instance {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String toString() {
|
public String toString() {
|
||||||
Long var10000 = this.getInstanceId();
|
Long var10000 = this.getInstanceId();
|
||||||
return "Instance.Context(instanceId=" + var10000 + ", key=" + this.getKey() + ", value=" + this.getValue() + ")";
|
return "Instance.Context(instanceId=" + var10000 + ", key=" + this.getKey() + ", value=" + this.getValue() + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Context(final Long instanceId, final String key, final String value) {
|
public Context(final Long instanceId, final String key, final String value) {
|
||||||
this.instanceId = instanceId;
|
this.instanceId = instanceId;
|
||||||
this.key = key;
|
this.key = key;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Context() {
|
public Context() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.Generated;
|
||||||
|
|
||||||
public class InstanceFilter {
|
public class InstanceFilter {
|
||||||
private List<Long> instanceIds;
|
private List<Long> instanceIds;
|
||||||
|
|
@ -19,94 +20,117 @@ public class InstanceFilter {
|
||||||
private LocalDateTime updateTimeStart;
|
private LocalDateTime updateTimeStart;
|
||||||
private LocalDateTime updateTimeEnd;
|
private LocalDateTime updateTimeEnd;
|
||||||
|
|
||||||
|
@Generated
|
||||||
public List<Long> getInstanceIds() {
|
public List<Long> getInstanceIds() {
|
||||||
return this.instanceIds;
|
return this.instanceIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Map<String, String> getContext() {
|
public Map<String, String> getContext() {
|
||||||
return this.context;
|
return this.context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Long getOperatorId() {
|
public Long getOperatorId() {
|
||||||
return this.operatorId;
|
return this.operatorId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Set<State> getInvolvedStates() {
|
public Set<State> getInvolvedStates() {
|
||||||
return this.involvedStates;
|
return this.involvedStates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Set<String> getType() {
|
public Set<String> getType() {
|
||||||
return this.type;
|
return this.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public Set<Instance.State> getState() {
|
public Set<Instance.State> getState() {
|
||||||
return this.state;
|
return this.state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public boolean isAsc() {
|
public boolean isAsc() {
|
||||||
return this.asc;
|
return this.asc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public LocalDateTime getCreateTimeStart() {
|
public LocalDateTime getCreateTimeStart() {
|
||||||
return this.createTimeStart;
|
return this.createTimeStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public LocalDateTime getCreateTimeEnd() {
|
public LocalDateTime getCreateTimeEnd() {
|
||||||
return this.createTimeEnd;
|
return this.createTimeEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public LocalDateTime getUpdateTimeStart() {
|
public LocalDateTime getUpdateTimeStart() {
|
||||||
return this.updateTimeStart;
|
return this.updateTimeStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public LocalDateTime getUpdateTimeEnd() {
|
public LocalDateTime getUpdateTimeEnd() {
|
||||||
return this.updateTimeEnd;
|
return this.updateTimeEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public void setInstanceIds(final List<Long> instanceIds) {
|
public void setInstanceIds(final List<Long> instanceIds) {
|
||||||
this.instanceIds = instanceIds;
|
this.instanceIds = instanceIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public void setContext(final Map<String, String> context) {
|
public void setContext(final Map<String, String> context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public void setOperatorId(final Long operatorId) {
|
public void setOperatorId(final Long operatorId) {
|
||||||
this.operatorId = operatorId;
|
this.operatorId = operatorId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public void setInvolvedStates(final Set<State> involvedStates) {
|
public void setInvolvedStates(final Set<State> involvedStates) {
|
||||||
this.involvedStates = involvedStates;
|
this.involvedStates = involvedStates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public void setType(final Set<String> type) {
|
public void setType(final Set<String> type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public void setState(final Set<Instance.State> state) {
|
public void setState(final Set<Instance.State> state) {
|
||||||
this.state = state;
|
this.state = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public void setAsc(final boolean asc) {
|
public void setAsc(final boolean asc) {
|
||||||
this.asc = asc;
|
this.asc = asc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public void setCreateTimeStart(final LocalDateTime createTimeStart) {
|
public void setCreateTimeStart(final LocalDateTime createTimeStart) {
|
||||||
this.createTimeStart = createTimeStart;
|
this.createTimeStart = createTimeStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public void setCreateTimeEnd(final LocalDateTime createTimeEnd) {
|
public void setCreateTimeEnd(final LocalDateTime createTimeEnd) {
|
||||||
this.createTimeEnd = createTimeEnd;
|
this.createTimeEnd = createTimeEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public void setUpdateTimeStart(final LocalDateTime updateTimeStart) {
|
public void setUpdateTimeStart(final LocalDateTime updateTimeStart) {
|
||||||
this.updateTimeStart = updateTimeStart;
|
this.updateTimeStart = updateTimeStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public void setUpdateTimeEnd(final LocalDateTime updateTimeEnd) {
|
public void setUpdateTimeEnd(final LocalDateTime updateTimeEnd) {
|
||||||
this.updateTimeEnd = updateTimeEnd;
|
this.updateTimeEnd = updateTimeEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public boolean equals(final Object o) {
|
public boolean equals(final Object o) {
|
||||||
if (o == this) {
|
if (o == this) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -236,10 +260,12 @@ public class InstanceFilter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
protected boolean canEqual(final Object other) {
|
protected boolean canEqual(final Object other) {
|
||||||
return other instanceof InstanceFilter;
|
return other instanceof InstanceFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int PRIME = true;
|
int PRIME = true;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
|
|
@ -267,6 +293,7 @@ public class InstanceFilter {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Generated
|
||||||
public String toString() {
|
public String toString() {
|
||||||
String var10000 = String.valueOf(this.getInstanceIds());
|
String var10000 = String.valueOf(this.getInstanceIds());
|
||||||
return "InstanceFilter(instanceIds=" + var10000 + ", context=" + String.valueOf(this.getContext()) + ", operatorId=" + this.getOperatorId() + ", involvedStates=" + String.valueOf(this.getInvolvedStates()) + ", type=" + String.valueOf(this.getType()) + ", state=" + String.valueOf(this.getState()) + ", asc=" + this.isAsc() + ", createTimeStart=" + String.valueOf(this.getCreateTimeStart()) + ", createTimeEnd=" + String.valueOf(this.getCreateTimeEnd()) + ", updateTimeStart=" + String.valueOf(this.getUpdateTimeStart()) + ", updateTimeEnd=" + String.valueOf(this.getUpdateTimeEnd()) + ")";
|
return "InstanceFilter(instanceIds=" + var10000 + ", context=" + String.valueOf(this.getContext()) + ", operatorId=" + this.getOperatorId() + ", involvedStates=" + String.valueOf(this.getInvolvedStates()) + ", type=" + String.valueOf(this.getType()) + ", state=" + String.valueOf(this.getState()) + ", asc=" + this.isAsc() + ", createTimeStart=" + String.valueOf(this.getCreateTimeStart()) + ", createTimeEnd=" + String.valueOf(this.getCreateTimeEnd()) + ", updateTimeStart=" + String.valueOf(this.getUpdateTimeStart()) + ", updateTimeEnd=" + String.valueOf(this.getUpdateTimeEnd()) + ")";
|
||||||
|
|
|
||||||
|
|
@ -2,30 +2,26 @@ package net.xnzn.framework.flow.instance;
|
||||||
|
|
||||||
import net.xnzn.framework.flow.Flow;
|
import net.xnzn.framework.flow.Flow;
|
||||||
|
|
||||||
public class InstanceHolder {
|
public record InstanceHolder(long id, Long operatorId, String operatorName) {
|
||||||
private final long id;
|
public InstanceHolder(long id, Long operatorId, String operatorName) {
|
||||||
private final Long operatorId;
|
|
||||||
private final String operatorName;
|
|
||||||
|
|
||||||
public void next() {
|
|
||||||
Flow.next(this.id, (String)null, this.operatorId, this.operatorName);
|
|
||||||
}
|
|
||||||
|
|
||||||
public InstanceHolder(final long id, final Long operatorId, final String operatorName) {
|
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.operatorId = operatorId;
|
this.operatorId = operatorId;
|
||||||
this.operatorName = operatorName;
|
this.operatorName = operatorName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getId() {
|
public void next() {
|
||||||
|
Flow.next(this.id, (String)null, this.operatorId, this.operatorName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public long id() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getOperatorId() {
|
public Long operatorId() {
|
||||||
return this.operatorId;
|
return this.operatorId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOperatorName() {
|
public String operatorName() {
|
||||||
return this.operatorName;
|
return this.operatorName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue