com.altair.hwm.toolkit.workflow
Class HWMWorkflowModel

java.lang.Object
  extended by javax.swing.tree.DefaultTreeModel
      extended by com.altair.hwm.toolkit.workflow.HWMWorkflowModel
All Implemented Interfaces:
IHWMWorkflow, java.io.Serializable, javax.swing.tree.TreeModel

public class HWMWorkflowModel
extends javax.swing.tree.DefaultTreeModel
implements IHWMWorkflow

Title: HWMWorkflowModel Description: Company: Altair Engineering, Inc.

See Also:
Serialized Form

Field Summary
static java.lang.String CURRENT_SCNODE_PROP_NAME
           
static java.lang.String CURRENT_TASK_PROP_NAME
           
static java.lang.String NODE_DOCKABLE_STATE_PROP_NAME
           
static java.lang.String NODE_ENABLE_STATE_PROP_NAME
           
static java.lang.String NODE_PLAYOPTIONS_PROP_NAME
           
static java.lang.String NODE_STATE_PROP_NAME
           
static java.lang.String NODE_VISIBLE_STATE_PROP_NAME
           
static java.lang.String SELECTED_NODE_PROP_NAME
           
static short TCLPROC_CLOSE
           
static short TCLPROC_DISPLAY
           
static short TCLPROC_EXECUTE
           
static short TCLPROC_NONE
          These constants signify what method in the TCL file hould be called - execute, display or none
static java.lang.String TEMPLATE_VERSION
           
static java.lang.String VERSION
           
 
Fields inherited from interface com.altair.hwm.interfaces.IHWMWorkflow
PLAYOPTION_BREAKPOINT, PLAYOPTION_PLAYABLE, PLAYOPTION_SKIP, STATE_COMPLETED, STATE_ERROR, STATE_INPROGRESS, STATE_NOTDONE
 
Constructor Summary
HWMWorkflowModel(HWMModelInstance hwmModelInstance)
          Constructor
HWMWorkflowModel(javax.swing.tree.TreeNode nodeRoot, boolean bAllowsChildren)
          Constructor
HWMWorkflowModel(javax.swing.tree.TreeNode nodeRoot, HWMModelInstance hwmModelInstance)
          Constructor
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listenerProp)
          Adds a propertyChangeListener
 void addPropertyChangeListener(java.lang.String szPropName, java.beans.PropertyChangeListener listenerProp)
          Adds a propertyChangeListener
 void AddToolkitEventListener(HWMToolkitEventListener listenerEvent)
          Adds a HWMToolkitEventListener
 void addWorkflowEventListener(HWMWorkflowEventListener hwmWorkflowEventListener)
          Add a workflow listener
 void ClearAll()
          Clear the workflow
 void CloseDisplayedTCLPanel(HWMWorkflowNode hwmNode)
          Utility method to close the currently displayed TCL panel
 void CloseHWSession()
          Close the communication session with HW.
 void CopyWorkflowStateToActiveRun()
          Copy the current workflow state to the active run model
 HWMWorkflowNode CreateWorkflowNode(java.lang.Object objUserObject, boolean bAllowsChildren)
          Create a new node with the given attributes
 void DeleteCustomWorkflowView()
          Deletes all beans from the vector of beans and clears the page.
 void ExecuteTaskInRunMode()
          NOTE: THis is because damn TCL does not support threads on UNIX and hence the slightly bigger language comes to the rescue once again :-) NOTE: Please use this only in TCL mode Execute the current task in run mode and at the end move to the next task.
 void ExecuteTCLScript(HWMWorkflowNode hwmWrkflowNode, short nOption)
          Utility method that sources the TCL script and either calls Display or Execute depending on bExecute flag
 HWMWorkflowNode FindTaskByName(java.lang.String strTaskName)
          Find the task with given name
 HWMWorkflowNode FindTaskByPath(java.lang.String strTaskPath)
          Find the task with given the path from the root
 void FireReplayCompleted()
          Fire the toolkit event to signify the end of run
 void fireWorkflowEvent(java.lang.Object objSrc, int nEvtType, java.lang.String strTaskName, int nTaskState, int nTaskPlayOption)
          Fire the workflow event
 java.util.Vector GetAllTaskNames()
          Get the vector of task names present in the workflow
 java.util.Vector GetAllTaskNamesAlongWithRootTask()
          returns the vector of all task names along with root task...
 java.lang.String GetAllVisibleTaskNames()
           
 int GetAppType()
          Get the application type
 java.util.Vector GetBeansInCurrentTask()
          Get all the beans in the page associated with the current task.
 java.lang.Object getChild(java.lang.Object objParent, int nIndex)
          Returns the child at the specified index
 java.lang.Object GetChildAtIndex(java.lang.Object objParent, int nIndex)
          Returns the child at the specified index even if its not visible
 int getChildCount(java.lang.Object objParent)
          Returns the number of children
 java.lang.String GetChildrenNames(java.lang.String strParentNodeName)
          Get the names of children as a space separated string
 HWMWorkflowNode GetCurrentShortCut()
          Returns the current shortcut task
 HWMWorkflowNode GetCurrentTask()
          Returns the current task/folder
 HWMWorkflowNode GetCurrentTaskDisplayed()
          Returns the current displayed task
 java.lang.String GetCurrentTaskName()
          Get current task name
 int GetCurrentTaskPlayOption()
          Get current task's play option
 int GetCurrentTaskState()
          Get current task state
 java.awt.Component GetCustomWorkflowView()
          Get the custom workflow view
 HWMWorkflowNode GetFirstTask()
          Returns the first task of the workflow.
