wt.workflow.engine
Class WfEngineServiceEvent

java.lang.Object
  extended bywt.events.KeyedEvent
      extended bywt.workflow.engine.WfEngineServiceEvent
All Implemented Interfaces:
Serializable

public class WfEngineServiceEvent
extends KeyedEvent
implements Serializable

Keyed event emitted by the workflow engine caused by a change or exception in an execution object. Stores the type of the event, the source object and the new state or data. Either the state or the data must be null (but not both).

It is possible to configure which events are emitted at a template level (affecting all instances of the template) and at the individual process level.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private  WfEventAuditType eventAuditType
           
private  Object eventAuxData
           
private  Object eventData
           
private static String RESOURCE
           
private  WfEngineService service
           
private  WfExecutionObject source
           
private  Timestamp timestamp
           
 
Fields inherited from class wt.events.KeyedEvent
 
Constructor Summary
WfEngineServiceEvent(WfEngineService svc, Object tgt, WfEventAuditType typ, Timestamp time, Object data, Object aux_data)
          Event constructor.
WfEngineServiceEvent(WfEngineService svc, WTList list, WfEventAuditType typ, Timestamp time, Object data, Object aux_data)
          Event constructor.
 
Method Summary
static String generateEventKey(WfEventAuditType event_type)
          Helper function to generate the event key.
 WfEventAuditType getEventAuditType()
          Gets the value of the attribute: eventAuditType; Type of the event.
 Object getEventAuxData()
          Gets the value of the attribute: eventAuxData; Additional data used to characterize the event.
 Object getEventData()
          Gets the value of the attribute: eventData; Object containing event relevant data.
 WfEngineService getService()
          Gets the value of the attribute: service; Reference to the service object that emitted the event.
 WfExecutionObject getSource()
          Gets the value of the attribute: source; Execution object that is the source of the event.
 Timestamp getTimestamp()
          Gets the value of the attribute: timestamp; Time when the event occurred.
 void setEventAuditType(WfEventAuditType a_EventAuditType)
          Sets the value of the attribute: eventAuditType; Type of the event.
 void setEventAuxData(Object a_EventAuxData)
          Sets the value of the attribute: eventAuxData; Additional data used to characterize the event.
 void setEventData(Object a_EventData)
          Sets the value of the attribute: eventData; Object containing event relevant data.
 void setService(WfEngineService a_Service)
          Sets the value of the attribute: service; Reference to the service object that emitted the event.
 void setSource(WfExecutionObject a_Source)
          Sets the value of the attribute: source; Execution object that is the source of the event.
 void setTimestamp(Timestamp a_Timestamp)
          Sets the value of the attribute: timestamp; Time when the event occurred.
 KeyedEvent toMultiObjectEvent()
          Given a single object event convert it to a multi object event with a WTCollection target.
 KeyedEvent[] toSingleObjectEvents()
          Given an event with a target object of type WTCollection convert it to an array of single object KeyedEvents.
 
Methods inherited from class wt.events.KeyedEvent
generateEventKey, generateEventKey, getConceptualClassname, getEventKey, getEventTarget, getEventType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

eventAuditType

private WfEventAuditType eventAuditType

source

private WfExecutionObject source

eventData

private Object eventData

service

private WfEngineService service

timestamp

private Timestamp timestamp

eventAuxData

private Object eventAuxData
Constructor Detail

WfEngineServiceEvent

public WfEngineServiceEvent(WfEngineService svc,
                            Object tgt,
                            WfEventAuditType typ,
                            Timestamp time,
                            Object data,
                            Object aux_data)
Event constructor.

Supported API: false

Parameters:
svc -
tgt -
typ -
time -
data -
aux_data -

WfEngineServiceEvent

public WfEngineServiceEvent(WfEngineService svc,
                            WTList list,
                            WfEventAuditType typ,
                            Timestamp time,
                            Object data,
                            Object aux_data)
Event constructor.

Supported API: false

Parameters:
svc -
typ -
time -
data -
aux_data -
Method Detail

getEventAuditType

public WfEventAuditType getEventAuditType()
Gets the value of the attribute: eventAuditType; Type of the event.

Supported API: false

