IFlwProcessService.java 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. package com.aizuda.boot.modules.flw.service;
  2. import com.aizuda.boot.modules.flw.entity.dto.FlwCategorySortDTO;
  3. import com.aizuda.boot.modules.flw.entity.dto.FlwProcessDTO;
  4. import com.aizuda.boot.modules.flw.entity.dto.FlwProcessHistoryDTO;
  5. import com.aizuda.boot.modules.flw.entity.dto.ProcessStartDTO;
  6. import com.aizuda.boot.modules.flw.entity.vo.FlwProcessCategoryVO;
  7. import com.aizuda.bpm.engine.core.FlowCreator;
  8. import com.aizuda.bpm.engine.entity.FlwProcess;
  9. import com.aizuda.service.service.IBaseService;
  10. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  11. import java.util.List;
  12. /**
  13. * 流程分类 服务类
  14. *
  15. * @author 青苗
  16. * @since 2023-09-07
  17. */
  18. public interface IFlwProcessService extends IBaseService<FlwProcess> {
  19. /**
  20. * 流程定义历史分页列表
  21. */
  22. Page<FlwProcess> pageHistory(Page<FlwProcess> page, FlwProcessHistoryDTO dto);
  23. /**
  24. * 流程定义分类查询所有流程定义列表
  25. *
  26. * @param keyword 搜索关键词
  27. */
  28. List<FlwProcessCategoryVO> listCategoryAll(String keyword);
  29. /**
  30. * 获取发起分类流程定义列表
  31. *
  32. * @param keyword 搜索关键词
  33. */
  34. List<FlwProcessCategoryVO> listLaunch(String keyword);
  35. /**
  36. * 查询满足条件前10条子流程列表
  37. *
  38. * @param keyword 搜索关键词
  39. */
  40. List<FlwProcess> listChildTop10(String keyword);
  41. /**
  42. * 发起流程
  43. *
  44. * @param dto 流程发起 DTO
  45. * @param flowCreator 流程创建者
  46. */
  47. boolean launchProcess(ProcessStartDTO dto, FlowCreator flowCreator);
  48. /**
  49. * 根据 id 获取模型
  50. *
  51. * @param id 流程定义ID
  52. */
  53. String getNodeModelById(Long id);
  54. /**
  55. * 根据 id 查询流程定义相关信息
  56. *
  57. * @param id 流程定义ID
  58. */
  59. FlwProcessDTO getDtoById(Long id);
  60. /**
  61. * 根据 key 查询流程定义相关信息
  62. *
  63. * @param key 流程定义KEY
  64. */
  65. FlwProcessDTO getDtoByKey(String key);
  66. /**
  67. * 创建添加流程定义配置
  68. *
  69. * @param dto 流程定义配置 DTO
  70. * @return 流程定义ID
  71. */
  72. Long saveDto(FlwProcessDTO dto);
  73. /**
  74. * 根据ID删除流程定义相关信息
  75. *
  76. * @param id 流程定义ID
  77. */
  78. boolean removeProcessInfo(Long id);
  79. /**
  80. * 根据ID更新流程定义排序
  81. *
  82. * @param dtoList 流程分类排序DTO列表
  83. */
  84. boolean sort(List<FlwCategorySortDTO> dtoList);
  85. /**
  86. * 根据ID更新流程定义流程状态
  87. *
  88. * @param id 流程定义ID
  89. * @param state 流程状态 0,不可用 1,可用
  90. */
  91. boolean updateSateById(Long id, Integer state);
  92. /**
  93. * 根据ID克隆流程定义信息
  94. *
  95. * @param id 流程定义ID
  96. */
  97. boolean cloneById(Long id);
  98. /**
  99. * 发布指定ID流程
  100. *
  101. * @param id 流程定义ID
  102. */
  103. boolean releaseById(Long id);
  104. /**
  105. * 根据指定ID签出历史流程
  106. * <p>
  107. * 当前版本和历史版本交换
  108. * </p>
  109. *
  110. * @param id 流程定义ID
  111. */
  112. boolean checkoutById(Long id);
  113. }