static HWMGraphView getGraphViewMgr()
          gives the information of flow chart
 java.lang.String GetImageFilenameOnPage()
          GetImageFile name on page....
 int getIndexOfChild(java.lang.Object objParent, java.lang.Object objChild)
          Returns the index of the child
 HWMWorkflowNode GetNextTaskNode()
          Get the next task node
 HWMWorkflowNode GetNextTaskNode(HWMWorkflowNode hwmWorkflowNode)
          Get the next task node
 java.util.Vector GetNodeImmediateChildren(HWMWorkflowNode nodeParent)
          This method returns a vector of immediate children nodes for this parent.
 java.util.Vector GetNodeRecursiveChildren(HWMWorkflowNode nodeParent)
          This method returns a vector of node children for the parent.
 java.lang.String GetParentNodeName(java.lang.String strNodeName)
          Get the name of the parent node
 HWMWorkflowNode GetPrevTaskNode()
          Get the previous task node
 HWMWorkflowNode GetPrevTaskNode(HWMWorkflowNode hwmWorkflowNode)
          Get the previous task node
 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
 int GetTotalChildCount(java.lang.Object objParent)
          Returns the number of children (both visible and non-visible)
 java.lang.String GetWorkflowStructure()
          Creates the workFlow structure for HWMPM as a string.
 void GotoTask(java.lang.String strTaskName)
          Got to the given task
 void GotoTaskByName(java.lang.String strTaskName)
          Go to the task with given name
 void InitCustomWorkflowView(IHWMFrameWork hwmFrameWork)
          Initializes the custom view bean.
 void Initialize(IHWMFrameWork hwmFrameWork, boolean bPMMode)
          Initializes the workflow.
 void InitializeTask()
          Initializes the task in workflow.
 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 IsDesignMode()
          Returns the designer mode flag
 java.lang.String isImageFileVisibilityStatusOnPage()
          gives the information of the image file on page..
 boolean isLeaf(java.lang.Object objNode)
          Returns whether the node is a leaf or not
 boolean IsNodeNameUnique(HWMWorkflowNode hwmNode, java.lang.String strNodeName)
          Checks if there are any nodes with the given name.
 boolean IsNodeVisible(HWMWorkflowNode hwmNode)
          Check if the given node is visible and if all it's parents are visible too.
 boolean IsRunInProgress()
          Returns a flag to indicate if run is in progress
 void IsWorkflowModelValid()
          Check if the workflow model is valid.
 void LoadProject(java.io.ObjectInputStream streamInput)
          Loads this class
 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 ReadWorkflowModel_3_0(org.jdom.Element elemWorkflow)
          In the prj file from V 3.0 save only the states of each task in XML format
 void ReadWorkflowModel_4_0(org.jdom.Element elemWorkflow)
          In the prj file from V 4.0 save only the states of each task in XML format
 void ReadWorkflowModel(org.jdom.Element elemWorkflow)
          In the prj file from V 6.0 save only the states of each task in XML format
 void removePropertyChangeListener(java.beans.PropertyChangeListener listenerProp)
          Removes a propertyChangeListener
 void removePropertyChangeListener(java.lang.String szPropName, java.beans.PropertyChangeListener listenerProp)
          Removes a propertyChangeListener
 void RemoveToolkitEventListener(HWMToolkitEventListener listenerEvt)
          Removes a HWMToolkitEventListener
 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 RunOnMainThread(int nRunMode)
          NOTE: THis is because damn TCL does not support threads on UNIX and hence the slightly bigger language comes to the rescue once again :-) NOTE: Please use this only in TCL mode Execute Run either from start or current task on the main thread.
 void SaveProject(java.io.ObjectOutputStream streamOut)
          Saves this class
 void SetCurrentTask(HWMWorkflowNode nodeCurrentTask)
          Sets the current task/folder
 void SetCurrentTask(HWMWorkflowNode nodeCurrentTask, java.lang.Object objCaller, short nOption)
          Sets the current task/folder
 void SetCurrentTaskPlayOption(int nPlayOption)
          Set current task's play option
 void SetCurrentTaskState(int nState)
          Set current task state
 void SetCustomWorkflowView(java.awt.Component compCustomWorkflow)
          Set the custom workflow view
 void SetDesignMode(boolean bDesignMode)
          Sets the designer mode flag
 void SetTaskDockable(java.lang.Object objSrc, HWMWorkflowNode hwmNode, boolean bDockable)
          Set the given task property IsDockable to true or false
 void SetTaskDockable(java.lang.String strTaskName, boolean bDockable)
          Docks/undocks the task
 void SetTaskEnabled(java.lang.String strTaskName, boolean bEnabled)
          ENABLE/DISABLE all tasks in the vector
 void SetTaskPlayOption(java.lang.Object objSrc, HWMWorkflowNode hwmNode, int nPlayOption)
          Set task's play option
 void SetTaskPlayOption(java.lang.String strTaskName, int nPlayOption)
          Set task's play option
 void SetTasksEnabled(java.lang.Object objSrc, java.util.Vector vectTasks, boolean bEnabled)
          Set the given tasks ENABLE state to true or false
 void SetTasksEnabled(java.util.Vector vectTaskNames, boolean bEnabled)
          ENABLE/DISABLE all tasks in the vector
 void SetTaskState(java.lang.Object objSrc, HWMWorkflowNode hwmNode, int nState)
          Set task's state
 void SetTaskState(java.lang.String strTaskName, int nState)
          Set task's state
 void SetTasksVisible(java.lang.Object objSrc, java.util.Vector vectTasks, boolean bVisible)
          Set the given tasks visibility to true or false
 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 running the process
 void TCLClose(HWMClientComm hwmClientComm, HWMWorkflowNode hwmNode, java.lang.String strCmd)
          Utility method that closes the TCL UI
 void TCLDisplay(HWMClientComm hwmClientComm, HWMWorkflowNode hwmNode, java.lang.String strCmd)
          Utility method that displays the TCL script
 void TCLExecute(HWMClientComm hwmClientComm, HWMWorkflowNode hwmNode, java.lang.String strCmd)
          Utility method that executes the TCL script
 void WriteWorkflowModel(org.jdom.Element elemWorkflow)
          In the prj file from V 6.0 save only the states of each task in XML format
 
