Process Class Relationships

filenet.vw.api
Class VWCompoundStepDefinition

java.lang.Object
  |
  +--filenet.vw.api.VWMapNode
        |
        +--filenet.vw.api.VWCompoundStepDefinition
All Implemented Interfaces:
java.io.Serializable

public final class VWCompoundStepDefinition
extends VWMapNode
implements java.io.Serializable

The VWCompoundStepDefinition class creates a series of workflow map nodes as sequence of "production workflow" instructions. Use the VWCompoundStepDefinition class to access timers, to make calls to sub-maps, and to perform other workflow map functions, as shown in the method summary.

Since:
VWWS4.20
See Also:
VWMapDefinition, VWMapNode, VWStepDefinition, VWInstructionDefinition, VWException, Serialized Form

Method Summary
 VWInstructionDefinition createAssignInstruction(java.lang.String[][] assignPairs)
          Creates an assign instruction in this compound step definition.
 VWInstructionDefinition createBeginCheckPointInstruction()
          Creates a begin checkpoint instruction in this compound step.
 VWInstructionDefinition createBeginTimerInstruction(java.lang.String theTimerName, java.lang.String theExpirationTime, java.lang.String theISName, java.lang.String thePreemptiveExpirationExpr)
          Creates a begin timer instruction in this compound step.
 VWInstructionDefinition createCallInstruction(java.lang.String theMapName)
          Creates a call instruction in this compound step definition.
 VWInstructionDefinition createCreateInstruction(java.lang.String theWorkClassName, java.lang.String[][] theFieldAssignList)
          Creates a Create instruction in this compound step definition.
 VWInstructionDefinition createDatabaseExecuteInstruction(java.lang.String theDatabaseName, java.lang.String theProcedureName, java.lang.String[] theParamList)
          Creates a Database Execute instruction in this compound step definition.
 VWInstructionDefinition createDelayInstruction(java.lang.String delay)
          Creates a delay instruction in this compound step definition.
 VWInstructionDefinition createEndAllTimersInstruction()
          Creates an end all timers instruction in this compound step.
 VWInstructionDefinition createEndCheckPointInstruction()
          Creates an end checkpoint instruction in this compound step.
 VWInstructionDefinition createEndTimerInstruction(java.lang.String theTimer)
          Creates an End Timer instruction in this compound step definition.
 VWInstructionDefinition createExecuteInstruction(java.lang.String theQueueName, java.lang.String theOperationName, java.lang.String[] theParamList)
          Creates an Execute instruction in this compound step definition.
 VWInstructionDefinition createLogInstruction(java.lang.String theEventType, java.lang.String theEventText)
          Creates a log instruction in this compound step definition.
 VWInstructionDefinition createNoOpInstruction()
          Creates a NoOp instruction in this compound step.
 VWInstructionDefinition createResumeTimerInstruction(java.lang.String theTimer)
          Creates a resume Timer instruction in this compound step definition.
 VWInstructionDefinition createReturnInstruction(java.lang.String retryOption)
          Creates a Return instruction in this compound step definition.
 VWInstructionDefinition createRollbackCheckpointInstruction(java.lang.String theReDoFlag, java.lang.String theCompCallIS, java.lang.String[] theNonRollbackFieldList)
          Creates a Rollback checkpoint instruction in this compound step definition.
 VWInstructionDefinition createSuspendTimerInstruction(java.lang.String timer)
          Creates a Suspend Timer instruction in this compound step definition.
 VWInstructionDefinition createTerminateInstruction()
          Creates a terminate instruction in this compound step.
 VWInstructionDefinition createWFEInstruction(java.lang.String theTimeOut, java.lang.String theEventNumLocation)
          Creates a wait for event instruction in this compound step definition.
 void deleteInstruction(int theInstructionId)
          Deletes an instruction from this compound step definition, specified by the instruction id.
 VWInstructionDefinition[] getInstructions()
          Gets the instructions contained in this VWCompoundStepDefinition instance.
 void setInstructions(VWInstructionDefinition[] theInstructions)
          Changes the instructions contained in this VWCompoundStepDefinition instance.
 java.lang.String toString()
          Gets the name of this compound step definition object.
 void toXML(java.lang.StringBuffer theBuffer)
          Appends an XML string that represents this VWCompoundStepDefinition object to the buffer specified by the input parameter.
 void validate(VWSession theSession, java.util.Vector EDefVector)
          Validates this VWCompoundStepDefinition object.
 
Methods inherited from class filenet.vw.api.VWMapNode
createRoute, deleteRoute, getDescription, getJoinType, getLocation, getName, getNextRoutes, getNodeType, getPreviousRoutes, getRoute, getRouteFrom, getRouteTo, getSplitType, getStepId, reorderRoutes, setDescription, setJoinType, setLocation, setName, setSplitType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstructions

