public abstract class WfXMLDocFormMessage extends WfXMLMessage
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 |
WfXMLDocFormMessage() |
protected |
WfXMLDocFormMessage(Document doc) |
Modifier and Type | Method and Description |
---|---|
void |
addProcessForm(String formName,
DMSForm form)
Use this method to add process forms to a message
message.
|
void |
addProcessForm(String formName,
WfXMLForm form)
Use this method to add a process form to this message.
|
void |
addToDMSFolder(Collection<DMSObject> dmsObjects)
This method adds a
Collection of DMSObject
objects to the DMS folder of this message. |
void |
addToDMSFolder(DMSObject obj)
This method adds a
DMSObject to the message. |
void |
addToDMSFolder(WfXMLObject obj)
Use this method to add any
WfXMLObject to the process instance's
DMSFolder without having a DMSObject . |
void |
attachNote(DMSNote note)
Use this method if you want that a note will be attached to message.
|
void |
attachNote(String subject,
String content,
String userId,
boolean isPrivate)
|
void |
attachNote(WfXMLNote note)
Use this method to attach a note to this message.
|
Collection<DMSObject> |
createAttachedNotes()
Use this method to get all attached notes out of this message (these are
notes which should be attached directly to the new process instance).
|
Collection<WfXMLNote> |
getAttachedNotes()
Use this method to get all attached notes as
WfXMLNote objects. |
WfXMLFolder |
getDMSFolder()
This method returns a
WfXMLFolder object containing
the content of the DMS folder part of this message. |
protected abstract Element |
getDMSParentElem()
Get the correct element of the message that wiil contain DMS artefacts;
|
WfXMLForm |
getProcessForm(String formName)
Use this method to get a specific process form out of this message.
|
List<WfXMLObject> |
listDMSFolderContent()
Use this method to get the content of this message's DMSFolder (that's
the DMSFolder content of the process instance that changed its state).
|
List<WfXMLForm> |
listProcessForms()
Use this method to get a list of process forms included in this message.
|
addParameterValueElem, assureBodyExists, assureHeaderExists, assureTransportExists, createMessage, createMessage, getDocumentCreator, getException, getMessageIdentifier, getMessageOrigin, getMessageType, getParameterValueElem, getParameterValueElems, getPlainKey, getResponseRequired, getStateString, getTimestamp, getTransportElementValue, prepare, setDocumentCreator, setException, setMessageIdentifier, setMessageOrigin, setMessageType, setPlainKey, setResponseRequired, setTimestamp, setTransportElement, toPrettyString, toString, write
protected WfXMLDocFormMessage()
protected WfXMLDocFormMessage(Document doc)
public final void addProcessForm(String formName, DMSForm form) throws Exception
formName
here, so that the values of the added form will be
used for the correct process form.public final void addProcessForm(String formName, WfXMLForm form)
formName
- The form name of that process form as defined in the
process definition.form
- The DMSForm
that you want to add.
if any other error occurs while the process form is
added (database problems, etc.).public final void addToDMSFolder(Collection<DMSObject> dmsObjects) throws Exception
Collection
of DMSObject
objects to the DMS folder of this message.
If you want that notes will be attached to the process instance, use one
of the attachNote
methods.dmsObjects
- A Collection
containing DMSObject
objects.IllegalArgumentException
- If the objects
collection contains
an object which is no DMSObject
Exception
- If other errors occur and the operation fails. The message
can be in an undefined state after such an exception. Some objects may
have been added and some others not.public final void addToDMSFolder(DMSObject obj) throws Exception
DMSObject
to the message.
DMSObjects can only be added for request messages. After the new process has
been started on the remote server, these objects will be added to its document
folder.addProcessForm
methods instead.attachNote
method.obj
may be one of the following:
DMSNote
- the DMSNote is added (it will
be placed in the document folder, and not attached to the new process
instance!).DMSDocForm
- the document (base64 encoded)
and any notes that may be attached to the document are added.DMSFolder
- a whole DMSFolder including all
content (also subfolders!) is added.DMSForm
- the form plus any referenced forms
and subforms and attached notes are added.DMSLink
- the linked object (one of the
4 types mentioned before) is added.obj
- The DMSObject
that you want to
add to the message.Exception
- if any error occurs while the object is added.WfXMLMessageException
- if adding failed because of an error. This
can happen if, e.g., there is not enough memory for adding the object.public final void addToDMSFolder(WfXMLObject obj) throws WfXMLMessageException
WfXMLObject
to the process instance's
DMSFolder without having a DMSObject
. You
can simply create a WfXMLObject
instead and add it with this method.
On response messages this method will not have any effect.obj
- The WfXMLObject
you want to add.WfXMLMessageException
- if the object could not be added because of
a runtime problem (e.g., not enough memory for adding the object).public final void attachNote(DMSNote note) throws Exception
addToDMSFolder(DMSObject)
method instead.public final void attachNote(String subject, String content, String userId, boolean isPrivate)
WfXMLNote
or DMSNote
objects.subject
, a
content
, and the ID of a user who will be the creator of the
note on the remote server. The boolean value indicates whether the note will
be private or public.subject
- A Subject for the note.content
- The content of the note.userId
- ID String of the user. You can set this to null
if you don't want to specify a particular user for this note. In that case
either the default document creator (see WfXMLMessage.setDocumentCreator
)
or the starter of the process instance will be set as user.isPrivate
- set this parameter to true
if this note should
be private (only the specified user will be able to read it), or to
false
, if all users should be able to read the note.public final void attachNote(WfXMLNote note)
note
- The WfXMLNote
object you want to
attach.public final Collection<WfXMLNote> getAttachedNotes()
WfXMLNote
objects. This
method does not create any DMSObject
objects.Collection
filled with WfXMLNote
objects representing all attached notes. If there are no notes, or if this
is a response message (which cannot contain notes), you will receive an
empty Collection.public final Collection<DMSObject> createAttachedNotes()
DMSNote
objects are created for the notes and returned in a collection.getAttachedNotes()
method to get all attached
notes, and then calls WfXMLNote.createDMSObject(com.groiss.org.User)
on all of the notes.DMSNote
objects
containing notes for the new process instance. If there are no notes, the
Collection will be empty (this also happens if you call this method for
response messages).public final WfXMLForm getProcessForm(String formName)
WfXMLForm
, so you can access all of its
content easily.formName
- The form name of the process form that you want to get.WfXMLForm
with the content of the form, or
null
if no process form with the given name exists.public final List<WfXMLForm> listProcessForms()
public final List<WfXMLObject> listDMSFolderContent()
WfXMLObject
objects. If you need
DMSObject
objects, you can create
DMSObject
s easily by calling the
WfXMLObject
s' WfXMLObject.createDMSObject(com.groiss.org.User)
method.WfXMLObject
objects. If the
folder is empty, the returned array will be empty, too.public final WfXMLFolder getDMSFolder()
WfXMLFolder
object containing
the content of the DMS folder part of this message. Warning: don't create a
DMSFolder
out of this folder, because it is not supposed
to be created "in real". You can use this folder to update an existing folder
(especially the DMS folder of a process) by using the folder's
fill
method.DMSFolder
holding the content of this message's
DMS folder.protected abstract Element getDMSParentElem()
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.