Methods inherited from class javax.swing.tree.DefaultTreeModel
addTreeModelListener, asksAllowsChildren, getListeners, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TCLPROC_NONE

public static final short TCLPROC_NONE
These constants signify what method in the TCL file hould be called - execute, display or none

See Also:
Constant Field Values

TCLPROC_DISPLAY

public static final short TCLPROC_DISPLAY
See Also:
Constant Field Values

TCLPROC_EXECUTE

public static final short TCLPROC_EXECUTE
See Also:
Constant Field Values

TCLPROC_CLOSE

public static final short TCLPROC_CLOSE
See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values

TEMPLATE_VERSION

public static final java.lang.String TEMPLATE_VERSION
See Also:
Constant Field Values

CURRENT_TASK_PROP_NAME

public static final java.lang.String CURRENT_TASK_PROP_NAME
See Also:
Constant Field Values

SELECTED_NODE_PROP_NAME

public static final java.lang.String SELECTED_NODE_PROP_NAME
See Also:
Constant Field Values

CURRENT_SCNODE_PROP_NAME

public static final java.lang.String CURRENT_SCNODE_PROP_NAME
See Also:
Constant Field Values

NODE_STATE_PROP_NAME

public static final java.lang.String NODE_STATE_PROP_NAME
See Also:
Constant Field Values

NODE_VISIBLE_STATE_PROP_NAME

public static final java.lang.String NODE_VISIBLE_STATE_PROP_NAME
See Also:
Constant Field Values

NODE_ENABLE_STATE_PROP_NAME

public static final java.lang.String NODE_ENABLE_STATE_PROP_NAME
See Also:
Constant Field Values

NODE_PLAYOPTIONS_PROP_NAME

public static final java.lang.String NODE_PLAYOPTIONS_PROP_NAME
See Also:
Constant Field Values

NODE_DOCKABLE_STATE_PROP_NAME

public static final java.lang.String NODE_DOCKABLE_STATE_PROP_NAME
See Also:
Constant Field Values
Constructor Detail

HWMWorkflowModel

public HWMWorkflowModel(HWMModelInstance hwmModelInstance)
Constructor


HWMWorkflowModel

