1 Star 0 Fork 188

一世宿敌 / orange-flowable

forked from 丶若愚 / orange-flowable 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

开源声明

从 2.0 开始,橙单完整开源全部脚手架代码,同时提供面向不同技术栈和架构场景的工程样例。与此同时,我们还会提供非常详尽、专业、完全免费的线上开发文档。希望通过我们共同的努力,让每一位对技术有兴趣的开发者,可以轻松迈过这个小小的门槛。 欢迎加入我们的技术支持QQ群2 (883176267),如果橙单对您确有帮助,Fork 的同时,也请 Star 一下。

再次确认你没看错,极高质量和成熟度的脚手架代码全部开源, 18万字的线上文档也完全开放,包括完整的工作流、在线表单和数据过滤等组件 ( 同类竞品售价几近万元 ),橙单全部源码可见,没有一丝遮蔽。

最新功能

  • 工作流支持催办,定时扫描并消息提醒。
  • 工作流支持撤回和驳回。场景可覆盖排他网关、并行网关内外、多实例会签等复杂场景的撤回和驳回。
  • 工作流支持指定角色、指定岗位、指定部门、指定部门岗位等更多候选组选项。
  • 工作流支持同一表单多次提审,即新增数据和修改数据执行后的审批。
  • 工作流支持审批中数据和最终发布数据分离,防止审批中数据污染其他业务关联表的数据,并在审批完成后执行主表及各关联从表的数据同步。
  • 工作流支持主表及一对一、一对多、多对多从表数据的级联增删改查。
  • 工程配置中同时支持最新版 log4j2 和 logback,可根据需求选择其一。
  • 数据 add 接口,支持主表与一对一、一对多、多对多从表数据的级联添加。前后端均已支持。
  • 如级联添加的关联从表数据是跨服务调用,亦可生成基于 seata 的分布式事务代码,保证数据的一致性。

仓库代码

仓库内包含多种不同类型的工程,均为橙单生成器动态生成而得。目前已覆盖橙单全部基础组件和部分架构场景,以及最主流的技术栈组合,更多架构会在随后的版本中,逐步推送至开源仓库,敬请关注。

  • orange-demo-flowable 基于 Flowable 6.6 的完整工作流组件及其示例,同时包含完整的在线表单代码,前端工程包含流程编辑器和在线表单编辑器。
  • orange-demo-activiti 基于 Activiti 7.x 的完整工作流组件及其示例,同时包含完整的在线表单代码,前端工程包含流程编辑器和在线表单编辑器。
  • orange-demo-multi 基于 Nacos + Redis + Kafka + ELK + Skywalking 的全栈微服务架构。包含完整的用户权限和数据权限管理。
  • orange-demo-multi-uaa 基于 OAuth2 + Nacos + Redis + Kafka + ELK + Skywalking 的全栈微服务单点登录架构,权限管理已去除对 Spring Security 的依赖。
  • orange-demo-single 单体架构工程,如果项目中不需要工作流和在线表单,可使用该工程为模板进行二次开发,省去您框架裁剪的时间开销。

选择橙单

  • 理念,对开发者极为友好的低代码生成理念,与功能堆砌相比,我们更关注逻辑、数据关联关系以及应用场景,他们的组合既是业务功能良好实现的保障,更是卓越架构高可靠运行的基石。
  • 基础,开放成熟的基础架构,沉淀于大型企业应用项目,又经过众多中小型项目的历练,逐步发展至今。
  • 架构,主流技术栈正交组合,具有极强的可裁剪性,相信总有一种组合适合您的企业。
  • 设计,拥抱云原生的架构设计理念,更多单表查询,有效提升缓存利用率,业务服务自动组装各种关联数据 (含跨服务调用),彻底释放数据库压力,让微服务下的服务拆分和库表拆分更加得心应手。
  • 逻辑,顶级的代码强度,全覆盖的关联数据合法性验证,数据可见性防越权验证,完整规范且可追溯的日志体系,无限层级的树形数据高效读写。
  • 代码,感动开源中国的代码质量,让你快速上手二开。吃透橙单,收入翻番,效率乘三。

关于橙单

如果说基础框架是技术轮子,那么我们就是生产线。不仅可以造出各种尺寸的轮子,通过我们的在线配置工具,还能生成您的更多业务所需。为了使轮子更为贴近项目的架构需求,我们目前已支持多种类型的工程结构模板,如多应用、多租户、多渠道等。架构师们通过选择最为适合的项目类型,可最大程度的降低对生成后工程进行裁剪和改造的工作量。

在线资源