public VWInstructionDefinition[] getInstructions()
                                          throws VWException
Gets the instructions contained in this VWCompoundStepDefinition instance.
Returns:
An array of all VWInstructionDefinition objects contained in this VWCompoundStepDefinition object. The returned array has the same number of elements as the number of instructions in the compound step; there are no empty elements in the array. If there are no instructions defined in the compound step, the method returns null.
Throws:
VWException - Thrown if it cannot get the instructions contained in this VWCompoundStepDefinition instance.

setInstructions

public void setInstructions(VWInstructionDefinition[] theInstructions)
                     throws VWException
Changes the instructions contained in this VWCompoundStepDefinition instance. This method cannot be used to add new instructions or delete instructions from the step: the number of elements in VWInstructionDefinition objects array must be the same as the number of instructions currently in this step. This method could be used to change the order of the instructions within a compound step definition. Any instructions currently contained in the step will be overwritten.
Parameters:
theInstructions - The array of VWInstructionDefinition objects to be changed in this compound step.
Throws:
VWException - Thrown if it cannot change the instructions contained in this VWCompoundStepDefinition instance.
See Also:
deleteInstruction(int)

deleteInstruction

public void deleteInstruction(int theInstructionId)
                       throws VWException
Deletes an instruction from this compound step definition, specified by the instruction id.
Parameters:
theInstructionId - An integer containing the ID of the instruction to be deleted.
Throws:
VWException - Thrown if it cannot delete an instruction from this compound step definition--for example, if the input instruction ID is 0.

createCallInstruction

public VWInstructionDefinition createCallInstruction(java.lang.String theMapName)
                                              throws VWException
Creates a call instruction in this compound step definition. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Parameters:
theMapName - A string containing name of the map to be called when this call instruction is executed. It must be a string( for example, "myMap" ) whose value is the name of a map in this work flow or a map inherited by this workflow definition.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create a call instruction in this compound step definition.

createDelayInstruction

public VWInstructionDefinition createDelayInstruction(java.lang.String delay)
                                               throws VWException
Creates a delay instruction in this compound step definition. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Parameters:
delay - A valid time expression that returns the desired delay expiration time. Details of time expressions are described in the "Expressions" book of the Reference section of the Designer User documentation.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create a delay instruction in this compound step definition.

createWFEInstruction

public VWInstructionDefinition createWFEInstruction(java.lang.String theTimeOut,
                                                    java.lang.String theEventNumLocation)
                                             throws VWException
Creates a wait for event instruction in this compound step definition. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Parameters:
theTimeOut - a Valid time expression representing the amount of time this instruction will wait for an event to occur. Details of time expressions are described in the "Expressions" book of the Reference section of the Designer User documentation.

A value of "0" means wait forever.

theEventNumLocation - A valid LValue expression, which specifies the location where this instruction will store the number of the event which occurred. For example, this parameter could be the name of a field in this Workflow definition.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create a delay instruction in this compound step definition.

createEndTimerInstruction

public VWInstructionDefinition createEndTimerInstruction(java.lang.String theTimer)
                                                  throws VWException
Creates an End Timer instruction in this compound step definition. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Parameters:
theTimer - the name of the timer that you want to end.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create an End Timer instruction in this compound step definition.

createResumeTimerInstruction

public VWInstructionDefinition createResumeTimerInstruction(java.lang.String theTimer)
                                                     throws VWException
Creates a resume Timer instruction in this compound step definition. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Parameters:
theTimer - The name (case-sensitive) of the suspended timer (SuspendTimer system instruction) that you want to restore. The ResumeTimer system instruction has no effect if you pass the name of a non-existent timer.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create a Resume Timer instruction in this compound step definition, when an existing timer is specified.

createSuspendTimerInstruction

public VWInstructionDefinition createSuspendTimerInstruction(java.lang.String timer)
                                                      throws VWException
Creates a Suspend Timer instruction in this compound step definition. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Parameters:
timer - the name (case-sensitive) of the timer (defined in the corresponding BeginTimer Instruction) that you want to suspend. The SuspendTimer system instruction has no effect if you enter the name of a non-existent timer.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create a Suspend Timer instruction in this compound step definition.

createReturnInstruction

public VWInstructionDefinition createReturnInstruction(java.lang.String retryOption)
                                                throws VWException
Creates a Return instruction in this compound step definition.

The Return system instruction immediately exits from a called instruction sheet and returns to the calling instruction sheet. On the calling instruction sheet, either the Instruction that caused the call executes again, or the next Instruction executes. Which action occurs depends on both: The retryOption (a boolean expression) designated for the Return system instruction AND the type of instruction sheet that contains the Return system instruction.

In the summary below, "next" means the Instruction following the Instruction that caused the call executes; "repeat" means the Instruction that caused the call executes again.


