Explorar o código

加入流程表设计

wangliang %!s(int64=2) %!d(string=hai) anos
pai
achega
f58207cc1d
Modificáronse 23 ficheiros con 604 adicións e 395 borrados
  1. 6 0
      pom.xml
  2. 102 0
      sop-business/src/main/java/com/qmth/sop/business/activiti/listener/ProcessEventListener.java
  3. 6 17
      sop-business/src/main/java/com/qmth/sop/business/bean/result/FlowFormWidgetResult.java
  4. 84 0
      sop-business/src/main/java/com/qmth/sop/business/bean/result/FlowResult.java
  5. 85 0
      sop-business/src/main/java/com/qmth/sop/business/bean/result/FlowTaskResult.java
  6. 0 11
      sop-business/src/main/java/com/qmth/sop/business/bean/result/FlowTdFormWidgetResult.java
  7. 46 0
      sop-business/src/main/java/com/qmth/sop/business/cache/CommonCacheService.java
  8. 102 3
      sop-business/src/main/java/com/qmth/sop/business/cache/impl/CommonCacheServiceImpl.java
  9. 6 17
      sop-business/src/main/java/com/qmth/sop/business/entity/TDFormWidget.java
  10. 14 0
      sop-business/src/main/java/com/qmth/sop/business/entity/TFCustomFlow.java
  11. 10 0
      sop-business/src/main/java/com/qmth/sop/business/mapper/TFCustomFlowMapper.java
  12. 10 0
      sop-business/src/main/java/com/qmth/sop/business/service/TFCustomFlowService.java
  13. 15 0
      sop-business/src/main/java/com/qmth/sop/business/service/impl/TFCustomFlowServiceImpl.java
  14. 32 0
      sop-business/src/main/resources/mapper/TFCustomFlowMapper.xml
  15. 4 0
      sop-common/pom.xml
  16. 15 0
      sop-common/src/main/java/com/qmth/sop/common/contant/SystemConstant.java
  17. 2 0
      sop-common/src/main/java/com/qmth/sop/common/enums/WidgetCodeEnum.java
  18. 41 22
      sop-server/src/main/java/com/qmth/sop/server/api/ActivitiFromHtmlController.java
  19. 2 6
      sop-server/src/main/java/com/qmth/sop/server/api/TDFormWidgetController.java
  20. 0 28
      sop-server/src/main/resources/inside_approve.form
  21. 0 28
      sop-server/src/main/resources/project.form
  22. 0 245
      sop-server/src/main/resources/start.form
  23. 22 18
      sop-server/src/main/resources/testform1.bpmn

+ 6 - 0
pom.xml

@@ -51,6 +51,7 @@
         <nanoid.version>2.0.0</nanoid.version>
         <jasypt.version>3.0.3</jasypt.version>
         <httpmime.version>4.5.13</httpmime.version>
+        <dom4j.version>2.1.4</dom4j.version>
     </properties>
 
     <dependencyManagement>
