public class GetPIDataMessage extends WfXMLDocFormMessage
Modifier and Type | Field and Description |
---|---|
static String |
DESC |
static String |
LASTMODIFIED |
protected static String |
MSG_BODY_REQ |
protected static String |
MSG_BODY_RESP |
static String |
NAME |
static String |
OBSERVERKEY |
static String |
PRIORITY |
static String |
PROCDEFKEY |
static String |
STATE |
static String |
SUBJECT |
static String |
VALIDSTATES |
body, CONTEXTDATA_DOCUMENTCREATOR, documentCreator, documentCreatorId, header, 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 |
GetPIDataMessage(Document doc)
This method is used internally for creating a GetPIDataMessage
out of a xml document.
|
|
GetPIDataMessage(short messageType)
Creates a new empty message and sets a type for that message (request or
response).
|
Modifier and Type | Method and Description |
---|---|
boolean |
areNotesRequested()
Use this method to find out if notes are requested in a request message.
|
String |
getDescription()
Use this method to get the Description attribute.
|
protected Element |
getDMSParentElem()
Get the correct element of the message that wiil contain DMS artefacts;
|
String |
getKey()
Use this method to get the oid of the target process instance.
|
Date |
getLastModified()
Use this method to get the value of the LastModified attribute.
|
String |
getName()
This method gets the Name attribute.
|
String |
getObserverKey()
Use this method to get the ObserverKey attribute.
|
int |
getPriority()
Use this method to get the Priority attribute.
|
String |
getProcessDefinitionKey()
Use this method to get the ProcessDefinitionKey attribute.
|
short |
getState()
This method returns the value set in the State attribute.
|
String |
getSubject()
Use this method to get the Subject attribute.
|
short[] |
getValidStates()
Use this method to get all states set in the ValidStates attribute.
|
boolean |
isDMSFolderRequested()
Use this method to find out if the content of the process instance's DMSFolder
is requested in a request message.
|
List<String> |
listProcessFormNames()
Use this method to get all form names of the process forms that are included
in this message.
|
String[] |
listRequestedAttributeNames()
Use this method to get a list containing the names of all requested
attributes.
|
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 |
requestDMSFolder()
Adds a request for the content of the process instance's DMSFolder to a
request message.
|
void |
requestNotes()
Adds a request for all notes to a request message.
|
void |
requestProcessForm(String formName)
Adds a request for a specific process form to a request message.
|
void |
requestProcessForms()
Call this method on request messages in order to add a request for process
forms.
|
void |
setDescription(String description)
This method sets the Description attribute.
|
void |
setKey(String procInstID)
Sets the key for the GetProcessInstanceData message.
|
void |
setLastModified(Date date)
This method sets the LastModified attribute.
|
void |
setMessageType(short type)
Set the message type of this WfXML message (in the message header).
|
void |
setName(String name)
This method sets the Name attribute.
|
void |
setObserverKey(String observerKey)
This method sets the ObserverKey attribute.
|
void |
setPriority(int value)
Use this method to set the Priority attribute.
|
void |
setProcessDefinitionKey(String procDefKey)
This method sets the ProcessDefinitionKey attribute.
|
void |
setState(short state)
Use this method to set the State attribute.
|
void |
setSubject(String subject)
This method sets the Subject attribute.
|
void |
setValidStates(short[] states)
Use this method to set the ValidStates attribute.
|
addProcessForm, addProcessForm, addToDMSFolder, addToDMSFolder, addToDMSFolder, attachNote, attachNote, attachNote, createAttachedNotes, getAttachedNotes, getDMSFolder, getProcessForm, listDMSFolderContent, listProcessForms
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 static final String NAME
public static final String SUBJECT
public static final String DESC
public static final String STATE
public static final String VALIDSTATES
public static final String OBSERVERKEY
public static final String PROCDEFKEY
public static final String PRIORITY
public static final String LASTMODIFIED
public GetPIDataMessage(short messageType)
messageType
- The type of the new message. Use WfXMLMessage.REQUEST
or WfXMLMessage.RESPONSE
as type.protected GetPIDataMessage(Document doc)
doc
- JDOM Document containing the content for the message.public void setKey(String procInstID)
WfXMLMessage.setPlainKey(java.lang.String)
method instead. With that method you can
set a complete key, like you receive it after you created a new process
instance with a CreatePIMessage
.procInstID
- The unique process instance OID of the process instance
on the remote partner server. This parameter must be provided.IllegalArgumentException
- if procInstID == null
.public String getKey() throws WfXMLMessageException
WfXMLMessage.getPlainKey()
method.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
never 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)
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 setName(String name)
name
parameter to null
). In @enterprise the name
is a process instance's id. name
- The name - according to the WfXML specification this is a
human readable identifier of the resource. In case this is a request
message, you can pass null
as parameter.public String getName()
null
, if the message doesn't contain a name.null
.
See the text above for further details.public void setSubject(String subject)
setName(java.lang.String)
method, with the only difference that it sets the subject
attribute instead of the name attribute.subject
- The value of the subject attribute. According to the WfXML
specification this is a short description of the process instance.
If this is a request message, you can set the parameter to null
.public String getSubject()
getName()
method for more details (this method works identically).null
.
See the similar getName()
method for more details.public void setDescription(String description)
setName(java.lang.String)
method, with the only difference that it sets the description
attribute instead of the name attribute. @enterprise doesn't return descriptions,
because descriptions with this semantics don't exist.description
- The value of the description attribute. According to the
WfXML specification this is a longer description of this process instance resource.
If this is a request message, you can set the parameter to null
.public String getDescription()
getName()
method for more details (this method works identically).null
.
See the similar getName()
method for more details.public void setObserverKey(String observerKey)
setName(java.lang.String)
method, with the only difference that it sets the observerkey
attribute instead of the name attribute.observerKey
- The value of the observerkey attribute. This is the id of
the observer which is registered for the process instance that you are
requesting data from. If this is a request message, you can set the parameter
to null
.public String getObserverKey()
getName()
method for more details (this method works identically).null
.
See the similar getName()
method for more details.public void setProcessDefinitionKey(String procDefKey)
setName(java.lang.String)
method.procDefKey
- The value of the process definition key. This is
the URI of the process definition resource from which this instance
was created.public String getProcessDefinitionKey()
getName()
method for more details (this method works identically).null
. See the similar getName()
method for
more details.public void setPriority(int value)
setName(java.lang.String)
method. If you want to set "no value" for the priority
(e.g., in request messages), use 0
as parameter.MessageListener
that sets the right value.value
- The priority that you want to set. The priority indicates the
relative importance of this process instance. Regular values are
integers from 1
(highest priority) to 5
(lowest
priority). Use 0
if you don't want to set a value (e.g., in a
request message). If you attempt to set an invalid value, no value will be
set.public int getPriority()
1-5
). If no value has been set, or
the attribute does not exist at all, 0
will be returned.0
if no value
is defined or the attribute does not exist.public void setLastModified(Date date)
setName(java.lang.String)
method.date
- The date that you want to set for this attribute. This is
the date of the last modification of the process instance.public Date getLastModified()
Date
object containing the date when the
last change occured, or null
if the attribute doesn't contain
a value, the value is not readable (according to the format defined by the
WfXML specification), or the attribute does not exist in the message.Date
object or null
. See the text
above for more details.public void setState(short state)
WfXMLMessage.PI_STATE_NONE
or 0
(both indicating that there is no state defined). In the response you will find
one of the states defined as constants in WfXMLMessage
.state
- WfXMLMessage.PI_STATE_NONE
or 0
for indicating
that no state is set, or one of the valid states WfXMLMessage.PI_STATE_OPEN_RUNNING
,
WfXMLMessage.PI_STATE_OPEN_NOTRUNNING
, WfXMLMessage.PI_STATE_CLOSED_COMPLETED
,
or WfXMLMessage.PI_STATE_CLOSED_ABNORMAL_COMPLETED
.public short getState()
WfXMLMessage
. If there is no
value defined for that attribute, or if the attribute is not part of the
message at all, WfXMLMessage.PI_STATE_NONE
(0
) will be
returned. State is the current state of the process instance.public void setValidStates(short[] states)
null
as parameter. If you want to set states in
a response message, create an array containg state constants defined in
WfXMLMessage
(short
values).states
- An array containing the states that you want to set for this
parameter, or null
if you don't want to set any states at all.public short[] getValidStates()
null
will be returned. If
the attribute exists but doesn't have values set, the array will be empty.
Otherwise you retrieve an array filled with all states that have been set
for this attribute (states are constants defined in WfXMLMessage
).null
if the attribute does not exist.public String[] listRequestedAttributeNames()
NAME
, SUBJECT
, ...).public void requestProcessForms()
public void requestProcessForm(String formName)
formName
should be the name of the
process form as it is defined in the remote process instance's process
definition. The response message will contain only the requested process
forms.formName
- The name of the process form as it is defined in the
process definition.public List<String> listProcessFormNames()
null
(because no specific forms are requested).public void requestNotes()
public boolean areNotesRequested()
true
if notes are requested, or false
if
notes are not requested.public void requestDMSFolder()
public boolean isDMSFolderRequested()
true
if the content of the DMSFolder is requested, or
false
if it is not requested.protected Element getDMSParentElem()
WfXMLDocFormMessage
getDMSParentElem
in class WfXMLDocFormMessage
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.