- 浏览: 407715 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (318)
- js (20)
- JQuery (2)
- Java (46)
- Oracle (4)
- mysql (21)
- ExtJs (17)
- Excel (2)
- Linux (8)
- Sql (8)
- Jsp (2)
- hibernate (12)
- jbpm (17)
- eclipse (8)
- 名博收藏 (1)
- Junit (2)
- 应用集成 (3)
- web (10)
- jboss (3)
- Rest (3)
- 其它 (7)
- 磁盘分区管理 (1)
- spring (18)
- SSO (4)
- tomcat (4)
- CSS (7)
- MemCached (6)
- EhCache (4)
- weblogic (1)
- apache (6)
- Exception design (1)
- db (1)
- 分析模式 (1)
- jstl (1)
- jsf (0)
- firefox (2)
- MongoDB (4)
- androidpn (1)
- hadoop (1)
- cvs (1)
- 微信公众号 (2)
- 高并发 (4)
- 技术论坛 (1)
- CDN (1)
- JVM (16)
- 加密 (4)
- maven (2)
- jenkins (1)
- hessian (1)
- 大数据处理 (2)
- NIO (0)
- netty (1)
- redis (1)
- git (1)
- Elastic Job (0)
最新评论
-
zgw06629:
或者<pre>aaaabbbbcccc</p ...
javaDoc注释换行 -
ddnzero:
...
StringBuffer换行 -
maosijun:
。。。。
EXT CExt.form.ComboBox选择一次后只剩一个选项 -
ysa198584:
你这有问题,当我的代码出现User.class的时候,反编绎的 ...
java的class文件批量反编译 -
dongj0325:
看到您的博客,很受启发,但还有关于jbpm4.4 timer使 ...
JBPM定时器(Timer)之Repeat属性不能使用变量
JBPM4对流程定义的部署的所有方式如下:
package org.jbpm.api; import java.io.File; import java.io.InputStream; import java.net.URL; import java.util.zip.ZipInputStream; /** extends a {@link Deployment} with method for creating a new * deployment. * * @see RepositoryService#createDeployment() * * @author Tom Baeyens */ public interface NewDeployment extends Deployment { /** typically correspond to the file name or url or some other * form of identifying the source archive file for this deployment. */ NewDeployment setName(String name); /** the timestamp can optionally be given and represents the last updated timestamp * of the archive file that is being deployed. * JBoss deployer makes use of this to remember if a file is already deployed or not.*/ NewDeployment setTimestamp(long timestamp); /** adds a resource as a string */ NewDeployment addResourceFromString(String resourceName, String string); /** adds a resource as a string */ NewDeployment addResourceFromInputStream(String resourceName, InputStream inputStream); /** adds a resource as a resource from the classpath */ NewDeployment addResourceFromClasspath(String resourceName); /** adds a resource as a url */ NewDeployment addResourceFromUrl(URL url); /** adds a resource as a zip stream */ NewDeployment addResourcesFromZipInputStream(ZipInputStream zipInputStream); /** adds a resource from a file */ NewDeployment addResourceFromFile(File file); /** after adding resources, this will perform the actual deployment. * @return the generated deploymentId identification for this deployment * in the {@link RepositoryService repository}. */ String deploy(); }
但我在使用NewDeployment addResourceFromString(String resourceName, String string);来部署时却在表jbpm4_deployprop中没有数据并且JBPM也不提示部署有错,经查看其源代码才明白是怎么回事。
我部署的代码是这样写的:
repositoryService.createDeployment().addResourceFromString("process",getJpdlAsString().deploy()
问题就出在参数resourceName:process上,JBPM部署时会判断resourceName是否以“.jpdl.xml“作为后缀,如果是,JBPM才会解析第二个参数为流程定义,否则不做处理。所以在jbpm4_deployprop就不会有数据了。JBPM相关源码在ProcessDeployer.java中如下:
@SuppressWarnings("unchecked") public void deploy(DeploymentImpl deployment) { for (String resourceName: deployment.getResourceNames()) { if (resourceName.endsWith(extension)) { byte[] bytes = deployment.getBytes(resourceName); InputStream inputStream = new ByteArrayInputStream(bytes); Parse parse = parser.createParse(); parse.contextMapPut(Parse.CONTEXT_KEY_DEPLOYMENT, deployment); parse.setProblems(deployment.getProblems()); parse.setInputStream(inputStream); parse.execute(); List<ProcessDefinitionImpl> processDefinitions = (List<ProcessDefinitionImpl>) parse.getDocumentObject(); if (processDefinitions!=null) { for (ProcessDefinitionImpl processDefinition : processDefinitions) { if ((processDefinition != null) && (processDefinition.getName() != null)) { String processDefinitionName = processDefinition.getName(); processDefinition.setSuspended(deployment.isSuspended()); String imageResourceName = resourceName.substring(0, resourceName.lastIndexOf(extension)) + ".png"; if (deployment.getResourceNames().contains(imageResourceName)) { processDefinition.setImageResourceName(imageResourceName); } processDefinition.setDeploymentDbid(deployment.getDbid()); if (deployment.hasObjectProperties(processDefinitionName)) { String key = deployment.getProcessDefinitionKey(processDefinitionName); String id = deployment.getProcessDefinitionId(processDefinitionName); Long version = deployment.getProcessDefinitionVersion(processDefinitionName); processDefinition.setId(id); processDefinition.setKey(key); processDefinition.setVersion(version.intValue()); } else { checkKey(processDefinition, deployment); checkVersion(processDefinition, deployment); checkId(processDefinition, deployment); deployment.setProcessDefinitionId(processDefinitionName, processDefinition.getId()); deployment.setProcessDefinitionKey(processDefinitionName, processDefinition.getKey()); deployment.setProcessDefinitionVersion(processDefinitionName, new Long(processDefinition.getVersion())); //execute migration Map<ProcessDefinition, MigrationDescriptor> migrations = (Map<ProcessDefinition, MigrationDescriptor>)parse.contextMapGet(Parse.CONTEXT_KEY_MIGRATIONS); if (migrations != null) { MigrationDescriptor migrationDescriptor = migrations.get(processDefinition); if (migrationDescriptor != null) { InstanceMigrator.migrateAll(processDefinition, migrationDescriptor); } } } deployment.addObject(processDefinitionName, processDefinition); } } } } } }
所以我最终把 "process"改为"process.jpdl.xml"就OK了!
发表评论
-
工作流系统参考模型
2012-04-19 15:44 1002工作流系统参考模型 ... -
【转载】JBPM之长事务设计解析
2011-08-16 22:26 768JBPM之长事务设计解析 在 ... -
纵观jBPM:从jBPM3到jBPM5以及Activiti5
2011-05-11 16:45 842原文:http://www.infoq.com/c ... -
JBPM4.3 动态创建Transition时,需要在OpenEnvironment取得Activity后closeEnvironment
2010-10-18 10:06 1640JBPM4.3 动态创建Transition时,需要在Open ... -
java.lang.NoSuchMethodError: org.w3c.dom.Element.setUserData(Ljava/lang/String;L
2010-09-14 10:40 1438http://topic.csdn.net/u/2009083 ... -
JBPM4.3变量表达式不能以数字开头
2010-07-08 19:50 1402当我配置节点超时使用以数字开头的表达式变量如下: <s ... -
jBPM Decision Node
2010-06-12 15:37 955jBPM Decision Node 决策节点的执 ... -
JBPM4.3中的variable
2010-05-24 19:40 744http://phoenix-clt.iteye.com/bl ... -
no environment to get org.jbpm.pvm.internal.session.RepositorySession
2010-04-14 15:47 2881我的代码是这样的: public List<Strin ... -
解决异常org.hibernate.exception.ConstraintViolationException: could not delete:
2010-04-13 10:06 3872调用方法RepositoryService.deleteDep ... -
Spring与Jbpm4.3集成:Cannot find the declaration of element 'jbpm-configuration'
2010-03-15 14:45 2480在单元测试Spring与Jbpm4.3集成的时报Cannot ... -
JBPM4与Spring的集成
2010-01-21 15:15 841JBPM4与Spring的集成: http://rongha ... -
Jbpm4的IOC容器(转)
2010-01-21 11:06 811Jbpm4的IOC容器(转):http://www.iteye ... -
jBPM4的运行期环境
2010-01-21 10:07 1361http://www.3648.com/article/200 ... -
JBPM定时器(Timer)之Repeat属性不能使用变量
2010-01-21 10:01 2024我曾 ... -
jBPM4 PVM的流程定义模型与过程调度
2010-01-15 12:14 1015jBPM4 PVM的流程定义模型与过程调度: http ...
相关推荐
相当不错的资料 jBPM-JPDL v3.2环境部署——发布到Tomcat + MySQL
jbpm-jpdl.jar jbpm-jpdl.jar
jBPM-jPDL学习笔记——流程设计与控制
jBPM-JPDL v3.2环境部署——发布到Tomcat + MySQL
首先介绍了如何用流程设计器为JPDL来设计工作流程 然后通过jsp页面发布一个工程 最后演示流程
jbpm-jpdl-suite-3.2GA -(5)分开压缩(共5个文件)jbpm下载 jbpm-jpdl-suite-3.2GA -(5)分开压缩(共5个文件)jbpm下载
jbpm-jpdl-designer-site-3.1.7.zip jbpm-jpdl-designer-site-3.1.7.zip jbpm-jpdl-designer-site-3.1.7.zip
博文链接:https://geekwang.iteye.com/blog/201267
源文件 博文链接:https://yy666.iteye.com/blog/470760
jbpm-jpdl-suite-3.2.3.zipjbpm-jpdl-suite-3.2.3.zipjbpm-jpdl-suite-3.2.3.zipjbpm-jpdl-suite-3.2.3.zipjbpm-jpdl-suite-3.2.3.zipjbpm-jpdl-suite-3.2.3.zipjbpm-jpdl-suite-3.2.3.zipjbpm-jpdl-suite-3.2.3....
jbpm jpdl 帮助文档pdf版jbpm jpdl 帮助文档pdf版jbpm jpdl 帮助文档pdf版jbpm jpdl 帮助文档pdf版
这个是jbpm-jpdl-3.2.3.zip的server部分,有60多兆, 只要将"jbpm-jpdl-3.2.3(没有server部分).rar"和这个合在一起就是整个的jbpm-jpdl-3.2.3.zip "jbpm-jpdl-3.2.3(没有server部分).rar"在我的另外一个上传资源里面
jbpm-jpdl-3.2.3
jbpm-jpdl-designer资源
NULL 博文链接:https://linliangyi2007.iteye.com/blog/252756
JBPM数据库表创建\jbpm.jpdl.oracle.sqlJBPM数据库表创建\jbpm.jpdl.oracle.sqlJBPM数据库表创建\jbpm.jpdl.oracle.sqlJBPM数据库表创建\jbpm.jpdl.oracle.sqlJBPM数据库表创建\jbpm.jpdl.oracle.sql
jbpm-jpdl-3.2.3.zip 开源工作流引擎
jbpm-jpdl-suite-3.2.GA.zip