工作流

  • 支持静态表单 + 工作流的代码生成。用户可在生成器配置表单和流程,再生成相关的完整业务代码,生成后代码对于二次开发极为友好
  • 前后端代码无一丝混淆,完全交付,代码质量超高,同时支持单体和微服务架构。
  • 同时集成 Flowable 6.6 和 Activiti 7.x 作为工作流引擎,配置工程时可自行二选一。
  • 集成工作流和在线表单,无需写一行代码即可配置出相对复杂的工作流业务。
  • 支持同一流程的多版本发布,同时支持版本切换。
  • 支持完整的工作流工单管理,稍作修改即可支持分布式操作。
  • 支持基于角色、部门、岗位、本部门岗位、上级部门岗位、指定部门岗位、本部门领导岗位、上级部门领导岗位等候选组。
  • 支持工单撤销和终止、会签加签、待办已办转办、催办、抄送和传阅、撤回和驳回、历史任务、审批详情列表、附件上传下载等。
  • 支持一个表单的多次提交,新增数据和修改数据后均可提交审批流程。
  • 工作流支持审批中数据和最终发布数据分离,防止审批中数据污染其他业务关联表的数据,并在审批完成后执行主表及各关联从表的数据同步。
  • 工作流支持主表及一对一、一对多、多对多从表数据的级联增删改查。
  • 工作流前端已集成美观的流程编辑器,同时支持流程图高亮及任务跟踪。
  • 严格且合理的数据安全校验,流程敏感数据 (如合同信息) 不会被越权访问和下载。
  • 已去除 Spring Security 的缺省依赖,并与现有权限系统完美整合。
  • 工作流与在线表单演示环境,全部代码由橙单生成器直接生成,未经任何修改。 http://demo.orangeforms.com/flow

在线表单

  • 前后端代码完全交付,甚至可配置为自己的项目包名。
  • 前后端代码无一丝混淆,且代码质量超高,极易学习和二次开发,同时支持单体和微服务架构。
  • 可视化的拖拉拽编辑器,目前已经支持大部分常用组件,后续版本会支持图表。
  • 支持主从表联动。
  • 支持富文本、多图、多附件的上传和下载。
  • 可视化接口配置编辑器,支持多数据库、数据表、一对一表关联、一对多表关联和多种数据字典等。
  • 支持字典过滤、主表字段过滤、一对一从表字段过滤,同时支持范围、模糊和等于查询方式。
  • 支持一对多的聚合字段计算,在主表列表中可动态计算并显示从表的聚合计算结果。
  • 支持主表字段排序、一对一从表字段排序。
  • 完美支持数据权限过滤和操作权限控制。
  • 接口参数均为数据源 ID,不暴露任何后台数据表细节,从机制上彻底消除了 SQL 注入的风险。
  • 运行时效率极高,动态表单关键数据结构均缓存 Redis,从而有效提升数据接口的应答效率。

多应用

  • 生成器支持多应用功能,应用和服务之间保持多对多关系,服务池功能已基本支持,后续版本会持续优化。
  • 单体工程可同时创建 WebAdmin 后台应用和面向前端 App 的 WebApi 应用。
  • 微服务工程可创建非常典型的单体后台 WebAdmin 应用,及面向前端 App 的 WebApi 微服务应用。补充说明,WebAdmin 后台应用也可以配置为微服务应用,并可与 WebApi 应用共享服务池中的通用业务服务。
  • 对于上述介绍的 WebAdmin 后台服务,与之前版本一致,仍然提供表单和权限功能。而 WebApi 作为面向前端的接口应用,为了降低架构师们的工程裁剪工作量,该类应用将不提供表单和权限功能。

多租户

  • 多租户工程可同时创建三个应用,分别为租户运营管理后台应用 TenantAdmin,租户运营后台应用,以及面向租户前端 App 的 WebApi 应用。
  • 对于多租户运营管理后台应用 TenantAdmin,不仅内置了自身的权限管理和租户运营管理等功能,同时也支持配置自定义的业务表单和租户统计表单。
  • 支持全局公用字典和租户字典,前者由租户运营管理后台统一管理,租户字典数据可由租户管理员自行维护。为了保证整体运行时效率,两者均支持缓存 Redis。
  • 租户数据支持逻辑隔离、物理隔离和混合隔离等多种方式,租户权限数据由租户运营管理服务统一管理,实时同步到多个租户运行系统数据库中。不仅非常有利于租户数据的迁移。同时也保证了运行时效率。业务逻辑代码与非多租户系统相比,差异也降至最低。
  • 可配置定时任务 Job 服务,并将不同租户数据库中的业务行为数据,分组统计后刷新到租户运营管理数据库中,再由配置的统计表单进行显示。
  • 可与现有的单点登录服务 (uaa) 无缝集成。

关于我们

  • S.L 老师,20年开发经验,后台全栈架构师,代码强迫症、性能洁癖、能看出一像素偏差。精通 C++/Java/Scala/Web高并发/大数据/C++服务器/视频直播网络技术,略懂容器。
  • J.T 老师,15年开发经验,前端全栈架构师,思维极缜密、号边界王。精通 C++/Java/Javascript/Vue & React/C++客户端/Android原生/小程序/视频直播编解码技术。
  • 欢迎加入我们的技术交流 QQ 群,如遇任何使用中的问题我们都将第一时间为您答疑。群2:加入QQ群2 QQ群

生成后工程

可无限制的用于学习、培训、接私活、公司自用和开发商业项目等场景,其中基础框架代码将永久免费,并持续更新。

开箱即用

