-
Notifications
You must be signed in to change notification settings - Fork 74
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
1 parent
130a09e
commit 263cabd
Showing
17 changed files
with
219 additions
and
2 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
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,22 @@ | ||
# 规则引擎 | ||
|
||
决策树和决策矩阵是业务人员可以直观理解的复杂IF-ELSE逻辑表达形式,也是规则引擎中最常用、最有用的部分。常见的规则引擎如Drools虽然提供了更加丰富的功能特性集, | ||
特别是所谓的RETE算法可以用于高效复用多次重复出现的表达式片段,但在实际业务应用中很少出现必须使用RETE算法的情况,大部分情况下我们都是把规则引擎降级为决策表和决策矩阵来使用。 | ||
|
||
> 合理安排决策树和决策矩阵的节点顺序已经可以起到优化执行的作用。对于必须使用RETE算法的情况往往一般人已经难以直观理解,难以交给业务人员直接配置。 | ||
> 甚至程序员理解其中的执行细节也存在困难,还不如手工实现更加便于优化。基本的决策表+类似流程图的执行控制往往比使用RETE算法更加合用。 | ||
NopRule规则引擎使用Excel作为可视化设计工具,可以高效的执行决策表和决策矩阵逻辑。NopRule是一个非常轻量级的规则引擎,它可以嵌入在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
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
5 changes: 5 additions & 0 deletions
5
...op-wf-meta/src/main/resources/_vfs/nop/wf/model/WorkflowService/WfActionRequestBean.xmeta
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<meta x:schema="/nop/schema/xmeta.xdef" xmlns:x="/nop/schema/xdsl.xdef" x:extends="_WfActionRequestBean.xmeta"> | ||
|
||
<props/> | ||
</meta> |
5 changes: 5 additions & 0 deletions
5
...p-wf-meta/src/main/resources/_vfs/nop/wf/model/WorkflowService/WfCommandRequestBean.xmeta
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<meta x:schema="/nop/schema/xmeta.xdef" xmlns:x="/nop/schema/xdsl.xdef" x:extends="_WfCommandRequestBean.xmeta"> | ||
|
||
<props/> | ||
</meta> |
5 changes: 5 additions & 0 deletions
5
...nop-wf-meta/src/main/resources/_vfs/nop/wf/model/WorkflowService/WfStartRequestBean.xmeta
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<meta x:schema="/nop/schema/xmeta.xdef" xmlns:x="/nop/schema/xdsl.xdef" x:extends="_WfStartRequestBean.xmeta"> | ||
|
||
<props/> | ||
</meta> |
5 changes: 5 additions & 0 deletions
5
...op-wf-meta/src/main/resources/_vfs/nop/wf/model/WorkflowService/WfStartResponseBean.xmeta
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<meta x:schema="/nop/schema/xmeta.xdef" xmlns:x="/nop/schema/xdsl.xdef" x:extends="_WfStartResponseBean.xmeta"> | ||
|
||
<props/> | ||
</meta> |
5 changes: 5 additions & 0 deletions
5
...f-meta/src/main/resources/_vfs/nop/wf/model/WorkflowService/WfSubFlowEndRequestBean.xmeta
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<meta x:schema="/nop/schema/xmeta.xdef" xmlns:x="/nop/schema/xdsl.xdef" x:extends="_WfSubFlowEndRequestBean.xmeta"> | ||
|
||
<props/> | ||
</meta> |
25 changes: 25 additions & 0 deletions
25
...p-wf-meta/src/main/resources/_vfs/nop/wf/model/WorkflowService/_WfActionRequestBean.xmeta
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,25 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<meta x:schema="/nop/schema/xmeta.xdef" xmlns:x="/nop/schema/xdsl.xdef" xmlns:i18n-en="i18n-en" displayName="执行动作请求消息" | ||
i18n-en:displayName="Workflow Action Request" ext:model="api"> | ||
|
||
<props> | ||
<prop name="wfName" displayName="工作流名称" i18n-en:displayName="Workflow Name"> | ||
<schema type="java.lang.String" precision="500"/> | ||
</prop> | ||
<prop name="wfVersion" displayName="工作流版本" i18n-en:displayName="Workflow Version"> | ||
<schema type="java.lang.String" precision="50"/> | ||
</prop> | ||
<prop name="wfId" displayName="工作流ID" i18n-en:displayName="Workflow ID" mandatory="true"> | ||
<schema type="java.lang.String" precision="50"/> | ||
</prop> | ||
<prop name="stepId" displayName="工作流步骤ID" i18n-en:displayName="Step ID" mandatory="true"> | ||
<schema type="java.lang.String" precision="50"/> | ||
</prop> | ||
<prop name="actionName" displayName="执行动作" i18n-en:displayName="Action Name" mandatory="true"> | ||
<schema type="java.lang.String" precision="100"/> | ||
</prop> | ||
<prop name="args" displayName="执行参数" i18n-en:displayName="Action Args"> | ||
<schema type="java.util.Map<java.lang.String,java.lang.Object>" precision="4000"/> | ||
</prop> | ||
</props> | ||
</meta> |
19 changes: 19 additions & 0 deletions
19
...-wf-meta/src/main/resources/_vfs/nop/wf/model/WorkflowService/_WfCommandRequestBean.xmeta
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,19 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<meta x:schema="/nop/schema/xmeta.xdef" xmlns:x="/nop/schema/xdsl.xdef" xmlns:i18n-en="i18n-en" displayName="执行命令请求消息" | ||
i18n-en:displayName="Workflow Command Request" ext:model="api"> | ||
|
||
<props> | ||
<prop name="wfName" displayName="工作流名称" i18n-en:displayName="Workflow Name"> | ||
<schema type="java.lang.String" precision="500"/> | ||
</prop> | ||
<prop name="wfVersion" displayName="工作流版本" i18n-en:displayName="Workflow Version"> | ||
<schema type="java.lang.String" precision="50"/> | ||
</prop> | ||
<prop name="wfId" displayName="工作流ID" i18n-en:displayName="Workflow ID" mandatory="true"> | ||
<schema type="java.lang.String" precision="50"/> | ||
</prop> | ||
<prop name="args" displayName="执行参数" i18n-en:displayName="Action Args"> | ||
<schema type="java.util.Map<java.lang.String,java.lang.Object>" precision="4000"/> | ||
</prop> | ||
</props> | ||
</meta> |
28 changes: 28 additions & 0 deletions
28
...op-wf-meta/src/main/resources/_vfs/nop/wf/model/WorkflowService/_WfStartRequestBean.xmeta
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,28 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<meta x:schema="/nop/schema/xmeta.xdef" xmlns:x="/nop/schema/xdsl.xdef" xmlns:i18n-en="i18n-en" displayName="启动工作流请求消息" | ||
i18n-en:displayName="Workflow Start Request" ext:model="api"> | ||
|
||
<props> | ||
<prop name="wfName" displayName="工作流名称" i18n-en:displayName="Workflow Name" mandatory="true"> | ||
<schema type="java.lang.String" precision="500"/> | ||
</prop> | ||
<prop name="wfVersion" displayName="工作流版本" i18n-en:displayName="Workflow Version" mandatory="true"> | ||
<schema type="java.lang.String" precision="50"/> | ||
</prop> | ||
<prop name="args" displayName="启动参数" i18n-en:displayName="Start Args"> | ||
<schema type="java.util.Map<java.lang.String,java.lang.Object>" precision="4000"/> | ||
</prop> | ||
<prop name="parentWfName" displayName="父工作流名称" i18n-en:displayName="Parent Workflow Name"> | ||
<schema type="java.lang.String" precision="500"/> | ||
</prop> | ||
<prop name="parentWfVersion" displayName="父工作流版本" i18n-en:displayName="Parent Workflow Version"> | ||
<schema type="java.lang.String" precision="50"/> | ||
</prop> | ||
<prop name="parentWfId" displayName="父工作流ID" i18n-en:displayName="Parent Workflow ID"> | ||
<schema type="java.lang.String" precision="500"/> | ||
</prop> | ||
<prop name="parentWfStepId" displayName="父工作流步骤ID" i18n-en:displayName="Parent Workflow Step ID"> | ||
<schema type="java.lang.String" precision="50"/> | ||
</prop> | ||
</props> | ||
</meta> |
Oops, something went wrong.