-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
liyuliang5
committed
Nov 8, 2024
1 parent
930a3ed
commit d33c679
Showing
513 changed files
with
224,916 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,14 +62,23 @@ Spring环境可直接定义FlowEngineImpl bean. | |
[main ] INFO BaseFlowRunner - NEXT NODES: | ||
[main ] INFO QuickStartTest - Execute finish, current node is:node003 | ||
``` | ||
以上只是简单使用示例,EasyFlow可支持很多的配置项和使用场景,更多使用见wiki文档. | ||
|
||
#### 流程引擎-BPMN | ||
打开easyflow-flow-bpmn/BPMNDesigner.html流程设计器. 点击导入按钮,导入easyflow-flow-bpmn/src/test/resources/flow/quickstart/quickstart_001.bpmn文件,可在设计器中看到和以上JSON定义等价的BPMN流程定义. | ||
使用时只需要将FlowEngineImpl的flowParser设置为BpmnFlowParser. | ||
|
||
### 更多 | ||
以上只是简单使用示例,EasyFlow可支持很多的配置项和使用场景,更多使用见wiki文档. | ||
#### 工作流 | ||
工作流模块提供了基于流程引擎的持久化和任务审批能力, 需要关系型数据库支持. 源码中的示例工程启动步骤如下: | ||
1. 检出本工程库代码至本地. | ||
1. 安装关系型数据库, 如MYSQL(使用时需遵守其许可). | ||
1. 建库表, 数据库名为easyflow, 表结构可参考源码中的create_all_table.sql和sample_form_template.sql. | ||
1. sample模块的application-open-all.yml文件中配置数据库连接信息, pom中引入数据库驱动jar包. | ||
1. 编译构建代码工程, 启动IntegrationOpenApplication类. 启动成功后访问http://localhost:9888便可看到JDEasyFlow管理界面. | ||
|
||
|
||
JDEasyFlow具有非常灵活的扩展性,你可以基于目前已开源组件做更多的功能,如流程持久化、任务审批等. | ||
### 更多 | ||
JDEasyFlow具有非常灵活的扩展性,你可以基于目前已开源组件扩展做更多的功能. | ||
|
||
### 联系我们 | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<artifactId>easyflow-process</artifactId> | ||
<groupId>com.jd.easyflow</groupId> | ||
<version>1.4.0</version> | ||
</parent> | ||
<artifactId>easyflow-process-admin</artifactId> | ||
<name>easyflow-process-admin</name> | ||
<packaging>jar</packaging> | ||
<properties> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.jd.easyflow</groupId> | ||
<artifactId>easyflow-process-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.jd.easyflow</groupId> | ||
<artifactId>easyflow-process-common</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.jd.easyflow</groupId> | ||
<artifactId>easyflow-flow-bpmn</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.jd.easyflow</groupId> | ||
<artifactId>easyflow-fsm</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
102 changes: 102 additions & 0 deletions
102
...in/src/main/java/com/jd/easyflow/admin/form/adapter/page/FormTemplateAdminController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
package com.jd.easyflow.admin.form.adapter.page; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.ui.Model; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.ResponseBody; | ||
|
||
import com.jd.easyflow.admin.form.adapter.page.converter.PagerConverter; | ||
import com.jd.easyflow.common.adapter.export.dto.ExportRequest; | ||
import com.jd.easyflow.common.adapter.export.dto.ExportResponse; | ||
import com.jd.easyflow.common.adapter.export.util.ExportResponseUtil; | ||
import com.jd.easyflow.common.adapter.page.BasePageController; | ||
import com.jd.easyflow.common.dto.DataResponse; | ||
import com.jd.easyflow.common.dto.pager.PagerCondition; | ||
import com.jd.easyflow.form.adapter.export.FormTemplateExport; | ||
import com.jd.easyflow.form.adapter.export.dto.FormTemplateDTO; | ||
import com.jd.easyflow.objects.factory.ObjectFactorys; | ||
|
||
/** | ||
* | ||
* @author liyuliang5 | ||
* | ||
*/ | ||
@Controller | ||
public class FormTemplateAdminController extends BasePageController { | ||
|
||
private FormTemplateExport formTemplateExport; | ||
|
||
@RequestMapping("easyflow/formTemplate/formTemplateList") | ||
public String templateList(Model model) { | ||
return "easyflow/formtemplate/formTemplateList"; | ||
} | ||
|
||
@RequestMapping("easyflow/formTemplate/ajax/getListData") | ||
@ResponseBody | ||
public DataResponse<com.jd.easyflow.common.adapter.export.dto.pager.PagerResult> getData() { | ||
PagerCondition condition = getPagerCondition(); | ||
ExportResponse<com.jd.easyflow.common.adapter.export.dto.pager.PagerResult> response = getFormTemplateExport() | ||
.find(new ExportRequest(PagerConverter.INSTANCE.convert(condition))); | ||
response.getData().getList().forEach(o -> { | ||
((FormTemplateDTO) o).setConfig(null); | ||
}); | ||
return new DataResponse<com.jd.easyflow.common.adapter.export.dto.pager.PagerResult>( | ||
ExportResponseUtil.unwrap(response)); | ||
} | ||
|
||
@RequestMapping("easyflow/formTemplate/formTemplateDetail") | ||
public String detailPage(String templateCode, Model model) { | ||
ExportResponse<FormTemplateDTO> response = getFormTemplateExport().get(new ExportRequest(templateCode)); | ||
FormTemplateDTO formTemplate = ExportResponseUtil.unwrap(response); | ||
model.addAttribute("detail", formTemplate); | ||
return "easyflow/formtemplate/formTemplateDetail"; | ||
} | ||
|
||
@RequestMapping("easyflow/formTemplate/formTemplateAdd") | ||
public String addPage(Model model) { | ||
return "easyflow/formtemplate/formTemplateAdd"; | ||
} | ||
|
||
@RequestMapping("easyflow/formTemplate/formTemplateEdit") | ||
public String editPage(String templateCode, Model model) { | ||
ExportResponse<FormTemplateDTO> response = getFormTemplateExport().get(new ExportRequest(templateCode)); | ||
model.addAttribute("detail", ExportResponseUtil.unwrap(response)); | ||
return "easyflow/formtemplate/formTemplateEdit"; | ||
} | ||
|
||
@RequestMapping("easyflow/formTemplate/ajax/add") | ||
@ResponseBody | ||
public DataResponse<Void> add(FormTemplateDTO formTemplate) { | ||
getFormTemplateExport().add(new ExportRequest(formTemplate)); | ||
return new DataResponse<>(); | ||
} | ||
|
||
@RequestMapping("easyflow/formTemplate/ajax/edit") | ||
@ResponseBody | ||
public DataResponse<Void> edit(FormTemplateDTO formTemplate) { | ||
getFormTemplateExport().update(new ExportRequest(formTemplate)); | ||
return new DataResponse<>(); | ||
} | ||
|
||
@RequestMapping("easyflow/formTemplate/ajax/getTemplate") | ||
@ResponseBody | ||
public DataResponse<Map<String, Object>> getTemplate(String templateCode) { | ||
ExportResponse<FormTemplateDTO> response = getFormTemplateExport().get(new ExportRequest(templateCode)); | ||
Map<String, Object> result = new HashMap<>(); | ||
String config = null == ExportResponseUtil.unwrap(response) ? null : ExportResponseUtil.unwrap(response).getConfig(); | ||
result.put("config", config); | ||
return new DataResponse<>(result); | ||
} | ||
|
||
public FormTemplateExport getFormTemplateExport() { | ||
if (formTemplateExport == null) { | ||
formTemplateExport = ObjectFactorys.getDefault().getObject(FormTemplateExport.class); | ||
} | ||
return formTemplateExport; | ||
} | ||
|
||
} |
Oops, something went wrong.