wt.clients.workflow.initiate
Class InitiateWorkflowApplet

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byjava.applet.Applet
                  extended bywt.clients.workflow.initiate.InitiateWorkflowApplet
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class InitiateWorkflowApplet
extends Applet

See Also:
Serialized Form

Nested Class Summary
(package private)  class InitiateWorkflowApplet.SymAction
           
(package private)  class InitiateWorkflowApplet.SymItem
           
(package private)  class InitiateWorkflowApplet.WorkThread
          The work thread is used to place long operations in a separate WTThread so the AWT thread isn't tied up.
 
Nested classes inherited from class java.applet.Applet
Applet.AccessibleApplet
 
Nested classes inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
(package private)  WTContainerRef context_ref
           
private static String CONTROL
           
(package private)  Panel delayPanel
           
(package private)  Checkbox delayStartCheckbox
           
(package private)  TextField delayStartTextField
           
(package private)  Choice delayUnitsChoice
           
(package private)  Label descriptionLabel
           
(package private)  WTTextArea descriptionTextArea
           
private static String DISPLAY_NAME
           
(package private)  CheckboxGroup dueDateGroup
           
(package private)  TextField dueDateTextField
           
(package private)  Checkbox dueInCheckBox
           
(package private)  Panel dueInPanel
           
(package private)  TextField dueInTextField
           
(package private)  Choice dueInUnitsChoice
           
(package private)  Checkbox dueOnCheckBox
           
(package private)  Panel dueOnPanel
           
(package private)  Button helpButton
           
(package private)  NFHelpSystem helpSystem
           
(package private)  symantec.itools.awt.shape.HorizontalLine hLine1
           
(package private)  symantec.itools.awt.shape.HorizontalLine hLine2
           
(package private)  symantec.itools.awt.shape.HorizontalLine hLine3
           
(package private) static int LOCALIZE
           
(package private)  WfProcess myProcess
           
(package private)  WfProcessTemplate myTemplate
           
private  ThreadGroup myThreadGroup
           
(package private)  Choice priorityChoice
           
(package private)  Label priorityLabel
           
(package private)  Label processNameLabel
           
(package private)  TextField processNameTextField
           
(package private)  Label processVariablesLabel
           
(package private) static ResourceBundle RB
           
private static String REQUIRED
           
private static String RESOURCE
           
(package private)  Button startWorkflowButton
           
(package private)  RapidFind targetObjectFinder
           
(package private)  Label targetObjectLabel
           
(package private)  Label teamLabel
           
(package private)  JITProjectPanel teamTemplatePanel
           
private static String TYPE
           
private static String VALUE
           
(package private)  Panel variablesPanel
           
(package private)  ScrollPane variablesScrollPane
           
(package private)  Hashtable[] workFlowVariables
           
 
Fields inherited from class java.applet.Applet
 
Fields inherited from class java.awt.Panel
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
InitiateWorkflowApplet()
           
 
Method Summary
private  Timestamp calculateDate(String offsetStr, int unitsIndex, String fieldName)
          calculateDate uses the current time and adds to it an offset of offsetStr.
private  Checkbox createCheckbox(String label, boolean value, int y)
          createCheckBox creates an AWT checkBox in the variablesPpanel set to value
private  void createDynamicVariableFields()
           
private  EnumeratedChoice createEnumeratedChoice(Object value, int x, int y, Class classType, boolean required)
          createEnumeratedChoice creates an EnumeratedChoiceBox in the variablesPanel populated with the values from the className
private  void createFinishLine()
          createFinishLine creates an horizontal line in the variablesPanel.
private  void createLabel(String labelText, boolean required, int x, int y)
          createLable creates an AWT label in the variablesPpanel with the supplied labelText.
private  RapidFind createObject(String label, Object value, int y)
          createObject creates an RapidFind object finder in the variablesPanel
private  PrincipalSelectionPanel createPrincipalChoice(Object value, int x, int y, int selectionMode)
          createPrincipalChoice creates an PrincipalSelectionPanel in the variablesPanel to select WTUsers, WTGroups, or WTPrincipals.
private  JITProjectPanel createTeamTemplate(Object value, int x, int y)
          createTeamTemplate creates an JITProjectPanel in the variablesPanel to select Team Templates.
private  WTTextArea createTextArea(Object value, int x, int y)
          createTextArea creates an AWT textArea in the variablesPpanel with the value as its initial value
private  TextField createTextField(Object value, int x, int y)
          createTextField creates an AWT textField in the variablesPpanel with the value as its initial value
(package private)  void delayStartCheckbox_ItemStateChanged(ItemEvent event)
          Enable and disable the delayStart value & units selectors
 void destroy()
          Override of java.applet.Applet.destroy method to incorporate WTContext usage.
