Class VWEventDefinition
- java.lang.Object
-
- filenet.vw.api.VWEventDefinition
-
- All Implemented Interfaces:
- java.io.Serializable
public final class VWEventDefinition extends java.lang.Object implements java.io.SerializableThe 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
VWEventDefinition.setCallISName(String)). An event can also cause a series of value assignments to occur (methodVWEventDefinition.setAssignments(String[][])).- Since:
- VWWS4.20
- See Also:
VWCompoundStepDefinition,VWInstructionDefinition,VWWFEInstruction, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static intLVALUEValue of 0: this constant can be used to subscript into the left-hand side values of an event assignment array.static intRVALUEValue of 1: this constant can be used to subscript into right-hand side values of an event assignment array.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description java.lang.String[][]getAssignments()Gets the assignments property value for the event.java.lang.StringgetCallISName()Gets the name of the instruction sheet (map) that is called when this event occurs.java.lang.StringgetComparisonOperator()Gets this event's comparison operator.VWSessiongetSession()Get the session associated with this event definition.java.lang.StringgetValue()Gets this event's value expression.java.lang.StringgetWorkClassName()Gets the value of this event's work class name property.voidsetAssignments(java.lang.String[][] theAssignments)Sets the assignments property value for the event.voidsetCallISName(java.lang.String theCallISName)Changes the value of this event's instruction sheet call property.voidsetComparisonOperator(java.lang.String theOperator)Changes the value of this event's comparison operator.voidsetValue(java.lang.String theValue)Changes the value of this event's value expression property.voidsetWorkClassName(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.voidtoXML(java.lang.StringBuffer theBuffer)voidtoXPDL(java.lang.String indentA, java.lang.StringBuffer theBuffer)voidvalidate(VWSession theSession, VWWorkflowDefinition theWorkflow, java.util.Vector EDefVector, VWCompoundStepDefinition myStep, int instId, int eventId)
-
-
-
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
-
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 run time, 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 VWExceptionChanges 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:
VWEventDefinition.setComparisonOperator(String),VWEventDefinition.getWorkClassName(),VWEventDefinition.setValue(String)
-
getValue
public java.lang.String getValue()
Gets this event's value expression.- Returns:
- This event's value expression.
- See Also:
VWEventDefinition.setComparisonOperator(String),VWEventDefinition.setValue(String)
-
setValue
public void setValue(java.lang.String theValue) throws VWExceptionChanges 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:
VWEventDefinition.getValue(),VWEventDefinition.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 run time, 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 VWExceptionChanges 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:
VWEventDefinition.setComparisonOperator(String),VWEventDefinition.getValue(),VWEventDefinition.setValue(String)
-
setComparisonOperator
public void setComparisonOperator(java.lang.String theOperator) throws VWExceptionChanges 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:
VWEventDefinition.getComparisonOperator(),VWEventDefinition.getValue(),VWEventDefinition.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:
VWEventDefinition.LVALUE,VWEventDefinition.RVALUE,VWEventDefinition.setAssignments(String[][])
-
setAssignments
public void setAssignments(java.lang.String[][] theAssignments) throws VWExceptionSets 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:
VWEventDefinition.LVALUE,VWEventDefinition.RVALUE,VWEventDefinition.getAssignments()
-
toXML
public void toXML(java.lang.StringBuffer theBuffer) throws VWExceptionDeprecated. UseVWWorkflowDefinition.write(java.io.OutputStream)orVWWorkflowDefinition.writeToFile(String).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:
VWWorkflowDefinition
-
toXPDL
public void toXPDL(java.lang.String indentA, java.lang.StringBuffer theBuffer) throws VWExceptionDeprecated. UseVWWorkflowCollectionDefinition.write(java.io.OutputStream)orVWWorkflowCollectionDefinition.writeToFile(String).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:
VWWorkflowCollectionDefinition
-
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. Although this method does not return a value,EDefVectorwill be updated to contain any validation errors found.- 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
-
-