ALBPM Process API (PAPI)

fuego.papi
Class InstanceEvent

java.lang.Object
  extended byfuego.papi.InstanceEvent
All Implemented Interfaces:
Comparable, Serializable

public class InstanceEvent
extends Object
implements Serializable, Comparable

Contains the information of a process-instance event.

See Also:
Serialized Form

Field Summary
 Time activationTime
          Time when the main task of the current activity started to execute.
 String activity
          Activity where the event was generated.
 String[] bussinesVariablesIds
          External varible ids in the event.
 Object[] bussinesVariablesValues
          External varible values in the event.
 int category
          Category of the event.
 String eventData
          Information of the event.
 int id
          Id of the event.
 int instanceIn
          Instance number where the event was generated.
 String participantId
          Participant which generates the event.
 int participantIn
          Participant number which generates the event.
 int processIn
          Process number where the event was generated.
 Time receiveTime
          Time when the instance arrived to the current activity.
static String TASK_EXECUTION_RESULT
          Key for the task execution result (variable result).
static String TASK_NAME
          Key for the task name.
static String TASK_NUMBER
          Key for the task number
static String TASK_STATE
          Key for the task state.
 int threadIn
          Thread number where the event was generated.
 Time timeStamp
          Time when the event was generated.
 int type
          Event type.
 
Constructor Summary
InstanceEvent()
           
 
Method Summary
 int compareTo(Object compareObject)
          Compares this object with the specified object for order.
 String getDescription(Locale locale)
          Gets the description of the event for the given Locale
 String getEventDataValue(String key)
          Gets the value of the key, which is defined in the event data.
 String toString()
          Gets the representation of the instance as a String
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

activationTime

public Time activationTime
Time when the main task of the current activity started to execute.


activity

public String activity
Activity where the event was generated.


bussinesVariablesIds

public String[] bussinesVariablesIds
External varible ids in the event.


bussinesVariablesValues

public Object[] bussinesVariablesValues
External varible values in the event.


category

public int category
Category of the event.


eventData

public String eventData
Information of the event.


id

public int id
Id of the event.


instanceIn

public int instanceIn
Instance number where the event was generated.


participantId

public String participantId
Participant which generates the event.


participantIn

public int participantIn
Participant number which generates the event.


processIn

public int processIn
Process number where the event was generated.


receiveTime

public Time receiveTime
Time when the instance arrived to the current activity.


threadIn

public int threadIn
Thread number where the event was generated.


timeStamp

public Time timeStamp
Time when the event was generated.


type

public int type
Event type.


TASK_NUMBER

public static final String TASK_NUMBER
Key for the task number

See Also:
Constant Field Values

TASK_NAME

public static final String TASK_NAME
Key for the task name.

See Also:
Constant Field Values

TASK_STATE

public static final String TASK_STATE
Key for the task state.

See Also:
Constant Field Values

TASK_EXECUTION_RESULT

public static final String TASK_EXECUTION_RESULT
Key for the task execution result (variable result).

See Also:
Constant Field Values
Constructor Detail

InstanceEvent

public InstanceEvent()
Method Detail

getDescription

public final String getDescription(Locale locale)
Gets the description of the event for the given Locale

Parameters:
locale - locale to localize the description.
Returns:
the localized description of the event.

toString

public final String toString()
Gets the representation of the instance as a String

Returns:
information about the event (instance, event id, event type, event timestamp, participant event, activity where the event was produced, event data).

getEventDataValue

public String getEventDataValue(String key)
Gets the value of the key, which is defined in the event data.

e.g.

          InstanceEvent[] events = processServiceSession.getInstanceEvents("/MyProcessId/1/0");

          for (int i=0; i < events.length; i++) {
              if (events[i].type == EventType.ITEM_EXECUTED) {
                  String taskName = events[i].getEventData(InstanceEvent.TASK_NAME);
                  String taskResult = events[i].getEventData(InstanceEvent.TASK_EXECUTION_RESULT);
                  System.out.println("Task '" + taskName + "' was executed -> result = '" + taskResult + "'");
              }
          }
 

Parameters:
key - key of the value to obtain.
Returns:
the value defined in the event data for the given key.

compareTo

public int compareTo(Object compareObject)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Implementation of the method inherited from the interface Comparable.

Specified by:
compareTo in interface Comparable
Parameters:
compareObject - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
ClassCastException - if the specified object's type prevents it from being compared to this Object.

ALBPM Process API (PAPI)

© Copyright 1996/2005 Fuego Inc. All Rights Reserved