- 浏览: 159846 次
- 性别:
- 来自: 北京
最新评论
-
pg_caolei:
楼主,刚才是为了测试一下提供的功能,不小心点提交了,见谅。呵呵 ...
吐一个泡泡 -
pg_caolei:
[b][/b][i][/i]引用[*][img][/img][ ...
吐一个泡泡 -
logcos:
看不明白。
jbpm 项目实践 1.2 (集成appfuse spring modules) -
flyffa:
sorry,应该是更符合Structured Synchron ...
jbpm 与 工作流模式 鉴别器(Discriminator) -
flyffa:
这个模式好像实现的有问题吧,按照workflow patter ...
jbpm 与 工作流模式 鉴别器(Discriminator)
好像源代码功能有点问题.
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jbpm.jpdl.patterns;
import junit.framework.*;
import org.jbpm.graph.def.*;
import org.jbpm.graph.exe.*;
/**
* http://is.tm.tue.nl/research/patterns/download/swf/pat_5.swf
*
* <p>in jbpm every node has an implicit merge in front of it.
* so it's not necessary to use the merge node. in fact, i can
* not think of a situation where implicit merge nodeMap are not
* sufficient. for the sake of workflow patterns, we leave if in.
* jbpm supports merging of both alternative paths of execution
* and concurrent paths of execution.
* </p>
*
* <p>first the merge node is demonstrated exactly as in the pattern.
* then the implicit variant is demonstrated, then the merging of
* concurrent paths is demonstrated.
* </p>
*/
public class Wfp05SimpleMergeTest extends TestCase {
private static ProcessDefinition simpleMergeProcessDefinition = createSimpleMergeProcessDefinition();
public static ProcessDefinition createSimpleMergeProcessDefinition() {
ProcessDefinition pd = new ProcessDefinition(
new String[]{"start-state start",
"state a",
"state b",
"merge xor",
"state c"},
new String[]{"start --to a--> a",
"start --to b--> b",
"a --> xor",
"b --> xor",
"xor --> c"});
return pd;
}
public void testSimpleMergeScenario1() {
ProcessDefinition pd = simpleMergeProcessDefinition;
ProcessInstance pi = new ProcessInstance( pd );
pi.signal("to a");
Token root = pi.getRootToken();
assertSame( pd.getNode("a"), root.getNode() );
root.signal();
assertSame( pd.getNode("c"), root.getNode() );
}
public void testSimpleMergeScenario2() {
ProcessDefinition pd = simpleMergeProcessDefinition;
ProcessInstance pi = new ProcessInstance( pd );
pi.signal("to b");
Token root = pi.getRootToken();
assertSame( pd.getNode("b"), root.getNode() );
root.signal();
assertSame( pd.getNode("c"), root.getNode() );
}
private static ProcessDefinition implicitMergeProcessDefinition = createImplicitMergeProcessDefinition();
public static ProcessDefinition createImplicitMergeProcessDefinition() {
ProcessDefinition pd = new ProcessDefinition(
new String[]{"start-state start",
"state a",
"state b",
"state c"},
new String[]{"start --to a--> a",
"start --to b--> b",
"a --> c",
"b --> c"});
return pd;
}
public void testImplicitMergeScenario1() {
ProcessDefinition pd = implicitMergeProcessDefinition;
ProcessInstance pi = new ProcessInstance( implicitMergeProcessDefinition );
pi.signal("to a");
Token root = pi.getRootToken();
assertSame( pd.getNode("a"), root.getNode() );
root.signal();
assertSame( pd.getNode("c"), root.getNode() );
}
public void testImplicitMergeScenario2() {
ProcessDefinition pd = implicitMergeProcessDefinition;
ProcessInstance pi = new ProcessInstance( implicitMergeProcessDefinition );
pi.signal("to b");
Token root = pi.getRootToken();
assertSame( pd.getNode("b"), root.getNode() );
root.signal();
assertSame( pd.getNode("c"), root.getNode() );
}
}
createSimpleMergeProcessDefinition()
创建如下流程定义文件
testSimpleMergeScenario1()
节点执行顺序
start --> a --> xor --> c
testSimpleMergeScenario2()
start --> b --> xor --> c
createImplicitMergeProcessDefinition()
创建如下流程定义文件
testImplicitMergeScenario1()
节点执行顺序
start --> a --> c
testImplicitMergeScenario2()
节点执行顺序
start --> b --> c
以上是对基本控制流程的一些说明, 本人水平有限, 难免有不当之处. 欢迎批评指正.
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jbpm.jpdl.patterns;
import junit.framework.*;
import org.jbpm.graph.def.*;
import org.jbpm.graph.exe.*;
/**
* http://is.tm.tue.nl/research/patterns/download/swf/pat_5.swf
*
* <p>in jbpm every node has an implicit merge in front of it.
* so it's not necessary to use the merge node. in fact, i can
* not think of a situation where implicit merge nodeMap are not
* sufficient. for the sake of workflow patterns, we leave if in.
* jbpm supports merging of both alternative paths of execution
* and concurrent paths of execution.
* </p>
*
* <p>first the merge node is demonstrated exactly as in the pattern.
* then the implicit variant is demonstrated, then the merging of
* concurrent paths is demonstrated.
* </p>
*/
public class Wfp05SimpleMergeTest extends TestCase {
private static ProcessDefinition simpleMergeProcessDefinition = createSimpleMergeProcessDefinition();
public static ProcessDefinition createSimpleMergeProcessDefinition() {
ProcessDefinition pd = new ProcessDefinition(
new String[]{"start-state start",
"state a",
"state b",
"merge xor",
"state c"},
new String[]{"start --to a--> a",
"start --to b--> b",
"a --> xor",
"b --> xor",
"xor --> c"});
return pd;
}
public void testSimpleMergeScenario1() {
ProcessDefinition pd = simpleMergeProcessDefinition;
ProcessInstance pi = new ProcessInstance( pd );
pi.signal("to a");
Token root = pi.getRootToken();
assertSame( pd.getNode("a"), root.getNode() );
root.signal();
assertSame( pd.getNode("c"), root.getNode() );
}
public void testSimpleMergeScenario2() {
ProcessDefinition pd = simpleMergeProcessDefinition;
ProcessInstance pi = new ProcessInstance( pd );
pi.signal("to b");
Token root = pi.getRootToken();
assertSame( pd.getNode("b"), root.getNode() );
root.signal();
assertSame( pd.getNode("c"), root.getNode() );
}
private static ProcessDefinition implicitMergeProcessDefinition = createImplicitMergeProcessDefinition();
public static ProcessDefinition createImplicitMergeProcessDefinition() {
ProcessDefinition pd = new ProcessDefinition(
new String[]{"start-state start",
"state a",
"state b",
"state c"},
new String[]{"start --to a--> a",
"start --to b--> b",
"a --> c",
"b --> c"});
return pd;
}
public void testImplicitMergeScenario1() {
ProcessDefinition pd = implicitMergeProcessDefinition;
ProcessInstance pi = new ProcessInstance( implicitMergeProcessDefinition );
pi.signal("to a");
Token root = pi.getRootToken();
assertSame( pd.getNode("a"), root.getNode() );
root.signal();
assertSame( pd.getNode("c"), root.getNode() );
}
public void testImplicitMergeScenario2() {
ProcessDefinition pd = implicitMergeProcessDefinition;
ProcessInstance pi = new ProcessInstance( implicitMergeProcessDefinition );
pi.signal("to b");
Token root = pi.getRootToken();
assertSame( pd.getNode("b"), root.getNode() );
root.signal();
assertSame( pd.getNode("c"), root.getNode() );
}
}
createSimpleMergeProcessDefinition()
创建如下流程定义文件
xml 代码
- <process-definition name="process">
- <start-state name='start'>
- <transition name='to a' to='a' />
- <transition name='to b' to='b' />
- </start-state>
- <state name='a'>
- <transition to='xor' />
- </state>
- <state name='b'>
- <transition to='xor' />
- </state>
- <state name='xor'>
- <transition to='c' />
- </state>
- <state name='c' />
- </process-definition>
testSimpleMergeScenario1()
节点执行顺序
start --> a --> xor --> c
testSimpleMergeScenario2()
start --> b --> xor --> c
createImplicitMergeProcessDefinition()
创建如下流程定义文件
xml 代码
- <process-definition name="process">
- <start-state name='start'>
- <transition name='to a' to='a' />
- <transition name='to b' to='b' />
- </start-state>
- <state name='a'>
- <transition to='c' />
- </state>
- <state name='b'>
- <transition to='c' />
- </state>
- <state name='c' />
- </process-definition>
testImplicitMergeScenario1()
节点执行顺序
start --> a --> c
testImplicitMergeScenario2()
节点执行顺序
start --> b --> c
以上是对基本控制流程的一些说明, 本人水平有限, 难免有不当之处. 欢迎批评指正.
发表评论
-
for download
2008-03-18 20:25 3http://www.softii.com/downinfo/ ... -
文档地址
2008-03-07 09:24 23http://wiki.redsaga.com/conflue ... -
jbpm 与 工作流模式 鉴别器(Discriminator)
2006-11-30 18:04 4152鉴别器(Discriminator) Description ... -
jbpm 与工作流模式 多路聚合(Multiple Merge)
2006-11-27 14:06 2893多路聚合(Multiple Merge) Descripti ... -
jbpm与工作流模式 同步汇聚(Synchronizing Merge)
2006-11-24 18:56 2096同步汇聚(Synchronizing Me ... -
jbpm 使用日记10
2006-11-24 18:05 1432日期: 第五周. 第五天. 经过了近一个多月的努 ... -
jbpm 使用日记9
2006-11-21 16:24 2481日期: 第五周 第 ... -
jbpm 使用日记8
2006-11-20 15:59 1382jbpm 用户组织结构 日期: 第五周, 第一天 ... -
jbpm 与 工作流模式 多路选择(Multiple Choice)
2006-11-17 16:01 7886多路选择(Multiple Choice) Descript ... -
jbpm 与 工作流模式 基本控制模式(二)
2006-11-16 20:18 5557xml 代码 <process-defi ... -
jbpm 与 工作流模式 基本控制模式(一)
2006-11-16 16:17 10493工作流模式 本文以jdpl/jar/sr ... -
jbpm 使用日记7
2006-11-15 18:26 1132日期: 第四周 第二天 继续了一天理论知识学 ... -
jbpm 使用日记6 理论知识学习.
2006-11-13 10:54 1526日期: 第四周.第一天 经过jbpm 的一段时间研 ... -
jbpm 使用日记5 一个简单会签示例
2006-11-10 15:52 10002经过3周的努力,终于看到点收获的希望. 基本实现目前项目 ... -
jbpm 使用日记4
2006-11-09 17:49 1531用了整整一天的时间, 实现了个比较简单的会签的功能. ... -
jbpm 使用日记3
2006-11-08 12:01 5438又用了3天,终于对jbpm 集成有了一个比较明确的思路. ... -
jbpm 使用日记2
2006-11-02 14:39 1776改写 jbpm 自带的 应用 jsf 遇到很多问题和工作量. ... -
jbpm 使用日记1
2006-11-01 10:56 1991进度. 1.使用 jbpm 3.1.2 build jbpm. ...
相关推荐
【作品名称】:基于Python的蓝桥杯竞赛平台的设计与实现 【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。 【项目介绍】:基于Python的蓝桥杯竞赛平台的设计与实现
python实现基于深度学习TensorFlow框架的花朵识别项目源码.zip
3-9
郊狼优化算法COA MATLAB源码, 应用案例为函数极值求解以及优化svm进行分类,代码注释详细,可结合自身需求进行应用
5635356
客户培训课程–金字塔式写作方法.ppt
工具与方法工作手册.ppt
Image_1715565894150.jpg
文件操作、数据分析和网络编程等。Python社区提供了大量的第三方库,如NumPy、Pandas和Requests,极大地丰富了Python的应用领域,从数据科学到Web开发。Python库的丰富性是Python成为最受欢迎的编程语言之一的关键原因之一。这些库不仅为初学者提供了快速入门的途径,而且为经验丰富的开发者提供了强大的工具,以高效率、高质量地完成复杂任务。例如,Matplotlib和Seaborn库在数据可视化领域内非常受欢迎,它们提供了广泛的工具和技术,可以创建高度定制化的图表和图形,帮助数据科学家和分析师在数据探索和结果展示中更有效地传达信息。
快速排序 C语言快速排序.doc C语言快速排序.doc C语言快速排序.doc C语言快速排序.doc C语言快速排序.doc C语言快速排序.doc
【作品名称】:基于Python+MobileFaceNet的静默活体检测系统的设计与实现 【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。 【项目介绍】: 2、实验环境 Windows 10(64位) CPU:AMD Ryzen 7 5800H RAM:16G GPU:NVIDIA RTX3060 开发工具:IntelliJ IDEA以及PyCharm 相关配置及版本: Chrome 90.0.4430.212 SpringBoot 2.2.6 Java JDK8 MyBatis 2.1.1 Mysql 8.0.25 Python 3.8 pytorch 1.7.1 torchvision 0.8.2 numpy 1.18.5 tensorboard 2.4.1 pandas 1.2.3 cuda 11.0.2 cudnn 11.2 torch 1.8.1 torchvision 0.9.1 3、模型训练命令 python train.py 4、模型测试命令
基于JavaScript的交通时空大数据分析挖掘系统源码+运行说明 项目描述 项目核心是百度地图 AMap和 echarts,用百度地图提供的API搭建的地图,项目中用到的有热力图、散点图和连线图,图表类型是由echarts提供的图表进行展示,包括饼图、柱状图 安装依赖 javascript
麦肯锡—xx集团战略咨询项目建议书.ppt
文件操作、数据分析和网络编程等。Python社区提供了大量的第三方库,如NumPy、Pandas和Requests,极大地丰富了Python的应用领域,从数据科学到Web开发。Python库的丰富性是Python成为最受欢迎的编程语言之一的关键原因之一。这些库不仅为初学者提供了快速入门的途径,而且为经验丰富的开发者提供了强大的工具,以高效率、高质量地完成复杂任务。例如,Matplotlib和Seaborn库在数据可视化领域内非常受欢迎,它们提供了广泛的工具和技术,可以创建高度定制化的图表和图形,帮助数据科学家和分析师在数据探索和结果展示中更有效地传达信息。
麦肯锡--战略咨询培训手册.ppt
graspnet-pybullet
xx电器品牌战略和营销组织架构-SHA----d.ppt
麦肯锡-战略规划模板.ppt
短视频拍摄-课程网盘链接提取码下载 .txt
Ruby是一种为简单快捷面向对象编程而创建的脚本语言,由日本人松本行弘(まつもとゆきひろ,英译:Yukihiro Matsumoto,外号matz)开发,遵守GPL协议和Ruby License。Ruby的作者认为Ruby > (Smalltalk + Perl) / 2,表示Ruby是一个语法像Smalltalk一样完全面向对象、脚本执行、又有Perl强大的文字处理功能的编程语言。 Ruby以7月的诞生石ruby(红宝石)命名,是因为Perl的发音与6月的诞生石pearl(珍珠)相同。Ruby明显比其他类似的编程语言(如Perl或Python)年轻,又因为Ruby是日本人发明的,所以早期的非日文资料和程序都比较贫乏。