com.jbbres.lib.actions.workflow
Class WorkflowEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.jbbres.lib.actions.workflow.WorkflowEvent
All Implemented Interfaces:
java.io.Serializable

public class WorkflowEvent
extends java.util.EventObject

A semantic event which indicates that a Workflow event related to the workflow execution occurred.

This event is generated by a Workflow during one of the stage of the execution.
The event is passed to every WorkflowListener object that registered to receive such events using the workflow' addWorkflowListener(WorkflowListener) method.

The object that implements the WorkflowListener interface gets this WorkflowEvent when the event occurs.

Since:
1.0.0
Version:
1.0.0
Author:
Jean-Baptiste Bres
See Also:
Serialized Form

Field Summary
static int WORKFLOW_FAILED
          The workflow has been executed but failed due to an error.
static int WORKFLOW_IN_PROGRESS
          The workflow is currently in execution.
static int WORKFLOW_STOPPED
          The workflow has been executed but stopped due to a request of the user.
static int WORKFLOW_SUCCEED
          The workflow has been executed and ended on a success.
static int WORKFLOW_SUSPENDED
          The workflow is in execution but suspended for the time being.
 
Constructor Summary
WorkflowEvent(Workflow source)
          Instantiates a new workflow event.
WorkflowEvent(Workflow source, int workflowStatus)
          Instantiates a new workflow event.
WorkflowEvent(Workflow source, int workflowStatus, java.lang.Object workflowResult)
          Instantiates a new workflow event.
 
Method Summary
 Workflow getSourceWorkflow()
          Returns the workflow that is the source of the event.
 java.lang.Object getWorkflowResult()
          Returns the object that has been generated as the result of the last action executed.
 int getWorkflowStatus()
          Returns status at the time the event occured.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WORKFLOW_SUCCEED

public static final int WORKFLOW_SUCCEED
The workflow has been executed and ended on a success.

See Also:
Constant Field Values

WORKFLOW_IN_PROGRESS

public static final int WORKFLOW_IN_PROGRESS
The workflow is currently in execution.

See Also:
Constant Field Values

WORKFLOW_SUSPENDED

public static final int WORKFLOW_SUSPENDED
The workflow is in execution but suspended for the time being.

See Also:
Constant Field Values

WORKFLOW_FAILED

public static final int WORKFLOW_FAILED
The workflow has been executed but failed due to an error.

See Also:
Constant Field Values

WORKFLOW_STOPPED

public static final int WORKFLOW_STOPPED
The workflow has been executed but stopped due to a request of the user.

See Also:
Constant Field Values
Constructor Detail

WorkflowEvent

public WorkflowEvent(Workflow source)
Instantiates a new workflow event.

Parameters:
source - - the workflow source of the event

WorkflowEvent

public WorkflowEvent(Workflow source,
                     int workflowStatus)
Instantiates a new workflow event.

Parameters:
source - - the workflow source of the event
workflowStatus - - the status of the workflow at the time the event occurs

WorkflowEvent

public WorkflowEvent(Workflow source,
                     int workflowStatus,
                     java.lang.Object workflowResult)
Instantiates a new workflow event.

Parameters:
source - - the workflow source of the event
workflowStatus - - the status of the workflow at the time the event occurs
workflowResult - - the result of the last action executed by the workflow
Method Detail

getSourceWorkflow

public Workflow getSourceWorkflow()
Returns the workflow that is the source of the event.

Returns:
the workflow that is the source of the event.

getWorkflowStatus

public int getWorkflowStatus()
Returns status at the time the event occured.

Returns:
The workflow current status

getWorkflowResult

public java.lang.Object getWorkflowResult()
Returns the object that has been generated as the result of the last action executed.
If the last action has no result, or if the execution is not finished or failed, this method returns null.

Returns:
The object that has been generated as result of the last action executed.


To file bugs or suggest feature enhancements, visit the app.jbbres.com Bug Reporter website.

Additional documentation available online at http://app.jbbres.com/actions/developers.

Copyright � 2009-2011 app.jbbres.com. All Rights Reserved.