To obtain these services you need a {@link org.jbpm.JbpmServiceLocator}. The easiest way to obtain a JbpmServiceLocator is by using the static {@link org.jbpm.JbpmServiceLocator#getInstance()} method.
A JbpmServiceLocator requires a {@link org.jbpm.JbpmConfiguration}. The default constructor of JbpmServiceLocator
will just use the JbpmConfiguration singleton instance. The JbpmConfiguration can be configured
in different ways. The easiest way is to put a jbpm.properties
in the root of your
classpath. The content of the jbpm.properties file is explained in {@link org.jbpm.JbpmConfiguration}.
// this code fragment shows how to obtain the jbpm services // the next statement requires a jbpm.properties file in the root of the classpath JbpmServiceLocator jbpmServiceLocator = JbpmServiceLocator.getInstance(); DefinitionService definitionService = jbpmServiceLocator.getDefinitionService(); ExecutionService executionService = jbpmServiceLocator.getExecutionService(); LogService logService = jbpmServiceLocator.getLogService();example of how to obtain the jbpm services