com.altair.hwm.interfaces
Interface IHWMWorkflow

All Known Implementing Classes:
HWMWorkflowModel

public interface IHWMWorkflow

Title: IHWMWorkflow

Description: The workflow interface will allow the beans to traverse thru the workflow.

NOTE: When using the GotoTask method, the name of the task and its path is given. If the workflow changes, the bean will now need to provide a new path. Hence, it is advisable to use a file which stores a map from required task name to its path.

Company: Altair Engineering, Inc.


Field Summary
static int PLAYOPTION_BREAKPOINT
           
static int PLAYOPTION_PLAYABLE
          The play options for a task
static int PLAYOPTION_SKIP
           
static int STATE_COMPLETED
           
static int STATE_ERROR
           
static int STATE_INPROGRESS
           
static int STATE_NOTDONE
          The states for a task
 
Method Summary
 void addWorkflowEventListener(HWMWorkflowEventListener hwmWorkflowEventListener)
          Add a workflow listener
 void CopyWorkflowStateToActiveRun()
          Copy the current workflow state to the active run model
 java.util.Vector GetBeansInCurrentTask()
          Get all the beans in the page associated with the current task.
 java.lang.String GetCurrentTaskName()
          Get current task name
 int GetCurrentTaskPlayOption()
          Get current task's play option
 int GetCurrentTaskState()
          Get current task state
 boolean GetTaskDockable(java.lang.String strTaskName)
          Get task's dockable state
 int GetTaskPlayOption(java.lang.String strTaskName)
          Get task's play option
 int GetTaskState(java.lang.String strTaskName)
          Get task's state
 void GotoTask(java.lang.String strTaskPath)
          Go to the task with given path
 void GotoTaskByName(java.lang.String strTaskName)
          Go to the task with given name
 boolean IsBeanDisplayedInTCL(java.lang.Object objBean)
          A flag indicating if the bean is being displayed in TCL
 boolean IsBeanInTask(java.lang.String strTaskName, java.lang.Object objBean)
          Check if the bean is part of the given task
 boolean IsCurrentTaskTCLEnabled()
          A flag indicating if the current task is displayed in TCL
 boolean IsRunInProgress()
          Returns a flag to indicate if run is in progress
 void NextTask()
          Got to the next task
 void Play()
          Play the current task
 void Play(java.lang.String strTaskName)
          Play the given task
 void PrevTask()
          Got to the previous task
 void removeWorkflowEventListener(HWMWorkflowEventListener hwmWorkflowEventListener)
          Remove the workflow listener
 void Run()
          Run from the first task
 void Run(java.lang.String strTaskName)
          Run from the given task
 void SetCurrentTaskPlayOption(int nPlayOption)
          Set current task's play option
 void SetCurrentTaskState(int nState)
          Set current task state
 void SetTaskDockable(java.lang.String strTaskName, boolean bDockable)
          Docks/undocks the task
 void SetTaskEnabled(java.lang.String strTaskName, boolean bEnabled)
          Set the task ENABLE state to be TRUE/FALSE
 void SetTaskPlayOption(java.lang.String strTaskName, int nPlayOption)
          Set task's play option
 void SetTasksEnabled(java.util.Vector vectTaskNames, boolean bEnabled)
          Enable/Disable all tasks in the vector
 void SetTaskState(java.lang.String strTaskName, int nState)
          Set task's state
 void SetTasksVisible(java.util.Vector vectTaskNames, boolean bVisible)
          Show/hide all tasks in the vector
 void SetTaskVisible(java.lang.String strTaskName, boolean bVisible)
          Set the task to be visible or not
 void SetWorkflowStateFromActiveRun()
          Set the current workflow state from the active run model
 void StopRun()
          Stop the "Run" process
 

Field Detail

STATE_NOTDONE

static final int STATE_NOTDONE
The states for a task

See Also:
Constant Field Values

STATE_INPROGRESS

static final int STATE_INPROGRESS
See Also:
Constant Field Values

STATE_COMPLETED

static final int STATE_COMPLETED
See Also:
Constant Field Values

STATE_ERROR

