Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.transport.jbpm
Class Jbpm

    java.lang.Object
      org.mule.transport.jbpm.Jbpm

All Implemented Interfaces:
  Disposable, Initialisable, BPMS

    public class Jbpm

extends Object
implements BPMS, Initialisable, Disposable

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 static Logger` | `log`
`static String` | `PROCESS_ENDED`
`protected org.jbpm.api.ProcessEngine` | `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)` Creates the Mule wrapper for jBPM
`Jbpm(String configurationResource, Properties processDefinitions)` Creates the Mule wrapper for jBPM

Method Summary
`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()` A lifecycle method where implementor should free up any resources.
`String` | `getConfigurationResource()`
`Object` | `getId(Object process)`
`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()` Method used to perform any initialisation work.
`boolean` | `isProcess(Object obj)`
`Object` | `lookupProcess(Object processId)` Look up an already-running process instance.
`void` | `setConfigurationResource(String configurationResource)`
`void` | `setMessageService(MessageService msgService)` `MessageService` contains a callback method used to generate Mule messages from your process.
`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.
`Object` | `updateProcess(Object executionId, 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

### log

    protected static final Logger log

### PROCESS_ENDED

    public static final String PROCESS_ENDED

See Also:
  Constant Field Values

### processEngine

    protected org.jbpm.api.ProcessEngine processEngine

### 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

### Jbpm

    public Jbpm(String configurationResource,
                Properties processDefinitions)

  Creates the Mule wrapper for jBPM

  Parameters:
    `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.

### Jbpm

    public Jbpm(org.jbpm.api.ProcessEngine processEngine)

  Creates the Mule wrapper for jBPM

  Parameters:
    `The` - already-initialized jBPM ProcessEngine. This is useful if you use Spring to configure your jBPM instance.

Method Detail

### initialise

    public void initialise()

  Description copied from interface: `Initialisable`
  Method used to perform any initialisation work. If a fatal error occurs during initialisation an `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.

  Specified by:
    `initialise` in interface `Initialisable`

### dispose

    public void dispose()

  Description copied from interface: `Disposable`
  A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

  Specified by:
    `dispose` in interface `Disposable`

### 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 processDefinitionKey)
                        throws Exception

  Start a new process.

  Returns:
    the newly-created ProcessInstance
  Throws:
    `Exception`

### startProcess

    public Object startProcess(Object processDefinitionKey,
                               Object signalName,
                               Map variables)
                        throws Exception

  Start a new process.

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

### advanceProcess

    public Object advanceProcess(Object executionId)
                          throws Exception

  Advance a process instance one step.

  Returns:
    the updated ProcessInstance
  Throws:
    `Exception`

### advanceProcess

    public Object advanceProcess(Object executionId,
                                 Object signalName,
                                 Map variables)
                          throws Exception

  Advance a process instance one step.

  Specified by:
    `advanceProcess` in interface `BPMS`
  Parameters:
    `processId` - - if no transition value is provided, this is assumed to be execution id
    `transition` - - the state of the execution we're looking for
    `processVariables` - - optional process variables/parameters to set
  Returns:
    the updated ProcessInstance
  Throws:
    `Exception`

### updateProcess

    public Object updateProcess(Object executionId,
                                Map variables)
                         throws Exception

  Update the variables for an execution.

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

### abortProcess

    public void abortProcess(Object processInstanceId)
                      throws Exception

  Delete a process instance.

  Specified by:
    `abortProcess` in interface `BPMS`
  Parameters:
    `processInstanceId` - - 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`

### getState

    public static String getState(org.jbpm.api.ProcessInstance processInstance)
                           throws Exception

  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

  Throws:
    `IOException`

### deployProcessFromStream

    public void deployProcessFromStream(String resourceName,
                                        InputStream processDefinition)
                                 throws IOException

  Throws:
    `IOException`

### completeTask

    public void completeTask(org.jbpm.api.task.Task task)

### completeTask

    public void completeTask(org.jbpm.api.task.Task task,
                             String outcome,
                             Map variables)

### getProcessEngine

    public org.jbpm.api.ProcessEngine getProcessEngine()

### setProcessEngine

    public void setProcessEngine(org.jbpm.api.ProcessEngine processEngine)

### getConfigurationResource

    public String getConfigurationResource()

### setConfigurationResource

    public void setConfigurationResource(String configurationResource)

### getProcessDefinitions

    public Properties getProcessDefinitions()

### setProcessDefinitions

    public void setProcessDefinitions(Properties processDefinitions)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.