org.mule.providers.bpm
Class ProcessConnector

java.lang.Object
  extended byorg.mule.providers.AbstractConnector
      extended byorg.mule.providers.bpm.ProcessConnector
All Implemented Interfaces:
org.mule.umo.lifecycle.Disposable, EventListener, ExceptionListener, org.mule.umo.lifecycle.Initialisable, MessageService, org.mule.umo.provider.UMOConnectable, org.mule.umo.provider.UMOConnector, WorkListener

public class ProcessConnector
extends org.mule.providers.AbstractConnector
implements MessageService

The BPM provider allows Mule events to initiate and/or advance processes in an external or embedded Business Process Management System (BPMS). It also allows executing processes to generate Mule events.


Field Summary
static String ACTION_ABORT
           
static String ACTION_ADVANCE
           
static String ACTION_START
           
static String ACTION_UPDATE
           
protected  boolean allowGlobalReceiver
          The global receiver allows an endpoint of type "bpm://*" to receive any incoming message to the BPMS, regardless of the process.
protected  BPMS bpms
          The underlying BPMS
static String GLOBAL_RECEIVER
           
protected  boolean localEndpointsOnly
          If true, a process can only send messages to the outgoing endpoints defined for the local component.
static String PROCESS_VARIABLE_DATA
           
static String PROCESS_VARIABLE_INCOMING
           
static String PROCESS_VARIABLE_INCOMING_SOURCE
           
protected  String processIdField
          This field will be used to correlated messages with processes.
static String PROPERTY_ACTION
           
static String PROPERTY_ENDPOINT
           
static String PROPERTY_PROCESS_ID
           
static String PROPERTY_PROCESS_STARTED
           
static String PROPERTY_PROCESS_TYPE
           
static String PROPERTY_TRANSITION
           
static String PROTOCOL
           
 
Fields inherited from class org.mule.providers.AbstractConnector
connected, connecting, connectionStrategy, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, defaultInboundTransformer, defaultOutboundTransformer, defaultResponseTransformer, dispatcherFactory, dispatchers, disposed, disposing, exceptionListener, initialised, logger, name, numberOfConcurrentTransactedReceivers, receivers, serviceDescriptor, serviceOverrides, sessionHandler, started, startOnConnect
 
Fields inherited from interface org.mule.umo.provider.UMOConnector
INT_VALUE_NOT_SET
 
Constructor Summary
ProcessConnector()
           
 
Method Summary
protected  void doConnect()
           
protected  void doDisconnect()
           
protected  void doDispose()
           
protected  void doInitialise()
           
protected  void doStart()
           
protected  void doStop()
           
 org.mule.umo.UMOMessage generateMessage(String endpoint, Object payloadObject, Map messageProperties, boolean synchronous)
           
 BPMS getBpms()
           
 org.mule.extras.client.MuleClient getMuleClient()
           
 String getProcessIdField()
           
 String getProtocol()
           
 boolean isAllowGlobalReceiver()
           
 boolean isLocalEndpointsOnly()
           
 ProcessMessageReceiver lookupReceiver(String processName, Object processId)
          This method looks for a receiver based on the process name and ID.
 void setAllowGlobalReceiver(boolean allowGlobalReceiver)
           
 void setBpms(BPMS bpms)
           
 void setLocalEndpointsOnly(boolean localEndpointsOnly)
           
 void setProcessIdField(String processIdField)
           
 String toUrl(String processName, Object processId)
          Generate a URL based on the process name and ID such as "bpm://myProcess/2342" If the parameters are missing, and allowGlobalReceiver is true, the GLOBAL_RECEIVER is returned.
 
Methods inherited from class org.mule.providers.AbstractConnector
checkDisposed, connect, createReceiver, destroyReceiver, disconnect, dispatch, dispose, disposeDispatchers, disposeReceivers, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getConnectionStrategy, getDefaultInboundTransformer, getDefaultOutboundTransformer, getDefaultResponseTransformer, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getExceptionListener, getMaxDispatchersActive, getMessageAdapter, getName, getNumberOfConcurrentTransactedReceivers, getOutputStream, getReceiver, getReceiverKey, getReceivers, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getReplyToHandler, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getStreamMessageAdapter, getSupportedProtocols, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isDisposing, isEnableMessageEvents, isRemoteSyncEnabled, isStarted, lookupReceiver, receive, receive, registerListener, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, send, setConnectionStrategy, setCreateMultipleTransactedReceivers, setDefaultInboundTransformer, setDefaultOutboundTransformer, setDefaultResponseTransformer, setDispatcherFactory, setDispatcherThreadingProfile, setEnableMessageEvents, setExceptionListener, setMaxDispatchersActive, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setServiceOverrides, setSessionHandler, setSupportedProtocols, startConnector, stopConnector, supportsProtocol, toString, unregisterListener, unregisterSupportedProtocol, workAccepted, workCompleted, workRejected, workStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bpms

