Process API

filenet.vw.api
Class VWEventDefinition

java.lang.Object
  extended by filenet.vw.api.VWEventDefinition
All Implemented Interfaces:
java.io.Serializable

public final class VWEventDefinition
extends java.lang.Object
implements java.io.Serializable

The VWEventDefinition class encapsulates methods and data that define events. Events are used in the Wait For Event instructions (class VWWFEInstruction) of a compound step definition.

When an event is evoked, the system compares the event's expression value against the F_Tag field of the current work object, using the event's comparison operator. If this comparison is true, the event occurs.

When an event occurs, it can cause the current work object to move to a specified instruction sheet (map) (method setCallISName(String)). An event can also cause a series of value assignments to occur (method setAssignments(String[][])).

Since:
VWWS4.20
See Also:
VWCompoundStepDefinition, VWInstructionDefinition, VWWFEInstruction, Serialized Form

Field Summary
static int LVALUE
          Value of 0: this constant can be used to subscript into the left-hand side values of an event assignment array.
static int RVALUE
          Value of 1: this constant can be used to subscript into right-hand side values of an event assignment array.
 
Method Summary
static java.lang.String _get_FILE_AUTHOR()
          For FileNet internal use only, do not call.
static java.lang.String _get_FILE_DATE()
          For FileNet internal use only, do not call.
static java.lang.String _get_FILE_REVISION()
          For FileNet internal use only, do not call.
 java.lang.String[][] getAssignments()
          Gets the assignments property value for the event.
 java.lang.String getCallISName()
          Gets the name of the instruction sheet (map) that is called when this event occurs.
 java.lang.String getComparisonOperator()
          Gets this event's comparison operator.
 VWSession getSession()
          Get the session associated with this event definition.
 java.lang.String getValue()
          Gets this event's value expression.
 java.lang.String getWorkClassName()
          Gets the value of this event's work class name property.
 void setAssignments(java.lang.String[][] theAssignments)
          Sets the assignments property value for the event.
 void setCallISName(java.lang.String theCallISName)
          Changes the value of this event's instruction sheet call property.
 void setComparisonOperator(java.lang.String theOperator)
          Changes the value of this event's comparison operator.
 void setValue(java.lang.String theValue)
          Changes the value of this event's value expression property.
 void setWorkClassName(java.lang.String theWorkClassName)
          Changes the value of this event's work class name property, which is the non-null name of the work class which contains this event.
 void toXML(java.lang.StringBuffer theBuffer)
          Appends an XML string representing this instance to the buffer specified.
 void toXPDL(java.lang.String indentA, java.lang.StringBuffer theBuffer)
          Appends an XPDL string representing this instance to the buffer specified.
 void validate(VWSession theSession, VWWorkflowDefinition theWorkflow, java.util.Vector EDefVector, VWCompoundStepDefinition myStep, int instId, int eventId)
          Validates this instance, appending any validation errors found to the specified Vector object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LVALUE

public static final int LVALUE
Value of 0: this constant can be used to subscript into the left-hand side values of an event assignment array.

See Also:
Constant Field Values

RVALUE

public static final int RVALUE
Value of 1: this constant can be used to subscript into right-hand side values of an event assignment array.

See Also:
Constant Field Values
Method Detail

_get_FILE_DATE

public static java.lang.String _get_FILE_DATE()
For FileNet internal use only, do not call.


_get_FILE_AUTHOR

public static java.lang.String _get_FILE_AUTHOR()
For FileNet internal use only, do not call.


_get_FILE_REVISION

public static java.lang.String _get_FILE_REVISION()
For FileNet internal use only, do not call.


getWorkClassName

public java.lang.String getWorkClassName()
Gets the value of this event's work class name property. If a translation source exists, the authored work class name is translated.

Note: The translation is done only at runtime, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

Returns:
A String containing the translated work class name, if a translation source exists; otherwise the authored name is returned.
See Also:
setWorkClassName

setWorkClassName

public void setWorkClassName(java.lang.String theWorkClassName)
                      throws VWException
Changes the value of this event's work class name property, which is the non-null name of the work class which contains this event.

Parameters:
theWorkClassName - The new value of this event's work class name property.
Throws:
VWException - Thrown if an error occurs, for example if the parameter is set to null.
See Also:
setComparisonOperator(String), getWorkClassName(), setValue(String)

getValue

public java.lang.String getValue()
Gets this event's value expression.

Returns:
This event's value expression.
See Also:
setComparisonOperator(String), setValue(String)

setValue

public void setValue(java.lang.String theValue)
              throws VWException
Changes the value of this event's value expression property. This value will be compared against the current value of the F_Tag field of the work class which contains this event, using the event's comparison operator. If the comparison expression is true, the system recognizes that the event has occurred.

Parameters:
theValue - This event's value expression; it cannot be null.
Throws:
VWException - Thrown if an error occurs, for example if the passed-in parameter theValue is null.
See Also:
getValue(), setComparisonOperator(String), VWWorkflowSignature.getFTagExpression()

getCallISName

public java.lang.String getCallISName()
Gets the name of the instruction sheet (map) that is called when this event occurs. If a translation source exists, the authored name of the instruction sheet is translated.

