Skip to content

Commit

Permalink
update starter/src: mod 1 files
Browse files Browse the repository at this point in the history
  • Loading branch information
pengjinning committed Feb 14, 2025
1 parent 33c9cd3 commit 4fc6b16
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions starter/src/test/java/com/bytedesk/starter/FlowableTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2025-02-02 11:21:45
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-02-14 11:59:32
* @LastEditTime: 2025-02-14 12:06:33
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
Expand All @@ -13,6 +13,7 @@
*/
package com.bytedesk.starter;

import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -83,10 +84,14 @@ public void testAddProcessDefinitionByUploadFile() {
.type(UploadTypeEnum.BPMN.name())
.fileUrl("")
.build();
// 将上传文件内容,部署流程

// 将文件URL转换为InputStream
InputStream inputStream = getClass().getResourceAsStream("/processes/StudentLeave.bpmn20.xml");

// 部署流程
Deployment deployment = repositoryService.createDeployment()
.name("请假流程")
.addClasspathResource("processes/StudentLeave.bpmn20.xml")
.name(upload.getFileName())
.addInputStream(upload.getFileName(), inputStream)
.deploy();
log.info("部署流程成功: {}", deployment.getId());
}
Expand Down

0 comments on commit 4fc6b16

Please sign in to comment.