|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.module.jbpm.Jbpm
public class Jbpm
An implementation of Mule's generic BPMS
interface for JBoss jBPM.
Field Summary | |
---|---|
protected boolean |
containerManaged
Indicates whether jBPM has been instantiated by the connector (false) or was passed in from somewhere else (true). |
protected static 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 java.lang.String |
PROCESS_ENDED
|
protected org.jbpm.api.ProcessEngine |
processEngine
The initialized jBPM ProcessEngine. |
Fields inherited from interface org.mule.api.lifecycle.Initialisable |
---|
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Disposable |
---|
PHASE_NAME |
Constructor Summary | |
---|---|
Jbpm()
Creates the Mule wrapper for jBPM |
|
Jbpm(org.jbpm.api.ProcessEngine processEngine,
java.util.Properties processDefinitions)
Creates the Mule wrapper for jBPM |
|
Jbpm(java.lang.String configurationResource,
java.util.Properties processDefinitions)
Creates the Mule wrapper for jBPM |
Method Summary | |
---|---|
void |
abortProcess(java.lang.Object processInstanceId)
Delete a process instance. |
java.lang.Object |
advanceProcess(java.lang.Object executionId)
Advance a process instance one step. |
java.lang.Object |
advanceProcess(java.lang.Object executionId,
java.lang.Object signalName,
java.util.Map variables)
Advance a process instance one step. |
void |
completeTask(org.jbpm.api.task.Task task)
|
void |
completeTask(org.jbpm.api.task.Task task,
java.lang.String outcome,
java.util.Map variables)
|
void |
deployProcess(java.lang.String processDefinitionFile)
Deploy (not start) a process to the BPMS based on a process definition file. |
void |
deployProcessFromStream(java.lang.String resourceName,
java.io.InputStream processDefinition)
|
void |
dispose()
A lifecycle method where implementor should free up any resources. |
java.lang.String |
getConfigurationResource()
|
java.lang.Object |
getId(java.lang.Object process)
|
java.lang.String |
getName()
Gets the name of the object |
java.util.Properties |
getProcessDefinitions()
|
org.jbpm.api.ProcessEngine |
getProcessEngine()
|
java.lang.Object |
getState(java.lang.Object process)
|
static java.lang.String |
getState(org.jbpm.api.ProcessInstance processInstance)
|
boolean |
hasEnded(java.lang.Object process)
|
void |
initialise()
Method used to perform any initialisation work. |
boolean |
isProcess(java.lang.Object obj)
|
java.lang.Object |
lookupProcess(java.lang.Object processId)
Look up an already-running process instance. |
void |
setConfigurationResource(java.lang.String configurationResource)
|
void |
setMessageService(MessageService msgService)
MessageService contains a callback method used to generate Mule messages from your process. |
void |
setName(java.lang.String name)
Sets the name of the object |
void |
setProcessDefinitions(java.util.Properties processDefinitions)
|
void |
setProcessEngine(org.jbpm.api.ProcessEngine processEngine)
|
java.lang.Object |
startProcess(java.lang.Object processDefinitionKey)
Start a new process. |
java.lang.Object |
startProcess(java.lang.Object processDefinitionKey,
java.lang.Object signalName,
java.util.Map variables)
Start a new process. |
void |
undeployProcess(java.lang.String resource)
Undeploy a process from the BPMS. |
java.lang.Object |
updateProcess(java.lang.Object executionId,
java.util.Map variables)
Update the variables for an execution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.jbpm.api.ProcessEngine processEngine
protected boolean containerManaged
public static final java.lang.String PROCESS_ENDED
public static final int PROCESS_CREATION_WAIT
protected static final Logger log
Constructor Detail |
---|
public Jbpm()
public Jbpm(java.lang.String configurationResource, java.util.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, java.util.Properties processDefinitions)
The
- already-initialized jBPM ProcessEngine. This is useful if you use Spring to configure your jBPM instance.Method Detail |
---|
public void initialise()
Initialisable
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
initialise
in interface Initialisable
public void dispose()
Disposable
dispose
in interface Disposable
public void setMessageService(MessageService msgService)
BPMS
MessageService
contains a callback method used to generate Mule messages from your process.
This method is REQUIRED.
setMessageService
in interface BPMS
msgService
- An interface within Mule which the BPMS may call to generate
Mule messages.public java.lang.Object startProcess(java.lang.Object processDefinitionKey) throws java.lang.Exception
java.lang.Exception
public java.lang.Object startProcess(java.lang.Object processDefinitionKey, java.lang.Object signalName, java.util.Map variables) throws java.lang.Exception
startProcess
in interface BPMS
processDefinitionKey
- - the type of process to startvariables
- - optional process variables/parameters to set
java.lang.Exception
public java.lang.Object advanceProcess(java.lang.Object executionId) throws java.lang.Exception
java.lang.Exception
public java.lang.Object advanceProcess(java.lang.Object executionId, java.lang.Object signalName, java.util.Map variables) throws java.lang.Exception
advanceProcess
in interface BPMS
processId
- - if no transition value is provided, this is assumed to be
execution idtransition
- - the state of the execution we're looking forprocessVariables
- - optional process variables/parameters to set
java.lang.Exception
public java.lang.Object updateProcess(java.lang.Object executionId, java.util.Map variables) throws java.lang.Exception
updateProcess
in interface BPMS
executionId
- - an ID which identifies the running processvariables
- - process variables/parameters to set
java.lang.Exception
public void abortProcess(java.lang.Object processInstanceId) throws java.lang.Exception
abortProcess
in interface BPMS
processInstanceId
- - an ID which identifies the running process
java.lang.Exception
public boolean isProcess(java.lang.Object obj) throws java.lang.Exception
isProcess
in interface BPMS
java.lang.Exception
public java.lang.Object getId(java.lang.Object process) throws java.lang.Exception
getId
in interface BPMS
java.lang.Exception
public java.lang.Object getState(java.lang.Object process) throws java.lang.Exception
getState
in interface BPMS
java.lang.Exception
public static java.lang.String getState(org.jbpm.api.ProcessInstance processInstance) throws java.lang.Exception
java.lang.Exception
public boolean hasEnded(java.lang.Object process) throws java.lang.Exception
hasEnded
in interface BPMS
java.lang.Exception
public java.lang.Object lookupProcess(java.lang.Object processId) throws java.lang.Exception
lookupProcess
in interface BPMS
java.lang.Exception
public void deployProcess(java.lang.String processDefinitionFile) throws java.io.IOException
BPMS
deployProcess
in interface BPMS
processDefinitionFile
- - process definition file
java.io.IOException
public void deployProcessFromStream(java.lang.String resourceName, java.io.InputStream processDefinition) throws java.io.IOException
java.io.IOException
public void undeployProcess(java.lang.String resource) throws java.lang.Exception
BPMS
undeployProcess
in interface BPMS
resource
- - process definition file
java.lang.Exception
public void completeTask(org.jbpm.api.task.Task task)
public void completeTask(org.jbpm.api.task.Task task, java.lang.String outcome, java.util.Map variables)
public org.jbpm.api.ProcessEngine getProcessEngine()
public void setProcessEngine(org.jbpm.api.ProcessEngine processEngine)
public java.lang.String getConfigurationResource()
public void setConfigurationResource(java.lang.String configurationResource)
public java.util.Properties getProcessDefinitions()
public void setProcessDefinitions(java.util.Properties processDefinitions)
public void setName(java.lang.String name)
NamedObject
setName
in interface NamedObject
name
- the name of the objectpublic java.lang.String getName()
NamedObject
getName
in interface NamedObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |