public class Jbpm extends Object implements BPMS, org.mule.api.lifecycle.Initialisable, org.mule.api.lifecycle.Disposable
BPMS interface for JBoss jBPM.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
containerManaged
Indicates whether jBPM has been instantiated by Mule (false) or was
passed in from somewhere else (true).
|
protected static org.slf4j.Logger |
log |
static int |
PROCESS_CREATION_WAIT
Given the multi-threaded nature of Mule, sometimes a response message will arrive to advance the
process before the creation of the process has fully terminated (e.g., during in-memory unit tests).
|
static String |
PROCESS_ENDED |
protected org.jbpm.api.ProcessEngine |
processEngine
The initialized jBPM ProcessEngine.
|
| Constructor and Description |
|---|
Jbpm()
Creates the Mule wrapper for jBPM
|
Jbpm(org.jbpm.api.ProcessEngine processEngine,
Properties processDefinitions)
Creates the Mule wrapper for jBPM
|
Jbpm(String configurationResource,
Properties processDefinitions)
Creates the Mule wrapper for jBPM
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortProcess(Object processInstanceId)
Delete a process instance.
|
Object |
advanceProcess(Object executionId)
Advance a process instance one step.
|
Object |
advanceProcess(Object executionId,
Object signalName,
Map variables)
Advance a process instance one step.
|
void |
completeTask(org.jbpm.api.task.Task task) |
void |
completeTask(org.jbpm.api.task.Task task,
String outcome,
Map variables) |
void |
deployProcess(String processDefinitionFile) |
void |
deployProcessFromStream(String resourceName,
InputStream processDefinition) |
void |
dispose() |
String |
getConfigurationResource() |
Object |
getId(Object process) |
String |
getName() |
Properties |
getProcessDefinitions() |
org.jbpm.api.ProcessEngine |
getProcessEngine() |
Object |
getState(Object process) |
static String |
getState(org.jbpm.api.ProcessInstance processInstance) |
boolean |
hasEnded(Object process) |
void |
initialise() |
boolean |
isProcess(Object obj) |
Object |
lookupProcess(Object processId)
Look up an already-running process instance.
|
void |
setConfigurationResource(String configurationResource) |
void |
setMessageService(MessageService msgService) |
void |
setName(String name) |
void |
setProcessDefinitions(Properties processDefinitions) |
void |
setProcessEngine(org.jbpm.api.ProcessEngine processEngine) |
Object |
startProcess(Object processDefinitionKey)
Start a new process.
|
Object |
startProcess(Object processDefinitionKey,
Object signalName,
Map variables)
Start a new process.
|
void |
undeployProcess(String resource) |
Object |
updateProcess(Object executionId,
Map variables)
Update the variables for an execution.
|
protected org.jbpm.api.ProcessEngine processEngine
protected boolean containerManaged
public static final String PROCESS_ENDED
public static final int PROCESS_CREATION_WAIT
protected static final org.slf4j.Logger log
public Jbpm()
public Jbpm(String configurationResource, Properties processDefinitions)
configurationResource - - The configuration file for jBPM, default is "jbpm.cfg.xml" if not specified.processDefinitions - - A list of process definitions to load into jBPM upon initialization.public Jbpm(org.jbpm.api.ProcessEngine processEngine,
Properties processDefinitions)
processEngine - The already-initialized jBPM ProcessEngine. This is
useful if you use Spring to configure your jBPM instance.public void initialise()
initialise in interface org.mule.api.lifecycle.Initialisablepublic void dispose()
dispose in interface org.mule.api.lifecycle.Disposablepublic void setMessageService(MessageService msgService)
setMessageService in interface BPMSpublic Object startProcess(Object processDefinitionKey) throws Exception
Exceptionpublic Object startProcess(Object processDefinitionKey, Object signalName, Map variables) throws Exception
startProcess in interface BPMSExceptionpublic Object advanceProcess(Object executionId) throws Exception
Exceptionpublic Object advanceProcess(Object executionId, Object signalName, Map variables) throws Exception
advanceProcess in interface BPMSvariables - - optional process variables/parameters to setExceptionpublic Object updateProcess(Object executionId, Map variables) throws Exception
updateProcess in interface BPMSExceptionpublic void abortProcess(Object processInstanceId) throws Exception
abortProcess in interface BPMSExceptionpublic static String getState(org.jbpm.api.ProcessInstance processInstance) throws Exception
Exceptionpublic Object lookupProcess(Object processId) throws Exception
lookupProcess in interface BPMSExceptionpublic void deployProcess(String processDefinitionFile) throws IOException
deployProcess in interface BPMSIOExceptionpublic void deployProcessFromStream(String resourceName, InputStream processDefinition) throws IOException
IOExceptionpublic void undeployProcess(String resource) throws Exception
undeployProcess in interface BPMSExceptionpublic void completeTask(org.jbpm.api.task.Task task)
public org.jbpm.api.ProcessEngine getProcessEngine()
public void setProcessEngine(org.jbpm.api.ProcessEngine processEngine)
public String getConfigurationResource()
public void setConfigurationResource(String configurationResource)
public Properties getProcessDefinitions()
public void setProcessDefinitions(Properties processDefinitions)
public void setName(String name)
setName in interface org.mule.api.NameableObjectpublic String getName()
getName in interface org.mule.api.NamedObjectCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.