bexee.core
Class ProcessContext

java.lang.Object
  extended bybexee.core.ProcessContext
All Implemented Interfaces:
java.io.Serializable

public class ProcessContext
extends java.lang.Object
implements java.io.Serializable

The ProcessContext contains state information about a very specific process instance. This includes:

The ProcessContext need to be made persistent for later retrieval of asynchronous or long-running processes.

Version:
$Revision: 1.1 $, $Date: 2004/12/15 14:18:10 $
Author:
Patric Fornasier, Pawel Kowalski
See Also:
Serialized Form

Constructor Summary
ProcessContext()
          Creates a new ProcessContext.
 
Method Summary
 void addEvent(Event event)
          Add an Event to this ProcessContext.
 Event getEvent(Activity activity)
          Get an Event for the given Activity.
 java.lang.String getId()
          Get the id of this ProcessContext.
 BexeeMessage getMessage()
          Get the current message.
 java.lang.Object getResult()
          Get the result of this process instance.
 java.util.Map getVariable(Variable variable)
          Gets the parts associated with a given Variable.
 java.lang.Object getVariablePart(Variable variable, java.lang.String part)
          Get a variable part identified by a Variable identifier and a part name.
 java.util.Set getVariablesIdentifiers()
          It is possible to retrieve all variable identifiers included in this context (Variable class instances).
 BexeeMessage removeMessage()
          Remove the current message.
 void setId(java.lang.String id)
          Set the id of this ProcessContext.
 void setMessage(BexeeMessage message)
          Set the current message.
 void setResult(java.lang.Object result)
          Provides a place to store the result of BPEL process instance that has terminated it's execution.
 void setVariable(Variable variable, java.util.Map parts)
          Stores the parts of a given Variable.
 void setVariablePart(Variable variable, java.lang.String part, java.lang.Object value)
          Set a variable part identified by a Variable identifier and a part name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessContext

public ProcessContext()
Creates a new ProcessContext.

Method Detail

getResult

public java.lang.Object getResult()
Get the result of this process instance.

Returns:

setResult

public void setResult(java.lang.Object result)
Provides a place to store the result of BPEL process instance that has terminated it's execution.

After setting the result this method will call notify() on itself to indicate locking threads that the result is available.


setMessage

public void setMessage(BexeeMessage message)
Set the current message.

Parameters:
message -

getMessage

public BexeeMessage getMessage()
Get the current message.

Returns:
currentMessage

setVariable

public void setVariable(Variable variable,
                        java.util.Map parts)
Stores the parts of a given Variable.

Parameters:
variable - the Variable that will be used as the key
parts - a Map containing the parts associated with the given Variable. The part names are used as keys in the parts Map.

getVariable

public java.util.Map getVariable(Variable variable)
Gets the parts associated with a given Variable.

Parameters:
variable - the Variable that will be used as the key
Returns:
a Map containing the parts associated with the given Variable. The part names are used as keys in the returned Map.

getVariablesIdentifiers

public java.util.Set getVariablesIdentifiers()
It is possible to retrieve all variable identifiers included in this context (Variable class instances).

Returns:
set a Set of Variable instances.

setVariablePart

public void setVariablePart(Variable variable,
                            java.lang.String part,
                            java.lang.Object value)
Set a variable part identified by a Variable identifier and a part name.

Parameters:
variable - the variable identifier
part - the part name
value - part value

getVariablePart

public java.lang.Object getVariablePart(Variable variable,
                                        java.lang.String part)
Get a variable part identified by a Variable identifier and a part name.

Parameters:
variable - the variable identifier
part - the part name
Returns:
value

removeMessage

public BexeeMessage removeMessage()
Remove the current message. This method will be called in order to retrieve the current message and remove it from the ProcessContext at the same time.

Returns:
bexeeMessage a BexeeMessage

addEvent

public void addEvent(Event event)
Add an Event to this ProcessContext. The Event s represent processed activities in bexee. It is possible to reconstruct states of the process by analyzing those Events.

Parameters:
event -

getEvent

public Event getEvent(Activity activity)
Get an Event for the given Activity.

Parameters:
activity -
Returns:
Event

setId

public void setId(java.lang.String id)
Set the id of this ProcessContext.

Parameters:
id -

getId

public java.lang.String getId()
Get the id of this ProcessContext.

Returns:


Copyright © 2004 Berne University of Applied Sciences. All Rights Reserved.