public HWMWorkflowModel(javax.swing.tree.TreeNode nodeRoot,
                        HWMModelInstance hwmModelInstance)
Constructor

Parameters:
nodeRoot - The root node of the tree

HWMWorkflowModel

public HWMWorkflowModel(javax.swing.tree.TreeNode nodeRoot,
                        boolean bAllowsChildren)
Constructor

Parameters:
nodeRoot - The root node of the tree
bAllowsChildren - True if node can have children
Method Detail

SetDesignMode

public void SetDesignMode(boolean bDesignMode)
Sets the designer mode flag

Parameters:
bDesignMode - If true then design mode else app mode

IsDesignMode

public boolean IsDesignMode()
Returns the designer mode flag

Returns:
boolean If design mode then true else false

ClearAll

public void ClearAll()
Clear the workflow


GetCurrentShortCut

public HWMWorkflowNode GetCurrentShortCut()
Returns the current shortcut task

Returns:
HWMWorkflowNode The current shortcut task

GetCurrentTaskDisplayed

public HWMWorkflowNode GetCurrentTaskDisplayed()
Returns the current displayed task

Returns:
HWMWorkflowNode The current task

GetCurrentTask

public HWMWorkflowNode GetCurrentTask()
Returns the current task/folder

Returns:
HWMWorkflowNode The current task/folder

SetCurrentTask

public void SetCurrentTask(HWMWorkflowNode nodeCurrentTask)
Sets the current task/folder

Parameters:
nodeCurrentTask - The new current task/folder

SetCurrentTask

public void SetCurrentTask(HWMWorkflowNode nodeCurrentTask,
                           java.lang.Object objCaller,
                           short nOption)
Sets the current task/folder

Parameters:
nodeCurrentTask - The new current task/folder
objCaller - A ref to the object that called this method. In the
nOption - The option to execute/display or do nothing Event object, it is stored as the source of the event.

GetFirstTask

public HWMWorkflowNode GetFirstTask()
Returns the first task of the workflow.

Parameters:
HWMWorkflowNode - The first task node or null.

SetTaskState

public void SetTaskState(java.lang.Object objSrc,
                         HWMWorkflowNode hwmNode,
                         int nState)
                  throws java.lang.Exception
Set task's state

Parameters:
objSrc - The source for this call
hwmNode - The task node whose state should be changed
nState - The task state
Throws:
java.lang.Exception - If the task is not present

SetTasksVisible

public void SetTasksVisible(java.lang.Object objSrc,
                            java.util.Vector vectTasks,
                            boolean bVisible)
                     throws java.lang.Exception
Set the given tasks visibility to true or false

Parameters:
objSrc - The source for this call
vectTasks - The vector of tasks whose state should be changed
bVisible - The visible state
Throws:
java.lang.Exception - If the task is not present

SetTasksEnabled

public void SetTasksEnabled(java.lang.Object objSrc,
                            java.util.Vector vectTasks,
                            boolean bEnabled)
                     throws java.lang.Exception
Set the given tasks ENABLE state to true or false

Parameters:
objSrc - The source for this call
vectTasks - The vector of tasks whose state should be changed
bEnabled - - The ENABLE state (TRUE/FALSE)
Throws:
java.lang.Exception - If the task is not present

SetTaskPlayOption

public void SetTaskPlayOption(java.lang.Object objSrc,
                              HWMWorkflowNode hwmNode,
                              int nPlayOption)
                       throws java.lang.Exception
Set task's play option

Parameters:
objSrc - The source for this call
hwmNode - The task node whose state should be changed
nPlayOption - The task's play option
Throws:
java.lang.Exception - If the task is not present

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listenerProp)
Adds a propertyChangeListener

Parameters:
listenerProp - The listener

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listenerProp)
Removes a propertyChangeListener

Parameters:
listenerProp - The listener

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String szPropName,
                                      java.beans.PropertyChangeListener listenerProp)
Adds a propertyChangeListener

Parameters:
szPropName - The property to listener for
listenerProp - The listener

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String szPropName,
                                         java.beans.PropertyChangeListener listenerProp)
Removes a propertyChangeListener

Parameters:
szPropName - The property to listener for.
listenerProp - The listener

AddToolkitEventListener

public void AddToolkitEventListener(HWMToolkitEventListener listenerEvent)
Adds a HWMToolkitEventListener

Parameters:
listenerEvent - The listener to add

RemoveToolkitEventListener

public void RemoveToolkitEventListener(HWMToolkitEventListener listenerEvt)
Removes a HWMToolkitEventListener

Parameters:
listenerEvent - The listener to remove

getIndexOfChild

public int getIndexOfChild(java.lang.Object objParent,
                           java.lang.Object objChild)
Returns the index of the child

