public class ChangePIStateMessage extends WfXMLMessage
CreatePIMessage
. The target process id must be set as key for
this message type (method setKey(java.lang.String)
). With setState(short)
you can set
the state that you request for the process instance.Modifier and Type | Field and Description |
---|---|
protected static String |
MSG_BODY_REQ |
protected static String |
MSG_BODY_RESP |
body, CONTEXTDATA_DOCUMENTCREATOR, documentCreator, documentCreatorId, header, logger, message, MSG_BODY, MSG_BODY_CTXDATA, MSG_BODY_CTXDATA_DMSFOLDER, MSG_BODY_CTXDATA_NOTES, MSG_BODY_CTXDATA_PROCESSFORMS, MSG_BODY_CTXDATA_PROCESSFORMS_NAME, MSG_BODY_EXC, MSG_BODY_EXC_DESC, MSG_BODY_EXC_MAINCODE, MSG_BODY_EXC_SUBCODE, MSG_BODY_EXC_SUBJECT, MSG_BODY_EXC_TYPE, MSG_BODY_RSLTDATA, MSG_BODY_RSLTDATASET, MSG_BODY_SET_NAME, MSG_BODY_SET_PARAM, MSG_BODY_SET_VALUE, MSG_HEAD, MSG_HEAD_KEY, MSG_HEAD_REQ, MSG_HEAD_RESP, MSG_HEAD_RESPREQUIRED, MSG_HEAD_RESPREQUIRED_NO, MSG_HEAD_RESPREQUIRED_ONERROR, MSG_HEAD_RESPREQUIRED_YES, MSG_ROOT, MSG_TRANSPORT, MSG_TRANSPORT_CORDATA, MSG_TRANSPORT_CORDATA_OID, MSG_TRANSPORT_CORDATA_ORIGIN, MSG_TRANSPORT_CORDATA_TIMESTAMP, MSG_VERSION, namespace, PI_STATE_CLOSED_ABNORMAL_COMPLETED, PI_STATE_CLOSED_ABNORMAL_COMPLETED_STR, PI_STATE_CLOSED_COMPLETED, PI_STATE_CLOSED_COMPLETED_STR, PI_STATE_NONE, PI_STATE_OPEN_NOTRUNNING, PI_STATE_OPEN_NOTRUNNING_STR, PI_STATE_OPEN_RUNNING, PI_STATE_OPEN_RUNNING_STR, REQUEST, RESPONSE, RESPONSE_NOT_REQUIRED, RESPONSE_REQUIRED, RESPONSE_REQUIRED_ONERROR, root, transport, usingPlainKey
Modifier | Constructor and Description |
---|---|
protected |
ChangePIStateMessage(Document doc)
This method is used internally for creating a ChangePIStateMessage
out of a xml document.
|
|
ChangePIStateMessage(short messageType)
Use this method to create a new ChangePIStateMessage message.
|
Modifier and Type | Method and Description |
---|---|
String |
getKey()
Use this method to get the oid of the target process instance.
|
short |
getState()
This method returns the state that has been set in this message (works for both
requests and responses).
|
void |
prepare(Partner partner)
This method prepares the message to be sent to a specific partner.
|
protected void |
prepare(String targetURL)
This method is used by the WfXML test client only!
|
void |
setKey(String procInstID)
Sets the key for the ChangeProcessInstanceState message.
|
void |
setMessageType(short type)
Set the message type of this WfXML message (in the message header).
|
void |
setState(short state)
Use this method to set the state.
|
addParameterValueElem, assureBodyExists, assureHeaderExists, assureTransportExists, createMessage, createMessage, getDocumentCreator, getException, getMessageIdentifier, getMessageOrigin, getMessageType, getParameterValueElem, getParameterValueElems, getPlainKey, getResponseRequired, getStateString, getTimestamp, getTransportElementValue, setDocumentCreator, setException, setMessageIdentifier, setMessageOrigin, setPlainKey, setResponseRequired, setTimestamp, setTransportElement, toPrettyString, toString, write
protected static final String MSG_BODY_REQ
protected static final String MSG_BODY_RESP
public ChangePIStateMessage(short messageType)
messageType
- The type of new message you want to create: this can be
either WfXMLMessage.REQUEST
or WfXMLMessage.RESPONSE
.protected ChangePIStateMessage(Document doc)
doc
- JDOM Document containing the content for the message.public void setKey(String procInstID)
procInstID
- The unique process instance OID of the process instance
on the remote partner server (not a complete key!). This parameter must be
provided.WfXMLMessage.setPlainKey(java.lang.String)
for setting the key (so you don't need to extract the oid part of the key
String).IllegalArgumentException
- if procInstID == null
.public String getKey() throws WfXMLMessageException
WfXMLMessageException
- if the key doesn't exist or if it is not
compatible to @enterprise requirements.public void prepare(Partner partner)
Sender
before the message is sent, so it should be
usually not necessary to call this method yourself.prepare
in class WfXMLMessage
partner
- The partner to which the message will be sent.protected void prepare(String targetURL)
Partner
object provided.targetURL
- target URL to which the message will be sent.public void setMessageType(short type)
WfXMLMessage
setMessageType
in class WfXMLMessage
type
- Use the constants WfXMLMessage.REQUEST
or WfXMLMessage.RESPONSE
as value for this parameter, depending on if you want to create
a request or a response message.public void setState(short state)
state
- one of the states defined in the WfXMLMessage
base class.
If you set the state to WfXMLMessage.PI_STATE_NONE
state info
will be completely removed from the message.public short getState()
short
value is one of the constant values
defined in the WfXMLMessage
base class. If no state is set in this
message, the returned value will be WfXMLMessage.PI_STATE_NONE
.@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.