@@ -348,6 +349,11 @@
                 <artifactId>httpmime</artifactId>
                 <version>${httpmime.version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.dom4j</groupId>
+                <artifactId>dom4j</artifactId>
+                <version>${dom4j.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 

+ 102 - 0
sop-business/src/main/java/com/qmth/sop/business/activiti/listener/ProcessEventListener.java

@@ -1,12 +1,31 @@
 package com.qmth.sop.business.activiti.listener;
 
+import com.alibaba.fastjson.JSONArray;
+import com.qmth.sop.business.bean.result.FlowFormWidgetResult;
+import com.qmth.sop.business.bean.result.FlowResult;
+import com.qmth.sop.business.bean.result.FlowTablePropResult;
+import com.qmth.sop.business.bean.result.FlowTaskResult;
+import com.qmth.sop.business.entity.TFCustomFlow;
+import com.qmth.sop.business.service.TFCustomFlowService;
+import com.qmth.sop.common.contant.SpringContextHolder;
+import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.enums.TFCustomModelTypeEnum;
+import com.qmth.sop.common.enums.TFCustomTypeEnum;
+import com.qmth.sop.common.util.JacksonUtil;
+import org.activiti.engine.delegate.event.ActivitiEntityEvent;
 import org.activiti.engine.delegate.event.ActivitiEvent;
 import org.activiti.engine.delegate.event.ActivitiEventListener;
+import org.activiti.engine.impl.persistence.entity.ResourceEntity;
+import org.dom4j.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
 
 import java.io.Serializable;
+import java.nio.charset.StandardCharsets;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * @Description: 全局监听
@@ -37,6 +56,89 @@ public class ProcessEventListener implements ActivitiEventListener, Serializable
 //            case TASK_ASSIGNED:
 //                log.info("流程分配人员_TASK_ASSIGNED:ProcessInstanceId:{},ExecutionId:{},ProcessDefinitionId:{}", event.getProcessInstanceId(), event.getExecutionId(), event.getProcessDefinitionId());
 //                break;
+            case ENTITY_CREATED:
+                ActivitiEntityEvent activitiEntityEvent = (ActivitiEntityEvent) event;
+                if (activitiEntityEvent.getEntity() instanceof ResourceEntity) {
+                    ResourceEntity resourceEntity = (ResourceEntity) activitiEntityEvent.getEntity();
+                    log.info("ENTITY_CREATED,id:{},name:{},deploymentId:{},persistentState:{}", resourceEntity.getId(), resourceEntity.getName(), resourceEntity.getDeploymentId(), resourceEntity.getPersistentState());
+                    if (resourceEntity.getName().endsWith(SystemConstant.BPMN_PREFIX)) {
+                        String xml = new String(resourceEntity.getBytes(), StandardCharsets.UTF_8);
+//                        log.info("ENTITY_CREATED,xml:{}", xml);
+                        try {
+                            Document doc = DocumentHelper.parseText(xml);
+                            Element rootElement = doc.getRootElement();
+                            // 通过element对象的elementIterator方法获取迭代器
+                            AtomicInteger atomicInteger = new AtomicInteger(1);
+                            Iterator iterator = rootElement.elementIterator();
+                            Map<String, FlowTaskResult> setupMap = new LinkedHashMap<>();//流程审批步骤map
+                            while (iterator.hasNext()) {
+                                Element element = (Element) iterator.next();
+                                List<Attribute> attributes = element.attributes();
+//                                for (Attribute attr : attributes) {
+//                                    log.info("属性:{},---值:{}", attr.getName(), attr.getValue());
+//                                }
+                                Iterator itt = element.elementIterator();
+                                while (itt.hasNext()) {
+                                    FlowTaskResult flowTaskResult = new FlowTaskResult();
+                                    Element node = (Element) itt.next();
+                                    attributes = node.attributes();
+//                                    log.info("节点:{},---值:{}", node.getName(), node.getStringValue());
+                                    if (Objects.equals(node.getName(), SystemConstant.START_EVENT) || Objects.equals(node.getName(), SystemConstant.USER_TASK) || Objects.equals(node.getName(), SystemConstant.END_EVENT)) {
+                                        if (Objects.equals(node.getName(), SystemConstant.END_EVENT)) {
+                                            flowTaskResult.setSetup(0);
+                                        } else {
+                                            flowTaskResult.setSetup(atomicInteger.getAndIncrement());
+                                        }
+                                        for (Attribute attr : attributes) {
+//                                            log.info("节点属性:{},---节点值:{}", attr.getName(), attr.getValue());
+                                            if (Objects.equals(attr.getName(), SystemConstant.ID_FLOW)) {
+                                                flowTaskResult.setTaskKey(attr.getValue());
+                                                setupMap.put(attr.getValue(), flowTaskResult);
+                                            } else if (Objects.equals(attr.getName(), SystemConstant.NAME)) {
+                                                flowTaskResult.setTaskName(attr.getValue());
+                                            } else if (Objects.equals(attr.getName(), SystemConstant.FORM_KEY) && SystemConstant.FLOW_MAP.containsKey(resourceEntity.getDeploymentId() + SystemConstant.FLOW_FORM_ID_SPACE + attr.getValue())) {
+                                                flowTaskResult.setFormKey(attr.getValue());
+                                                List<String> list = SystemConstant.FLOW_MAP.get(resourceEntity.getDeploymentId() + SystemConstant.FLOW_FORM_ID_SPACE + attr.getValue());
+                                                String data = list.get(list.size() - 1);
+                                                List<FlowFormWidgetResult> listData = JSONArray.parseArray(data, FlowFormWidgetResult.class);
+                                                for (FlowFormWidgetResult f : listData) {
+                                                    f.setFormId(flowTaskResult.getTaskKey() + SystemConstant.FLOW_FORM_ID_SPACE + f.getFormId());
+                                                    f.setFormName(flowTaskResult.getTaskKey() + SystemConstant.FLOW_FORM_ID_SPACE + f.getFormName());
+                                                    if (!CollectionUtils.isEmpty(f.getTablePropList())) {
+                                                        for (FlowTablePropResult t : f.getTablePropList()) {
+                                                            t.setTdId(flowTaskResult.getTaskKey() + SystemConstant.FLOW_FORM_ID_SPACE + t.getWidgetId() + SystemConstant.FLOW_FORM_ID_SPACE + t.getTdId());
+                                                            t.setTdName(flowTaskResult.getTaskKey() + SystemConstant.FLOW_FORM_ID_SPACE + t.getWidgetId() + SystemConstant.FLOW_FORM_ID_SPACE + t.getTdName());
+                                                        }
+                                                    }
+                                                }
+                                                flowTaskResult.setFormProperty(listData);
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                            FlowResult flowResult = new FlowResult(resourceEntity.getDeploymentId(), resourceEntity.getName(), setupMap);
+                            log.info("flowResult:{}", JacksonUtil.parseJson(flowResult));
+                            TFCustomFlowService tfCustomFlowService = SpringContextHolder.getBean(TFCustomFlowService.class);
+                            TFCustomFlow maxTfCustomFlow = tfCustomFlowService.findMaxVersion(null, flowResult.getFlowName(), TFCustomTypeEnum.OFFICE_SOP_FLOW);
+                            TFCustomFlow tfCustomFlow = new TFCustomFlow(null, flowResult.getFlowName(), TFCustomTypeEnum.OFFICE_SOP_FLOW, flowResult.getDeploymentId(), TFCustomModelTypeEnum.USER_FIXED);
+                            flowResult.setId(tfCustomFlow.getId());
+                            if (Objects.nonNull(maxTfCustomFlow)) {
+                                tfCustomFlow.setVersion(maxTfCustomFlow.getVersion() + 1);
+                            }
+                            flowResult.setVersion(tfCustomFlow.getVersion());
+                            tfCustomFlow.setFlowProcessVar(JacksonUtil.parseJson(flowResult));
+                            tfCustomFlowService.save(tfCustomFlow);
+                        } catch (DocumentException e) {
+                            log.error(SystemConstant.LOG_ERROR, e);
+                        }
+                    } else {
+                        String data = new String(resourceEntity.getBytes(), StandardCharsets.UTF_8);
+//                        log.info("ENTITY_CREATED,data:{}", data);
+                        SystemConstant.FLOW_MAP.add(resourceEntity.getDeploymentId() + SystemConstant.FLOW_FORM_ID_SPACE + resourceEntity.getName(), data);
+                    }
+                }
+                break;
             default:
 //                log.info("default->type:{},ProcessInstanceId:{},ExecutionId:{},ProcessDefinitionId:{}", event.getType(), event.getProcessInstanceId(), event.getExecutionId(), event.getProcessDefinitionId());
                 break;

+ 6 - 17
sop-business/src/main/java/com/qmth/sop/business/bean/result/FlowFormWidgetResult.java

@@ -28,9 +28,9 @@ public class FlowFormWidgetResult implements Serializable {
     @TableId(value = "id")
     private Long id;
 
-    @ApiModelProperty(value = "机构id")
+    @ApiModelProperty(value = "id")
     @JsonSerialize(using = ToStringSerializer.class)
-    private Long orgId;
+    private Long parentId;
 
     @ApiModelProperty(value = "编码,TEXT:文本,TEXTAREA:文本域,SELECT:下拉框,RADIO:单选框,CHECKBOX:复选框,DATE:日期,BUTTON:按钮,IMG:图片,VIDEO:视频,AUDIO:音频,FILE:文件,POP_SELECT:弹出选择框,LABEL:标签,TABLE:表格,OTHER:其它")
     private WidgetCodeEnum code;
@@ -74,9 +74,6 @@ public class FlowFormWidgetResult implements Serializable {
     @ApiModelProperty(value = "控件用值")
     private String value;
 
-    @ApiModelProperty(value = "备注")
-    private String remark;
-
     @ApiModelProperty(value = "数据来源")
     private String dataGrid;
 
@@ -136,12 +133,12 @@ public class FlowFormWidgetResult implements Serializable {
         this.id = id;
     }
 
-    public Long getOrgId() {
-        return orgId;
+    public Long getParentId() {
+        return parentId;
     }
 
-    public void setOrgId(Long orgId) {
-        this.orgId = orgId;
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
     }
 
     public WidgetCodeEnum getCode() {
@@ -248,14 +245,6 @@ public class FlowFormWidgetResult implements Serializable {
         this.value = value;
     }
 
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
     public String getDataGrid() {
         return dataGrid;
     }

+ 84 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/FlowResult.java

@@ -0,0 +1,84 @@
+package com.qmth.sop.business.bean.result;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * @Description: 流程节点result
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2021/8/6
+ */
+public class FlowResult implements Serializable {
+
+    @ApiModelProperty(value = "流程id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    @ApiModelProperty(value = "流程部署id")
+    private String deploymentId;
+
+    @ApiModelProperty(value = "流程名称")
+    private String flowName;
+
+    @ApiModelProperty(value = "流程数据")
+    private Map<String, FlowTaskResult> setupMap;
+
+    @ApiModelProperty(value = "流程版本")
+    private Integer version;
+
+    public FlowResult() {
+
+    }
+
+    public FlowResult(String deploymentId, String flowName, Map<String, FlowTaskResult> setupMap) {
+        this.deploymentId = deploymentId;
+        this.flowName = flowName;
+        this.setupMap = setupMap;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getDeploymentId() {
+        return deploymentId;
+    }
+
+    public void setDeploymentId(String deploymentId) {
+        this.deploymentId = deploymentId;
+    }
+
+    public String getFlowName() {
+        return flowName;
+    }
+
+    public void setFlowName(String flowName) {
+        this.flowName = flowName;
+    }
+
+    public Map<String, FlowTaskResult> getSetupMap() {
+        return setupMap;
+    }
+
+    public void setSetupMap(Map<String, FlowTaskResult> setupMap) {
+        this.setupMap = setupMap;
+    }
+
+    public Integer getVersion() {
+        return version;
+    }
+
+    public void setVersion(Integer version) {
+        this.version = version;
+    }
+}

+ 85 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/FlowTaskResult.java

@@ -0,0 +1,85 @@
+package com.qmth.sop.business.bean.result;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Description: 流程节点result
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2021/8/6
+ */
+public class FlowTaskResult implements Serializable {
+
+    @ApiModelProperty(value = "流程id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long flowId;
+
+    @ApiModelProperty(value = "流程节点名称")
+    private String taskName;
+
+    @ApiModelProperty(value = "流程节点key")
+    private String taskKey;
+
+    @ApiModelProperty(value = "流程节点步骤")
+    private Integer setup;
+
+    @ApiModelProperty(value = "表单key")
+    private String formKey;
+
+    @ApiModelProperty(value = "表单数据")
+    private List<FlowFormWidgetResult> formProperty;
+
+    public List<FlowFormWidgetResult> getFormProperty() {
+        return formProperty;
+    }
+
+    public void setFormProperty(List<FlowFormWidgetResult> formProperty) {
+        this.formProperty = formProperty;
+    }
+
+    public Long getFlowId() {
+        return flowId;
+    }
+
+    public void setFlowId(Long flowId) {
+        this.flowId = flowId;
+    }
+
+    public String getTaskName() {
+        return taskName;
+    }
+
+    public void setTaskName(String taskName) {
+        this.taskName = taskName;
+    }
+
+    public String getTaskKey() {
+        return taskKey;
+    }
+
+    public void setTaskKey(String taskKey) {
+        this.taskKey = taskKey;
+    }
+
+    public Integer getSetup() {
+        return setup;
+    }
+
+    public void setSetup(Integer setup) {
+        this.setup = setup;
+    }
+
+    public String getFormKey() {
+        return formKey;
+    }
+
+    public void setFormKey(String formKey) {
+        this.formKey = formKey;
+    }
+}

+ 0 - 11
sop-business/src/main/java/com/qmth/sop/business/bean/result/FlowTdFormWidgetResult.java

@@ -26,9 +26,6 @@ public class FlowTdFormWidgetResult implements Serializable {
     @ApiModelProperty(value = "控件用值")
     private String value;
 
-    @ApiModelProperty(value = "备注")
-    private String remark;
-
     @ApiModelProperty(value = "数据来源")
     private String dataGrid;
 
@@ -85,14 +82,6 @@ public class FlowTdFormWidgetResult implements Serializable {
         this.value = value;
     }
 
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
     public String getDataGrid() {
         return dataGrid;
     }

+ 46 - 0
sop-business/src/main/java/com/qmth/sop/business/cache/CommonCacheService.java

@@ -254,4 +254,50 @@ public interface CommonCacheService {
      * 删除控件缓存
      */
     public void removeFormWidgetCache();
+
+    /**
+     * 添加控件缓存
+     *
+     * @param id
+     * @return
+     */
+    public TDFormWidget formWidgetCache(Long id);
+
+    /**
+     * 修改控件缓存
+     *
+     * @param id
+     * @return
+     */
+    public TDFormWidget updateFormWidgetCache(Long id);
+
+    /**
+     * 删除控件缓存
+     *
+     * @param id
+     */
+    public void removeFormWidgetCache(Long id);
+
+    /**
+     * 添加表格属性缓存
+     *
+     * @param widgetId
+     * @return
+     */
+    public List<TDTableProp> tablePropCache(Long widgetId);
+
+    /**
+     * 修改表格属性缓存
+     *
+     * @param widgetId
+     * @return
+     */
+    public List<TDTableProp> updateTablePropCache(Long widgetId);
+
+    /**
+     * 删除表格属性缓存
+     *
+     * @param widgetId
+     */
+    public void removeTablePropCache(Long widgetId);
 }

+ 102 - 3
sop-business/src/main/java/com/qmth/sop/business/cache/impl/CommonCacheServiceImpl.java

@@ -17,8 +17,6 @@ import com.qmth.sop.common.util.GsonUtil;
 import com.qmth.sop.common.util.JacksonUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.context.annotation.ScopedProxyMode;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
@@ -37,7 +35,6 @@ import java.util.stream.Collectors;
  * @Date: 2021/3/25
  */
 @Service
-@Scope(proxyMode = ScopedProxyMode.INTERFACES)
 public class CommonCacheServiceImpl implements CommonCacheService {
     private final static Logger log = LoggerFactory.getLogger(CommonCacheServiceImpl.class);
 
@@ -68,6 +65,9 @@ public class CommonCacheServiceImpl implements CommonCacheService {
     @Resource
     TDFormWidgetService tdFormWidgetService;
 
+    @Resource
+    TDTablePropService tdTablePropService;
+
     /**
      * 添加用户缓存
      *
@@ -515,6 +515,105 @@ public class CommonCacheServiceImpl implements CommonCacheService {
         cacheService.evict(SystemConstant.FORM_WIDGET_CACHE, SystemConstant.FORM_WIDGET_CACHE);
     }
 
+    /**
+     * 添加控件缓存
+     *
+     * @param id
+     * @return
+     */
+    @Override
+    public TDFormWidget formWidgetCache(Long id) {
+        return formWidgetCacheCommon(id);
+    }
+
+    /**
+     * 修改控件缓存
+     *
+     * @param id
+     * @return
+     */
+    @Override
+    public TDFormWidget updateFormWidgetCache(Long id) {
+        cacheService.evict(SystemConstant.FORM_WIDGET_CACHE, String.valueOf(id));
+        return formWidgetCacheCommon(id);
+    }
+
+    /**
+     * 删除控件缓存
+     *
+     * @param id
+     */
+    @Override
+    public void removeFormWidgetCache(Long id) {
+        cacheService.evict(SystemConstant.FORM_WIDGET_CACHE, String.valueOf(id));
+    }
+
+    /**
+     * 添加表格属性缓存
+     *
+     * @param widgetId
+     * @return
+     */
+    @Override
+    public List<TDTableProp> tablePropCache(Long widgetId) {
+        return tablePropCacheCommon(widgetId);
+    }
+
+    /**
+     * 修改表格属性缓存
+     *
+     * @param widgetId
+     * @return
+     */
+    @Override
+    public List<TDTableProp> updateTablePropCache(Long widgetId) {
+        cacheService.evict(SystemConstant.TABLE_PROP_CACHE, String.valueOf(widgetId));
+        return tablePropCacheCommon(widgetId);
+    }
+
+    /**
+     * 删除表格属性缓存
+     *
+     * @param widgetId
+     */
+    @Override
+    public void removeTablePropCache(Long widgetId) {
+        cacheService.evict(SystemConstant.TABLE_PROP_CACHE, String.valueOf(widgetId));
+    }
+
+    /**
+     * 控件缓存共用
+     *
+     * @return
+     */
+    private List<TDTableProp> tablePropCacheCommon(Long widgetId) {
+        List<TDTableProp> tablePropList = (List<TDTableProp>) cacheService.get(SystemConstant.TABLE_PROP_CACHE, String.valueOf(widgetId));
+        if (CollectionUtils.isEmpty(tablePropList)) {
+            tablePropList = tdTablePropService.list(new QueryWrapper<TDTableProp>().lambda().eq(TDTableProp::getWidgetId, widgetId));
+            if (!CollectionUtils.isEmpty(tablePropList)) {
+                cacheService.put(SystemConstant.TABLE_PROP_CACHE, String.valueOf(widgetId), tablePropList);
+            }
+        }
+        return tablePropList;
+    }
+
+    /**
+     * 控件缓存共用
+     *
+     * @param id
+     * @return
+     */
+    private TDFormWidget formWidgetCacheCommon(Long id) {
+        TDFormWidget tdFormWidget = (TDFormWidget) cacheService.get(SystemConstant.FORM_WIDGET_CACHE, String.valueOf(id));
+        if (Objects.isNull(tdFormWidget)) {
+            tdFormWidget = tdFormWidgetService.getById(id);
+            if (Objects.nonNull(tdFormWidget)) {
+                cacheService.put(SystemConstant.FORM_WIDGET_CACHE, String.valueOf(id), tdFormWidget);
+            }
+        }
+        return tdFormWidget;
+    }
+
     /**
      * 控件缓存共用
      *

+ 6 - 17
sop-business/src/main/java/com/qmth/sop/business/entity/TDFormWidget.java

@@ -25,9 +25,9 @@ public class TDFormWidget extends BaseEntity implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
-    @ApiModelProperty(value = "机构id")
+    @ApiModelProperty(value = "id")
     @JsonSerialize(using = ToStringSerializer.class)
-    private Long orgId;
+    private Long parentId;
 
     @ApiModelProperty(value = "编码,TEXT:文本,TEXTAREA:文本域,SELECT:下拉框,RADIO:单选框,CHECKBOX:复选框,DATE:日期,BUTTON:按钮,IMG:图片,VIDEO:视频,AUDIO:音频,FILE:文件,POP_SELECT:弹出选择框,LABEL:标签,TABLE:表格,OTHER:其它")
     private WidgetCodeEnum code;
@@ -74,9 +74,6 @@ public class TDFormWidget extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "控件用值")
     private String value;
 
-    @ApiModelProperty(value = "备注")
-    private String remark;
-
     @ApiModelProperty(value = "数据来源")
     private String dataGrid;
 
@@ -102,12 +99,12 @@ public class TDFormWidget extends BaseEntity implements Serializable {
         this.binding = binding;
     }
 
-    public Long getOrgId() {
-        return orgId;
+    public Long getParentId() {
+        return parentId;
     }
 
-    public void setOrgId(Long orgId) {
-        this.orgId = orgId;
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
     }
 
     public WidgetCodeEnum getCode() {
@@ -222,14 +219,6 @@ public class TDFormWidget extends BaseEntity implements Serializable {
         this.value = value;
     }
 
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
     public String getDataGrid() {
         return dataGrid;
     }

+ 14 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/TFCustomFlow.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.qmth.sop.common.base.BaseEntity;
+import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.enums.TFCustomModelTypeEnum;
 import com.qmth.sop.common.enums.TFCustomTypeEnum;
 import io.swagger.annotations.ApiModel;
@@ -63,6 +64,19 @@ public class TFCustomFlow extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "流程过程变量数据")
     private String flowProcessVar;
 
+    public TFCustomFlow() {
+
+    }
+
+    public TFCustomFlow(Long orgId, String name, TFCustomTypeEnum type, String actFlowId, TFCustomModelTypeEnum modelType) {
+        setId(SystemConstant.getDbUuid());
+        this.orgId = orgId;
+        this.name = name;
+        this.type = type;
+        this.actFlowId = actFlowId;
+        this.modelType = modelType;
+    }
+
     public Long getOrgId() {
         return orgId;
     }

+ 10 - 0
sop-business/src/main/java/com/qmth/sop/business/mapper/TFCustomFlowMapper.java

@@ -2,6 +2,7 @@ package com.qmth.sop.business.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.qmth.sop.business.entity.TFCustomFlow;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * <p>
@@ -13,4 +14,13 @@ import com.qmth.sop.business.entity.TFCustomFlow;
  */
 public interface TFCustomFlowMapper extends BaseMapper<TFCustomFlow> {
 
+    /**
+     * 查询版本号
+     *
+     * @param orgId
+     * @param flowName
+     * @param type
+     * @return
+     */
+    TFCustomFlow findMaxVersion(@Param("orgId") Long orgId, @Param("flowName") String flowName, @Param("type") String type);
 }

+ 10 - 0
sop-business/src/main/java/com/qmth/sop/business/service/TFCustomFlowService.java

@@ -2,6 +2,7 @@ package com.qmth.sop.business.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.sop.business.entity.TFCustomFlow;
+import com.qmth.sop.common.enums.TFCustomTypeEnum;
 
 /**
  * <p>
@@ -13,4 +14,13 @@ import com.qmth.sop.business.entity.TFCustomFlow;
  */
 public interface TFCustomFlowService extends IService<TFCustomFlow> {
 
+    /**
+     * 查询版本号
+     *
+     * @param orgId
+     * @param flowName
+     * @param type
+     * @return
+     */
+    TFCustomFlow findMaxVersion(Long orgId, String flowName, TFCustomTypeEnum type);
 }

+ 15 - 0
sop-business/src/main/java/com/qmth/sop/business/service/impl/TFCustomFlowServiceImpl.java

@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.sop.business.entity.TFCustomFlow;
 import com.qmth.sop.business.mapper.TFCustomFlowMapper;
 import com.qmth.sop.business.service.TFCustomFlowService;
+import com.qmth.sop.common.enums.TFCustomTypeEnum;
 import org.springframework.stereotype.Service;
 
+import java.util.Objects;
+
 /**
  * <p>
  * 自定义流程表 服务实现类
@@ -17,4 +20,16 @@ import org.springframework.stereotype.Service;
 @Service
 public class TFCustomFlowServiceImpl extends ServiceImpl<TFCustomFlowMapper, TFCustomFlow> implements TFCustomFlowService {
 
+    /**
+     * 查询版本号
+     *
+     * @param orgId
+     * @param flowName
+     * @param type
+     * @return
+     */
+    @Override
+    public TFCustomFlow findMaxVersion(Long orgId, String flowName, TFCustomTypeEnum type) {
+        return this.baseMapper.findMaxVersion(orgId, flowName, Objects.nonNull(type) ? type.name() : null);
+    }
 }

+ 32 - 0
sop-business/src/main/resources/mapper/TFCustomFlowMapper.xml

@@ -2,4 +2,36 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qmth.sop.business.mapper.TFCustomFlowMapper">
 
+    <select id="findMaxVersion" resultType="com.qmth.sop.business.entity.TFCustomFlow">
+        select * from t_f_custom_flow tfcf
+        <where>
+            1 = 1 and tfcf.version =
+            (select max(t.version) from t_f_custom_flow t
+            <where>
+                <if test="orgId != null and orgId != ''">
+                    and t.org_id = #{orgId}
+                </if>
+                <if test="flowName != null and flowName != ''">
+                    and t.name = #{flowName}
+                </if>
+                <if test="type != null and type != ''">
+                    and t.type = #{type}
+                </if>
+                and t.enable = 1
+                and t.publish = 1
+            </where>
+            )
+            <if test="orgId != null and orgId != ''">
+                and tfcf.org_id = #{orgId}
+            </if>
+            <if test="flowName != null and flowName != ''">
+                and tfcf.name = #{flowName}
+            </if>
+            <if test="type != null and type != ''">
+                and tfcf.type = #{type}
+            </if>
+            and tfcf.enable = 1
+            and tfcf.publish = 1
+        </where>
+    </select>
 </mapper>

+ 4 - 0
sop-common/pom.xml

@@ -181,5 +181,9 @@
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpmime</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.dom4j</groupId>
+            <artifactId>dom4j</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 15 - 0
sop-common/src/main/java/com/qmth/sop/common/contant/SystemConstant.java

@@ -2,6 +2,7 @@ package com.qmth.sop.common.contant;
 
 import com.aventrix.jnanoid.jnanoid.NanoIdUtils;
 import com.qmth.boot.core.uid.service.UidService;
+import org.springframework.util.LinkedMultiValueMap;
 
 import java.nio.charset.Charset;
 
@@ -77,6 +78,7 @@ public class SystemConstant {
     public static final String ROLE_PRIVILEGE_CACHE = "role:privilege:cache";
     public static final String USER_ROLE_PRIVILEGE_CACHE = "user:role:privilege:cache";
     public static final String FORM_WIDGET_CACHE = "form:widget:cache";
+    public static final String TABLE_PROP_CACHE = "table:prop:cache";
 
     /**
      * 鉴权
@@ -104,6 +106,19 @@ public class SystemConstant {
     public static final int THREAD_POOL_KEEP_ALIVE_SECONDS = 10;
     public static final int THREAD_POOL_QUEUE_CAPACITY = 500;
 
+    /**
+     * 流程相关
+     */
+    public static LinkedMultiValueMap<String, String> FLOW_MAP = new LinkedMultiValueMap<>();
+    public static final String BPMN_PREFIX = ".bpmn";
+    public static final String START_EVENT = "startEvent";
+    public static final String END_EVENT = "endEvent";
+    public static final String USER_TASK = "userTask";
+    public static final String NAME = "name";
+    public static final String FORM_KEY = "formKey";
+    public static final String ID_FLOW = "id";
+    public static final String FLOW_FORM_ID_SPACE = "|";
+
     /**
      * 获取数据库uuid
      *

+ 2 - 0
sop-common/src/main/java/com/qmth/sop/common/enums/WidgetCodeEnum.java

@@ -37,6 +37,8 @@ public enum WidgetCodeEnum {
 
     TABLE("表格"),
 
+    SIGN("签名"),
+
     OTHER("其它");
 
     private String title;

+ 41 - 22
sop-server/src/main/java/com/qmth/sop/server/api/ActivitiFromHtmlController.java

@@ -1,10 +1,12 @@
 package com.qmth.sop.server.api;
 
-import com.google.gson.reflect.TypeToken;
+import com.alibaba.fastjson.JSONArray;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.qmth.sop.business.bean.FormPropertyBean;
 import com.qmth.sop.business.bean.result.FlowFormWidgetResult;
+import com.qmth.sop.business.entity.TFCustomFlow;
 import com.qmth.sop.business.service.ActivitiConsumerService;
-import com.qmth.sop.common.util.GsonUtil;
+import com.qmth.sop.business.service.TFCustomFlowService;
 import com.qmth.sop.common.util.JacksonUtil;
 import io.swagger.annotations.*;
 import org.activiti.engine.FormService;
@@ -47,6 +49,9 @@ public class ActivitiFromHtmlController {
     @Resource
     TaskService taskService;
 
+    @Resource
+    TFCustomFlowService tfCustomFlowService;
+
     /**
      * 注册流程
      *
@@ -57,11 +62,7 @@ public class ActivitiFromHtmlController {
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
     public Map<String, Object> createDeployment() throws IOException {
         DeploymentBuilder builder = repositoryService.createDeployment();
-//        builder.addClasspathResource("testform3.bpmn");
-//        builder.addClasspathResource("start.form");
-//        builder.addClasspathResource("dept-leader-audit.form");
-        ClassPathResource resource = new ClassPathResource("testform3.zip");
-//        ClassPathResource resource = new ClassPathResource("testform4.zip");
+        ClassPathResource resource = new ClassPathResource("testform1.zip");
         ZipInputStream zip = new ZipInputStream(resource.getInputStream());
         builder.addZipInputStream(zip);
         return getFlowStartFormData(builder.deploy().getId());
@@ -80,13 +81,35 @@ public class ActivitiFromHtmlController {
         String processDefinitionId = activitiConsumerService.findProcessDefinitionIdByDeploymentId(deploymentId);
 //        ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(processDefinitionId).singleResult();
 //        boolean hasStartFormKey = processDefinition.hasStartFormKey();
-        Object o = formService.getRenderedStartForm(processDefinitionId);
-        if (Objects.nonNull(o)) {
-            log.info("start formProperties:{}", JacksonUtil.parseJson(o));
-            List<FlowFormWidgetResult> list = GsonUtil.fromJson(JacksonUtil.parseJson(o), new TypeToken<List<FlowFormWidgetResult>>() {
-            }.getType());
-            map.put("FormProperty", new FormPropertyBean(null, null, list));
-        }
+//        //获得流程模型
+//        BpmnModel model = repositoryService.getBpmnModel(processDefinitionId);
+//        //获得流程模型的所有节点
+//        Collection<FlowElement> flowElements = model.getMainProcess().getFlowElements();
+//        List<FormPropertyBean> formPropertyBeanList = new LinkedList<>();
+//        for (FlowElement e : flowElements) {
+//            // 判断节点类型
+//            if (e instanceof UserTask) {
+//                UserTask userTask = (UserTask) e;
+//                if (Objects.nonNull(userTask.getFormKey())) {
+////                    Object o = formService.getRenderedTaskForm(processDefinitionId, userTask.getId());
+////                    log.info("task formProperties:{}", JacksonUtil.parseJson(o));
+//                }
+//            } else if (e instanceof StartEvent) {
+//                StartEvent startEvent = (StartEvent) e;
+//                if (Objects.nonNull(startEvent.getFormKey())) {
+//                    Object o = formService.getRenderedStartForm(processDefinitionId);
+//                    log.info("start formProperties:{}", JacksonUtil.parseJson(o));
+//                }
+//            }
+//        }
+        TFCustomFlow tfCustomFlow = tfCustomFlowService.getOne(new QueryWrapper<TFCustomFlow>().lambda().eq(TFCustomFlow::getActFlowId, deploymentId));
+//        Object o = formService.getRenderedStartForm(processDefinitionId);
+//        if (Objects.nonNull(o)) {
+//            log.info("start formProperties:{}", JacksonUtil.parseJson(o));
+//            List<FlowFormWidgetResult> list = JSONArray.parseArray(o.toString(), FlowFormWidgetResult.class);
+//            map.put("FormProperty", new FormPropertyBean(null, null, list));
+//        }
+        map.put("FormPropertys", tfCustomFlow.getFlowProcessVar());
         map.put("processDefinitionId", processDefinitionId);
         map.put("deploymentId", deploymentId);
         return map;
@@ -119,8 +142,7 @@ public class ActivitiFromHtmlController {
                 log.info("taskId:{},flowId:{}", flowTaskId, processInstanceId);
                 if (Objects.nonNull(o)) {
                     log.info("task formProperties:{}", JacksonUtil.parseJson(o));
-                    List<FlowFormWidgetResult> list = GsonUtil.fromJson(JacksonUtil.parseJson(o), new TypeToken<List<FlowFormWidgetResult>>() {
-                    }.getType());
+                    List<FlowFormWidgetResult> list = JSONArray.parseArray(o.toString(), FlowFormWidgetResult.class);
                     formPropertyList.add(new FormPropertyBean(processInstanceId, flowTaskId, t.getAssignee(), list));
                 }
             }
@@ -164,8 +186,7 @@ public class ActivitiFromHtmlController {
                     log.info("flowTaskId:{},flowId:{}", flowTaskId, processInstanceId);
                     if (Objects.nonNull(o)) {
                         log.info("task formProperties:{}", JacksonUtil.parseJson(o));
-                        List<FlowFormWidgetResult> list = GsonUtil.fromJson(JacksonUtil.parseJson(o), new TypeToken<List<FlowFormWidgetResult>>() {
-                        }.getType());
+                        List<FlowFormWidgetResult> list = JSONArray.parseArray(o.toString(), FlowFormWidgetResult.class);
                         formPropertyList.add(new FormPropertyBean(processInstanceId, flowTaskId, list));
                     }
                 }
@@ -197,8 +218,7 @@ public class ActivitiFromHtmlController {
                     Object o = formService.getRenderedTaskForm(flowTaskId);
                     if (Objects.nonNull(o)) {
                         log.info("task formProperties:{}", JacksonUtil.parseJson(o));
-                        List<FlowFormWidgetResult> list = GsonUtil.fromJson(JacksonUtil.parseJson(o), new TypeToken<List<FlowFormWidgetResult>>() {
-                        }.getType());
+                        List<FlowFormWidgetResult> list = JSONArray.parseArray(o.toString(), FlowFormWidgetResult.class);
                         formPropertyList.add(new FormPropertyBean(processInstanceId, flowTaskId, userId, list));
                     }
                 }
@@ -243,8 +263,7 @@ public class ActivitiFromHtmlController {
                 log.info("userId:{},taskId:{},flowId:{},processDefinitionId:{}", t.getAssignee(), nextFlowTaskId, processInstanceId, processDefinitionId);
                 if (Objects.nonNull(o)) {
                     log.info("task formProperties:{}", JacksonUtil.parseJson(o));
-                    List<FlowFormWidgetResult> list = GsonUtil.fromJson(JacksonUtil.parseJson(o), new TypeToken<List<FlowFormWidgetResult>>() {
-                    }.getType());
+                    List<FlowFormWidgetResult> list = JSONArray.parseArray(o.toString(), FlowFormWidgetResult.class);
                     formPropertyList.add(new FormPropertyBean(processInstanceId, flowTaskId, t.getAssignee(), list));
                 }
                 varMap.put("formProperties", formPropertyList);

+ 2 - 6
sop-server/src/main/java/com/qmth/sop/server/api/TDFormWidgetController.java

@@ -12,7 +12,6 @@ import com.qmth.sop.business.cache.CommonCacheService;
 import com.qmth.sop.business.entity.TDFormWidget;
 import com.qmth.sop.business.entity.TDTableProp;
 import com.qmth.sop.business.service.TDFormWidgetService;
-import com.qmth.sop.business.service.TDTablePropService;
 import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.enums.WidgetCodeEnum;
 import com.qmth.sop.common.enums.WidgetTypeEnum;
@@ -45,9 +44,6 @@ public class TDFormWidgetController {
     @Resource
     TDFormWidgetService tdFormWidgetService;
 
-    @Resource
-    TDTablePropService tdTablePropService;
-
     @ApiOperation(value = "控件查询列表")
     @ApiResponses({@ApiResponse(code = 200, message = "控件查询列表信息", response = Object.class)})
     @RequestMapping(value = "/list", method = RequestMethod.POST)
@@ -68,12 +64,12 @@ public class TDFormWidgetController {
             Set<FlowFormWidgetResult> flowFormWidgetResultSet = flowFormWidgetResultList.stream().filter(s -> s.getCode() == WidgetCodeEnum.TABLE).collect(Collectors.toSet());
             if (!CollectionUtils.isEmpty(flowFormWidgetResultSet)) {
                 for (FlowFormWidgetResult f : flowFormWidgetResultSet) {
-                    List<TDTableProp> tdTablePropList = tdTablePropService.list(new QueryWrapper<TDTableProp>().lambda().eq(TDTableProp::getWidgetId, f.getId()));
+                    List<TDTableProp> tdTablePropList = commonCacheService.tablePropCache(f.getId());
                     if (!CollectionUtils.isEmpty(tdTablePropList)) {
                         List<FlowTablePropResult> flowTablePropResultList = GsonUtil.fromJson(JacksonUtil.parseJson(tdTablePropList), new TypeToken<List<FlowTablePropResult>>() {
                         }.getType());
                         for (FlowTablePropResult tf : flowTablePropResultList) {
-                            TDFormWidget tdFormWidget = tdFormWidgetService.getById(tf.getEditWidgetId());
+                            TDFormWidget tdFormWidget = commonCacheService.formWidgetCache(tf.getEditWidgetId());
                             FlowTdFormWidgetResult flowTdFormWidgetResult = GsonUtil.fromJson(GsonUtil.toJson(tdFormWidget), FlowTdFormWidgetResult.class);
                             tf.setTdFormWidget(flowTdFormWidgetResult);
                         }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 28
sop-server/src/main/resources/inside_approve.form


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 28
sop-server/src/main/resources/project.form


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 245
sop-server/src/main/resources/start.form


+ 22 - 18
sop-server/src/main/resources/testform1.bpmn

@@ -1,35 +1,39 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.activiti.org/test" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test" id="m1626068475250" name="">
   <process id="myFormProcess_1" isExecutable="true" isClosed="false" processType="None">
-    <startEvent id="usertask_jwc_start" name="开始" activiti:formKey="start.form"></startEvent>
-    <userTask id="usertask_jwc_project" name="教务处sop_项目关键信息" activiti:assignee="${approveId}" activiti:formKey="project.form"></userTask>
-    <userTask id="usertask_jwc_inside_approve" name="教务处sop_内审" activiti:assignee="${approveId}" activiti:formKey="inside_approve.form"></userTask>
-    <endEvent id="_5" name="结束"></endEvent>
-    <sequenceFlow id="_6" sourceRef="jwc_usertask_start" targetRef="usertask_jwc_project"></sequenceFlow>
-    <sequenceFlow id="_7" sourceRef="usertask_jwc_project" targetRef="usertask_jwc_inside_approve"></sequenceFlow>
-    <sequenceFlow id="_8" sourceRef="usertask_jwc_inside_approve" targetRef="_5"></sequenceFlow>
+    <startEvent id="f_usertask_jwc_start" name="开始" activiti:formKey="start.form"></startEvent>
+    <userTask id="f_usertask_jwc_project" name="教务处sop_项目关键信息" activiti:assignee="${approveId}" activiti:formKey="project.form"></userTask>
+    <userTask id="f_usertask_jwc_inside_approve" name="教务处sop_内审" activiti:assignee="${approveId}" activiti:formKey="inside_approve.form"></userTask>
+    <endEvent id="f_usertask_jwc_end" name="结束"></endEvent>
+    <sequenceFlow id="_7" sourceRef="f_usertask_jwc_project" targetRef="f_usertask_jwc_inside_approve"></sequenceFlow>
+    <sequenceFlow id="_8" sourceRef="f_usertask_jwc_inside_approve" targetRef="f_usertask_jwc_end"></sequenceFlow>
+    <sequenceFlow id="flow1" sourceRef="f_usertask_jwc_start" targetRef="f_usertask_jwc_project"></sequenceFlow>
   </process>
   <bpmndi:BPMNDiagram id="BPMNDiagram_myFormProcess_1">
     <bpmndi:BPMNPlane bpmnElement="myFormProcess_1" id="BPMNPlane_myFormProcess_1">
-      <bpmndi:BPMNShape bpmnElement="usertask_jwc_start" id="BPMNShape_usertask_jwc_start">
+      <bpmndi:BPMNShape bpmnElement="f_usertask_jwc_start" id="BPMNShape_f_usertask_jwc_start">
         <omgdc:Bounds height="35.0" width="35.0" x="240.0" y="15.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask_jwc_project" id="BPMNShape_usertask_jwc_project">
-        <omgdc:Bounds height="55.0" width="85.0" x="205.0" y="135.0"></omgdc:Bounds>
+      <bpmndi:BPMNShape bpmnElement="f_usertask_jwc_project" id="BPMNShape_f_usertask_jwc_project">
+        <omgdc:Bounds height="55.0" width="85.0" x="215.0" y="135.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask_jwc_inside_approve" id="BPMNShape_usertask_jwc_inside_approve">
-        <omgdc:Bounds height="55.0" width="85.0" x="200.0" y="275.0"></omgdc:Bounds>
+      <bpmndi:BPMNShape bpmnElement="f_usertask_jwc_inside_approve" id="BPMNShape_f_usertask_jwc_inside_approve">
+        <omgdc:Bounds height="55.0" width="85.0" x="215.0" y="276.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="_5" id="BPMNShape__5">
-        <omgdc:Bounds height="35.0" width="35.0" x="230.0" y="480.0"></omgdc:Bounds>
+      <bpmndi:BPMNShape bpmnElement="f_usertask_jwc_end" id="BPMNShape_f_usertask_jwc_end">
+        <omgdc:Bounds height="35.0" width="35.0" x="240.0" y="480.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge bpmnElement="_7" id="BPMNEdge__7">
-        <omgdi:waypoint x="247.0" y="190.0"></omgdi:waypoint>
-        <omgdi:waypoint x="242.0" y="275.0"></omgdi:waypoint>
+        <omgdi:waypoint x="257.0" y="190.0"></omgdi:waypoint>
+        <omgdi:waypoint x="257.0" y="276.0"></omgdi:waypoint>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge bpmnElement="_8" id="BPMNEdge__8">
-        <omgdi:waypoint x="242.0" y="330.0"></omgdi:waypoint>
-        <omgdi:waypoint x="247.0" y="480.0"></omgdi:waypoint>
+        <omgdi:waypoint x="257.0" y="331.0"></omgdi:waypoint>
+        <omgdi:waypoint x="257.0" y="480.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
+        <omgdi:waypoint x="257.0" y="50.0"></omgdi:waypoint>
+        <omgdi:waypoint x="257.0" y="135.0"></omgdi:waypoint>
       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio