org.obe.spi.model
Class JoinInstance

java.lang.Object
  extended byorg.obe.spi.model.JoinInstance
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AndJoinInstance, OrJoinInstance

public abstract class JoinInstance
extends java.lang.Object
implements java.io.Serializable

Stores the persistent state of an activity instance's join.

Author:
Adrian Price
See Also:
Serialized Form

Field Summary
protected  boolean[] _states
           
protected  java.lang.String[] _transitions
           
 
Constructor Summary
protected JoinInstance(java.lang.String[] transitions)
           
 
Method Summary
protected  boolean didFire(int index)
          Sets the fired state for the specified transition.
 boolean equals(java.lang.Object obj)
           
protected  void fire()
          Informs the join that it has fired.
 int getFiredCount()
          Returns the number of times the join has fired since the workflow started.
 boolean hasFired()
          Returns whether the join has fired.
protected  boolean hasFired(int index)
           
 int hashCode()
           
 boolean isModified()
          Returns whether the join has been modified since it was last persisted.
 void reset()
          Resets the join to its initial state.
abstract  boolean shouldFire(java.lang.String transitionId)
          Handles the activation of an afferent transition.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_transitions

protected final java.lang.String[] _transitions

_states

protected final boolean[] _states
Constructor Detail

JoinInstance

protected JoinInstance(java.lang.String[] transitions)
Method Detail

shouldFire

public abstract boolean shouldFire(java.lang.String transitionId)
Handles the activation of an afferent transition.

Parameters:
transitionId - The ID of the transition that fired.
Returns:
true if the join fired.

fire

protected final void fire()
Informs the join that it has fired. If it has not already fired it is marked as both fired and modified, which states persist until it is reset and persisted respectively. Firing a join also increments its fired count.


hasFired

public final boolean hasFired()
Returns whether the join has fired.

Returns:
true if the join has fired.

hasFired

protected final boolean hasFired(int index)

didFire

protected final boolean didFire(int index)
Sets the fired state for the specified transition. A change of state marks the join as modified.

Parameters:
index - Index to set.
Returns:
Whether the transition fired.

getFiredCount

public final int getFiredCount()
Returns the number of times the join has fired since the workflow started.

Returns:
Fire count;

isModified

public final boolean isModified()
Returns whether the join has been modified since it was last persisted.

Returns:
true if the join has been modified.

reset

public final void reset()
Resets the join to its initial state. The 'fired count' is unaffected by the reset operation.


equals

public final boolean equals(java.lang.Object obj)

hashCode

public final int hashCode()

toString

public final java.lang.String toString()


SourceForge.net Logo OBE-1.0 Copyright (C) 2002-2006 Adrian Price. All Rights Reserved.