11-01-2011 12:14 AM
11-01-2011 02:36 AM
11-01-2011 03:22 AM
11-01-2011 03:27 AM
11-01-2011 03:49 AM
11-01-2011 03:54 AM
RepositoryService reposService = (RepositoryService)BeanLoader.getBean("repositoryService");
Deployment deployment = reposService.createDeployment().name("UserDemo")
.addClasspathResource("UserTaskDemo.bpmn20.xml")
.deploy();
InputStream imageStream =null;
if(type!=null && type.equals("inst")){
RuntimeService runtimeService = (RuntimeService)BeanLoader.getBean("runtimeService");
//ProcessDefinitionEntity pde = (ProcessDefinitionEntity)processDefinition;
ProcessDefinitionEntity pde = (ProcessDefinitionEntity)((RepositoryServiceImpl) repositoryService).getDeployedProcessDefinition(processDefId);
if(pde.isGraphicalNotationDefined()){
System.out.println("isGraphicalNotationDefined:No diagram defined for process definition id ");
}else{
ProcessDiagramGenerator.generateDiagram(pde, "png", runtimeService.getActiveActivityIds(processInstanceId));
}
imageStream = ProcessDiagramGenerator.generateDiagram(pde, "png", runtimeService.getActiveActivityIds(processInstanceId));
}else{
String diagramResourceName = processDefinition.getDiagramResourceName();
imageStream = repositoryService.getResourceAsStream(processDefinition.getDeploymentId(), diagramResourceName);
}
if(imageStream !=null){
byte[] b_image = new byte[1024];
while(imageStream.read(b_image)>0)
{
response.getOutputStream().write(b_image);
}
}
11-01-2011 04:52 AM
public ProcessDiagramCanvas(int width, int height) {
this.canvasWidth = width;
this.canvasHeight = height;
this.processDiagram = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
this.g = processDiagram.createGraphics();
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.setPaint(Color.black);
Font font = new Font("Arial", Font.BOLD, 11);
g.setFont(font);
this.fontMetrics = g.getFontMetrics();
}
11-01-2011 05:11 AM
11-01-2011 05:46 AM
11-03-2011 04:42 AM
Font font = new Font("Microsoft YaHei", Font.BOLD, 11);
is ok, here is the patch
Index: .classpath
===================================================================
— .classpath (revision 3062)
+++ .classpath (working copy)
@@ -1,10 +1,53 @@
-<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
- <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+ <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+ <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
+ <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+ <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4.1/mail-1.4.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.1/ant-1.7.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/antlr/antlr-runtime/3.1.3/antlr-runtime-3.1.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/asm/asm/3.2/asm-3.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/asm/asm-analysis/3.2/asm-analysis-3.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/asm/asm-commons/3.2/asm-commons-3.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/asm/asm-tree/3.2/asm-tree-3.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/asm/asm-util/3.2/asm-util-3.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-email/1.2/commons-email-1.2.jar" sourcepath="M2_REPO/org/apache/commons/commons-email/1.2/commons-email-1.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-pool/commons-pool/1.3/commons-pool-1.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/drools/drools-api/5.1.1/drools-api-5.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/drools/drools-compiler/5.1.1/drools-compiler-5.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/drools/drools-core/5.1.1/drools-core-5.1.1.jar" sourcepath="M2_REPO/org/drools/drools-core/5.1.1/drools-core-5.1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/eclipse/jdt/core/compiler/ecj/3.5.1/ecj-3.5.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.0.1/geronimo-jms_1.1_spec-1.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jpa_3.0_spec/1.0/geronimo-jpa_3.0_spec-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/groovy/groovy/1.7.5/groovy-1.7.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/h2database/h2/1.2.132/h2-1.2.132.jar" sourcepath="M2_REPO/com/h2database/h2/1.2.132/h2-1.2.132-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/fasterxml/uuid/java-uuid-generator/3.1.2/java-uuid-generator-3.1.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sourceforge/jtds/jtds/1.2.4/jtds-1.2.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/4.8.1/junit-4.8.1.jar" sourcepath="M2_REPO/junit/junit/4.8.1/junit-4.8.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/livetribe/livetribe-jsr223/2.0.6/livetribe-jsr223-2.0.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mockito/mockito-core/1.8.2/mockito-core-1.8.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mvel/mvel2/2.0.16/mvel2-2.0.16.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mybatis/mybatis/3.0.4/mybatis-3.0.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/objenesis/objenesis/1.0/objenesis-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/openjpa/openjpa/1.2.2/openjpa-1.2.2.jar" sourcepath="M2_REPO/org/apache/openjpa/openjpa/1.2.2/openjpa-1.2.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/postgresql/postgresql/8.4-701.jdbc4/postgresql-8.4-701.jdbc4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sourceforge/serp/serp/1.13.1/serp-1.13.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/springframework/spring-asm/3.0.3.RELEASE/spring-asm-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/springframework/spring-beans/3.0.3.RELEASE/spring-beans-3.0.3.RELEASE.jar" sourcepath="M2_REPO/org/springframework/spring-beans/3.0.3.RELEASE/spring-beans-3.0.3.RELEASE-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/springframework/spring-core/3.0.3.RELEASE/spring-core-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/subethamail/subethasmtp-smtp/1.2/subethasmtp-smtp-1.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/subethamail/subethasmtp-wiser/1.2/subethasmtp-wiser-1.2.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+</classpath>
\ No newline at end of file
Index: src/main/java/org/activiti/engine/impl/bpmn/diagram/ProcessDiagramCanvas.java
===================================================================
— src/main/java/org/activiti/engine/impl/bpmn/diagram/ProcessDiagramCanvas.java (revision 3062)
+++ src/main/java/org/activiti/engine/impl/bpmn/diagram/ProcessDiagramCanvas.java (working copy)
@@ -120,7 +120,7 @@
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.setPaint(Color.black);
- Font font = new Font("Arial", Font.BOLD, 11);
+ Font font = new Font("Microsoft YaHei", Font.BOLD, 11);
g.setFont(font);
this.fontMetrics = g.getFontMetrics();
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.