static final int STATE_ERROR
See Also:
Constant Field Values

PLAYOPTION_PLAYABLE

static final int PLAYOPTION_PLAYABLE
The play options for a task

See Also:
Constant Field Values

PLAYOPTION_BREAKPOINT

static final int PLAYOPTION_BREAKPOINT
See Also:
Constant Field Values

PLAYOPTION_SKIP

static final int PLAYOPTION_SKIP
See Also:
Constant Field Values
Method Detail

NextTask

void NextTask()
              throws java.lang.Exception
Got to the next task

Throws:
java.lang.Exception - If the next task cannot be shown

PrevTask

void PrevTask()
              throws java.lang.Exception
Got to the previous task

Throws:
java.lang.Exception - If the previous task cannot be shown

GotoTask

void GotoTask(java.lang.String strTaskPath)
              throws java.lang.Exception
Go to the task with given path

Parameters:
strTaskPath - The name of the task. It will be in the form of Root.Child1.Child2.taskname
Throws:
java.lang.Exception - If the given task cannot be shown

GotoTaskByName

void GotoTaskByName(java.lang.String strTaskName)
                    throws java.lang.Exception
Go to the task with given name

Parameters:
strTaskName - The name of the task.
Throws:
java.lang.Exception - If the given task cannot be shown

GetBeansInCurrentTask

java.util.Vector GetBeansInCurrentTask()
                                       throws java.lang.Exception
Get all the beans in the page associated with the current task.

Returns:
Vector of Objects. A vector of all the beans involved in the current task
Throws:
java.lang.Exception - If there is no current task

GetCurrentTaskName

java.lang.String GetCurrentTaskName()
                                    throws java.lang.Exception
Get current task name

Returns:
String The current task name
Throws:
java.lang.Exception - If the current task is null

SetCurrentTaskState

void SetCurrentTaskState(int nState)
                         throws java.lang.Exception
Set current task state

Parameters:
nState - The current task state
Throws:
java.lang.Exception - If the current task is null

SetCurrentTaskPlayOption

void SetCurrentTaskPlayOption(int nPlayOption)
                              throws java.lang.Exception
Set current task's play option

Parameters:
nPlayOption - The current task's play option
Throws:
java.lang.Exception - If the current task is null

SetTaskState

void SetTaskState(java.lang.String strTaskName,
                  int nState)
                  throws java.lang.Exception
Set task's state

Parameters:
strTaskName - The name of the task
nState - The task state
Throws:
java.lang.Exception - If the task is not present

SetTaskPlayOption

void SetTaskPlayOption(java.lang.String strTaskName,
                       int nPlayOption)
                       throws java.lang.Exception
Set task's play option

Parameters:
strTaskName - The name of the task
nPlayOption - The task's play option
Throws:
java.lang.Exception - If the task is not present

GetCurrentTaskState

int GetCurrentTaskState()
                        throws java.lang.Exception
Get current task state

Returns:
int The current task state
Throws:
java.lang.Exception - If the current task is null

GetCurrentTaskPlayOption

int GetCurrentTaskPlayOption()
                             throws java.lang.Exception
Get current task's play option

Returns:
int The current task's play option
Throws:
java.lang.Exception - If the current task is null

GetTaskState

int GetTaskState(java.lang.String strTaskName)
                 throws java.lang.Exception
Get task's state

Parameters:
strTaskName - The name of the task
Returns:
int The task state
Throws:
java.lang.Exception - If the task is not present

GetTaskPlayOption

int GetTaskPlayOption(java.lang.String strTaskName)
                      throws java.lang.Exception
Get task's play option

Parameters:
strTaskName - The name of the task
Returns:
int The task's play option
Throws:
java.lang.Exception - If the task is not present

Play

void Play()
          throws java.lang.Exception
Play the current task

Throws:
java.lang.Exception - If the current task is null or not playable

Play

void Play(java.lang.String strTaskName)
          throws java.lang.Exception
Play the given task

Parameters:
strTaskName - The name of the task to play
Throws:
java.lang.Exception - If the task is not present or not playable

Run

void Run()
         throws java.lang.Exception
Run from the first task

