init
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>workflow-service-parent</artifactId>
|
||||
<groupId>com.platform</groupId>
|
||||
<version>0.4.x</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>0.4.x</version>
|
||||
<artifactId>workflow-service-api</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-micro-spring-boot-starter</artifactId>
|
||||
<version>${knife4j.version}</version>
|
||||
</dependency>
|
||||
<!--feign 依赖-->
|
||||
<dependency>
|
||||
<groupId>io.github.openfeign</groupId>
|
||||
<artifactId>feign-okhttp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.platform</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>0.4.x</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-web</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,51 @@
|
||||
package cn.datax.service.workflow.api.dto;
|
||||
|
||||
import cn.datax.common.validate.ValidationGroups;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* <p>
|
||||
* 业务流程配置表 实体DTO
|
||||
* </p>
|
||||
*
|
||||
* @author AllDataDC
|
||||
* @date 2022-11-22
|
||||
*/
|
||||
@ApiModel(value = "业务流程配置表Model")
|
||||
@Data
|
||||
public class BusinessDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
@NotBlank(message = "主键ID不能为空", groups = {ValidationGroups.Update.class})
|
||||
private String id;
|
||||
@ApiModelProperty(value = "业务编码")
|
||||
@NotBlank(message = "业务编码不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
|
||||
private String businessCode;
|
||||
@ApiModelProperty(value = "业务名称")
|
||||
@NotBlank(message = "业务名称不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
|
||||
private String businessName;
|
||||
@ApiModelProperty(value = "业务组件")
|
||||
@NotBlank(message = "业务组件不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
|
||||
private String businessComponent;
|
||||
@ApiModelProperty(value = "业务审核用户组")
|
||||
@NotBlank(message = "业务审核用户组不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
|
||||
private String businessAuditGroup;
|
||||
@ApiModelProperty(value = "流程定义ID")
|
||||
@NotBlank(message = "流程定义ID不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
|
||||
private String processDefinitionId;
|
||||
@ApiModelProperty(value = "消息模板")
|
||||
@NotBlank(message = "消息模板不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
|
||||
private String businessTempalte;
|
||||
@ApiModelProperty(value = "状态")
|
||||
@NotNull(message = "状态不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
|
||||
private String status;
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package cn.datax.service.workflow.api.dto;
|
||||
|
||||
import cn.datax.common.validate.ValidationGroups;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程分类表 实体DTO
|
||||
* </p>
|
||||
*
|
||||
* @author AllDataDC
|
||||
* @date 2022-11-10
|
||||
*/
|
||||
@ApiModel(value = "流程分类表Model")
|
||||
@Data
|
||||
public class CategoryDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
@NotBlank(message = "主键ID不能为空", groups = {ValidationGroups.Update.class})
|
||||
private String id;
|
||||
@ApiModelProperty(value = "分类名称")
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package cn.datax.service.workflow.api.dto;
|
||||
|
||||
import cn.datax.service.workflow.api.enums.VariablesEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiModel(value = "创建流程实例Model")
|
||||
@Data
|
||||
public class ProcessInstanceCreateRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "流程定义ID")
|
||||
private String processDefinitionId;
|
||||
@ApiModelProperty(value = "提交人")
|
||||
private String submitter;
|
||||
@ApiModelProperty(value = "业务ID")
|
||||
private String businessKey;
|
||||
@ApiModelProperty(value = "业务类型")
|
||||
private String businessCode;
|
||||
@ApiModelProperty(value = "业务名称")
|
||||
private String businessName;
|
||||
@ApiModelProperty(value = "业务审核用户组")
|
||||
private String businessAuditGroup;
|
||||
@ApiModelProperty(value = "流程参数")
|
||||
private Map<String, Object> variables = new HashMap<>();
|
||||
|
||||
public Map<String, Object> getVariables() {
|
||||
variables.put(VariablesEnum.submitter.toString(), submitter);
|
||||
variables.put(VariablesEnum.businessKey.toString(), businessKey);
|
||||
variables.put(VariablesEnum.businessCode.toString(), businessCode);
|
||||
variables.put(VariablesEnum.businessName.toString(), businessName);
|
||||
variables.put(VariablesEnum.businessAuditGroup.toString(), businessAuditGroup);
|
||||
return variables;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package cn.datax.service.workflow.api.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiModel(value = "任务执行Model")
|
||||
@Data
|
||||
public class TaskRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "执行任务类型")
|
||||
private String action;
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private String taskId;
|
||||
@ApiModelProperty(value = "流程实例ID")
|
||||
private String processInstanceId;
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private String userId;
|
||||
@ApiModelProperty(value = "审批意见")
|
||||
private String message;
|
||||
@ApiModelProperty(value = "参数")
|
||||
private Map<String, Object> variables;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package cn.datax.service.workflow.api.entity;
|
||||
|
||||
import cn.datax.common.base.DataScopeBaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 业务流程配置表
|
||||
* </p>
|
||||
*
|
||||
* @author AllDataDC
|
||||
* @date 2022-11-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@TableName("flow_business")
|
||||
public class BusinessEntity extends DataScopeBaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 业务编码
|
||||
*/
|
||||
private String businessCode;
|
||||
|
||||
/**
|
||||
* 业务名称
|
||||
*/
|
||||
private String businessName;
|
||||
|
||||
/**
|
||||
* 业务组件
|
||||
*/
|
||||
private String businessComponent;
|
||||
|
||||
/**
|
||||
* 业务审核用户组
|
||||
*/
|
||||
private String businessAuditGroup;
|
||||
|
||||
/**
|
||||
* 流程定义ID
|
||||
*/
|
||||
private String processDefinitionId;
|
||||
|
||||
/**
|
||||
* 消息模板
|
||||
*/
|
||||
private String businessTempalte;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package cn.datax.service.workflow.api.entity;
|
||||
|
||||
import cn.datax.common.base.DataScopeBaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程分类表
|
||||
* </p>
|
||||
*
|
||||
* @author AllDataDC
|
||||
* @date 2022-11-10
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@TableName("flow_category")
|
||||
public class CategoryEntity extends DataScopeBaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package cn.datax.service.workflow.api.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ActionEnum {
|
||||
|
||||
COMPLETE("complete", "任务完成"),
|
||||
CLAIM("claim", "任务签收"),
|
||||
UNCLAIM("unclaim", "任务反签收"),
|
||||
DELEGATE("delegate", "任务委派"),
|
||||
RESOLVE("resolve", "任务归还"),
|
||||
ASSIGNEE("assignee", "任务转办");
|
||||
|
||||
private String action;
|
||||
private String title;
|
||||
|
||||
public static ActionEnum actionOf(String action) {
|
||||
for(ActionEnum actionEnum : values()){
|
||||
if(actionEnum.getAction().equals(action)){
|
||||
return actionEnum;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("没有找到对应的枚举");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package cn.datax.service.workflow.api.enums;
|
||||
|
||||
/**
|
||||
* 流程参数 常量
|
||||
*/
|
||||
public enum VariablesEnum {
|
||||
|
||||
/** 开始 */
|
||||
start,
|
||||
|
||||
/** 提交节点 */
|
||||
submitNode,
|
||||
|
||||
/** 提交人 */
|
||||
submitter,
|
||||
|
||||
/** 初审节点 */
|
||||
initialAuditNode,
|
||||
|
||||
/** 终审节点 */
|
||||
finalAuditNode,
|
||||
|
||||
/** 通过结束节点 */
|
||||
approveEnd,
|
||||
|
||||
/** 失败结束节点 */
|
||||
rejectEnd,
|
||||
|
||||
/** 业务主题 */
|
||||
businessName,
|
||||
|
||||
/** 业务类型 */
|
||||
businessCode,
|
||||
|
||||
/** 业务主键 */
|
||||
businessKey,
|
||||
|
||||
/** 业务审核用户组 */
|
||||
businessAuditGroup,
|
||||
|
||||
/** 审核结果 */
|
||||
approved;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package cn.datax.service.workflow.api.feign;
|
||||
|
||||
import cn.datax.service.workflow.api.dto.ProcessInstanceCreateRequest;
|
||||
import cn.datax.service.workflow.api.feign.factory.FlowInstanceServiceFeignFallbackFactory;
|
||||
import cn.datax.service.workflow.api.vo.FlowInstanceVo;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@FeignClient(contextId = "flowInstanceServiceFeign", value = "service-workflow", fallbackFactory = FlowInstanceServiceFeignFallbackFactory.class)
|
||||
public interface FlowInstanceServiceFeign {
|
||||
|
||||
@PostMapping("/instances/startById")
|
||||
FlowInstanceVo startById(@RequestBody ProcessInstanceCreateRequest request);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package cn.datax.service.workflow.api.feign.factory;
|
||||
|
||||
import cn.datax.service.workflow.api.feign.FlowInstanceServiceFeign;
|
||||
import cn.datax.service.workflow.api.feign.fallback.FlowInstanceServiceFeignFallbackImpl;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class FlowInstanceServiceFeignFallbackFactory implements FallbackFactory<FlowInstanceServiceFeign> {
|
||||
|
||||
@Override
|
||||
public FlowInstanceServiceFeign create(Throwable throwable) {
|
||||
FlowInstanceServiceFeignFallbackImpl flowInstanceServiceFeignFallback = new FlowInstanceServiceFeignFallbackImpl();
|
||||
flowInstanceServiceFeignFallback.setCause(throwable);
|
||||
return flowInstanceServiceFeignFallback;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package cn.datax.service.workflow.api.feign.fallback;
|
||||
|
||||
import cn.datax.service.workflow.api.dto.ProcessInstanceCreateRequest;
|
||||
import cn.datax.service.workflow.api.feign.FlowInstanceServiceFeign;
|
||||
import cn.datax.service.workflow.api.vo.FlowInstanceVo;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class FlowInstanceServiceFeignFallbackImpl implements FlowInstanceServiceFeign {
|
||||
|
||||
@Setter
|
||||
private Throwable cause;
|
||||
|
||||
@Override
|
||||
public FlowInstanceVo startById(ProcessInstanceCreateRequest request) {
|
||||
log.error("feign 调用{}出错", request, cause);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package cn.datax.service.workflow.api.query;
|
||||
|
||||
import cn.datax.common.base.BaseQueryParams;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 业务流程配置表 查询实体
|
||||
* </p>
|
||||
*
|
||||
* @author AllDataDC
|
||||
* @date 2022-11-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class BusinessQuery extends BaseQueryParams {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private String businessCode;
|
||||
private String businessName;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package cn.datax.service.workflow.api.query;
|
||||
|
||||
import cn.datax.common.base.BaseQueryParams;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程分类表 查询实体
|
||||
* </p>
|
||||
*
|
||||
* @author AllDataDC
|
||||
* @date 2022-11-10
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CategoryQuery extends BaseQueryParams {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package cn.datax.service.workflow.api.query;
|
||||
|
||||
import cn.datax.common.base.BaseQueryParams;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class FlowDefinitionQuery extends BaseQueryParams {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private String name;
|
||||
private String key;
|
||||
private String categoryId;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package cn.datax.service.workflow.api.query;
|
||||
|
||||
import cn.datax.common.base.BaseQueryParams;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class FlowInstanceQuery extends BaseQueryParams {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private String name;
|
||||
private String businessKey;
|
||||
private String businessCode;
|
||||
private String businessName;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package cn.datax.service.workflow.api.query;
|
||||
|
||||
import cn.datax.common.base.BaseQueryParams;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class FlowTaskQuery extends BaseQueryParams {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private String taskId;
|
||||
private String userId;
|
||||
private List<String> groupIds;
|
||||
private String name;
|
||||
private String businessKey;
|
||||
private String businessCode;
|
||||
private String businessName;
|
||||
private String taskDefinitionKey;
|
||||
private String processInstanceId;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package cn.datax.service.workflow.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 业务流程配置表 实体VO
|
||||
* </p>
|
||||
*
|
||||
* @author AllDataDC
|
||||
* @date 2022-11-22
|
||||
*/
|
||||
@Data
|
||||
public class BusinessVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private String id;
|
||||
private String status;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime createTime;
|
||||
private String businessCode;
|
||||
private String businessName;
|
||||
private String businessComponent;
|
||||
private String businessAuditGroup;
|
||||
private String processDefinitionId;
|
||||
private String businessTempalte;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cn.datax.service.workflow.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 流程分类表 实体VO
|
||||
* </p>
|
||||
*
|
||||
* @author AllDataDC
|
||||
* @date 2022-11-10
|
||||
*/
|
||||
@Data
|
||||
public class CategoryVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private String id;
|
||||
private String status;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime createTime;
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package cn.datax.service.workflow.api.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class FlowDefinitionVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String key;
|
||||
private String description;
|
||||
private Integer version;
|
||||
private String deploymentId;
|
||||
private String resourceName;
|
||||
private String diagramResourceName;
|
||||
private Integer suspensionState;
|
||||
private String tenantId;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package cn.datax.service.workflow.api.vo;
|
||||
|
||||
import cn.datax.service.workflow.api.enums.VariablesEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class FlowHistInstanceVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String startUserId;
|
||||
private Date startTime;
|
||||
private Date endTime;
|
||||
private String durationInMillis;
|
||||
private String processDefinitionId;
|
||||
private String processDefinitionKey;
|
||||
private String processDefinitionName;
|
||||
private Integer processDefinitionVersion;
|
||||
private String deploymentId;
|
||||
private String processInstanceId;
|
||||
private String deleteReason;
|
||||
private String tenantId;
|
||||
/**
|
||||
* 业务相关
|
||||
*/
|
||||
private String businessKey;
|
||||
private String businessCode;
|
||||
private String businessName;
|
||||
private Map<String,Object> variables;
|
||||
|
||||
public void setVariables(Map<String, Object> variables) {
|
||||
this.variables = variables;
|
||||
if(null != variables){
|
||||
//放入业务常量
|
||||
this.businessKey = (String) variables.get(VariablesEnum.businessKey.toString());
|
||||
this.businessCode = (String) variables.get(VariablesEnum.businessCode.toString());
|
||||
this.businessName = (String) variables.get(VariablesEnum.businessName.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package cn.datax.service.workflow.api.vo;
|
||||
|
||||
import cn.datax.service.workflow.api.enums.VariablesEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class FlowHistTaskVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String executionId;
|
||||
private String processInstanceId;
|
||||
private String processDefinitionId;
|
||||
private Date createTime;
|
||||
private Date endTime;
|
||||
private String durationInMillis;
|
||||
private String deleteReason;
|
||||
private String owner;
|
||||
private String assignee;
|
||||
private String taskDefinitionKey;
|
||||
private Date claimTime;
|
||||
private String tenantId;
|
||||
/**
|
||||
* 业务相关
|
||||
*/
|
||||
private String businessKey;
|
||||
private String businessCode;
|
||||
private String businessName;
|
||||
private Map<String,Object> variables;
|
||||
|
||||
public void setVariables(Map<String, Object> variables) {
|
||||
this.variables = variables;
|
||||
if(null != variables){
|
||||
//放入业务常量
|
||||
this.businessKey = (String) variables.get(VariablesEnum.businessKey.toString());
|
||||
this.businessCode = (String) variables.get(VariablesEnum.businessCode.toString());
|
||||
this.businessName = (String) variables.get(VariablesEnum.businessName.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package cn.datax.service.workflow.api.vo;
|
||||
|
||||
import cn.datax.service.workflow.api.enums.VariablesEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class FlowInstanceVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String startUserId;
|
||||
private Date startTime;
|
||||
private String processDefinitionId;
|
||||
private String processDefinitionKey;
|
||||
private String processDefinitionName;
|
||||
private Integer processDefinitionVersion;
|
||||
private String deploymentId;
|
||||
private String processInstanceId;
|
||||
private String rootProcessInstanceId;
|
||||
private Integer suspensionState;
|
||||
private String tenantId;
|
||||
/**
|
||||
* 业务相关
|
||||
*/
|
||||
private String businessKey;
|
||||
private String businessCode;
|
||||
private String businessName;
|
||||
private Map<String,Object> variables;
|
||||
|
||||
public void setVariables(Map<String, Object> variables) {
|
||||
this.variables = variables;
|
||||
if(null != variables){
|
||||
//放入业务常量
|
||||
this.businessKey = (String) variables.get(VariablesEnum.businessKey.toString());
|
||||
this.businessCode = (String) variables.get(VariablesEnum.businessCode.toString());
|
||||
this.businessName = (String) variables.get(VariablesEnum.businessName.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package cn.datax.service.workflow.api.vo;
|
||||
|
||||
import cn.datax.service.workflow.api.enums.VariablesEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class FlowTaskVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String owner;
|
||||
private String assignee;
|
||||
private Date createTime;
|
||||
private Integer suspensionState;
|
||||
private String executionId;
|
||||
private String processInstanceId;
|
||||
private String processDefinitionId;
|
||||
private String taskDefinitionKey;
|
||||
private Date claimTime;
|
||||
private String tenantId;
|
||||
/**
|
||||
* 是否委派任务
|
||||
*/
|
||||
private Boolean isDelegation;
|
||||
/**
|
||||
* 业务相关
|
||||
*/
|
||||
private String businessKey;
|
||||
private String businessCode;
|
||||
private String businessName;
|
||||
private Map<String,Object> variables;
|
||||
|
||||
public void setVariables(Map<String, Object> variables) {
|
||||
this.variables = variables;
|
||||
if(null != variables){
|
||||
//放入业务常量
|
||||
this.businessKey = (String) variables.get(VariablesEnum.businessKey.toString());
|
||||
this.businessCode = (String) variables.get(VariablesEnum.businessCode.toString());
|
||||
this.businessName = (String) variables.get(VariablesEnum.businessName.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
cn.datax.service.workflow.api.feign.factory.FlowInstanceServiceFeignFallbackFactory,\
|
||||
cn.datax.service.workflow.api.feign.fallback.FlowInstanceServiceFeignFallbackImpl
|
||||
Reference in New Issue
Block a user