Returns:
WfEventAuditType

setEventAuditType

public void setEventAuditType(WfEventAuditType a_EventAuditType)
                       throws WTPropertyVetoException
Sets the value of the attribute: eventAuditType; Type of the event.

Supported API: false

Parameters:
a_EventAuditType -
Throws:
WTPropertyVetoException

getSource

public WfExecutionObject getSource()
Gets the value of the attribute: source; Execution object that is the source of the event.

Supported API: false

Returns:
WfExecutionObject

setSource

public void setSource(WfExecutionObject a_Source)
               throws WTPropertyVetoException
Sets the value of the attribute: source; Execution object that is the source of the event.

Supported API: false

Parameters:
a_Source -
Throws:
WTPropertyVetoException

getEventData

public Object getEventData()
Gets the value of the attribute: eventData; Object containing event relevant data. The actual object value depends on the eventAuditType, according to the following table:
old state
event type = state change; old state of the change of state of the object; object's type is wt.workflow.engine.WfState
old data
event type = data change; old object's context; object's type is wt.workflow.engine.ProcessData
old assignee
event type = assignment change; old assignee to the activity; object's type is wt.org.WTPrincipal
exception
event type = execution error; exception thrown by execution object; object's type is java.lang.Exception


Supported API: false

Returns:
Object

setEventData

public void setEventData(Object a_EventData)
                  throws WTPropertyVetoException
Sets the value of the attribute: eventData; Object containing event relevant data. The actual object value depends on the eventAuditType, according to the following table:
old state
event type = state change; old state of the change of state of the object; object's type is wt.workflow.engine.WfState
old data
event type = data change; old object's context; object's type is wt.workflow.engine.ProcessData
old assignee
event type = assignment change; old assignee to the activity; object's type is wt.org.WTPrincipal
exception
event type = execution error; exception thrown by execution object; object's type is java.lang.Exception


Supported API: false

Parameters:
a_EventData -
Throws:
WTPropertyVetoException

getService

public WfEngineService getService()
Gets the value of the attribute: service; Reference to the service object that emitted the event.

Supported API: false

Returns:
WfEngineService

setService

public void setService(WfEngineService a_Service)
                throws WTPropertyVetoException
Sets the value of the attribute: service; Reference to the service object that emitted the event.

Supported API: false

Parameters:
a_Service -
Throws:
WTPropertyVetoException

getTimestamp

public Timestamp getTimestamp()
Gets the value of the attribute: timestamp; Time when the event occurred. For state change this time is computed by the execution object for others it is computed by the engine service.

Supported API: false

Returns:
Timestamp

setTimestamp

public void setTimestamp(Timestamp a_Timestamp)
                  throws WTPropertyVetoException
Sets the value of the attribute: timestamp; Time when the event occurred. For state change this time is computed by the execution object for others it is computed by the engine service.

Supported API: false

Parameters:
a_Timestamp -
Throws:
WTPropertyVetoException

getEventAuxData

public Object getEventAuxData()
Gets the value of the attribute: eventAuxData; Additional data used to characterize the event. For example, for the COMPLETE transition this may be the associated user event.

Supported API: false

Returns:
Object

setEventAuxData

public void setEventAuxData(Object a_EventAuxData)
Sets the value of the attribute: eventAuxData; Additional data used to characterize the event. For example, for the COMPLETE transition this may be the associated user event.

Supported API: false

Parameters:
a_EventAuxData -

generateEventKey

public static String generateEventKey(WfEventAuditType event_type)
Helper function to generate the event key.

Supported API: false

Parameters:
event_type -
Returns:
String

toMultiObjectEvent

public KeyedEvent toMultiObjectEvent()
Given a single object event convert it to a multi object event with a WTCollection target.

Supported API: false

Overrides:
toMultiObjectEvent in class KeyedEvent
Returns:
KeyedEvent

toSingleObjectEvents

public KeyedEvent[] toSingleObjectEvents()
                                  throws WTException
Given an event with a target object of type WTCollection convert it to an array of single object KeyedEvents.

Supported API: false

Overrides:
toSingleObjectEvents in class KeyedEvent
Returns:
KeyedEvent[]
Throws:
WTException