Specified by:
getIndexOfChild in interface javax.swing.tree.TreeModel
Overrides:
getIndexOfChild in class javax.swing.tree.DefaultTreeModel
Parameters:
objParent - The parent node
objChild - The child node

isLeaf

public boolean isLeaf(java.lang.Object objNode)
Returns whether the node is a leaf or not

Specified by:
isLeaf in interface javax.swing.tree.TreeModel
Overrides:
isLeaf in class javax.swing.tree.DefaultTreeModel
Parameters:
objNode - The node to test
Returns:
boolean True if leaf, false if not.

getChildCount

public int getChildCount(java.lang.Object objParent)
Returns the number of children

Specified by:
getChildCount in interface javax.swing.tree.TreeModel
Overrides:
getChildCount in class javax.swing.tree.DefaultTreeModel
Parameters:
objParent - The parent node
Returns:
int The number of visible children

GetTotalChildCount

public int GetTotalChildCount(java.lang.Object objParent)
Returns the number of children (both visible and non-visible)

Parameters:
objParent - The parent node
Returns:
int The number of visible children

getChild

public java.lang.Object getChild(java.lang.Object objParent,
                                 int nIndex)
Returns the child at the specified index

Specified by:
getChild in interface javax.swing.tree.TreeModel
Overrides:
getChild in class javax.swing.tree.DefaultTreeModel
Parameters:
objParent - The parent
nIndex - The index of the child
Returns:
Object The child

GetChildAtIndex

public java.lang.Object GetChildAtIndex(java.lang.Object objParent,
                                        int nIndex)
Returns the child at the specified index even if its not visible

Parameters:
objParent - The parent
nIndex - The index of the child
Returns:
Object The child

GetAppType

public int GetAppType()
Get the application type

Returns:
int The application type

CloseHWSession

public void CloseHWSession()
Close the communication session with HW. This is called when PM instructs EPIC to shutdown and PM itself is exiting.


ExecuteTCLScript

public void ExecuteTCLScript(HWMWorkflowNode hwmWrkflowNode,
                             short nOption)
                      throws java.lang.Exception
Utility method that sources the TCL script and either calls Display or Execute depending on bExecute flag

Parameters:
hwmWrkflowNode - The workflow node whose task should be executed
nOption - The option to execute/display or do nothing
Throws:
java.lang.Exception - If any error occurs

TCLDisplay

public void TCLDisplay(HWMClientComm hwmClientComm,
                       HWMWorkflowNode hwmNode,
                       java.lang.String strCmd)
                throws java.lang.Exception
Utility method that displays the TCL script

Parameters:
hwmClientComm - The client communication
hwmNode - The workflow node whose task should be displayed
strCmd - The cmd to send. More cmds will be appended to this
Throws:
java.lang.Exception - If any error occurs

TCLExecute

public void TCLExecute(HWMClientComm hwmClientComm,
                       HWMWorkflowNode hwmNode,
                       java.lang.String strCmd)
                throws java.lang.Exception
Utility method that executes the TCL script

Parameters:
hwmClientComm - The client communication
hwmNode - The workflow node whose task should be executed
strCmd - The cmd to send. More cmds will be appended to this
Throws:
java.lang.Exception - If any error occurs

TCLClose

public void TCLClose(HWMClientComm hwmClientComm,
                     HWMWorkflowNode hwmNode,
                     java.lang.String strCmd)
              throws java.lang.Exception
Utility method that closes the TCL UI

Parameters:
hwmClientComm - The client communication
hwmNode - The workflow node whose task should be closed
strCmd - The cmd to send. More cmds will be appended to this
Throws:
java.lang.Exception - If any error occurs

GetNodeRecursiveChildren

public java.util.Vector GetNodeRecursiveChildren(HWMWorkflowNode nodeParent)
                                          throws java.lang.Exception
This method returns a vector of node children for the parent.

Parameters:
nodeParent - The node to get the children from
Returns:
java.util.Vector The children
Throws:
java.lang.Exception

GetNodeImmediateChildren

public java.util.Vector GetNodeImmediateChildren(HWMWorkflowNode nodeParent)
                                          throws java.lang.Exception
This method returns a vector of immediate children nodes for this parent.

Parameters:
nodeParent - The node to get the children from
Returns:
java.util.Vector The children
Throws:
java.lang.Exception

GetParentNodeName

public java.lang.String GetParentNodeName(java.lang.String strNodeName)
                                   throws java.lang.Exception
Get the name of the parent node

Parameters:
The - parent node name
Throws:
java.lang.Exception

GetChildrenNames

public java.lang.String GetChildrenNames(java.lang.String strParentNodeName)
                                  throws java.lang.Exception