项目信息如您所愿,工程名称、目录结构、基础包名、common模块、代码注释中的 @author 信息等,在创建工程时即已配置,不会留有橙单的任何信息。因此无需二次修改,前后端直接编译运行即可。如编译期和运行时出现问题,那一定是我们的 bug,在得到您反馈后,我们将及时修复。

开源工程部署

技术选型

  • 前端: Element (Vue) / Ant Design (React) + ECharts / AntV + Axios + Webpack。
  • 后端: Spring Boot / Spring Cloud / Spring Cloud Alibaba + Spring Security OAuth2 + Mybatis + Jwt。
  • 工具库: Activiti + Flowable + Hutool + Guava + Caffeine + Lombok + MapStruct + Mybatis Plus + Knife4j + qdox。
  • 服务组件: Redis + Zookeeper + Nacos + Consul + XXL-Job + Quartz + Seata + Minio + Canal + RocketMQ + Kafka + Sentinel。
  • 系统监控: ELK + PinPoint / SkyWalking + Grafana + Prometheus。

基础功能

  • 前端框架:单页面、多标签、多栏目和子路由,多套高颜值样式主题可供选择。
  • 前端能力:列表编辑、统计图表、多表联动、明细数据下钻、上传下载、导入导出、自定义打印样式模板、富文本等。
  • 页面布局:支持基于 Fragment 和 Block 的灵活布局方式,通过配置即可生成多样化的表单页面,并可预览。
  • 接口规范:微服务和单体服务的接口命名和参数定义规范完全一致,便于日后的平滑升级。
  • 在线表单:支持可视化拖来拽编辑器,表单、后台接口和数据字典均可动态配置,完美集成数据权限过滤和操作权限控制,即配即得。
  • 流程管理:功能完整且前后端全部开源。
  • 后台架构:分布式锁、分布式 Id、分布式缓存、分布式事务、分布式限流和灰度发布等,按需集成。
  • 用户管理:支持基于 OAuth2 的单点登录。
  • 操作权限:前端控制可精确到按钮级的操作和标签级的显示,同时提供了多维度的权限分配路径查询能力。
  • 数据权限:基于 Mybatis 拦截器 + JSqlParser 的实现方式,配置更灵活,代码侵入性更低。
  • 租户管理:租户权限管理数据、字典等通用数据,均由租户运营管理服务统一管理,并实时同步到多个租户运营库,具有极高的数据库级别容错性。
  • 多数据源:支持简单和复杂两种多数据源注解。复杂注解可灵活自定义,并应对复杂的业务场景。
  • 数据组装:Java 注解方式实现数据组装,支持统一接口的服务内和跨服务的一对一、一对多、多对多、字典、聚合计算等关系数据组合。
  • 定时任务:我们不仅提供了多套 Job 基础框架的集成,更能生成灵活可配、高度优化、便于二次开发的 Job 业务逻辑代码。
  • 系统监控:基于 Kafka + ELK 的日志收集,基于 PinPoint/SkyWalking 的服务链路跟踪,基于 GPE 的服务性能指标监控。
  • 接口文档:目前已集成 Knife4j,同时支持基于 qdox 逆推 Java 工程代码,实现 0 注解导出 Postman 接口文件和 Markdown 文档。
  • 操作日志:灵活可配置。统一拦截每次请求调用的输入输出,及各种调用数据细节,以便于后期的统计分析和问题定位。微服务工程由 Kafka 消费者服务统一批量处理,并与 ELK + SkyWalking/PinPoint 等日志监控系统完全打通。单体工程则异步的存入数据库表中。
  • 缓存同步:同时集成了 Canal-Admin 和 Canal-Server,以便于用户的 Canal Instance 管理。目前已实现字典变化数据到 Redis 的实时缓存同步。

代码质量

此为在线演示工程的代码审查报告,而非当前开源示例工程。前者代码量更大,结构更复杂。

  1. SonarQube 扫描
  • 基于 SonarQube8.2 缺省最严格的代码扫描规则,其中代码复杂度要求为 15。
  • 有气味代码共90处,其中85处为DTO、Model、常量字典、RPC接口等定义出现重复名称所致,均与模拟实际业务有关。
  • 其余气味代码,是在权衡性能、可读性和易修改性等因素后保留下来的,具体见图4。
  1. Alibaba Code Guide 扫描
  • 下载最新版本IDEA插件,同时打开所有审查条件。
  • 全部代码扫描通过。
  1. Statistic 代码统计
  • 生成代码总量约为86000多行,主要包括Java、XML、YAML和SQL初始化脚本等。
  • Java代码覆盖率为37%。

价值理念

都看到这里了,如果看的仔细,至少要花 20 分钟,非常感谢您的坚持和耐心,希望能再花 1 秒钟的时间在下面 star 一下。

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

橙单中台化低代码生成器。可完整支持多应用、多租户、多渠道、工作流 (Flowable & Activiti)、在线表单、自定义数据同步、自定义Job、多表关联、跨服务多表关联、框架技术栈自由组合等。 展开 收起
Java
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/yueyue_heart/orange-flowable.git
git@gitee.com:yueyue_heart/orange-flowable.git
yueyue_heart
orange-flowable
orange-flowable
master

搜索帮助