org.mule.transport.bpm.jbpm
Class Jbpm

java.lang.Object
  extended by org.mule.transport.bpm.jbpm.Jbpm
All Implemented Interfaces:
BPMS

public class Jbpm
extends Object
implements BPMS

jBPM's implementation of Mule's generic BPMS interface. This class should be set as the "bpms" property of the BPM Connector:


Field Summary
protected  boolean containerManaged
          Indicates whether jBPM has been instantiated by the connector (false) or was passed in from somewhere else (true).
protected  org.jbpm.JbpmConfiguration jbpmConfiguration
           
protected static Log logger
           
 
Constructor Summary
Jbpm()
          Creates the Mule wrapper for jBPM using a default configuration.
Jbpm(org.jbpm.JbpmConfiguration jbpmConfiguration)
          Creates the Mule BPM wrapper based on an already-initialized jBPM instance
 
Method Summary
 void abortProcess(Object processId)
          Delete a process instance.
 Object advanceProcess(Object processId)
          Advance a process instance one step.
 Object advanceProcess(Object processId, Object transition, Map processVariables)
          Advance a process instance one step.
 void completeTask(org.jbpm.taskmgmt.exe.TaskInstance task)
           
 void completeTask(org.jbpm.taskmgmt.exe.TaskInstance task, String transition)
           
 void deployProcess(String processDefinitionFile)
          Deploy a new process definition.
 void deployProcessFromStream(InputStream processDefinition)
           
 void destroy()
           
 Object getId(Object process)
           
 org.jbpm.JbpmConfiguration getJbpmConfiguration()
           
 Object getState(Object process)
           
 boolean hasEnded(Object process)
           
 boolean isProcess(Object obj)
           
 List loadTasks(org.jbpm.graph.exe.ProcessInstance process)
           
 Object lookupProcess(Object processId)
          Look up an already-running process instance.
 void setJbpmConfiguration(org.jbpm.JbpmConfiguration jbpmConfiguration)
           
 void setMessageService(MessageService msgService)
          MessageService contains a callback method used to generate Mule messages from your process.
 Object startProcess(Object processType)
          Start a new process.
 Object startProcess(Object processType, Object transition, Map processVariables)
          Start a new process.
 Object updateProcess(Object processId, Map processVariables)
          Update the variables for a process instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final Log logger

jbpmConfiguration

protected org.jbpm.JbpmConfiguration jbpmConfiguration

containerManaged

protected boolean containerManaged
Indicates whether jBPM has been instantiated by the connector (false) or was passed in from somewhere else (true).

Constructor Detail

Jbpm

public Jbpm()
Creates the Mule wrapper for jBPM using a default configuration.


Jbpm

public Jbpm(org.jbpm.JbpmConfiguration jbpmConfiguration)
Creates the Mule BPM wrapper based on an already-initialized jBPM instance

Parameters:
jbpmConfiguration - - the already-initialized jBPM instance
Method Detail

destroy

public void destroy()

setMessageService

public void setMessageService(MessageService msgService)
Description copied from interface: BPMS
MessageService contains a callback method used to generate Mule messages from your process. This method is REQUIRED.

Specified by:
setMessageService in interface BPMS
Parameters:
msgService - An interface within Mule which the BPMS may call to generate Mule messages.

startProcess

public Object startProcess(Object processType)
                    throws Exception
Start a new process.

Returns:
the newly-created ProcessInstance
Throws:
Exception

startProcess

public Object startProcess(Object processType,
                           Object transition,
                           Map processVariables)
                    throws Exception
Start a new process.

Specified by:
startProcess in interface BPMS
Parameters:
processType - - the type of process to start
processVariables - - optional process variables/parameters to set
Returns:
the newly-created ProcessInstance
Throws:
Exception

advanceProcess

public Object advanceProcess(Object processId)
                      throws Exception
Advance a process instance one step.

Returns:
the updated ProcessInstance
Throws:
Exception

advanceProcess

public Object advanceProcess(Object processId,
                             Object transition,
                             Map processVariables)
                      throws Exception
Advance a process instance one step.

Specified by:
advanceProcess in interface BPMS
Parameters:
processId - - an ID which identifies the running process
transition - - optionally specify which transition to take from the current state
processVariables - - optional process variables/parameters to set
Returns:
the updated ProcessInstance
Throws:
Exception

updateProcess

public Object updateProcess(Object processId,
                            Map processVariables)
                     throws Exception
Update the variables for a process instance.

Specified by:
updateProcess in interface BPMS
Parameters:
processId - - an ID which identifies the running process
processVariables - - process variables/parameters to set
Returns:
the updated ProcessInstance
Throws:
Exception

abortProcess

public void abortProcess(Object processId)
                  throws Exception
Delete a process instance.

Specified by:
abortProcess in interface BPMS
Parameters:
processId - - an ID which identifies the running process
Throws:
Exception

isProcess

public boolean isProcess(Object obj)
                  throws Exception
Specified by:
isProcess in interface BPMS
Returns:
true if the object is a valid process This method is OPTIONAL.
Throws:
Exception

getId

public Object getId(Object process)
             throws Exception
Specified by:
getId in interface BPMS
Returns:
an ID which identifies the given process. This method is OPTIONAL.
Throws:
Exception

getState

public Object getState(Object process)
                throws Exception
Specified by:
getState in interface BPMS
Returns:
the current state of the given process. This method is OPTIONAL.
Throws:
Exception

hasEnded

public boolean hasEnded(Object process)
                 throws Exception
Specified by:
hasEnded in interface BPMS
Returns:
true if the given process has ended. This method is OPTIONAL.
Throws:
Exception

lookupProcess

public Object lookupProcess(Object processId)
                     throws Exception
Look up an already-running process instance.

Specified by:
lookupProcess in interface BPMS
Returns:
the ProcessInstance
Throws:
Exception

deployProcess

public void deployProcess(String processDefinitionFile)
                   throws IOException
Deploy a new process definition.

Throws:
IOException

deployProcessFromStream

public void deployProcessFromStream(InputStream processDefinition)
                             throws IOException
Throws:
IOException

loadTasks

public List loadTasks(org.jbpm.graph.exe.ProcessInstance process)

completeTask

public void completeTask(org.jbpm.taskmgmt.exe.TaskInstance task)

completeTask

public void completeTask(org.jbpm.taskmgmt.exe.TaskInstance task,
                         String transition)

getJbpmConfiguration

public org.jbpm.JbpmConfiguration getJbpmConfiguration()

setJbpmConfiguration

public void setJbpmConfiguration(org.jbpm.JbpmConfiguration jbpmConfiguration)


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.