Class VWReplyInstruction
- java.lang.Object
-
- filenet.vw.api.VWInstructionDefinition
-
- filenet.vw.api.VWReplyInstruction
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public final class VWReplyInstruction extends VWInstructionDefinition implements java.io.Serializable
This class defines a workflow step instruction that allows a Process Engine to communicate through a local Web Service and send a reply XML message to a location defined by the associated partner link, or it may send parameters to this location.A VWReplyInstruction instance allows a business workflow process step to send a message in reply to a message that was received through a VWReceiveInstruction instance activity using the same portType, over the same partner link, before any other reply has been sent for that particular receive activity.
Create an instance of this class with
VWCompoundStepDefinition.createReplyInstruction(String,String).Types of Message Management This class provides two groups of methods for communication over a partner link, depending on the type of message management desired; an instance of this class should use message management methods from one group or the other, but not both. The two types of partner link-related message management that this class handles are the following:
- Business Process Execution: Contains data in a complex structure that is best expressed with XML expressions.
- Process Engine parameter: Only Process Engine parameter data
is passed over the partner link.
Parameters for Java API Web Service methods are like any Process Engine workflow operation parameter, and must have a data type that is a Process Engine field type.
Methods in this class for handling the Business Process Execution type of message management include:
- getCorrelationSetName()
- setCorrelationSetName(String)
- getCorrelationSetProperties()
- setCorrelationSetProperties(String[][])
- getMessageExpr()
- setMessageExpr(String)
- getMessageFromElementName()
- setMessageFromElementName(String)
- getMessageFromSchemaName()
- setMessageFromSchemaName(String)
Methods in this class for handling the Process Engine parameter type of message management include:
- createParameter(String, String, int, boolean)
- deleteAllParameters()
- deleteParameter(String)
- getParameterDefinition(int)
- getParameterDefinitions()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description VWWebServiceParameterDefinitioncreateParameter(java.lang.String theName, java.lang.String theValue, int theType, boolean theIsArray)Creates a parameter with name, direction, value, and type information.voiddeleteAllParameters()Deletes all parameter definitions for this reply instruction.voiddeleteParameter(int theSequenceNumber)Deletes a parameter definition from the set of parameter definitions stored in this reply instruction.java.lang.StringgetCorrelationSetName()Gets the correlation set name.java.lang.String[][]getCorrelationSetProperties()Gets the correlation set properties for this reply message.java.lang.StringgetFaultName()Gets the fault name for this VWReplyInstruction instance.booleangetHasAttachments()Gets the HasAttachments flag, indicating the message is associated with one or more attachments.java.lang.StringgetMessageExpr()Gets the message expression of this reply instruction.java.lang.StringgetMessageFromElementName()Gets the name of the schema element that defines the WSDL message associated with this reply message, where the schema is defined in the containing workflow definition.java.lang.StringgetMessageFromSchemaName()Gets the name of the schema that defines the WSDL message associated with this reply message, where the schema is defined in the containing workflow definition.java.lang.StringgetOperationName()Gets the operation name of this reply instruction.VWWebServiceParameterDefinitiongetParameterDefinition(int theSequenceNumber)Gets a parameter definition from the set of parameter definitions stored in this reply instruction.VWWebServiceParameterDefinition[]getParameterDefinitions()Gets a parameter definition from the set of parameter definitions stored in this reply instruction.java.lang.StringgetPartnerLinkName()Gets the partner link name of this reply instruction.voidsetCorrelationSetName(java.lang.String theName)Sets the correlation set name.voidsetCorrelationSetProperties(java.lang.String[][] theProps)Sets the output correlation set properties for this reply message.voidsetFaultName(java.lang.String theName)Creates a fault in this VWReplyInstruction instance.voidsetHasAttachments(boolean theHasAttachmentsFlag)Sets the HasAttachments flag, indicating whether the message is associated with one or more attachments.voidsetMessageExpr(java.lang.String theMessageExpr)Sets the message expression of this reply instruction.voidsetMessageFromElementName(java.lang.String theElement)Sets the name of the schema element that defines the WSDL message associated with this reply message, where the schema is defined in the containing workflow definition.voidsetMessageFromSchemaName(java.lang.String theSchemaName)Sets the name of the schema that defines the WSDL message associated with this reply message, where the schema is defined in the containing workflow definition.voidsetOperationName(java.lang.String theOperationName)Sets the operation name of this reply instruction, which must be the name of an operation on the port type defined in the associated partner link.voidsetPartnerLinkName(java.lang.String thePartnerLinkName)Sets the partner link name of this reply instruction.java.lang.StringtoString()Gets the name of this VWReplyInstruction instruction.voidtoXML(java.lang.StringBuffer theBuffer)voidtoXPDL(java.lang.String indentA, java.lang.StringBuffer theBuffer)voidvalidate(VWSession theSession, java.util.Vector EDefVector, VWCompoundStepDefinition myStep)-
Methods inherited from class filenet.vw.api.VWInstructionDefinition
getAction, getInstructionId, getStep
-
-
-
-
Method Detail
-
setFaultName
public void setFaultName(java.lang.String theName) throws VWExceptionCreates a fault in this VWReplyInstruction instance.- Parameters:
theName- Fault name, ornullif no fault is defined.- Throws:
VWException
-
getFaultName
public java.lang.String getFaultName() throws VWExceptionGets the fault name for this VWReplyInstruction instance.- Returns:
- Fault name for this VWReplyInstruction instance; null if no fault is defined.
- Throws:
VWException
-
getMessageExpr
public java.lang.String getMessageExpr()
Gets the message expression of this reply instruction.
-
setMessageExpr
public void setMessageExpr(java.lang.String theMessageExpr) throws VWExceptionSets the message expression of this reply instruction.- Parameters:
theMessageExpr- Valid String expression for the message expression.- Throws:
VWException- See Also:
VWReplyInstruction.setCorrelationSetName(String),VWReplyInstruction.setMessageFromSchemaName(String),VWReplyInstruction.setMessageFromElementName(String),VWReplyInstruction.getMessageExpr(), Types Of Message Management
-
setPartnerLinkName
public void setPartnerLinkName(java.lang.String thePartnerLinkName) throws VWExceptionSets the partner link name of this reply instruction. The partner link name must be the name of a partner link of the same the workflow definition that contains this reply instruction.- Parameters:
thePartnerLinkName- Partner link name for this reply instruction.- Throws:
VWException- Thrown for various causes, including when the input partner link name is not the name of a partner link- See Also:
VWPartnerLinkDefinition,VWWorkflowDefinition
-
getPartnerLinkName
public java.lang.String getPartnerLinkName()
Gets the partner link name of this reply instruction.- Returns:
- Partner link name
- See Also:
VWReplyInstruction.setPartnerLinkName(String),VWPartnerLinkDefinition,VWWorkflowDefinition
-
setOperationName
public void setOperationName(java.lang.String theOperationName) throws VWExceptionSets the operation name of this reply instruction, which must be the name of an operation on the port type defined in the associated partner link.- Parameters:
theOperationName- Operation name- Throws:
VWException- See Also:
VWPartnerLinkDefinition
-
getOperationName
public java.lang.String getOperationName()
Gets the operation name of this reply instruction.- Returns:
- Operation name
- See Also:
VWReplyInstruction.setOperationName(String),VWPartnerLinkDefinition
-
createParameter
public VWWebServiceParameterDefinition createParameter(java.lang.String theName, java.lang.String theValue, int theType, boolean theIsArray) throws VWException
Creates a parameter with name, direction, value, and type information. Designed for situations involving simple data transfer with a Web Service, parameters may be used in place of the (usually) more complex Business Processing Execution type of message management.- Parameters:
theName- The name of the parameter definition.theValue- String representation of the parameter definition.theType- Integer specifying the field type that applies to the value expression.theIsArray- boolean expression:truespecifies the value expression is an array; otherwise, specifyfalse.- Returns:
- A VWWebServiceParameterDefinition object that represents the newly created parameter definition.
- Throws:
VWException- Various causes, including the following:- Invalid theName parameter
- Parameter by that name already exists
- Invalid field type
- Invalid mode type
- See Also:
- Types Of Message Management,
VWWebServiceParameterDefinition,VWModeType
-
deleteParameter
public void deleteParameter(int theSequenceNumber) throws VWExceptionDeletes a parameter definition from the set of parameter definitions stored in this reply instruction.- Parameters:
theSequenceNumber- Sequence number of the parameter definition to be deleted.- Throws:
VWException- Thrown for various causes, including when the input parameter name is invalid.- See Also:
VWWebServiceParameterDefinition
-
deleteAllParameters
public void deleteAllParameters() throws VWExceptionDeletes all parameter definitions for this reply instruction.- Throws:
VWException- See Also:
VWWebServiceParameterDefinition
-
getParameterDefinition
public VWWebServiceParameterDefinition getParameterDefinition(int theSequenceNumber) throws VWException
Gets a parameter definition from the set of parameter definitions stored in this reply instruction.- Parameters:
theSequenceNumber- A property of the web service parameter which uniquely identifies the web service parameter with an integer.- Returns:
- VWWebServiceParameterDefinition object, specified by the input sequence number
- Throws:
VWException- Thrown for various causes, including when the parameter cannot be found.- See Also:
- Types Of Message Management
-
getParameterDefinitions
public VWWebServiceParameterDefinition[] getParameterDefinitions() throws VWException
Gets a parameter definition from the set of parameter definitions stored in this reply instruction.- Returns:
- VWWebServiceParameterDefinition object, specified by the input name
- Throws:
VWException- See Also:
- Types Of Message Management
-
toString
public java.lang.String toString()
Gets the name of this VWReplyInstruction instruction.- Specified by:
toStringin classVWInstructionDefinition- Returns:
- A String representing this VWReplyInstruction instruction.
- See Also:
VWActionType
-
setHasAttachments
public void setHasAttachments(boolean theHasAttachmentsFlag) throws VWExceptionSets the HasAttachments flag, indicating whether the message is associated with one or more attachments.- Parameters:
theHasAttachmentsFlag-trueindicates the message is associated with one or more attachments;falseindicates otherwise.- Throws:
VWException
-
getHasAttachments
public boolean getHasAttachments()
Gets the HasAttachments flag, indicating the message is associated with one or more attachments.- Returns:
trueindicates the message is associated with one or more attachments.
-
validate
public void validate(VWSession theSession, java.util.Vector EDefVector, VWCompoundStepDefinition myStep) 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.- Specified by:
validatein classVWInstructionDefinition- 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.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.- Throws:
VWException- Thrown if an error occurs during the validation.
-
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.
- Specified by:
toXMLin classVWInstructionDefinition- 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
-
setMessageFromSchemaName
public void setMessageFromSchemaName(java.lang.String theSchemaName) throws VWExceptionSets the name of the schema that defines the WSDL message associated with this reply message, where the schema is defined in the containing workflow definition.- Parameters:
theSchemaName- Schema name- Throws:
VWException- See Also:
VWReplyInstruction.setCorrelationSetName(String),VWReplyInstruction.getMessageFromSchemaName(),VWReplyInstruction.setMessageFromElementName(String),VWReplyInstruction.setMessageExpr(String), Types Of Message Management
-
getMessageFromSchemaName
public java.lang.String getMessageFromSchemaName()
Gets the name of the schema that defines the WSDL message associated with this reply message, where the schema is defined in the containing workflow definition.
-
setMessageFromElementName
public void setMessageFromElementName(java.lang.String theElement) throws VWExceptionSets the name of the schema element that defines the WSDL message associated with this reply message, where the schema is defined in the containing workflow definition.- Parameters:
theElement- Schema element name.- Throws:
VWException- See Also:
VWWorkflowDefinition,VWReplyInstruction.setCorrelationSetName(String),VWReplyInstruction.setMessageFromSchemaName(String),VWReplyInstruction.setMessageExpr(String),VWReplyInstruction.getMessageFromElementName(), Types Of Message Management
-
getMessageFromElementName
public java.lang.String getMessageFromElementName()
Gets the name of the schema element that defines the WSDL message associated with this reply message, where the schema is defined in the containing workflow definition.
-
setCorrelationSetName
public void setCorrelationSetName(java.lang.String theName) throws VWExceptionSets the correlation set name. A correlation set stores the message state value so that the work item can be matched with a particular message.- Parameters:
theName- Correlation set name; may be null Anullvalue signifies there is no correlation set name, normally because another type of message management is used, or because a state value is not needed. Correlation set names can only contain letters, numbers and underscores.- Throws:
VWException- See Also:
VWReplyInstruction.setMessageFromSchemaName(String),VWReplyInstruction.setMessageFromElementName(String),VWReplyInstruction.setMessageExpr(String),VWReplyInstruction.getCorrelationSetName()
-
getCorrelationSetName
public java.lang.String getCorrelationSetName()
Gets the correlation set name.
-
setCorrelationSetProperties
public void setCorrelationSetProperties(java.lang.String[][] theProps) throws VWExceptionSets the output correlation set properties for this reply message. A correlation set stores the message state value so that the work item can be matched with a particular message.- Parameters:
theProps- Correlation set properties, a two dimensional array (n by 2, where n is the number of properties) which is an array of pairs, each comprised of a property name and its corresponding Process Engine expression query.- Throws:
VWException- Thrown for various causes including an incorrectly dimensioned input String array, or anullentry in the input array- See Also:
VWReplyInstruction.getCorrelationSetProperties(),VWReplyInstruction.setCorrelationSetName(String),VWReplyInstruction.setMessageFromSchemaName(String),VWReplyInstruction.setMessageFromElementName(String),VWReplyInstruction.setMessageExpr(String), Types Of Message Management
-
getCorrelationSetProperties
public java.lang.String[][] getCorrelationSetProperties()
Gets the correlation set properties for this reply message.- Returns:
- Correlation set properties in a two dimensional array (n by 2, where n is the number of properties) which is an array of pairs, each comprised of a property name and its corresponding Process Engine expression query.
- See Also:
VWReplyInstruction.setCorrelationSetName(String),VWReplyInstruction.setMessageFromSchemaName(String),VWReplyInstruction.setMessageFromElementName(String),VWReplyInstruction.setMessageExpr(String),VWReplyInstruction.getCorrelationSetProperties(), Types Of Message Management
-
-