org.mule.module.bpm
Class Process

java.lang.Object
  extended by org.mule.module.bpm.Process
All Implemented Interfaces:
Disposable, Initialisable, MessageService

public class Process
extends Object
implements Initialisable, Disposable, MessageService

A business process definition.


Field Summary
static String ACTION_ABORT
           
static String ACTION_ADVANCE
           
static String ACTION_START
           
static String ACTION_UPDATE
           
static String BPM_PROPERTY_PREFIX
           
protected static Log logger
           
protected  MuleContext muleContext
           
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 correlate 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
           
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
Process(BPMS bpms, String name, String resource, FlowConstruct flowConstruct, MuleContext muleContext)
           
Process(BPMS bpms, String name, String resource, String processIdField, FlowConstruct flowConstruct, MuleContext muleContext)
           
 
Method Summary
 void dispose()
          A lifecycle method where implementor should free up any resources.
 MuleMessage generateMessage(String endpoint, Object payload, Map messageProperties, MessageExchangePattern exchangePattern)
           
 BPMS getBpms()
           
 String getName()
           
 String getProcessIdField()
           
 String getResource()
           
protected  Object handleEvent(MuleEvent event)
           
 void initialise()
          Method used to perform any initialisation work.
protected  void populateProcessVariables(MuleEvent event, Map processVariables, PropertyScope propertyScope)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

processIdField

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


muleContext

protected MuleContext muleContext

BPM_PROPERTY_PREFIX

public static final String BPM_PROPERTY_PREFIX
See Also:
Constant Field Values

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

logger

protected static final Log logger
Constructor Detail

Process

public Process(BPMS bpms,
               String name,
               String resource,
               FlowConstruct flowConstruct,
               MuleContext muleContext)

Process

public Process(BPMS bpms,
               String name,
               String resource,
               String processIdField,
               FlowConstruct flowConstruct,
               MuleContext muleContext)
Method Detail

initialise

public void initialise()
                throws InitialisationException
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
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from

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

handleEvent

protected Object handleEvent(MuleEvent event)
                      throws Exception
Throws:
Exception

populateProcessVariables

protected void populateProcessVariables(MuleEvent event,
                                        Map processVariables,
                                        PropertyScope propertyScope)

generateMessage

public MuleMessage generateMessage(String endpoint,
                                   Object payload,
                                   Map messageProperties,
                                   MessageExchangePattern exchangePattern)
                            throws MuleException
Specified by:
generateMessage in interface MessageService
Throws:
MuleException

getProcessIdField

public String getProcessIdField()

getBpms

public BPMS getBpms()

getResource

public String getResource()

getName

public String getName()


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