Get the names of children as a space separated string

Throws:
java.lang.Exception

GetAllVisibleTaskNames

public java.lang.String GetAllVisibleTaskNames()
                                        throws java.lang.Exception
Throws:
java.lang.Exception

CloseDisplayedTCLPanel

public void CloseDisplayedTCLPanel(HWMWorkflowNode hwmNode)
Utility method to close the currently displayed TCL panel

Parameters:
The - workflow node whose TCL panel should be closed [if its displayed]. if null, the current displayed node is closed (if tcl) Note: Changed the protected to public by Binu Panicker on Jan 9th 2003. This is done to allow the HWPMInteraction class to call this method when the "EpicCloseTaskModule" messaged is received

GetNextTaskNode

public HWMWorkflowNode GetNextTaskNode()
                                throws java.lang.Exception
Get the next task node

Returns:
HWMWorkflowNode The next node. null if it is the last task
Throws:
java.lang.Exception

GetPrevTaskNode

public HWMWorkflowNode GetPrevTaskNode()
                                throws java.lang.Exception
Get the previous task node

Returns:
HWMWorkflowNode The previous node. null if it is the first task
Throws:
java.lang.Exception

GetNextTaskNode

public HWMWorkflowNode GetNextTaskNode(HWMWorkflowNode hwmWorkflowNode)
                                throws java.lang.Exception
Get the next task node

Parameters:
hwmWorkflowNode - The node whose next node should be returned
Returns:
HWMWorkflowNode The next node. null if it is the last task
Throws:
java.lang.Exception

GetPrevTaskNode

public HWMWorkflowNode GetPrevTaskNode(HWMWorkflowNode hwmWorkflowNode)
                                throws java.lang.Exception
Get the previous task node

Parameters:
hwmWorkflowNode - The node whose prev node should be returned
Returns:
HWMWorkflowNode The previous node. null if it is the first task
Throws:
java.lang.Exception

IsNodeVisible

public boolean IsNodeVisible(HWMWorkflowNode hwmNode)
Check if the given node is visible and if all it's parents are visible too.

Parameters:
hwmNode - The node whose hierarchy should be checked for visiblity
Returns:
boolean true if visible else false

FindTaskByName

public HWMWorkflowNode FindTaskByName(java.lang.String strTaskName)
                               throws java.lang.Exception
Find the task with given name

Parameters:
strTaskName - The task name
Returns:
HWMWorkflowNode The workflow node with given name
Throws:
java.lang.Exception - If the given task name cannot be found

FindTaskByPath

public HWMWorkflowNode FindTaskByPath(java.lang.String strTaskPath)
                               throws java.lang.Exception
Find the task with given the path from the root

Parameters:
strTaskPath - The task path
Returns:
HWMWorkflowNode The workflow node with given task path
Throws:
java.lang.Exception - If the given task path cannot be found

CreateWorkflowNode

public HWMWorkflowNode CreateWorkflowNode(java.lang.Object objUserObject,
                                          boolean bAllowsChildren)
Create a new node with the given attributes

Parameters:
objUserObject - The object stored in the node
bAllowsChildren - True if accepts children, false if not.

IsNodeNameUnique

public boolean IsNodeNameUnique(HWMWorkflowNode hwmNode,
                                java.lang.String strNodeName)
Checks if there are any nodes with the given name. If yes - it will return false else true

Parameters:
hwmNode - The node whose name is to be checked for uniqueness
strNodeName - The name of the given node
Returns:
boolean true if it is unique else false

SetCustomWorkflowView

public void SetCustomWorkflowView(java.awt.Component compCustomWorkflow)
Set the custom workflow view


GetCustomWorkflowView

public java.awt.Component GetCustomWorkflowView()
Get the custom workflow view


InitCustomWorkflowView

public void InitCustomWorkflowView(IHWMFrameWork hwmFrameWork)
Initializes the custom view bean.

Parameters:
iFrameWork - The frame work interface

Initialize

public void Initialize(IHWMFrameWork hwmFrameWork,
                       boolean bPMMode)
                throws java.lang.Exception
Initializes the workflow. This will initialize the custom view and also the model

Parameters:
hwmFrameWork - The frame work interface
bPMMode - If PM interaction is on - then this is true, else false
Throws:
java.lang.Exception

InitializeTask

public void InitializeTask()
Initializes the task in workflow. It will set the curr task so that PM will get the notification and the tcl file (if associated with the task) is sourced in PM mode.


DeleteCustomWorkflowView

public void DeleteCustomWorkflowView()
Deletes all beans from the vector of beans and clears the page. If any applet was added... it will stop the applet.


GetWorkflowStructure

