package cn.itcast.hiss.process.activiti.service.impl;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.itcast.hiss.api.client.HissProcessConstants;
import cn.itcast.hiss.api.client.common.HissVariableServer;
import cn.itcast.hiss.api.client.form.FormSubmitData;
import cn.itcast.hiss.api.client.processdefinition.ProcessDesignModel;
import cn.itcast.hiss.api.client.task.*;
import cn.itcast.hiss.api.server.common.UserInfo;
import cn.itcast.hiss.common.SystemConstant;
import cn.itcast.hiss.common.enums.*;
import cn.itcast.hiss.event.pojo.HissActivitiEvent;
import cn.itcast.hiss.form.service.HissFormModelService;
import cn.itcast.hiss.message.CurrentUser;
import cn.itcast.hiss.message.Message;
import cn.itcast.hiss.message.MessageContext;
import cn.itcast.hiss.message.sender.form.FormSubmitDataMessage;
import cn.itcast.hiss.message.sender.processdefinition.ProcessDesignModelMessage;
import cn.itcast.hiss.message.sender.task.*;
import cn.itcast.hiss.process.activiti.configurator.function.HissUtil;
import cn.itcast.hiss.process.activiti.listener.HissActivitiEventBuilder;
import cn.itcast.hiss.process.activiti.mapper.*;
import cn.itcast.hiss.process.activiti.multilnstance.AddMultiInstanceExecutionCmd;
import cn.itcast.hiss.process.activiti.multilnstance.JumpMultiInstanceExecutionCmd;
import cn.itcast.hiss.process.activiti.pojo.*;
import cn.itcast.hiss.process.activiti.service.ActivitiService;
import cn.itcast.hiss.process.activiti.service.CommentService;
import cn.itcast.hiss.process.activiti.service.UpdateProcessTenantService;
import cn.itcast.hiss.process.activiti.service.UserTaskService;
import cn.itcast.hiss.process.activiti.util.AdminUtil;
import cn.itcast.hiss.process.activiti.util.VariableUtil;
import cn.itcast.hiss.process.activiti.variables.SysVariableManager;
import cn.itcast.hiss.process.activiti.vo.MultiInstanceVo;
import cn.itcast.hiss.server.template.HissServerApperanceTemplate;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.activiti.bpmn.constants.BpmnXMLConstants;
import org.activiti.bpmn.converter.BpmnXMLConverter;
import org.activiti.bpmn.model.Process;
import org.activiti.bpmn.model.*;
import org.activiti.engine.*;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.Expression;
import org.activiti.engine.history.*;
import org.activiti.engine.impl.bpmn.behavior.ParallelMultiInstanceBehavior;
import org.activiti.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior;
import org.activiti.engine.impl.identity.Authentication;
import org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl;
import org.activiti.engine.impl.persistence.entity.TaskEntity;
import org.activiti.engine.repository.Deployment;
import org.activiti.engine.repository.DeploymentBuilder;
import org.activiti.engine.repository.Model;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.Execution;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.DelegationState;
import org.activiti.engine.task.IdentityLink;
import org.activiti.engine.task.Task;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import java.io.ByteArrayInputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.stream.Collectors;
/*
* @author miukoo
* @description 流程办理各功能实现
* @date 2023/6/3 11:19
* @version 1.0
**/
@Slf4j
@Service
@Transactional
public class ActivitiServiceImpl implements ActivitiService {
@Autowired
HissProcessUpdateJobMapper hissProcessUpdateJobMapper;
@Autowired
HissProcessPreLaunchMapper hissProcessPreLaunchMapper;
@Autowired
private TaskService taskService;
@Autowired
private RuntimeService runtimeService;
@Autowired
private CommentService commentService;
@Autowired
private ProcessEngine processEngine;
@Autowired
private HistoryService historyService;
@Autowired
private RepositoryService repositoryService;
@Autowired
private HiActinstMapper hiActinstMapper;
@Autowired
private ManagementService managementService;
@Autowired
private HissAutoApprovalConfigMapper hissAutoApprovalConfigMapper;
@Autowired
private UserTaskService userTaskService;
@Autowired
private ActRuEventSubscrMapper actRuEventSubscrMapper;
@Autowired
private HissServerApperanceTemplate hissServerApperanceTemplate;
@Autowired
private GeBytearrayMapper geBytearrayMapper;
@Autowired
private HissProcessFormMapper hissProcessFormMapper;
@Autowired
private HissFormModelService hissFormModelService;
@Autowired
private ActReModelMapper actReModelMapper;
/**
* 创建知会任务
*
* @param params
* @return
*/
@Override
public void createNotificationTask(NotificationTaskMessage params, MessageContext messageContext) {
createTask(params, HissTaskTypeEnum.NOTIFICATION, messageContext);
}
private void createTask(NotificationTaskMessage params, HissTaskTypeEnum type, MessageContext messageContext) {
NotificationTask notificationTask = params.getPalyload();
createTask(notificationTask, params.getMessageAuth().getCurrentUser(), type, messageContext);
}
@Override
public void createTask(NotificationTask notificationTask, CurrentUser currentUser, HissTaskTypeEnum type, MessageContext messageContext) {
String actionName = notificationTask.getOperatorName();
Task task = taskService.createTaskQuery().taskId(notificationTask.getTaskId()).singleResult();
if (task != null) {
if (StrUtil.isNotEmpty(task.getAssignee()) && task.getAssignee().equalsIgnoreCase(currentUser.getUserId())) {
ActReModel actReModel = actReModelMapper.getModelByBusId(type.name().toLowerCase());
ProcessDefinition hissNotification = repositoryService.createProcessDefinitionQuery()
.processDefinitionName("hiss_"+type.name().toLowerCase())
.deploymentId(actReModel.getDeploymentId())
.processDefinitionTenantId("tenant_hiss")
.latestVersion().singleResult();
// 增加流程标识
Map<String,Object> map = new HashMap<>();
map.put(type.name().toLowerCase(),notificationTask.getUserId());
map.put(HissProcessConstants.PARENT_PROCESS_INSTANCE,task.getProcessInstanceId());
map.put(HissProcessConstants.NODE_TYPE, type.name());// 这里type实际是ActiveNodeTypeEnum的值,但是可以直接使用type,因为抄送和知会
ProcessInstance oldProcessInstance = runtimeService.createProcessInstanceQuery().processInstanceId(task.getProcessInstanceId()).singleResult();
Authentication.setAuthenticatedUserId(task.getAssignee());
ProcessInstance processInstance = runtimeService.startProcessInstanceById(hissNotification.getId(), task.getBusinessKey(), map);
addHissProcessUpdateJob("【"+actionName+"】"+oldProcessInstance.getName(),task.getTenantId(),processInstance.g
没有合适的资源?快使用搜索试试~ 我知道了~
基于SpringBoot+Activiti7的hiss-center工作流组件设计源码
共1599个文件
java:526个
js:359个
vue:260个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 45 浏览量
2024-09-29
08:39:20
上传
评论
收藏 78.1MB ZIP 举报
温馨提示
本项目是一款基于SpringBoot和Activiti7框架开发的hiss-center工作流组件开源项目,融合了低代码开发理念。项目包含1599个文件,其中Java文件526个,JavaScript文件355个,Vue文件260个,TypeScript文件119个,以及PNG、SVG、Less、JSON、XML、CSS等多种类型的文件。项目不仅提供了工作流与低代码表单的整合解决方案和权限控制,还深入探索了Activiti7的强大功能,实现了流程设计器、业务人员流程设计器、流程状态图、加签和驳回等多种功能。此外,项目还附带流程中心微服务、流程设计器等开源工具,旨在助力开发者高效构建流程项目。学习本项目后,学员将掌握工作流与低代码解决方案,并能够利用开源工具解决企业实际问题,显著提升就业竞争力。
资源推荐
资源详情
资源评论
收起资源包目录
基于SpringBoot+Activiti7的hiss-center工作流组件设计源码 (1599个子文件)
default.conf 1KB
default.conf 1KB
index.css 549KB
index.css 549KB
index.css 528KB
index.css 528KB
build.css 409KB
build.css 409KB
build.css 409KB
build.css 409KB
properties-panel.css 26KB
base.css 4KB
HissDesign.css 2KB
iconfont.css 2KB
iconfont.css 2KB
renderForm.css 773B
renderForm.css 773B
renderForm.css 743B
renderForm.css 743B
Amap.css 599B
Amap.css 599B
fetch.css 599B
addressList.css 599B
Amap.css 599B
fetch.css 599B
addressList.css 599B
Amap.css 599B
test.css 234B
.env.development 52B
.env.development 52B
Dockerfile 448B
Dockerfile 274B
DockerfileCenter 263B
DockerfileRuoyi 211B
DockerfileZhyl 212B
.editorconfig 209B
.editorconfig 209B
.env 82B
.env 82B
.env 20B
bpmn.07cc7b0a.eot 47KB
bpmn.07cc7b0a.eot 47KB
bpmn.07cc7b0a.eot 47KB
.eslintignore 121B
.eslintignore 121B
.eslintignore 27B
.eslintrc 4KB
.eslintrc 4KB
.eslintrc 314B
.eslintrc 90B
spring.factories 149B
spring.factories 146B
spring.factories 141B
spring.factories 140B
spring.factories 139B
spring.factories 137B
spring.factories 129B
spring.factories 128B
spring.factories 128B
spring.factories 126B
spring.factories 121B
clip_image004.gif 106KB
clip_image002.gif 50KB
.gitignore 4KB
.gitignore 253B
.gitignore 253B
index.html 960B
index.html 351B
index.html 350B
index.html 292B
ActivitiServiceImpl.java 81KB
HissFormModelServiceImpl.java 44KB
ParseBusinessUtil.java 41KB
PI_GetInstanceViewerHandler.java 35KB
DefaultHissClientApperanceTemplate.java 31KB
RuoyiUtil.java 16KB
HissDefaultListenerFactory.java 13KB
HissClientApperanceTemplate.java 13KB
ProcessServiceImpl.java 11KB
MySQLDatabaseDriver.java 10KB
HissAutoApprovalListenner.java 9KB
ActivitiDesignerServiceImpl.java 9KB
ActivitiHandlerAutoConfiguration.java 9KB
HandlerIdClientEnum.java 9KB
HttpAuthCheckServiceImpl.java 8KB
HissDefaultActivityBehaviorFactory.java 7KB
Task_GetMyTaskHandler.java 7KB
HissMailDeletgate.java 7KB
ProcessInstanceServiceImpl.java 7KB
HissUserTaskActivityBehavior.java 7KB
DefaultMessageSenderExecuterImpl.java 6KB
ProcessController.java 6KB
HissServerMessageHandler.java 6KB
HissRemoteDelegateExpressionTransactionDependentEventListener.java 6KB
ProcessApplyServiceImpl.java 6KB
ActivitiService.java 6KB
CmdExecuterImpl.java 5KB
CreateSqlHandler.java 5KB
MessageBuilder.java 5KB
GlobalEventListener.java 5KB
共 1599 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16
资源评论
lly202406
- 粉丝: 3024
- 资源: 5526
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 毕设和企业适用springboot企业资源规划类及在线学习平台源码+论文+视频.zip
- 毕设和企业适用springboot企业资源规划类及智慧安防系统源码+论文+视频.zip
- 毕设和企业适用springboot区块链技术类及企业云管理平台源码+论文+视频.zip
- 毕设和企业适用springboot企业资源规划类及智能医疗监测系统源码+论文+视频.zip
- 毕设和企业适用springboot企业资源规划类及智能城市数据管理平台源码+论文+视频.zip
- 毕设和企业适用springboot企业资源规划类及智慧社区管理平台源码+论文+视频.zip
- 毕设和企业适用springboot区块链技术类及数字营销平台源码+论文+视频.zip
- 毕设和企业适用springboot汽车电商类及城市智能管理系统源码+论文+视频.zip
- 毕设和企业适用springboot汽车电商类及城市智能运营平台源码+论文+视频.zip
- 毕设和企业适用springboot汽车电商类及广告效果评估平台源码+论文+视频.zip
- 毕设和企业适用springboot区块链技术类及网络营销平台源码+论文+视频.zip
- 毕设和企业适用springboot汽车电商类及跨境电商管理平台源码+论文+视频.zip
- 毕设和企业适用springboot汽车电商类及教学资源共享平台源码+论文+视频.zip
- 毕设和企业适用springboot区块链技术类及云端储物管理系统源码+论文+视频.zip
- 毕设和企业适用springboot区块链技术类及在线教育管理系统源码+论文+视频.zip
- 毕设和企业适用springboot区块链技术类及智能会议管理平台源码+论文+视频.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功