Note: The translation is done only at runtime, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

Returns:
A String containing the translated name of the instruction sheet, if a translation source exists; otherwise, the authored name is returned. Because calling an instruction sheet when an event occurs is optional, this value may be null.
See Also:
setCallISName

setCallISName

public void setCallISName(java.lang.String theCallISName)
                   throws VWException
Changes the value of this event's instruction sheet call property.

Parameters:
theCallISName - The new name of the instruction sheet (map) which will be called when this event occurs. Since calling an instruction sheet when an event occurs is optional, a null value is valid.
Throws:
VWException
See Also:
getCallISName

getComparisonOperator

public java.lang.String getComparisonOperator()
Gets this event's comparison operator.

Returns:
This event's comparison operator.
See Also:
setComparisonOperator(String), getValue(), setValue(String)

setComparisonOperator

public void setComparisonOperator(java.lang.String theOperator)
                           throws VWException
Changes the value of this event's comparison operator.

Parameters:
theOperator - The new value of this event's comparison operator. The operator specified will be used to compare this event's value property against the current value of the F_Tag field of the work class containing this event. If this expression is true, the system recognizes that this event has occurred.

The operator value must be one among the following: "=", ">", "<", "<>", "<=", or ">=".

Note: The operator cannot be null.

Throws:
VWException - Thrown if an error occurs, for example if the passed-in operator argument is null.
See Also:
getComparisonOperator(), getValue(), setValue(String)

getAssignments

public java.lang.String[][] getAssignments()
Gets the assignments property value for the event.

Returns:
A two dimensional array of Strings representing the assignments for this event.
See Also:
LVALUE, RVALUE, setAssignments(String[][])

setAssignments

public void setAssignments(java.lang.String[][] theAssignments)
                    throws VWException
Sets the assignments property value for the event.

Parameters:
theAssignments - A two-dimensional array of Strings that contains pairs of left values and right values of assignment operations.

Array Dimensionality. The grouping in pairs is accomplished by making the size of the second dimension of the array two, corresponding to the two items in a pair. The number of pairs is indicated by the size of the first dimension of the array. This dimensionality effectively organizes the array into two "columns".

Column organization. The first "column" (second subscript value=0) holds left-side values of the assignment operations, represented as string expressions. Left-side values are typically field names, often subscripted. Left-side values cannot be null.

The second "column" (second subscript value=1) holds the right-side values of the assignment. Right-side values can be any non-null, valid string expression recognized by the workflow server. Some examples of right-side expressions include the string "hello" or the number 75, as literal values. Other valid right-side expressions include field names, arithmetic and boolean expressions, and function calls.

Note: This parameter may be null, to signify that no assignments are made when the event occurs.

Throws:
VWException - Thrown if the theAssignments array is not properly dimensioned, or if any individual array elements are null.
See Also:
LVALUE, RVALUE, getAssignments()

toXML

public void toXML(java.lang.StringBuffer theBuffer)
           throws VWException
Appends an XML string representing this instance to the buffer specified.

Warning: This XML string is nonextensible, and cannot be modified in any way.

Parameters:
theBuffer - A StringBuffer that will be appended with the XML content.
Throws:
VWException - Thrown if the specified buffer is null.
See Also:
VWXMLUtil

toXPDL

public void toXPDL(java.lang.String indentA,
                   java.lang.StringBuffer theBuffer)
            throws VWException
Appends an XPDL string representing this instance to the buffer specified.

Warning: This XPDL string is nonextensible, and cannot be modified in any way.

Parameters:
indentA - A String specifying the initial indentation for this XPDL section.
theBuffer - A StringBuffer that will be appended with the XPDL content.
Throws:
VWException - Thrown if the specified buffer is null.
See Also:
VWXMLUtil

validate

public void validate(VWSession theSession,
                     VWWorkflowDefinition theWorkflow,
                     java.util.Vector EDefVector,
                     VWCompoundStepDefinition myStep,
                     int instId,
                     int eventId)
              throws VWException
Validates this instance, appending any validation errors found to the specified Vector object.

Parameters:
theSession - The current VWSession object if logged on. This is needed for various parts of the validation process. This can be null; however, areas of validation requiring a logon will not be validated.
theWorkflow - The VWWorkflowDefinition object for the containing workflow.
EDefVector - A Vector to which will be added a VWValidationError object for each validation error found. This can be null; in this case, a new Vector is used.

Note: Because validate methods having EDefVector in the signature also occur on other classes, the existing Vector can contain validation errors from previous validation calls.

myStep - The VWCompoundStepDefinition object containing this event.
instId - An integer identifying the instruction ID for the VWWFEInstruction object that contains this event.
eventId - An integer identifying the event ID of this event (its index into the array of events that belongs to the containing VWWFEInstruction).
Throws:
VWException - Thrown if an error occurs during the validation.
See Also:
VWCompoundStepDefinition, VWValidationError, VWWFEInstruction

getSession

public VWSession getSession()
                     throws VWException
Get the session associated with this event definition.

Returns:
The session associated with this event definition, may return null.
Throws:
VWException

Process API

© Copyright IBM Corporation 2002, 2008. All rights reserved.