protected BPMS bpms
The underlying BPMS


processIdField

protected String processIdField
This field will be used to correlated messages with processes.


localEndpointsOnly

protected boolean localEndpointsOnly
If true, a process can only send messages to the outgoing endpoints defined for the local component. If false, a process can send messages to any endpoint on any component.


allowGlobalReceiver

protected boolean allowGlobalReceiver
The global receiver allows an endpoint of type "bpm://*" to receive any incoming message to the BPMS, regardless of the process. If this false, the process name must be specified for each endpoint, e.g. "bpm://myProcess" and will only receive messages for the specified process.


PROPERTY_ENDPOINT

public static final String PROPERTY_ENDPOINT
See Also:
Constant Field Values

PROPERTY_PROCESS_TYPE

public static final String PROPERTY_PROCESS_TYPE
See Also:
Constant Field Values

PROPERTY_PROCESS_ID

public static final String PROPERTY_PROCESS_ID
See Also:
Constant Field Values

PROPERTY_ACTION

public static final String PROPERTY_ACTION
See Also:
Constant Field Values

PROPERTY_TRANSITION

public static final String PROPERTY_TRANSITION
See Also:
Constant Field Values

PROPERTY_PROCESS_STARTED

public static final String PROPERTY_PROCESS_STARTED
See Also:
Constant Field Values

ACTION_START

public static final String ACTION_START
See Also:
Constant Field Values

ACTION_ADVANCE

public static final String ACTION_ADVANCE
See Also:
Constant Field Values

ACTION_UPDATE

public static final String ACTION_UPDATE
See Also:
Constant Field Values

ACTION_ABORT

public static final String ACTION_ABORT
See Also:
Constant Field Values

PROCESS_VARIABLE_INCOMING

public static final String PROCESS_VARIABLE_INCOMING
See Also:
Constant Field Values

PROCESS_VARIABLE_INCOMING_SOURCE

public static final String PROCESS_VARIABLE_INCOMING_SOURCE
See Also:
Constant Field Values

PROCESS_VARIABLE_DATA

public static final String PROCESS_VARIABLE_DATA
See Also:
Constant Field Values

PROTOCOL

public static final String PROTOCOL
See Also:
Constant Field Values

GLOBAL_RECEIVER

public static final String GLOBAL_RECEIVER
See Also:
Constant Field Values
Constructor Detail

ProcessConnector

public ProcessConnector()
Method Detail

getProtocol

public String getProtocol()
Specified by:
getProtocol in interface org.mule.umo.provider.UMOConnector

doInitialise

protected void doInitialise()
                     throws org.mule.umo.lifecycle.InitialisationException
Throws:
org.mule.umo.lifecycle.InitialisationException

doDispose

protected void doDispose()

doConnect

protected void doConnect()
                  throws Exception
Throws:
Exception

doDisconnect

protected void doDisconnect()
                     throws Exception
Throws:
Exception

doStart

protected void doStart()
                throws org.mule.umo.UMOException
Throws:
org.mule.umo.UMOException

doStop

protected void doStop()
               throws org.mule.umo.UMOException
Throws:
org.mule.umo.UMOException

lookupReceiver

public ProcessMessageReceiver lookupReceiver(String processName,
                                             Object processId)
This method looks for a receiver based on the process name and ID. It searches iteratively from the narrowest scope (match process name and ID) to the widest scope (match neither - global receiver) possible.

Returns:
ProcessMessageReceiver or null if no match is found

toUrl

public String toUrl(String processName,
                    Object processId)
Generate a URL based on the process name and ID such as "bpm://myProcess/2342" If the parameters are missing, and allowGlobalReceiver is true, the GLOBAL_RECEIVER is returned.


generateMessage

public org.mule.umo.UMOMessage generateMessage(String endpoint,
                                               Object payloadObject,
                                               Map messageProperties,
                                               boolean synchronous)
                                        throws Exception
Specified by:
generateMessage in interface MessageService
Throws:
Exception

getBpms

public BPMS getBpms()

setBpms

public void setBpms(BPMS bpms)

getMuleClient

public org.mule.extras.client.MuleClient getMuleClient()

isLocalEndpointsOnly

public boolean isLocalEndpointsOnly()

setLocalEndpointsOnly

public void setLocalEndpointsOnly(boolean localEndpointsOnly)

isAllowGlobalReceiver

public boolean isAllowGlobalReceiver()

setAllowGlobalReceiver

public void setAllowGlobalReceiver(boolean allowGlobalReceiver)

getProcessIdField

public String getProcessIdField()

setProcessIdField

public void setProcessIdField(String processIdField)


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