Throws:
java.lang.Exception - If any error occurs

Run

void Run(java.lang.String strTaskName)
         throws java.lang.Exception
Run from the given task

Parameters:
strTaskName - The name of the task to run from. If null, the process is run from the current task
Throws:
java.lang.Exception - If task is not present or if any error occurs

StopRun

void StopRun()
             throws java.lang.Exception
Stop the "Run" process

Throws:
java.lang.Exception - If any error occurs

SetTaskVisible

void SetTaskVisible(java.lang.String strTaskName,
                    boolean bVisible)
                    throws java.lang.Exception
Set the task to be visible or not

Parameters:
String - strTaskName The unique name for the task
bVisible - The flag that indicates if the task should be visible or not
Throws:
java.lang.Exception - If any error occurs

SetTasksVisible

void SetTasksVisible(java.util.Vector vectTaskNames,
                     boolean bVisible)
                     throws java.lang.Exception
Show/hide all tasks in the vector

Parameters:
vectTaskNames - The vector of unique name for the tasks
bVisible - The flag that indicates if the task should be visible or not
Throws:
java.lang.Exception - If any error occurs

SetTaskEnabled

void SetTaskEnabled(java.lang.String strTaskName,
                    boolean bEnabled)
                    throws java.lang.Exception
Set the task ENABLE state to be TRUE/FALSE

Parameters:
String - strTaskName The unique name for the task
bEnabled - - The flag that indicates if the task should be enabled or not
Throws:
java.lang.Exception - If any error occurs

SetTasksEnabled

void SetTasksEnabled(java.util.Vector vectTaskNames,
                     boolean bEnabled)
                     throws java.lang.Exception
Enable/Disable all tasks in the vector

Parameters:
vectTaskNames - The vector of unique name for the tasks
bEnabled - - The flag that indicates if the task should be enabled or not
Throws:
java.lang.Exception - If any error occurs

IsRunInProgress

boolean IsRunInProgress()
Returns a flag to indicate if run is in progress

Returns:
boolean If true - run is in progress else not.

addWorkflowEventListener

void addWorkflowEventListener(HWMWorkflowEventListener hwmWorkflowEventListener)
Add a workflow listener

Parameters:
hwmWorkflowEventListener - The listener object

removeWorkflowEventListener

void removeWorkflowEventListener(HWMWorkflowEventListener hwmWorkflowEventListener)
Remove the workflow listener

Parameters:
hwmWorkflowEventListener - The listener object

IsBeanInTask

boolean IsBeanInTask(java.lang.String strTaskName,
                     java.lang.Object objBean)
Check if the bean is part of the given task

Parameters:
strTaskName - The unique name for the task
objBean - The bean object
Returns:
boolean true if the bean is in the current task else false

IsCurrentTaskTCLEnabled

boolean IsCurrentTaskTCLEnabled()
A flag indicating if the current task is displayed in TCL

Returns:
boolean true if the task is displayed in TCL else false

IsBeanDisplayedInTCL

boolean IsBeanDisplayedInTCL(java.lang.Object objBean)
A flag indicating if the bean is being displayed in TCL

Returns:
boolean true if the bean is being displayed in TCL else false

CopyWorkflowStateToActiveRun

void CopyWorkflowStateToActiveRun()
Copy the current workflow state to the active run model


SetWorkflowStateFromActiveRun

void SetWorkflowStateFromActiveRun()
                                   throws java.lang.Exception
Set the current workflow state from the active run model

Throws:
java.lang.Exception

SetTaskDockable

void SetTaskDockable(java.lang.String strTaskName,
                     boolean bDockable)
                     throws java.lang.Exception
Docks/undocks the task

Parameters:
strTaskName - The unique name of the task
bDockable - The flag that indicates if the task should be dockable or not
Throws:
java.lang.Exception - If any error occurs

GetTaskDockable

boolean GetTaskDockable(java.lang.String strTaskName)
                        throws java.lang.Exception
Get task's dockable state

Parameters:
strTaskName - The name of the task
Returns:
boolean The task's dockable state
Throws:
java.lang.Exception - If the task is not present