public class InternalMessage
extends java.lang.Object
javax.jms.Message
object to an
InternalMessage
object by constructing the InternalMessage
using InternalMessage(Message)
, and from an InternalMessage
object to a javax.jms.Message
using
populateJavaxJmsMessage(Message)
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DESTINATION_EVENT_PERSISTENT_ID_KEY
Property name for the message property containing the persistent IDs for
destination events.
|
static int |
DESTINATION_NOT_PROVIDED_CODE
Result code returned from the
MessagePublisherService or
ProcessExecutionService.handleMessages(InternalMessage[])
indicating that the message could not be sent because none of the destination
fields were not filled in. |
static java.lang.String |
DESTINATION_PMUUID_KEY
Property name for the message property containing the UUIDs for destination
process models.
|
static java.lang.String |
DESTINATION_PROCESS_ID_KEY
Property name for the message property containing the IDs for destination
processes.
|
static java.lang.String |
DESTINATION_PROCESS_MODEL_ID_KEY
Property name for the message property containing the IDs for destination process
models.
|
static int |
DUPLICATE_MESSAGE_CODE
Result code returned from the
MessagePublisherService or
ProcessExecutionService.handleMessages(InternalMessage[])
indicating that the message was not sent because a message with the same ID had
previously been sent. |
static java.lang.String |
EXTERNAL_TO_PROCESS
Message type name for a message sent from a non-Appian Process application to
Appian Process (e.g., a message sent from PeopleSoft to a Receive Message event).
|
static int |
INVALID_USERNAME_CODE
Result code returned from the
MessagePublisherService or
ProcessExecutionService.handleMessages(InternalMessage[])
indicating that the message could not be sent because the username provided was
invalid. |
static java.lang.String |
JMS_TYPE_KEY
Property name for the message property containing the message type.
|
static java.lang.String |
JMS_TYPE_KEY_BC |
static int |
JMS_TYPE_NOT_PROVIDED_CODE
Result code returned from the
MessagePublisherService or
ProcessExecutionService.handleMessages(InternalMessage[])
indicating that the message could not be sent because the JMS type was not
provided. |
static java.lang.String |
MAIL
Message type name for a message sent via e-mail to Appian Process.
|
static java.lang.String |
MAIL_ATTACHMENTS_KEY
(Email message types only) Property name for the message property containing the
document IDs of any e-mail attachments that were saved into Appian Content.
|
static java.lang.String |
MAIL_KEY_KEY
(Email message types only) Property name for the message property containing the
key from the subject of the e-mail.
|
static java.lang.String |
MAIL_SUBJECT_KEY
(Email message types only) Property name for the message property containing
subject of the e-mail, in its original form.
|
static int |
MESSAGE_UNDELIVERED_CODE
Result code to indicate the message was not delivered to the server as the server
was down.
|
static java.lang.String |
PROCESS_TO_PROCESS
Message type name for a message sent from Appian Process to Appian Process (e.g.,
a Send Message event would send this type of message to a Receive Message event).
|
static int |
SUCCESS_CODE
Result code returned from the
MessagePublisherService or
ProcessExecutionService.handleMessages(InternalMessage[])
indicating that the message was successfully sent. |
static java.lang.String |
USERNAME_KEY
Property name for the message property containing the username of the user that
sent the message.
|
Constructor and Description |
---|
InternalMessage()
Default constructor.
|
InternalMessage(javax.jms.Message javaxJmsMessage_)
Constructs a new
InternalMessage based on an existing JMS message (
javax.jms.Message ). |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
eventPersistentUUID(java.lang.String uuid)
Generate String suitable for setting
InternalMessage.DESTINATION_EVENT_PERSISTENT_ID_KEY
|
static java.lang.String |
eventPersistentUUIDs(java.util.List<java.lang.String> listUuids)
Generate String suitable for setting
InternalMessage.DESTINATION_EVENT_PERSISTENT_ID_KEY
|
static java.lang.String |
eventPersistentUUIDs(java.lang.String[] uuids)
Generate String suitable for setting
InternalMessage.DESTINATION_EVENT_PERSISTENT_ID_KEY
|
void |
externalizeBooleanProperties()
Externalizes all Boolean properties so that they are handled correctly by
Expression.
|
java.lang.String |
getBody()
Gets the message body.
|
java.lang.String[] |
getDestinationEventPersistentID()
Gets the destination event persistent IDs (which events the message will be sent
to).
|
java.lang.Long[] |
getDestinationPMID()
Gets the destination PM IDs (which process models the message will be sent to).
|
java.lang.String[] |
getDestinationPMUUID()
Gets the destination PM UUIDs (which process models the message will be sent to).
|
java.lang.Long[] |
getDestinationProcessID()
Gets the destination process IDs (which processes the message will be sent to).
|
java.lang.Long |
getId()
Gets the message ID.
|
java.lang.String |
getJMSType() |
java.lang.String |
getMessageType()
Gets the message type (
JMS_TYPE_KEY ). |
java.util.Map |
getProperties()
Gets the message properties.
|
java.lang.Object |
getProperty(java.lang.String name_)
Gets the named property.
|
boolean |
getPropertyExternalizationState(java.lang.String name_)
Gets the message property externalization state for the specified property.
|
java.util.Map |
getPropertyExternalizationStates()
Gets the message property externalization states.
|
java.lang.String |
getUserName()
Gets the UserName property.
|
TypedVariable |
internalizeExternalizedProperty(java.lang.String name_)
Returns the internalized version of the externalized property.
|
void |
minimizeTypeSizes()
Makes the underlying storage for all of the properties the smallest it can be but
still storing the data.
|
javax.jms.Message |
populateJavaxJmsMessage(javax.jms.Message javaxJmsMessage_)
Populates the JMS message with the body and properties of this message.
|
static java.lang.String |
processId(java.lang.Long pid)
Generate String suitable for setting
InternalMessage.DESTINATION_PROCESS_MODEL_ID_KEY
|
static java.lang.String |
processIds(java.util.List<java.lang.Long> listPids)
Generate String suitable for setting
InternalMessage.DESTINATION_PROCESS_MODEL_ID_KEY
|
static java.lang.String |
processIds(java.lang.Long[] pids)
Generate String suitable for setting
InternalMessage.DESTINATION_PROCESS_MODEL_ID_KEY
|
static java.lang.String |
processModelId(java.lang.Long pmid)
Generate String suitable for setting
InternalMessage.DESTINATION_PROCESS_MODEL_ID_KEY
|
static java.lang.String |
processModelIds(java.util.List<java.lang.Long> listPmids)
Generate String suitable for setting
InternalMessage.DESTINATION_PROCESS_MODEL_ID_KEY
|
static java.lang.String |
processModelIds(java.lang.Long[] pmids)
Generate String suitable for setting
InternalMessage.DESTINATION_PROCESS_MODEL_ID_KEY
|
static java.lang.String |
processModelUUID(java.lang.String uuid)
Generate String suitable for setting
InternalMessage.DESTINATION_PMUUID_KEY
|
static java.lang.String |
processModelUUIDs(java.util.List<java.lang.String> listUuids)
Generate String suitable for setting
InternalMessage.DESTINATION_PMUUID_KEY
|
static java.lang.String |
processModelUUIDs(java.lang.String[] uuids)
Generate String suitable for setting
InternalMessage.DESTINATION_PMUUID_KEY
|
static void |
routeToEventPersistentId(javax.jms.Message message,
java.lang.Long processId,
java.lang.String eventPersistentUuid,
java.lang.String username)
Populate the JMS Message with routing information to the given event persistent id from the given username.
|
static void |
routeToEventPersistentId(javax.jms.Message message,
java.lang.String eventPersistentUuid,
java.lang.String username)
Populate the JMS Message with routing information to the given event persistent id from the given username.
|
static void |
routeToEventPersistentId(javax.jms.Message message,
java.lang.String processModelUuid,
java.lang.String eventPersistentUuid,
java.lang.String username)
Populate the JMS Message with routing information to the given event persistent id from the given username.
|
static void |
routeToProcess(javax.jms.Message message,
java.lang.Long processId,
java.lang.String username)
Populate the JMS Message with routing information to the given process from the given username.
|
static void |
routeToProcessModel(javax.jms.Message message,
java.lang.Long processModelId,
java.lang.String username)
Populate the JMS Message with routing information to the given process model from the given username.
|
static void |
routeToProcessModel(javax.jms.Message message,
java.lang.String processModelUuid,
java.lang.String username)
Populate the JMS Message with routing information to the given process model from the given username.
|
void |
setBody(java.lang.String body_)
Sets the message body.
|
void |
setDestinationEventPersistentID(java.lang.String[] eventPersistentIds_)
Sets the destination event persistent ID property (which events the message will
be sent to).
|
void |
setDestinationPMID(java.lang.Long[] processModelIds_)
Sets the destination PM ID property (which process models the message will be sent
to).
|
void |
setDestinationPMUUID(java.lang.String[] processModelUuids)
Sets the destination PM UUID property (which process models the message will be
sent to).
|
void |
setDestinationProcessID(java.lang.Long[] processIds_)
Sets the destination process ID property (which processes the message will be sent
to).
|
void |
setExternalizedProperty(java.lang.String name_,
java.lang.Object value_,
long type_,
boolean multiple_)
Externalizes the value and sets the specified message property to the value
provided.
|
void |
setExternalizedProperty(java.lang.String name_,
java.lang.Object value_,
java.lang.Long type_,
boolean multiple_)
Externalizes the value and sets the specified message property to the value
provided.
|
void |
setId(java.lang.Long id_)
Sets the message ID.
|
void |
setJMSType(java.lang.String jmsType_) |
void |
setMessageType(java.lang.String jmsType_)
Sets the message type (
JMS_TYPE_KEY ) to the type passed in. |
void |
setProperties(java.util.Map properties_)
Sets the message properties.
|
void |
setProperty(java.lang.String name_,
java.lang.Object value_)
Sets the specified message property to the given value.
|
void |
setProperty(java.lang.String name_,
java.lang.Object value_,
boolean externalized_)
Sets the specified message property to the value, and sets the externalized map
entry for that property to the boolean passed in.
|
void |
setPropertyBestType(java.lang.String name_,
java.lang.String strRep_)
Sets the specified message property using the "best fit" type.
|
void |
setPropertyExternalizationState(java.lang.String name_,
boolean isExternalized_)
Sets the message property externalization state for the specified property.
|
void |
setPropertyExternalizationStates(java.util.Map propertyExternalizationStates_)
Sets the message property externalization states.
|
void |
setSmartProperty(java.lang.String name,
java.lang.Object value)
Determines if a value is plain, comma-delimited or externalized, and sets accordingly.
123 is an id destination (all digits)
0001d0c7-d9ae-8000-d9ae-57b76157b761 is a UUID destination (all hex-digits an -, 8-4-4-4-12)
01000000200000000000000003000000040000006162630001000000030000000100000002000000 is an externalized destination (>=80 hex-digits)
123,45,67890123 is a list of ids
uuid, uuid, uuid is a list of uuids
(list of externals is not allowed, and unnecessary, as it's embedded)
Number (Integer, Long) values are allowed for ids.
|
void |
setUserName(java.lang.String username_)
Sets the UserName property.
|
boolean |
shouldGoToAllServers()
Checks whether the message should go to design and all execution servers.
|
java.lang.String |
toString()
String representation of this object.
|
static boolean |
validatePropertyName(java.lang.String propertyName_)
Checks if property name is valid.
|
static boolean |
validatePropertyNameChar(char c_)
Checks whether a character is allowed in a property name.
|
public static final java.lang.String PROCESS_TO_PROCESS
public static final java.lang.String EXTERNAL_TO_PROCESS
MAIL
message
type.public static final java.lang.String MAIL
public static final int SUCCESS_CODE
MessagePublisherService
or
ProcessExecutionService.handleMessages(InternalMessage[])
indicating that the message was successfully sent.public static final int JMS_TYPE_NOT_PROVIDED_CODE
MessagePublisherService
or
ProcessExecutionService.handleMessages(InternalMessage[])
indicating that the message could not be sent because the JMS type was not
provided.public static final int INVALID_USERNAME_CODE
MessagePublisherService
or
ProcessExecutionService.handleMessages(InternalMessage[])
indicating that the message could not be sent because the username provided was
invalid.public static final int DESTINATION_NOT_PROVIDED_CODE
MessagePublisherService
or
ProcessExecutionService.handleMessages(InternalMessage[])
indicating that the message could not be sent because none of the destination
fields were not filled in.public static final int DUPLICATE_MESSAGE_CODE
MessagePublisherService
or
ProcessExecutionService.handleMessages(InternalMessage[])
indicating that the message was not sent because a message with the same ID had
previously been sent.public static final int MESSAGE_UNDELIVERED_CODE
public static final java.lang.String DESTINATION_PMUUID_KEY
AppianType.STRING
).public static final java.lang.String DESTINATION_PROCESS_ID_KEY
TypedVariableTypes.LONG
).
Note that you can set this property by calling
setDestinationProcessID(Long[])
.public static final java.lang.String DESTINATION_PROCESS_MODEL_ID_KEY
TypedVariableTypes.LONG
).
Note that you can set this property by calling setDestinationPMID(Long[])
.public static final java.lang.String DESTINATION_EVENT_PERSISTENT_ID_KEY
AppianType.STRING
). Note that you
can set this property by calling
setDestinationEventPersistentID(String[])
.public static final java.lang.String JMS_TYPE_KEY
public static final java.lang.String JMS_TYPE_KEY_BC
public static final java.lang.String USERNAME_KEY
public static final java.lang.String MAIL_ATTACHMENTS_KEY
AppianType.DOCUMENT
).public static final java.lang.String MAIL_KEY_KEY
AppianType.STRING
). Keys
can be placed in the subject of an e-mail, and are enclosed between [ and ]
markers. For example, if the e-mail subject were "[ticket-142] My Ticket", the key
would be "ticket-142".public static final java.lang.String MAIL_SUBJECT_KEY
AppianType.STRING
).public InternalMessage()
public InternalMessage(javax.jms.Message javaxJmsMessage_) throws javax.jms.JMSException
InternalMessage
based on an existing JMS message (
javax.jms.Message
). All of the message properties with valid names
are copied from the JMS message into the new InternalMessage
(property name validity is determined by calling
validatePropertyName(String)
). In addition, if the JMS message is a
TextMessage
, the body is also copied from the JMS message into the
new InternalMessage
. A log4j message will be printed out with a log
level of WARN if the message property has an invalid name.javaxJmsMessage_
- the JMS message to populate the newly constructed object
fromjavax.jms.JMSException
- if any exceptions are thrown from the JMS methodspublic static java.lang.String processModelId(java.lang.Long pmid)
pmid
- public static java.lang.String processModelIds(java.lang.Long[] pmids)
pmids
- public static java.lang.String processModelIds(java.util.List<java.lang.Long> listPmids)
pmids
- public static java.lang.String processId(java.lang.Long pid)
pmid
- public static java.lang.String processIds(java.lang.Long[] pids)
pmids
- public static java.lang.String processIds(java.util.List<java.lang.Long> listPids)
pmids
- public static java.lang.String processModelUUID(java.lang.String uuid)
uuid
- public static java.lang.String processModelUUIDs(java.lang.String[] uuids)
uuids
- public static java.lang.String processModelUUIDs(java.util.List<java.lang.String> listUuids)
uuids
- public static java.lang.String eventPersistentUUID(java.lang.String uuid)
uuid
- public static java.lang.String eventPersistentUUIDs(java.lang.String[] uuids)
uuids
- public static java.lang.String eventPersistentUUIDs(java.util.List<java.lang.String> listUuids)
uuids
- public java.lang.String getBody()
setBody(String).
public void setBody(java.lang.String body_)
body_
- the message bodygetBody()
public java.lang.Long getId()
setId(Long)
public void setId(java.lang.Long id_)
id_
- the message IDgetId()
public java.util.Map getProperties()
setProperties(Map)
public void setProperties(java.util.Map properties_)
properties_
- the message property mapgetProperties()
public void setProperty(java.lang.String name_, java.lang.Object value_)
setProperty(String, Object, boolean)
with the
externalized_
parameter set to false.name_
- the property namevalue_
- the valuegetProperty(String)
public void setPropertyBestType(java.lang.String name_, java.lang.String strRep_)
AppianBeanUtils.convertToBestFitType(java.lang.String, boolean)
. Note that this does not minimize the number of bytes necessary to represent a
number, such as converting 125 from a Long into a Byte. The
minimizeTypeSizes()
method does that.name_
- the property namestrRep_
- the valuepublic void setProperty(java.lang.String name_, java.lang.Object value_, boolean externalized_)
setExternalizedProperty(String, Object, Long, boolean)
name_
- the property namevalue_
- the valueexternalized_
- whether the value has been externalizedgetProperty(String)
public void setSmartProperty(java.lang.String name, java.lang.Object value)
name
- value
- public java.lang.Object getProperty(java.lang.String name_)
name_
- the name of the propertysetProperty(String, Object, boolean)
public void setExternalizedProperty(java.lang.String name_, java.lang.Object value_, long type_, boolean multiple_)
name_
- the property namevalue_
- the valuetype_
- the type to convert (in TypedVariable)multiple_
- whether it can contain multiple valusesetExternalizedProperty(String, Object, Long, boolean)
public void setExternalizedProperty(java.lang.String name_, java.lang.Object value_, java.lang.Long type_, boolean multiple_)
name_
- the property namevalue_
- the valuetype_
- the type to convert (in TypedVariable
)multiple_
- whether it can contain multiple valusepublic TypedVariable internalizeExternalizedProperty(java.lang.String name_)
name_
- the property nameTypedVariable
representationpublic void setMessageType(java.lang.String jmsType_)
JMS_TYPE_KEY
) to the type passed in.jmsType_
- the message type (one of PROCESS_TO_PROCESS
,
EXTERNAL_TO_PROCESS
, MAIL
, or a custom typegetMessageType()
public void setJMSType(java.lang.String jmsType_)
public java.lang.String getMessageType()
JMS_TYPE_KEY
).setMessageType(String)
public java.lang.String getJMSType()
public java.util.Map getPropertyExternalizationStates()
Boolean.TRUE
for yes, 0 or
Boolean.FALSE
for no).setPropertyExternalizationStates(Map)
,
setPropertyExternalizationState(String, boolean)
public void setPropertyExternalizationStates(java.util.Map propertyExternalizationStates_)
propertyExternalizationStates_
- the property externalization states map. The
keys must be the property names, and the values must be Booleans.getPropertyExternalizationStates()
public void setPropertyExternalizationState(java.lang.String name_, boolean isExternalized_)
name_
- the name of the propertyisExternalized_
- whether the property is externalizedgetPropertyExternalizationState(String)
public boolean getPropertyExternalizationState(java.lang.String name_)
name_
- the name of the propertysetPropertyExternalizationState(String, boolean)
public javax.jms.Message populateJavaxJmsMessage(javax.jms.Message javaxJmsMessage_) throws javax.jms.JMSException
javaxJmsMessage_
- the JMS message, generated by the JMS APIjavax.jms.JMSException
- if any errors occur in any JMS methodspublic void setDestinationPMID(java.lang.Long[] processModelIds_)
processModelIds_
- the PM IDsgetDestinationPMID()
public void setDestinationPMUUID(java.lang.String[] processModelUuids)
processModelUuids
- public java.lang.Long[] getDestinationPMID()
getProperty(String)
, it will return the externalized string.setDestinationPMID(Long[])
public java.lang.String[] getDestinationPMUUID()
getProperty(String)
, it will return the externalized string.#setDestinationPMUUID(Long[])
public void setDestinationEventPersistentID(java.lang.String[] eventPersistentIds_)
eventPersistentIds_
- the event persistent IDsgetDestinationEventPersistentID()
public java.lang.String[] getDestinationEventPersistentID()
getProperty(String)
, it will return the
externalized string.setDestinationEventPersistentID(String[])
public void setDestinationProcessID(java.lang.Long[] processIds_)
processIds_
- the process IDsgetDestinationProcessID()
public java.lang.Long[] getDestinationProcessID()
getProperty(String)
, it will return the externalized string.setDestinationProcessID(Long[])
public void setUserName(java.lang.String username_)
username_
- the usernamegetUserName()
public java.lang.String getUserName()
setUserName(String)
public void minimizeTypeSizes()
public static boolean validatePropertyName(java.lang.String propertyName_)
validatePropertyNameChar(char)
on each character other than first.propertyName_
- the property name to validatepublic static boolean validatePropertyNameChar(char c_)
c_
- the character to validatepublic boolean shouldGoToAllServers()
public java.lang.String toString()
toString
in class java.lang.Object
public void externalizeBooleanProperties()
InternalMessage
.public static void routeToProcessModel(javax.jms.Message message, java.lang.String processModelUuid, java.lang.String username) throws javax.jms.JMSException
message:
- this is the message to be populatedprocessModelUuid
- username:
- this is the nominal source usernamejavax.jms.JMSException
public static void routeToProcessModel(javax.jms.Message message, java.lang.Long processModelId, java.lang.String username) throws javax.jms.JMSException
message:
- this is the message to be populatedprocessModelId
- username:
- this is the nominal source usernamejavax.jms.JMSException
public static void routeToEventPersistentId(javax.jms.Message message, java.lang.String eventPersistentUuid, java.lang.String username) throws javax.jms.JMSException
message:
- this is the message to be populateduuid
- event persistent UUIDusername:
- this is the nominal source usernamejavax.jms.JMSException
public static void routeToEventPersistentId(javax.jms.Message message, java.lang.Long processId, java.lang.String eventPersistentUuid, java.lang.String username) throws javax.jms.JMSException
message:
- this is the message to be populateduuid
- event persistent UUIDusername:
- this is the nominal source usernamejavax.jms.JMSException
public static void routeToEventPersistentId(javax.jms.Message message, java.lang.String processModelUuid, java.lang.String eventPersistentUuid, java.lang.String username) throws javax.jms.JMSException
message:
- this is the message to be populateduuid
- event persistent UUIDusername:
- this is the nominal source usernamejavax.jms.JMSException
public static void routeToProcess(javax.jms.Message message, java.lang.Long processId, java.lang.String username) throws javax.jms.JMSException
message:
- this is the message to be populatedprocessId
- username:
- this is the nominal source usernamejavax.jms.JMSException
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.