对Tomcat的修改
在将jBPM与web项目结合的时候,需要把jBPM资源包中的juel-engine.jar和juel-impl.jar添加到tomcat/lib下,同时在Web应用的lib下面,把juel-api.jar、juel-engine.jar和juel-impl.jar 删除掉。
注意,以后在建立web工程的时候,需要选择修改后的tomcat。
将jPDL的图片发布到jBPM中
1:首先把jpdl和png打到一起,打成zip包。
2:然后修改流程定义的代码,通过读取zip文件的方式来发布:
java代码:
ProcessEngine processEngine = Configuration.getProcessEngine();
RepositoryService repositoryService = processEngine.getRepositoryService();
//repositoryService.createDeployment().addResourceFromClasspath("leave.jpdl.xml").deploy();
ZipInputStream zis = new ZipInputStream(this.getClass().getResourceAsStream("/doc.zip"));
repositoryService.createDeployment().addResourcesFromZipInputStream(zis).deploy();
将jPDL的图片发布到jBPM中,页面上的代码示例如下:
java代码:
java代码:
ProcessInstance pi = executionService.findProcessInstanceById("test1.10001");
Set activityNames = pi.findActiveActivityNames();
for (String activityName:activityNames){
String pdId = pi.getProcessDefinitionId();
ActivityCoordinates ac = repositoryService.getActivityCoordinates(pdId,activityName);
System.out.println("activityName="+activityName);
System.out.println("x="+ac.getX());
System.out.println("y="+ac.getY());
System.out.println("height="+ac.getHeight());
System.out.println("width="+ac.getWidth());
System.out.println("---------------------");
}
java代码:
activityNames = pi.findActiveActivityNames();
for (String acitiveAcitityName:activityNames){
String pdId = pi.getProcessDefinitionId();
ActivityCoordinates ac = repositoryService.getActivityCoordinates(pdId,acitiveAcitityName);
%>
java代码:
ProcessInstance pi = executionService.findProcessInstanceById("test1.10001");
Set activityNames = pi.findActiveActivityNames();
for (String acitiveAcitityName:activityNames){
String pdId = pi.getProcessDefinitionId();
ActivityCoordinates ac = repositoryService.getActivityCoordinates(pdId,acitiveAcitityName);
%>
视频配套PPT,视频地址【
最新jbpm4工作流开发实战视频课程 】
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26715458/viewspace-717589/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26715458/viewspace-717589/