(package private)  void dueInCheckBox_ItemStateChanged(ItemEvent event)
          Enable the dueOn Textbox and disable the dueIn value & units selectors
(package private)  void dueOnCheckBox_ItemStateChanged(ItemEvent event)
          Enable the dueIn value & units selectors & disable the dueOn Textbox
protected  Frame getParentFrame()
          Returns the parent Frame of this applet.
protected  Frame getTopLevelParent(Component component)
           
(package private)  void helpButton_ActionPerformed(ActionEvent event)
          Launch the named browser "OnlineHelp" to display html help when the help button is pushed.
 void init()
           
(package private)  void initialize()
           
private  void localize()
          Localize interface
 void start()
          Override of java.applet.Applet.start method to incorporate WTContext usage.
private  void startWorkflow()
          Gather up the user's input for this workflow, validate it and initiate the workflow process
(package private)  void startWorkflowButton_ActionPerformed(ActionEvent event)
           
 void stop()
          Override of java.applet.Applet.stop method to incorporate WTContext usage.
private  ProcessData updateWorkflowVariables(ProcessData context)
          updateWorkflowVariables iterates through the defined workflow process variables updating the context with the user's supplied values.
 
Methods inherited from class java.applet.Applet
getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RB

static ResourceBundle RB

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

DISPLAY_NAME

private static String DISPLAY_NAME

VALUE

private static String VALUE

TYPE

private static String TYPE

CONTROL

private static String CONTROL

REQUIRED

private static String REQUIRED

LOCALIZE

static final int LOCALIZE
See Also:
Constant Field Values

context_ref

WTContainerRef context_ref

myThreadGroup

private ThreadGroup myThreadGroup

myTemplate

WfProcessTemplate myTemplate

myProcess

WfProcess myProcess

workFlowVariables

Hashtable[] workFlowVariables

helpSystem

NFHelpSystem helpSystem

processNameLabel

Label processNameLabel

processVariablesLabel

Label processVariablesLabel

teamLabel

Label teamLabel

targetObjectLabel

Label targetObjectLabel

priorityLabel

Label priorityLabel

descriptionLabel

Label descriptionLabel

dueDateGroup

CheckboxGroup dueDateGroup

delayStartCheckbox

Checkbox delayStartCheckbox

dueOnCheckBox

Checkbox dueOnCheckBox

dueInCheckBox

Checkbox dueInCheckBox

processNameTextField

TextField processNameTextField

dueDateTextField

TextField dueDateTextField

delayStartTextField

TextField delayStartTextField

dueInTextField

TextField dueInTextField

priorityChoice

Choice priorityChoice

delayUnitsChoice

Choice delayUnitsChoice

dueInUnitsChoice

Choice dueInUnitsChoice

delayPanel

Panel delayPanel

dueOnPanel

Panel dueOnPanel

dueInPanel

Panel dueInPanel

variablesPanel

Panel variablesPanel

variablesScrollPane

ScrollPane variablesScrollPane

startWorkflowButton

Button startWorkflowButton

helpButton

Button helpButton

hLine1

symantec.itools.awt.shape.HorizontalLine hLine1

hLine2

symantec.itools.awt.shape.HorizontalLine hLine2

hLine3

symantec.itools.awt.shape.HorizontalLine hLine3

descriptionTextArea

WTTextArea descriptionTextArea

teamTemplatePanel

JITProjectPanel teamTemplatePanel

targetObjectFinder

RapidFind targetObjectFinder
Constructor Detail

InitiateWorkflowApplet

public InitiateWorkflowApplet()
Method Detail

start

public void start()
Override of java.applet.Applet.start method to incorporate WTContext usage.


stop

public void stop()
Override of java.applet.Applet.stop method to incorporate WTContext usage.


destroy

public void destroy()
Override of java.applet.Applet.destroy method to incorporate WTContext usage.


init

public void init()

delayStartCheckbox_ItemStateChanged

void delayStartCheckbox_ItemStateChanged(ItemEvent event)
Enable and disable the delayStart value & units selectors

Parameters:
event -

dueOnCheckBox_ItemStateChanged

void dueOnCheckBox_ItemStateChanged(ItemEvent event)
Enable the dueIn value & units selectors & disable the dueOn Textbox

Parameters:
event -

dueInCheckBox_ItemStateChanged

void dueInCheckBox_ItemStateChanged(ItemEvent event)
Enable the dueOn Textbox and disable the dueIn value & units selectors

Parameters:
event -

initialize

void initialize()
          throws Exception
Throws:
Exception

createDynamicVariableFields

private void createDynamicVariableFields()
                                  throws Exception
Throws:
Exception

createLabel

private void createLabel(String labelText,
                         boolean required,
                         int x,
                         int y)
createLable creates an AWT label in the variablesPpanel with the supplied labelText.