public java.lang.String GetWorkflowStructure()
Creates the workFlow structure for HWMPM as a string. workFlow structure is a space separated string, where each item is a quoted, dot separated path to a task in the tree (as shown below). { Branch taskName taskState playOption type visible enabled {displayName} } Branch - the path from root to the task (using unique names rather than display names) taskName - the unique name for the task taskState - the state the task is in i.e. done, notDone, workInProgress and error playOption - the option for the task i.e. 0 (for PLAYABLE), 1 (for BREAKPOINT), 2 (for SKIP) type - can be "task" or "folder" visible - can be true or false enable - can be true or false displayName - the display name for the task


GetAllTaskNames

public java.util.Vector GetAllTaskNames()
Get the vector of task names present in the workflow

Returns:
Vector The vector of tasks in the order in which they appear in the workflow.

addWorkflowEventListener

public void addWorkflowEventListener(HWMWorkflowEventListener hwmWorkflowEventListener)
Add a workflow listener

Specified by:
addWorkflowEventListener in interface IHWMWorkflow
Parameters:
hwmWorkflowEventListener - The listener object

removeWorkflowEventListener

public void removeWorkflowEventListener(HWMWorkflowEventListener hwmWorkflowEventListener)
Remove the workflow listener

Specified by:
removeWorkflowEventListener in interface IHWMWorkflow
Parameters:
hwmWorkflowEventListener - The listener object

fireWorkflowEvent

public void fireWorkflowEvent(java.lang.Object objSrc,
                              int nEvtType,
                              java.lang.String strTaskName,
                              int nTaskState,
                              int nTaskPlayOption)
Fire the workflow event

Parameters:
objSrc - The source object
nEvtType - The type of the event
strTaskName - The name of the task
nTaskState - The state of the task
nTaskPlayOption - The play option for the task

FireReplayCompleted

public void FireReplayCompleted()
Fire the toolkit event to signify the end of run


LoadProject

public void LoadProject(java.io.ObjectInputStream streamInput)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Loads this class

Parameters:
streamInput - The input stream to read from
Throws:
java.io.IOException
java.lang.ClassNotFoundException

SaveProject

public void SaveProject(java.io.ObjectOutputStream streamOut)
                 throws java.io.IOException
Saves this class

Parameters:
streamOut - The stream to write to
Throws:
java.io.IOException

ReadWorkflowModel_3_0

public void ReadWorkflowModel_3_0(org.jdom.Element elemWorkflow)
                           throws java.lang.Exception
In the prj file from V 3.0 save only the states of each task in XML format

Parameters:
elemWrkflow - The workflow element
Throws:
java.lang.Exception

ReadWorkflowModel_4_0

public void ReadWorkflowModel_4_0(org.jdom.Element elemWorkflow)
                           throws java.lang.Exception
In the prj file from V 4.0 save only the states of each task in XML format

Parameters:
elemWrkflow - The workflow element Note: Added the Node ENABLE/DISBALE state
Throws:
java.lang.Exception

ReadWorkflowModel

public void ReadWorkflowModel(org.jdom.Element elemWorkflow)
                       throws java.lang.Exception
In the prj file from V 6.0 save only the states of each task in XML format

Parameters:
elemWrkflow - The workflow element
Throws:
java.lang.Exception

WriteWorkflowModel

public void WriteWorkflowModel(org.jdom.Element elemWorkflow)
In the prj file from V 6.0 save only the states of each task in XML format

Parameters:
elemWrkflow - The workflow element

IsWorkflowModelValid

public void IsWorkflowModelValid()
                          throws java.lang.Exception
Check if the workflow model is valid. There should be atleast one task and every task should be associated with a page or tcl module

Throws:
java.lang.Exception - If the workflow model is not valid.

RunOnMainThread

public void RunOnMainThread(int nRunMode)
NOTE: THis is because damn TCL does not support threads on UNIX and hence the slightly bigger language comes to the rescue once again :-) NOTE: Please use this only in TCL mode Execute Run either from start or current task on the main thread. So here we need to execute one task at a time.

Parameters:
nRunMode - If 0 - execute from task else current task

ExecuteTaskInRunMode

public void ExecuteTaskInRunMode()
NOTE: THis is because damn TCL does not support threads on UNIX and hence the slightly bigger language comes to the rescue once again :-) NOTE: Please use this only in TCL mode Execute the current task in run mode and at the end move to the next task. If the current task is a folder - no sweat - do not execute it and proceed If the current task has a break point - stop the run mode. If the task execution fails - stop the run after displaying the task. If the task execution succeeds, move to the next task and let tcl know that it can execute the next task. If this is the last task - stop the execution


IsBeanInTask

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

Specified by:
IsBeanInTask in interface IHWMWorkflow
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

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

