04-05-2011 04:04 AM
04-05-2011 04:34 AM
addInputStream("xxx",new FileInputStream(new File("C:/xxx.bpmn20.xml"))
04-05-2011 08:33 AM
09-14-2011 07:19 AM
09-16-2011 04:07 AM
Hi,hi, how can I make the classpath available? should I configure the system classpath??
Classpath-resource is relative to the classpath, not the filesystem. Use:
addInputStream("xxx",new FileInputStream(new File("C:/xxx.bpmn20.xml"))
09-16-2011 04:27 AM
Hi,hi, how can I make the classpath available? should I configure the system classpath??
Classpath-resource is relative to the classpath, not the filesystem. Use:
addInputStream("xxx",new FileInputStream(new File("C:/xxx.bpmn20.xml"))
BR~
05-02-2012 11:07 AM
05-21-2012 02:14 PM
I'm having the same problem. Where do I find the classpath?As I had the same issues while creating a unit test I'll post my solutions here:
<?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 kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Activiti Designer Extensions"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
As the structure of this project contains a tree like this:
project base
|-src/main/java
|-src/main/resources
|-src/test/java
|-target
…
well see that src/main/resources is already in the .classpath. So the following code snippet will load a PaymentProcess definition into the Activiti engine, which Activiti Designer created in a diagrams// deploy the process definition
DeploymentBuilder builder = repositoryService.createDeployment();
builder.addClasspathResource("diagrams/PaymentProcess.bpmn20.xml");
builder.deploy();
// use the id of the root-process defined in the definition - PaymentProcess in my case
ProcessInstance proc = runtimeService.startProcessInstanceByKey("PaymentProcess");
DeploymentBuilder builder = repositoryService.createDeployment();
builder.addInputStream("PaymentProcess.bpmn20.xml", new FileInputStream(System.getProperty("user.dir")+"/src/main/resources/diagrams/PaymentProcess.bpmn20.xml"));
builder.deploy();
// use the id of the root-process defined in the definition - PaymentProcess in my case
ProcessInstance proc = runtimeService.startProcessInstanceByKey("PaymentProcess");
HTH,01-20-2016 06:31 PM
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.