com.altair.hwm.toolkit.workflow
Class HWMWorkflowAdapter

java.lang.Object
  extended by com.altair.hwm.toolkit.workflow.HWMWorkflowAdapter

public class HWMWorkflowAdapter
extends java.lang.Object

Title: HWMWorkflowAdapter

Description: The adapter class for the IHWMWorkflow interface

Company: Altair Engineering, Inc.


Constructor Summary
HWMWorkflowAdapter(HWMWorkflowModel hwmWorkflowModel)
          Constructor
 
Method Summary
 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 strTaskPathName)
          Go to the given task
 void GotoTaskByName(java.lang.String strTaskName)
          Go to the task with given name
 boolean IsRunning()
          Return a flag indicating if the process is currently running
 void NextTask()
          Got to the next task
 void Play(HWMWorkflowNode hwmNode, java.lang.Object objSrc)
          Play the current task
 void Play(java.lang.String strTaskName, java.lang.Object objSrc)
          Set the given task as the current task and play it
 void PrevTask()
          Got to the previous task
 void RunTask(HWMWorkflowNode hwmCurrNode, HWMWorkflowNode hwmNextNodeToPlay, java.lang.Object objSrc)
          Run the next task.
 void SetCurrentTaskPlayOption(int nPlayOption)
          Set current task's play option
 void SetCurrentTaskState(int nState)
          Set current task state
 void SetRun(boolean bRun)
          Set the "run' flag.
 void SetTaskDockable(java.lang.String strTaskName, boolean bDockable)
          Docks/undocks the task
 void SetTaskEnabled(java.lang.String strTaskName, boolean bEnabled)
          Set the ENABLE/DISABLE state of the task
 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HWMWorkflowAdapter

public HWMWorkflowAdapter(HWMWorkflowModel hwmWorkflowModel)
Constructor

Parameters:
hwmWorkflowModel - The workflow model
Method Detail

NextTask

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

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

PrevTask

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

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

GotoTask

public void GotoTask(java.lang.String strTaskPathName)
              throws java.lang.Exception
Go to the given task

Parameters:
strTaskPathName - 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

SetTaskVisible

public 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

public 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

SetTasksEnabled

public 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

SetTaskEnabled

public void SetTaskEnabled(java.lang.String strTaskName,
                           boolean bEnabled)
                    throws java.lang.Exception
Set the ENABLE/DISABLE state of the task

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

GetCurrentTaskState

public 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

public 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

public 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

public 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

public void Play(HWMWorkflowNode hwmNode,
                 java.lang.Object objSrc)
          throws java.lang.Exception
Play the current task

Parameters:
hwmNode - The current task/folder to play
objSrc - The responsible object/caller of this fn
Throws:
java.lang.Exception - If the current task is null or not playable

Play

public void Play(java.lang.String strTaskName,
                 java.lang.Object objSrc)
          throws java.lang.Exception
Set the given task as the current task and play it

Parameters:
strTaskName - The name of the task to play
objSrc - The responsible object/caller of this fn
Throws:
java.lang.Exception - If the task is not present or not playable

RunTask

public void RunTask(HWMWorkflowNode hwmCurrNode,
                    HWMWorkflowNode hwmNextNodeToPlay,
                    java.lang.Object objSrc)
Run the next task. This called when the OnResponseReceived event is fired in response to an earlier play

Parameters:
hwmCurrNode - The current workflow node that was just executed
hwmNextNodeToPlay - The next node to execute
objSrc - The responsible object/caller of this fn

SetRun

public void SetRun(boolean bRun)
Set the "run' flag.

Parameters:
bRun - The run flag

IsRunning

public boolean IsRunning()
Return a flag indicating if the process is currently running

Returns:
boolean If true, it is running else false

SetTaskDockable

public 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

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

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