instruction sheet containing Return is: Retry option = true Retry option = false
An exception-handling instruction sheet called by the system, or the VW_RaiseException API raised an exception repeat next
An instruction sheet called via the Call system instruction or VW_Call API repeat next
A timer expiration instruction sheet called because it is designated (in a BeginTimer system instruction) to be called if a timer expires repeat repeat

The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.

Parameters:
retryOption - A String containing a Boolean expression. The expression's effects are according to the method description above.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create a Return instruction in this compound step definition.

createExecuteInstruction

public VWInstructionDefinition createExecuteInstruction(java.lang.String theQueueName,
                                                        java.lang.String theOperationName,
                                                        java.lang.String[] theParamList)
                                                 throws VWException
Creates an Execute instruction in this compound step definition. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Parameters:
theQueueName - the name of the workperformer class or queue which exposes the operation to be executed.
theOperationName - A string, the name of the operation to be executed.
theParamList - array of parameter expressions needed to execute the operation. The length of the array should equal the number of parameters needed by the operation named by theOperationName.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create an Execute instruction in this compound step definition.

createDatabaseExecuteInstruction

public VWInstructionDefinition createDatabaseExecuteInstruction(java.lang.String theDatabaseName,
                                                                java.lang.String theProcedureName,
                                                                java.lang.String[] theParamList)
                                                         throws VWException
Creates a Database Execute instruction in this compound step definition. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Parameters:
theDatabaseName - the name of the database which contains the stored procedure to be executed.
theProcedureName - the name of the stored procedure to be executed.
theParamList - array of parameter expressions needed to execute the stored procedure. The length of the array should equal the number of parameters needed by the procedure named by theProcedureName argument.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException -  

createCreateInstruction

public VWInstructionDefinition createCreateInstruction(java.lang.String theWorkClassName,
                                                       java.lang.String[][] theFieldAssignList)
                                                throws VWException
Creates a Create instruction in this compound step definition. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Parameters:
theWorkClassName - The name of the WorkClass to be created.
theFieldAssignList - A two-dimensional array of Strings containing field initialization pairs: field name and initial value assignment; may also be empty (null value).

The first "column" of this array comprises the left-side values of a set of assignment operations. Each string in this "column" is a field name. The number of "rows" in the array (the first dimension) is the number of assignment operations to be executed when the instruction runs.

The second "column" of this array comprises the right-side values of a set of assignment operations. Each of these strings can be any valid expression recognized by the server (a literal constant like the string "hello" or the number 75, a field name, an arithmetic expression, a boolean expression, a function call, or an array initialization expression).

Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create an Execute instruction in this compound step definition.

createRollbackCheckpointInstruction

public VWInstructionDefinition createRollbackCheckpointInstruction(java.lang.String theReDoFlag,
                                                                   java.lang.String theCompCallIS,
                                                                   java.lang.String[] theNonRollbackFieldList)
                                                            throws VWException
Creates a Rollback checkpoint instruction in this compound step definition. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Parameters:
theReDoFlag - a Boolean expression that determines where processing resumes after the rollback occurs. The expression must meet specific guidelines for expressions; for detailed information about expression guidelines refer to the Expressions book: Reference section, in the Designer online help. This parameter may be null, equivalent to the default value, which is "True".

If the expression evaluates to true, the instructions immediately following BeginCheckPoint execute. This means that RollBackCheckPoint will execute.

If the expression evaluates to false, RollBackCheckPoint is skipped: the instruction immediately following RollBackCheckPoint executes.

CompCallIS - An instruction sheet (map) name, which may be null.
theNonRollbackFieldList - An array of user defined field names. This parameter may be null. These files will not be rolled back when tbe rollback checkpoint instruction executes. By default all user-defined field values will be rolled back to the values they contained when the begin checkpoint instruction executed.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create a Rollback checkpoint instruction in this compound step definition.

createAssignInstruction

public VWInstructionDefinition createAssignInstruction(java.lang.String[][] assignPairs)
                                                throws VWException
Creates an assign instruction in this compound step definition. The new instruction will be added to the end of the list of instructions that are currently in this compound step. An Instruction ID is generated automatically.
Parameters:
assignPairs - A two-dimensional array of Strings that contains pairs of left values and right values of assignment operations which will be performed when this instruction executes. The number of "rows" in the array (the first dimension) is the number of assignment operations to be executed when the instruction runs.

The first "column" of this array comprises the left-side values of a set of assignment operations. Each string is a field name which may be subscripted (myField or myArrayField[3], for example).

The second "column" of this array comprises the right-side values of a set of assignment operations. Each of these strings can be any valid expression recognized by the server (a literal constant like the string "hello" or the number 75, a field name, an arithmetic expression, a boolean expression or a function call).

Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create an assign instruction in this compound step definition.

