IFlwProcessService.java 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. * @return 流程实例ID
  47. */
  48. Long launchProcess(ProcessStartDTO dto, FlowCreator flowCreator);
  49. /**
  50. * 根据 id 获取模型
  51. *
  52. * @param id 流程定义ID
  53. */
  54. String getNodeModelById(Long id);
  55. /**
  56. * 根据 id 查询流程定义相关信息
  57. *
  58. * @param id 流程定义ID
  59. */
  60. FlwProcessDTO getDtoById(Long id);
  61. /**
  62. * 根据 key 查询流程定义相关信息
  63. *
  64. * @param key 流程定义KEY
  65. */
  66. FlwProcessDTO getDtoByKey(String key);
  67. /**
  68. * 创建添加流程定义配置
  69. *
  70. * @param dto 流程定义配置 DTO
  71. * @return 流程定义ID
  72. */
  73. Long saveDto(FlwProcessDTO dto);
  74. /**
  75. * 根据ID删除流程定义相关信息
  76. *
  77. * @param id 流程定义ID
  78. */
  79. boolean removeProcessInfo(Long id);
  80. /**
  81. * 根据ID更新流程定义排序
  82. *
  83. * @param dtoList 流程分类排序DTO列表
  84. */
  85. boolean sort(List<FlwCategorySortDTO> dtoList);
  86. /**
  87. * 根据ID更新流程定义流程状态
  88. *
  89. * @param id 流程定义ID
  90. * @param state 流程状态 0,不可用 1,可用
  91. */
  92. boolean updateSateById(Long id, Integer state);
  93. /**
  94. * 根据ID克隆流程定义信息
  95. *
  96. * @param id 流程定义ID
  97. */
  98. boolean cloneById(Long id);
  99. /**
  100. * 发布指定ID流程
  101. *
  102. * @param id 流程定义ID
  103. */
  104. boolean releaseById(Long id);
  105. /**
  106. * 根据指定ID签出历史流程
  107. * <p>
  108. * 当前版本和历史版本交换
  109. * </p>
  110. *
  111. * @param id 流程定义ID
  112. */
  113. boolean checkoutById(Long id);
  114. }