Parameters:
labelText - text to be displayed on the label
required - boolean: if true, an "*" is displayed before the label text
x - gridx value of the label in the variablesPanel's gridBagLayout
y - gridy value of the label in the variablesPanel's gridBagLayout

createTextField

private TextField createTextField(Object value,
                                  int x,
                                  int y)
createTextField creates an AWT textField in the variablesPpanel with the value as its initial value

Parameters:
value - initial value for the text box
x - gridx value of the label in the variablesPanel's gridBagLayout
y - gridy value of the label in the variablesPanel's gridBagLayout

createTextArea

private WTTextArea createTextArea(Object value,
                                  int x,
                                  int y)
createTextArea creates an AWT textArea in the variablesPpanel with the value as its initial value

Parameters:
value - initial value for the textArea
x - gridx value of the label in the variablesPanel's gridBagLayout
y - gridy value of the label in the variablesPanel's gridBagLayout

createCheckbox

private Checkbox createCheckbox(String label,
                                boolean value,
                                int y)
createCheckBox creates an AWT checkBox in the variablesPpanel set to value

Parameters:
label - The checkBox's label
value - initial value for the checkBox
y - gridy value of the label in the variablesPanel's gridBagLayout

createObject

private RapidFind createObject(String label,
                               Object value,
                               int y)
createObject creates an RapidFind object finder in the variablesPanel

Parameters:
label - label for the RapidFinder
value - object to display (Currently unimplemented)
y - gridy value of the label in the variablesPanel's gridBagLayout

createPrincipalChoice

private PrincipalSelectionPanel createPrincipalChoice(Object value,
                                                      int x,
                                                      int y,
                                                      int selectionMode)
                                               throws Exception
createPrincipalChoice creates an PrincipalSelectionPanel in the variablesPanel to select WTUsers, WTGroups, or WTPrincipals.

Parameters:
x - gridx value of the label in the variablesPanel's gridBagLayout
y - gridy value of the label in the variablesPanel's gridBagLayout
selectionMode - set the mode of the selector to find Users, Groups or WTPrincipals
Throws:
Exception

createTeamTemplate

private JITProjectPanel createTeamTemplate(Object value,
                                           int x,
                                           int y)
                                    throws Exception
createTeamTemplate creates an JITProjectPanel in the variablesPanel to select Team Templates.

Parameters:
x - gridx value of the label in the variablesPanel's gridBagLayout
y - gridy value of the label in the variablesPanel's gridBagLayout
Throws:
Exception

createEnumeratedChoice

private EnumeratedChoice createEnumeratedChoice(Object value,
                                                int x,
                                                int y,
                                                Class classType,
                                                boolean required)
                                         throws Exception
createEnumeratedChoice creates an EnumeratedChoiceBox in the variablesPanel populated with the values from the className

Parameters:
x - gridx value of the label in the variablesPanel's gridBagLayout
y - gridy value of the label in the variablesPanel's gridBagLayout
classType - the class type of values to display
required - is this a required field
Throws:
Exception

createFinishLine

private void createFinishLine()
createFinishLine creates an horizontal line in the variablesPanel. The sole purpose of this method is to create a control that forces the other controls in the variablesPanel into a better grid bac configuration. None of the other workflow variables in the panel carray an X or Y weight and consequently they all float in the center of the panel instead of the top left.


getParentFrame

protected Frame getParentFrame()
Returns the parent Frame of this applet.


getTopLevelParent

protected Frame getTopLevelParent(Component component)

updateWorkflowVariables

private ProcessData updateWorkflowVariables(ProcessData context)
                                     throws WTException
updateWorkflowVariables iterates through the defined workflow process variables updating the context with the user's supplied values. It also sets the primaryBusinessObject.

Parameters:
context - label for the RapidFinder
Throws:
WTException

startWorkflowButton_ActionPerformed

void startWorkflowButton_ActionPerformed(ActionEvent event)

startWorkflow

private void startWorkflow()
                    throws Exception
Gather up the user's input for this workflow, validate it and initiate the workflow process

Throws:
Exception

calculateDate

private Timestamp calculateDate(String offsetStr,
                                int unitsIndex,
                                String fieldName)
                         throws WTException
calculateDate uses the current time and adds to it an offset of offsetStr.

Parameters:
unitsIndex - integer index from a choice box indicating what units selection has been made. The index maps as follows: 0 - No selection 1 - minutes 2 - hours 3 - days 4 - weeks 5 - months
fieldName - The localized name of the field requesting the date calculation--used for error messages
Returns:
Timestamp Timestamp caluculated by taking the current time and adding to it the specifed number of offset units.
Throws:
WTException

localize

private void localize()
Localize interface


helpButton_ActionPerformed

void helpButton_ActionPerformed(ActionEvent event)
Launch the named browser "OnlineHelp" to display html help when the help button is pushed.

Parameters:
event -