org.jwarp.flow.process
Class Transition

java.lang.Object
  |
  +--org.jwarp.flow.process.Transition
All Implemented Interfaces:
ITransition, IWorkflowObject

public abstract class Transition
extends java.lang.Object
implements ITransition


Field Summary
static int ACTIVE
          Constant indicating that the transitions is firing, that means executing.
static int BLOCKED
          Constant indicating that this transition can not fire.
static int COMPLETED
          Constant indicating that the transition has fired successfully.
static int CREATED
          Constant indicating that this transition is not yet initialised.
protected  java.util.Date creationDate
          The dateTime when the transition was created.
protected  java.util.Date endDate
          The dateTime when the transition finished.
protected  int id
          The id.
protected  ITransition metaData
          The transitions metadata
protected  java.util.Vector preStates
          The current registered states for firing.
protected  IProcess process
          The actual running process
static int READY
          Constant indicating that the transition is ready to fire, but was not activated yet for execution.
protected  java.util.Date startDate
          The dateTime when the transition started.
protected  int status
          The current state of the transition.
 
Constructor Summary
Transition(java.util.Iterator prevStates, ITransition meta)
          Creates a new transition instance given the passed metaData information.
 
Method Summary
 java.util.Date getCreationDate()
          Returns the creation date/time of this transition.
 java.lang.String getDescription()
          Return a description (opional)
 java.util.Date getEndDate()
          Returns the end date/time of this transition (if available).
 int getID()
          Return the ID number of the object.
 ITransition getMetadata()
           
 java.lang.String getName()
          Return a name or string representation of the object.
 java.util.Iterator getPreStates()
          Return the states that have registered to fire the transition so far.
 IProcess getProcess()
           
 java.util.Date getStartDate()
          Returns the start date/time of this transition.
 int getStatus()
          Get the current status.
 void prepareRun(IWorkflowContext workflow)
          This method checks if the transition can fire.
 void runTransition(IWorkflowContext workflow)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jwarp.flow.process.ITransition
init, run
 

Field Detail

CREATED

public static final int CREATED
Constant indicating that this transition is not yet initialised.

BLOCKED

public static final int BLOCKED
Constant indicating that this transition can not fire.

READY

public static final int READY
Constant indicating that the transition is ready to fire, but was not activated yet for execution.

ACTIVE

public static final int ACTIVE
Constant indicating that the transitions is firing, that means executing.

COMPLETED

public static final int COMPLETED
Constant indicating that the transition has fired successfully.

status

protected int status
The current state of the transition.

metaData

protected ITransition metaData
The transitions metadata

preStates

protected java.util.Vector preStates
The current registered states for firing.

endDate

protected java.util.Date endDate
The dateTime when the transition finished.

startDate

protected java.util.Date startDate
The dateTime when the transition started.

creationDate

protected java.util.Date creationDate
The dateTime when the transition was created.

id

protected int id
The id.

process

protected IProcess process
The actual running process
Constructor Detail

Transition

public Transition(java.util.Iterator prevStates,
                  ITransition meta)
Creates a new transition instance given the passed metaData information.
Method Detail

getStatus

public int getStatus()
Description copied from interface: ITransition
Get the current status.
Specified by:
getStatus in interface ITransition
Following copied from interface: org.jwarp.flow.process.ITransition
Returns:
the current status

getStartDate

public java.util.Date getStartDate()
Description copied from interface: ITransition
Returns the start date/time of this transition.
Specified by:
getStartDate in interface ITransition
Following copied from interface: org.jwarp.flow.process.ITransition
Returns:
start date

getEndDate

public java.util.Date getEndDate()
Description copied from interface: ITransition
Returns the end date/time of this transition (if available).
Specified by:
getEndDate in interface ITransition
Following copied from interface: org.jwarp.flow.process.ITransition
Returns:
end date

getCreationDate

public java.util.Date getCreationDate()
Description copied from interface: ITransition
Returns the creation date/time of this transition.
Specified by:
getCreationDate in interface ITransition
Following copied from interface: org.jwarp.flow.process.ITransition
Returns:
creation date

getPreStates

public java.util.Iterator getPreStates()
Return the states that have registered to fire the transition so far.

prepareRun

public void prepareRun(IWorkflowContext workflow)
                throws TransitionException,
                       TransitionInitException
This method checks if the transition can fire. If so the transitions run method is called.

runTransition

public void runTransition(IWorkflowContext workflow)
                   throws TransitionException,
                          TransitionInitException

getMetadata

public ITransition getMetadata()

getProcess

public IProcess getProcess()

getDescription

public java.lang.String getDescription()
Description copied from interface: IWorkflowObject
Return a description (opional)
Specified by:
getDescription in interface IWorkflowObject
Following copied from interface: org.jwarp.flow.IWorkflowObject
Returns:
The description

getName

public java.lang.String getName()
Description copied from interface: IWorkflowObject
Return a name or string representation of the object.
Specified by:
getName in interface IWorkflowObject
Following copied from interface: org.jwarp.flow.IWorkflowObject
Returns:
The name

getID

public int getID()
Description copied from interface: IWorkflowObject
Return the ID number of the object.
Specified by:
getID in interface IWorkflowObject
Following copied from interface: org.jwarp.flow.IWorkflowObject
Returns:
the id

©   O R C A   S y s t e m s