Specified by:
IsCurrentTaskTCLEnabled in interface IHWMWorkflow
Returns:
boolean true if the task is displayed in TCL else false

IsBeanDisplayedInTCL

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

Specified by:
IsBeanDisplayedInTCL in interface IHWMWorkflow
Returns:
boolean true if the bean is being displayed in TCL else false

NextTask

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

Specified by:
NextTask in interface IHWMWorkflow
Throws:
java.lang.Exception - If the next task cannot be shown

PrevTask

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

Specified by:
PrevTask in interface IHWMWorkflow
Throws:
java.lang.Exception - If the previous task cannot be shown

GotoTask

public void GotoTask(java.lang.String strTaskName)
              throws java.lang.Exception
Got to the given task

Specified by:
GotoTask in interface IHWMWorkflow
Parameters:
strTaskName - 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

Specified by:
GotoTaskByName in interface IHWMWorkflow
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.

Specified by:
GetBeansInCurrentTask in interface IHWMWorkflow
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

Specified by:
GetCurrentTaskName in interface IHWMWorkflow
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

Specified by:
SetCurrentTaskState in interface IHWMWorkflow
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

Specified by:
SetCurrentTaskPlayOption in interface IHWMWorkflow
Parameters:
nPlayOption - The current task's play option
Throws:
java.lang.Exception - If the current task is null

SetTaskVisible

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

Specified by:
SetTaskVisible in interface IHWMWorkflow
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

Specified by:
SetTasksVisible in interface IHWMWorkflow
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

Specified by:
SetTasksEnabled in interface IHWMWorkflow
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
ENABLE/DISABLE all tasks in the vector

Specified by:
SetTaskEnabled in interface IHWMWorkflow
Parameters:
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

SetTaskState

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

Specified by:
SetTaskState in interface IHWMWorkflow
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

Specified by:
SetTaskPlayOption in interface IHWMWorkflow
Parameters:
strTaskName - The name of the task
nPlayOption - The task's play option
Throws:
java.lang.Exception - If the task is not present

GetCurrentTaskState

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

Specified by:
GetCurrentTaskState in interface IHWMWorkflow
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

Specified by:
GetCurrentTaskPlayOption in interface IHWMWorkflow
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

Specified by:
GetTaskState in interface IHWMWorkflow
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

Specified by:
GetTaskPlayOption in interface IHWMWorkflow
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()
          throws java.lang.Exception
Play the current task

Specified by:
Play in interface IHWMWorkflow
Throws:
java.lang.Exception - If the current task is null or not playable

Play

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

Specified by:
Play in interface IHWMWorkflow
Parameters:
strTaskName - The name of the task to play
Throws:
java.lang.Exception - If the task is not present or not playable

Run

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

Specified by:
Run in interface IHWMWorkflow
Throws:
java.lang.Exception - If any error occurs

Run

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

Specified by:
Run in interface IHWMWorkflow
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

public void StopRun()
stop running the process

Specified by:
StopRun in interface IHWMWorkflow

IsRunInProgress

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

Specified by:
IsRunInProgress in interface IHWMWorkflow
Returns:
boolean If true - run is in progress else not.

CopyWorkflowStateToActiveRun

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

Specified by:
CopyWorkflowStateToActiveRun in interface IHWMWorkflow

SetWorkflowStateFromActiveRun

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

Specified by:
SetWorkflowStateFromActiveRun in interface IHWMWorkflow
Throws:
java.lang.Exception

GetImageFilenameOnPage

public java.lang.String GetImageFilenameOnPage()
GetImageFile name on page....

Returns:

isImageFileVisibilityStatusOnPage

public java.lang.String isImageFileVisibilityStatusOnPage()
gives the information of the image file on page..


getGraphViewMgr

public static HWMGraphView getGraphViewMgr()
gives the information of flow chart


GetAllTaskNamesAlongWithRootTask

public java.util.Vector GetAllTaskNamesAlongWithRootTask()
returns the vector of all task names along with root task...


SetTaskDockable

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

Specified by:
SetTaskDockable in interface IHWMWorkflow
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

SetTaskDockable

public void SetTaskDockable(java.lang.Object objSrc,
                            HWMWorkflowNode hwmNode,
                            boolean bDockable)
                     throws java.lang.Exception
Set the given task property IsDockable to true or false

Parameters:
objSrc - The source for this call
hwmNode - The task node whose dockable state should be changed
bDockable - The dockable state
Throws:
java.lang.Exception - If the task is not present

GetTaskDockable

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

Specified by:
GetTaskDockable in interface IHWMWorkflow
Parameters:
strTaskName - The name of the task, whose dockable property is to be known
Returns:
boolean The task state
Throws:
java.lang.Exception - If the task is not present