Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jbpm.process.workitem.handler;
 
 import java.util.Map;
 
 
This is a sample file to launch a process.
public class HandlerTest extends TestCase {
	public void testHandler() throws Exception {
		Map<StringObjectparams = new HashMap<StringObject>();
		params.put("employeeId""12345-ABC");
		ksession.startProcess("com.sample.bpmn.java"params);
	}
	private static KnowledgeBase readKnowledgeBase() throws Exception {
		KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
		kbuilder.add(ResourceFactory.newClassPathResource("JavaHandler.bpmn"), .);
		return kbuilder.newKnowledgeBase();
	}
		Properties properties = new Properties();
		properties.put("drools.processInstanceManagerFactory""org.jbpm.process.instance.impl.DefaultProcessInstanceManagerFactory");
		properties.put("drools.processSignalManagerFactory""org.jbpm.process.instance.event.DefaultSignalManagerFactory");
		KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);
		return kbase.newStatefulKnowledgeSession(config, EnvironmentFactory.newEnvironment());
	}
New to GrepCode? Check out our FAQ X