createTerminateInstruction

public VWInstructionDefinition createTerminateInstruction()
                                                   throws VWException
Creates a terminate instruction in this compound step.

This system instruction prematurely ends processing of a work object. The behavior of Terminate varies depending on the instruction sheet it is on:

On the terminate instruction sheet, terminate immediately terminates the work object.

On all other instruction sheets, terminate calls the terminate instruction sheet defined in or inherited by the work object’s work class. The work object is then processed and ultimately terminated according to the logic of the terminate instruction sheet.

In all cases, upon Terminate system instruction execution, all active, suspended, or disabled timers for the work object are ended.

The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.

Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create a terminate instruction in this compound step.

createNoOpInstruction

public VWInstructionDefinition createNoOpInstruction()
                                              throws VWException
Creates a NoOp instruction in this compound step. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
A NoOp is a dummy instruction. NoOp is short for "No Operation". NoOps are stripped out of the runtime instruction sheets by the server. A NoOp can be useful as a place holder.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create a NoOp instruction in this compound step.

createBeginCheckPointInstruction

public VWInstructionDefinition createBeginCheckPointInstruction()
                                                         throws VWException
Creates a begin checkpoint instruction in this compound step. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create a begin checkpoint instruction in this compound step.

createEndCheckPointInstruction

public VWInstructionDefinition createEndCheckPointInstruction()
                                                       throws VWException
Creates an end checkpoint instruction in this compound step. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create an end checkpoint instruction in this compound step.

createEndAllTimersInstruction

public VWInstructionDefinition createEndAllTimersInstruction()
                                                      throws VWException
Creates an end all timers instruction in this compound step. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create an end all timers instruction in this compound step.

createBeginTimerInstruction

public VWInstructionDefinition createBeginTimerInstruction(java.lang.String theTimerName,
                                                           java.lang.String theExpirationTime,
                                                           java.lang.String theISName,
                                                           java.lang.String thePreemptiveExpirationExpr)
                                                    throws VWException
Creates a begin timer instruction in this compound step. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Parameters:
theTimerName - The name of the timer.

theExpirationTime - A time expression which will evaluate to the time that the timer will expire. This expression could be a a literal time value, a time expression such as "addminutes(systemtime(),45)" (meaning "45 minutes from now").

theISName - Name of the instruction sheet (or "map") to call if the timer expires. Details of time expressions are described in the "Expressions" book of the Reference section of the Designer User documentation.

thePreemptiveExpirationExpr - This string expression may be null, which indicates the work object stays locked(it is "non-preemptive") after a timer expiration time. A non-preemptive timer will wait until the work object is unlocked before it expires.

A time expression specifies the time period that elapses after the expiration time, before a lock on the work object is removed ("preempted"). Details of time expressions are defined in the "Expressions" book of the Reference section of the Designer User documentation.

Returns:
A new VWInstructionDefinition object.
Throws:
VWException - Thrown if it cannot create an begin timer instruction in this compound step.

createLogInstruction

public VWInstructionDefinition createLogInstruction(java.lang.String theEventType,
                                                    java.lang.String theEventText)
                                             throws VWException
Creates a log instruction in this compound step definition. The new instruction will be added to the end of the list of instructions currently in this compound step. An Instruction ID will be generated automatically.
Parameters:
theEventType - A String containing an integer expression that evaluates to the event number, which must be greater than 1000.
theEventText - A String containing the message to be logged, up to 250 characters long.
Returns:
A new VWInstructionDefinition object.
Throws:
VWException -  

validate

public void validate(VWSession theSession,
                     java.util.Vector EDefVector)
              throws VWException
Validates this VWCompoundStepDefinition object.
Overrides:
validate in class VWMapNode
Parameters:
theSession - The session object if logged on. This object is needed for various parts of the validation process. The object may be null, but areas of validation that require a logon will not be validated.
EDefVector - a Vector to which will be added any VWValidationErrors found during this call, the Vector may already contain some validation errors errors from previous calls to validate on other objects.
Returns:
void, but the EDefVector will be updated to contain any validation errors found during this call.
Throws:
VWException - Thrown if it cannot validate this VWCompoundStepDefinition object.

toXML

public void toXML(java.lang.StringBuffer theBuffer)
           throws VWException
Appends an XML string that represents this VWCompoundStepDefinition object to the buffer specified by the input parameter.
Overrides:
toXML in class VWMapNode
Parameters:
theBuffer - A string buffer that this method will append with XML content.
Throws:
VWException -  
See Also:
VWXMLUtil

toString

public java.lang.String toString()
Gets the name of this compound step definition object.
Overrides:
toString in class VWMapNode
Returns:
The name of this compound step definition object.

Process Class Relationships

Copyright © 2002 FileNET Corporation. All rights reserved.