updated docs
This commit is contained in:
parent
b8d75dd95f
commit
0d9b40f020
apidocs
src/main/java/com/inteligr8/activiti/mq
@ -6,6 +6,10 @@
|
||||
|
||||
This delegate sends a message to an MQ queue.
|
||||
|
||||
The process instance will continue after a successful publish of the message by this delegate to the specified queue. Use `mqSubscribeReplyDelegate` in a subsequent task to handle the response asynchronously.
|
||||
|
||||
If you have more than one MQ communication in a single process, set the `mq_messageName` field on this and the corresponding `mqSubscribeReplyDelegate` task. The resultant variables will then include that message name (e.g. `mq_messageId_{mq_messageName}`).
|
||||
|
||||
*See Also*: [`mqSubscribeReplyDelegate`](bean-mqSubscribeReplyDelegate.md)
|
||||
*See Also*: [`mqSubscribeDelegate`](bean-mqSubscribeDelegate.md)
|
||||
|
||||
@ -20,21 +24,25 @@ ${mqPublishDelegate}
|
||||
You may use it in a **Service Task**.
|
||||
|
||||
|
||||
This method sends a message to an MQ queue.
|
||||
|
||||
It does not wait for a response and will continue after a successful publish of the message to the specified queue. Use `mqSubscribeReplyDelegate` in a subsequent task to handle the response asynchronously.
|
||||
|
||||
If you have more than one MQ communication in a single process, set the `mq_messageName` field on this and the corresponding `mqPublishDelegate` task.
|
||||
This method makes this bean an Activiti delegate.
|
||||
|
||||
| Input Type | Name | Java Type | Documentation |
|
||||
| ------------------------ | ------------------------ | ------------------------------------------------ | ---------------------------------- |
|
||||
| BPMN Field | `mq_connectorId` | | An Activiti App Tenant Endpoint ID or Java system property in the format `inteligr8.mq.connectors.{connectorId}.url`. Using system properties support `url`, `username`, and `password`. |
|
||||
| BPMN Field | `mq_queueName` | | The name of an MQ destination (queue or topic). This is the target of the message. If it doesn't exist, it will be created. |
|
||||
| BPMN Field | `mq_messageName` | | [optional] A unique identifier to append to Activiti variables when more than one MQ message publication/subscription is supported by a process. |
|
||||
| BPMN Field | `mq_metadataProcessScope` | | [optional] `true` to set the `mq_messageId` result variable in the process instance scope; otherwise the variable will be local to the task. `mq_correlationId` is always at the process scope. |
|
||||
| BPMN Field | `mq_messageName` | | [optional] A unique identifier to append to Activiti result variable names when more than one MQ message publication/subscription is supported by a process. |
|
||||
| BPMN Field | `mq_priority` | | [optional] A priority of the MQ message. May be an expression. Value depends on MQ protocol. |
|
||||
| BPMN Field | `mq_payload` | | [optional] The body of the MQ message. May include expressions. |
|
||||
| BPMN Field | `mq_payloadMimeType` | | [optional] The MIME type of the body of the MQ message. |
|
||||
| BPMN Field | `mq_replyQueueName` | | [optional] The name of an MQ destination (queue or topic). This tells the processor of the message where to send a reply. |
|
||||
| BPMN Field | `mq_statusQueueName` | | [optional] The name of an MQ destination (queue or topic). This tells the processor of the message where to send status updates. |
|
||||
| Activiti Variable | `mq_correlationId` | | [optional] The correlationId of the message to send. |
|
||||
|
||||
| Result Type | Java Type, Name, or Error Code | Documentation |
|
||||
| ------------------------ | ------------------------------------------------ | -------------------------------- |
|
||||
| Activiti Variable | `mq_correlationId` | The correlationId of the message sent. |
|
||||
| Activiti Variable | `mq_messageId` | The messageId of the message sent. |
|
||||
| Thrown BPMN Error | `timeout` | The MQ connection timed out connecting or waiting for a message. |
|
||||
| Thrown BPMN Error | `network` | The MQ connection experienced network issues. |
|
||||
| Thrown BPMN Error | `mq` | An unknown MQ issue occurred. |
|
||||
|
@ -6,6 +6,14 @@
|
||||
|
||||
This delegate listens for messages on an MQ queue.
|
||||
|
||||
This is expected to exist in a Service Task immediately after a plain start activity. This will cause process instances to automatically be created in order to maintain the MQ subscription as messages are received. If used in any other way, it will error and the process will fail validation.
|
||||
|
||||
This does not wait for a response to a specific message, but instead to all messages put on an MQ queue. That is for the `mqSubscribeReplyDelegate` delegate.
|
||||
|
||||
If you have more than one MQ communication in a single process, set the `mq_messageName` field on this task. The resultant variables will then include that message name (e.g. `mq_messageId_{mq_messageName}`).
|
||||
|
||||
This requires a long running connection to MQ. It runs in a long running Activiti job/execution. If there is a failure or the server is restarted, the Activiti job will fail and automatically retry per the Activiti standard features. After exhausting retries, it may eventually dead-letter. Retry the job to continue the subscription.
|
||||
|
||||
*See Also*: [`mqPublishDelegate`](bean-mqPublishDelegate.md)
|
||||
*See Also*: [`mqSubscribeReplyDelegate`](bean-mqSubscribeReplyDelegate.md)
|
||||
|
||||
@ -20,22 +28,15 @@ ${mqSubscribeDelegate}
|
||||
You may use it in a **Service Task**.
|
||||
|
||||
|
||||
This delegate listens for messages on an MQ queue.
|
||||
|
||||
It does not wait for a response to a specific message put on an MQ queue. That is for the `mqPublishDelegate` and `mqSubscribeReplyDelegate` tasks.
|
||||
|
||||
When used, this task must be the first task after a plain start event in a process. If used in any other way, it will error and the process will fail validation.
|
||||
|
||||
If you have more than one MQ communication in a single process, set the `mq_messageName` field on this task. The resultant variables will then include that message name (e.g. `mq_messageId_{mq_messageName}`).
|
||||
|
||||
TODO map response to variables
|
||||
This method makes this bean an Activiti delegate.
|
||||
|
||||
| Input Type | Name | Java Type | Documentation |
|
||||
| ------------------------ | ------------------------ | ------------------------------------------------ | ---------------------------------- |
|
||||
| BPMN Field | `mq_connectorId` | | An Activiti App Tenant Endpoint ID or Java system property in the format `inteligr8.mq.connectors.{connectorId}.url`. Using system properties support `url`, `username`, and `password`. |
|
||||
| BPMN Field | `mq_queueName` | | The name of an MQ destination (queue or topic). This is the target of the message. If it doesn't exist, it will be created. |
|
||||
| BPMN Field | `mq_metadataProcessScope` | | [optional] `true` to set all variables below in the process instance scope; otherwise the variables will be local to the task. |
|
||||
| BPMN Field | `mq_messageName` | | [optional] A unique identifier to append to Activiti variables when more than one MQ message publication/subscription is supported by a process. |
|
||||
| BPMN Field | `mq_metadataProcessScope` | | [optional] `true` to set all Activiti result variables in the process instance scope; otherwise the variables will be local to the task. |
|
||||
| BPMN Field | `mq_messageName` | | [optional] A unique identifier to append to Activiti result variable names when more than one MQ message publication/subscription is supported by a process. |
|
||||
| BPMN Field | `mq_concurrency` | | The number of process instances to simultaneously listen on the queue. Only positive numbers are accepted. |
|
||||
|
||||
| Result Type | Java Type, Name, or Error Code | Documentation |
|
||||
| ------------------------ | ------------------------------------------------ | -------------------------------- |
|
||||
@ -43,7 +44,10 @@ TODO map response to variables
|
||||
| Activiti Variable | `mq_messageId` | The unique message identifer of the message received. |
|
||||
| Activiti Variable | `mq_deliveryTime` | The time the message was delivered; not received. It is of the `java.util.Date` type as supported by Activiti. |
|
||||
| Activiti Variable | `mq_priority` | An integer priority of the message; value depends on MQ protocol. |
|
||||
| Activiti Variable | `mq_replyQueueName` | The name of a queue or topic to use to reply to the received message. The reply message must have the same correlating identifier. |
|
||||
| Activiti Variable | `mq_payload` | The body of the MQ message. May include expressions. May be `null`. |
|
||||
| Activiti Variable | `mq_payloadMimeType` | The MIME type of the body of the MQ message. May be `null`. |
|
||||
| Activiti Variable | `mq_replyQueueName` | The name of an MQ destination (queue or topic) to use to reply to the received message. The reply message must have the same correlating identifier. May be `null`. |
|
||||
| Activiti Variable | `mq_statusQueueName` | The name of an MQ destination (queue or topic) to use to reply to the received message. The reply message must have the same correlating identifier. May be `null`. |
|
||||
| Thrown BPMN Error | `timeout` | The MQ connection timed out connecting or waiting for a message. |
|
||||
| Thrown BPMN Error | `network` | The MQ connection experienced network issues. |
|
||||
| Thrown BPMN Error | `mq` | An unknown MQ issue occurred. |
|
||||
|
@ -4,10 +4,16 @@
|
||||
*Since Version*: 1.0
|
||||
|
||||
|
||||
This delegate listens for a reply message on an MQ queue.
|
||||
This method listens for a reply message on an MQ queue.
|
||||
|
||||
*See Also*: mqPublishDelegate
|
||||
*See Also*: mqSubscribeDelegate
|
||||
The process instance will block until a corresponding reply message is received. It uses the `mq_correlationId` variable to select the corresponding reply message. That variable is automatically set by the `mqPublishDelegate` task. This is meant to be used after `mqPublishDelegate` and not just by itself. If you want to start processes with an MQ subscription see the `mqSubscribeDelegate` task.
|
||||
|
||||
If you have more than one MQ communication in a single process, set the `mq_messageName` field on this and the corresponding `mqPublishDelegate` task. The resultant variables will then include that message name (e.g. `mq_messageId_{mq_messageName}`).
|
||||
|
||||
This requires a long running connection to MQ. It runs in a long running Activiti job/execution. If there is a failure or the server is restarted, the Activiti job will fail and automatically retry per the Activiti standard features. After exhausting retries, it may eventually dead-letter. Retry the job to continue the subscription.
|
||||
|
||||
*See Also*: [`mqPublishDelegate`](bean-mqPublishDelegate.md)
|
||||
*See Also*: [`mqSubscribeDelegate`](bean-mqSubscribeDelegate.md)
|
||||
|
||||
## <a name="delegate"></a> Delegate Expression Uses
|
||||
|
||||
@ -20,20 +26,14 @@ ${mqSubscribeReplyDelegate}
|
||||
You may use it in a **Service Task**.
|
||||
|
||||
|
||||
This method listens for a reply message on an MQ queue.
|
||||
|
||||
It uses the `mq_correlationId` variable to select the corresponding reply message. That variable is automatically set by the `mqPublishDelegate` task. This is meant to be used after `mqPublishDelegate` and not just by itself. If you want to start processes with an MQ subscription see the `mqSubscribeDelegate` task.
|
||||
|
||||
If you have more than one MQ communication in a single process, set the `mq_messageName` field on this and the corresponding `mqPublishDelegate` task.
|
||||
|
||||
TODO map response to variables
|
||||
This method makes this bean an Activiti delegate.
|
||||
|
||||
| Input Type | Name | Java Type | Documentation |
|
||||
| ------------------------ | ------------------------ | ------------------------------------------------ | ---------------------------------- |
|
||||
| BPMN Field | `mq_connectorId` | | An Activiti App Tenant Endpoint ID or Java system property in the format `inteligr8.mq.connectors.{connectorId}.url`. Using system properties support `url`, `username`, and `password`. |
|
||||
| BPMN Field | `mq_queueName` | | The name of an MQ destination (queue or topic). This is the target of the message. If it doesn't exist, it will be created. |
|
||||
| BPMN Field | `mq_metadataProcessScope` | | [optional] `true` to set all variables below in the process instance scope; otherwise the variables will be local to the task. |
|
||||
| BPMN Field | `mq_messageName` | | [optional] A unique identifier to append to Activiti variables when more than one MQ message publication/subscription is supported by a process. |
|
||||
| BPMN Field | `mq_metadataProcessScope` | | [optional] `true` to set all Activiti result variables in the process instance scope; otherwise the variables will be local to the task. |
|
||||
| BPMN Field | `mq_messageName` | | [optional] A unique identifier to append to Activiti result variable names when more than one MQ message publication/subscription is supported by a process. |
|
||||
| Activiti Variable | `mq_correlationId` | | The correlating identifier of the message to receive. Used to correlate between sent/received messages; like a thread of communication. |
|
||||
|
||||
| Result Type | Java Type, Name, or Error Code | Documentation |
|
||||
@ -41,7 +41,10 @@ TODO map response to variables
|
||||
| Activiti Variable | `mq_messageId` | The unique message identifer of the message received. |
|
||||
| Activiti Variable | `mq_deliveryTime` | The time the message was delivered; not received. It is of the `java.util.Date` type as supported by Activiti. |
|
||||
| Activiti Variable | `mq_priority` | An integer priority of the message; value depends on MQ protocol. |
|
||||
| Activiti Variable | `mq_replyQueueName` | The name of a queue or topic to use to reply to the received message. The reply message must have the same correlating identifier. |
|
||||
| Activiti Variable | `mq_payload` | The body of the MQ message. May include expressions. May be `null`. |
|
||||
| Activiti Variable | `mq_payloadMimeType` | The MIME type of the body of the MQ message. May be `null`. |
|
||||
| Activiti Variable | `mq_replyQueueName` | The name of an MQ destination (queue or topic) to use to reply to the received message. The reply message must have the same correlating identifier. May be `null`. |
|
||||
| Activiti Variable | `mq_statusQueueName` | The name of an MQ destination (queue or topic) to use to reply to the received message. The reply message must have the same correlating identifier. May be `null`. |
|
||||
| Thrown BPMN Error | `correlation` | `mq_correlationId` is required. |
|
||||
| Thrown BPMN Error | `timeout` | The MQ connection timed out connecting or waiting for a message. |
|
||||
| Thrown BPMN Error | `network` | The MQ connection experienced network issues. |
|
||||
|
@ -23,7 +23,7 @@ It is important to note that Activiti expressions use the JUEL language and Acti
|
||||
| -------------------------------- | ------------------------- |
|
||||
| [`mqPublishDelegate`](bean-mqPublishDelegate.md) | This delegate sends a message to an MQ queue. |
|
||||
| [`mqSubscribeDelegate`](bean-mqSubscribeDelegate.md) | This delegate listens for messages on an MQ queue. |
|
||||
| [`mqSubscribeReplyDelegate`](bean-mqSubscribeReplyDelegate.md) | This delegate listens for a reply message on an MQ queue. |
|
||||
| [`mqSubscribeReplyDelegate`](bean-mqSubscribeReplyDelegate.md) | This method listens for a reply message on an MQ queue. |
|
||||
|
||||
---
|
||||
|
||||
|
@ -19,6 +19,15 @@ import com.inteligr8.activiti.mq.model.PreparedMessage;
|
||||
/**
|
||||
* This delegate sends a message to an MQ queue.
|
||||
*
|
||||
* The process instance will continue after a successful publish of the message
|
||||
* by this delegate to the specified queue. Use `mqSubscribeReplyDelegate` in
|
||||
* a subsequent task to handle the response asynchronously.
|
||||
*
|
||||
* If you have more than one MQ communication in a single process, set the
|
||||
* `mq_messageName` field on this and the corresponding
|
||||
* `mqSubscribeReplyDelegate` task. The resultant variables will then include
|
||||
* that message name (e.g. `mq_messageId_{mq_messageName}`).
|
||||
*
|
||||
* @author brian@inteligr8.com
|
||||
* @since 1.0
|
||||
* @see mqSubscribeReplyDelegate#
|
||||
@ -37,25 +46,16 @@ public class MqPublishDelegate extends AbstractMqDelegate {
|
||||
private MqServiceTaskService msts;
|
||||
|
||||
/**
|
||||
* This method sends a message to an MQ queue.
|
||||
*
|
||||
* It does not wait for a response and will continue after a successful
|
||||
* publish of the message to the specified queue. Use
|
||||
* `mqSubscribeReplyDelegate` in a subsequent task to handle the response
|
||||
* asynchronously.
|
||||
*
|
||||
* If you have more than one MQ communication in a single process, set the
|
||||
* `mq_messageName` field on this and the corresponding `mqPublishDelegate`
|
||||
* task.
|
||||
* This method makes this bean an Activiti delegate.
|
||||
*
|
||||
* @param execution An Activiti delegate execution (source task or execution/task listener).
|
||||
* @field mq_connectorId An Activiti App Tenant Endpoint ID or Java system property in the format `inteligr8.mq.connectors.{connectorId}.url`. Using system properties support `url`, `username`, and `password`.
|
||||
* @field mq_queueName The name of an MQ destination (queue or topic). This is the target of the message. If it doesn't exist, it will be created.
|
||||
* @field mq_metadataProcessScope [optional] `true` to set the `mq_messageId` variable below in the process instance scope; otherwise the variable will be local to the task. `mq_correlationId` is always at the process scope.
|
||||
* @field mq_messageName [optional] A unique identifier to append to Activiti variables when more than one MQ message publication/subscription is supported by a process.
|
||||
* @field mq_priority [optional] A priority of the MQ message. May be an expression. Value depends on MQ protocol.
|
||||
* @field mq_metadataProcessScope [optional] `true` to set the `mq_messageId` result variable in the process instance scope; otherwise the variable will be local to the task. `mq_correlationId` is always at the process scope.
|
||||
* @field mq_messageName [optional] A unique identifier to append to Activiti result variable names when more than one MQ message publication/subscription is supported by a process.
|
||||
* @field mq_priority [optional] A priority of the MQ message. May be an expression. Supported range depends on MQ protocol.
|
||||
* @field mq_payload [optional] The body of the MQ message. May include expressions.
|
||||
* @field mq_payloadMimeType [optional] The MIME type of the body of the MQ message.
|
||||
* @field mq_payloadMimeType [optional] The MIME type of the `mq_payload`.
|
||||
* @field mq_replyQueueName [optional] The name of an MQ destination (queue or topic). This tells the processor of the message where to send a reply.
|
||||
* @field mq_statusQueueName [optional] The name of an MQ destination (queue or topic). This tells the processor of the message where to send status updates.
|
||||
* @varIn mq_correlationId [optional] The correlationId of the message to send.
|
||||
|
@ -18,6 +18,25 @@ import com.inteligr8.activiti.mq.model.DeliveredMessage;
|
||||
/**
|
||||
* This delegate listens for messages on an MQ queue.
|
||||
*
|
||||
* This is expected to exist in a Service Task immediately after a plain start
|
||||
* activity. This will cause process instances to automatically be created in
|
||||
* order to maintain the MQ subscription as messages are received. If used in
|
||||
* any other way, it will error and the process will fail validation.
|
||||
*
|
||||
* This does not wait for a response to a specific message, but instead to all
|
||||
* messages put on an MQ queue. That is for the `mqSubscribeReplyDelegate`
|
||||
* delegate.
|
||||
*
|
||||
* If you have more than one MQ communication in a single process, set the
|
||||
* `mq_messageName` field on this task. The resultant variables will then
|
||||
* include that message name (e.g. `mq_messageId_{mq_messageName}`).
|
||||
*
|
||||
* This requires a long running connection to MQ. It runs in a long running
|
||||
* Activiti job/execution. If there is a failure or the server is restarted,
|
||||
* the Activiti job will fail and automatically retry per the Activiti standard
|
||||
* features. After exhausting retries, it may eventually dead-letter. Retry
|
||||
* the job to continue the subscription.
|
||||
*
|
||||
* @author brian@inteligr8.com
|
||||
* @since 1.0
|
||||
* @see mqPublishDelegate#
|
||||
@ -39,35 +58,22 @@ public class MqSubscribeDelegate extends AbstractMqDelegate {
|
||||
private MqSubscriptionService subscriptionService;
|
||||
|
||||
/**
|
||||
* This delegate listens for messages on an MQ queue.
|
||||
*
|
||||
* It does not wait for a response to a specific message put on an MQ queue.
|
||||
* That is for the `mqPublishDelegate` and `mqSubscribeReplyDelegate` tasks.
|
||||
*
|
||||
* When used, this task must be the first task after a plain start event in a
|
||||
* process. If used in any other way, it will error and the process will fail
|
||||
* validation.
|
||||
*
|
||||
* If you have more than one MQ communication in a single process, set the
|
||||
* `mq_messageName` field on this task. The resultant variables will then
|
||||
* include that message name (e.g. `mq_messageId_{mq_messageName}`).
|
||||
*
|
||||
* TODO map response to variables
|
||||
* This method makes this bean an Activiti delegate.
|
||||
*
|
||||
* @param execution An Activiti delegate execution (source task or execution/task listener).
|
||||
* @field mq_connectorId An Activiti App Tenant Endpoint ID or Java system property in the format `inteligr8.mq.connectors.{connectorId}.url`. Using system properties support `url`, `username`, and `password`.
|
||||
* @field mq_queueName The name of an MQ destination (queue or topic). This is the target of the message. If it doesn't exist, it will be created.
|
||||
* @field mq_metadataProcessScope [optional] `true` to set all variables below in the process instance scope; otherwise the variables will be local to the task.
|
||||
* @field mq_messageName [optional] A unique identifier to append to Activiti variables when more than one MQ message publication/subscription is supported by a process.
|
||||
* @field mq_metadataProcessScope [optional] `true` to set all Activiti result variables in the process instance scope; otherwise the variables will be local to the task.
|
||||
* @field mq_messageName [optional] A unique identifier to append to Activiti result variable names when more than one MQ message publication/subscription is supported by a process.
|
||||
* @field mq_concurrency The number of process instances to simultaneously listen on the queue. Only positive numbers are accepted.
|
||||
* @varOut mq_correlationId The correlating identifier of the message received. Use to correlate between sent/received messages; like a thread of communication.
|
||||
* @varOut mq_messageId The unique message identifer of the message received.
|
||||
* @varOut mq_deliveryTime The time the message was delivered; not received. It is of the `java.util.Date` type as supported by Activiti.
|
||||
* @varOut mq_priority An integer priority of the message; value depends on MQ protocol.
|
||||
* @varOut mq_payload The body of the MQ message. May include expressions. May be `null`.
|
||||
* @varOut mq_payloadMimeType The MIME type of the body of the MQ message. May be `null`.
|
||||
* @varOut mq_priority An integer priority of the message; supported range depends on MQ protocol.
|
||||
* @varOut mq_payload The body of the MQ message; may be `null`.
|
||||
* @varOut mq_payloadMimeType The MIME type of `mq_payload`; may be `null`.
|
||||
* @varOut mq_replyQueueName The name of an MQ destination (queue or topic) to use to reply to the received message. The reply message must have the same correlating identifier. May be `null`.
|
||||
* @varOut mq_statusQueueName The name of an MQ destination (queue or topic) to use to reply to the received message. The reply message must have the same correlating identifier. May be `null`.
|
||||
* @varOut mq_statusQueueName The name of an MQ destination (queue or topic) where status updates on the received message are expected to be sent. The status message must have the same correlating identifier. May be `null`.
|
||||
* @throws BPMNError timeout The MQ connection timed out connecting or waiting for a message.
|
||||
* @throws BPMNError network The MQ connection experienced network issues.
|
||||
* @throws BPMNError mq An unknown MQ issue occurred.
|
||||
@ -128,10 +134,5 @@ public class MqSubscribeDelegate extends AbstractMqDelegate {
|
||||
throw new BpmnError("mq", "JMS communication failed: " + je.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public Integer getConcurrency(DelegateExecution execution) {
|
||||
MqServiceTask task = this.msts.get(execution.getProcessDefinitionId(), execution.getCurrentActivityId());
|
||||
return task == null ? 1 : task.getFieldValueFromModel(Constants.FIELD_CONCURRENCY, Integer.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -16,7 +16,25 @@ import org.springframework.stereotype.Component;
|
||||
import com.inteligr8.activiti.mq.model.DeliveredMessage;
|
||||
|
||||
/**
|
||||
* This delegate listens for a reply message on an MQ queue.
|
||||
* This method listens for a reply message on an MQ queue.
|
||||
*
|
||||
* The process instance will block until a corresponding reply message is
|
||||
* received. It uses the `mq_correlationId` variable to select the
|
||||
* corresponding reply message. That variable is automatically set by the
|
||||
* `mqPublishDelegate` task. This is meant to be used after
|
||||
* `mqPublishDelegate` and not just by itself. If you want to start processes
|
||||
* with an MQ subscription see the `mqSubscribeDelegate` task.
|
||||
*
|
||||
* If you have more than one MQ communication in a single process, set the
|
||||
* `mq_messageName` field on this and the corresponding `mqPublishDelegate`
|
||||
* task. The resultant variables will then include that message name (e.g.
|
||||
* `mq_messageId_{mq_messageName}`).
|
||||
*
|
||||
* This requires a long running connection to MQ. It runs in a long running
|
||||
* Activiti job/execution. If there is a failure or the server is restarted,
|
||||
* the Activiti job will fail and automatically retry per the Activiti standard
|
||||
* features. After exhausting retries, it may eventually dead-letter. Retry
|
||||
* the job to continue the subscription.
|
||||
*
|
||||
* @author brian@inteligr8.com
|
||||
* @since 1.0
|
||||
@ -39,33 +57,21 @@ public class MqSubscribeReplyDelegate extends AbstractMqDelegate {
|
||||
private MqSubscriptionService subscriptionService;
|
||||
|
||||
/**
|
||||
* This method listens for a reply message on an MQ queue.
|
||||
*
|
||||
* It uses the `mq_correlationId` variable to select the corresponding reply
|
||||
* message. That variable is automatically set by the `mqPublishDelegate`
|
||||
* task. This is meant to be used after `mqPublishDelegate` and not just by
|
||||
* itself. If you want to start processes with an MQ subscription see the
|
||||
* `mqSubscribeDelegate` task.
|
||||
*
|
||||
* If you have more than one MQ communication in a single process, set the
|
||||
* `mq_messageName` field on this and the corresponding `mqPublishDelegate`
|
||||
* task.
|
||||
*
|
||||
* TODO map response to variables
|
||||
* This method makes this bean an Activiti delegate.
|
||||
*
|
||||
* @param execution An Activiti delegate execution (source task or execution/task listener).
|
||||
* @field mq_connectorId An Activiti App Tenant Endpoint ID or Java system property in the format `inteligr8.mq.connectors.{connectorId}.url`. Using system properties support `url`, `username`, and `password`.
|
||||
* @field mq_queueName The name of an MQ destination (queue or topic). This is the target of the message. If it doesn't exist, it will be created.
|
||||
* @field mq_metadataProcessScope [optional] `true` to set all variables below in the process instance scope; otherwise the variables will be local to the task.
|
||||
* @field mq_messageName [optional] A unique identifier to append to Activiti variables when more than one MQ message publication/subscription is supported by a process.
|
||||
* @field mq_metadataProcessScope [optional] `true` to set all Activiti result variables in the process instance scope; otherwise the variables will be local to the task.
|
||||
* @field mq_messageName [optional] A unique identifier to append to Activiti result variable names when more than one MQ message publication/subscription is supported by a process.
|
||||
* @varIn mq_correlationId The correlating identifier of the message to receive. Used to correlate between sent/received messages; like a thread of communication.
|
||||
* @varOut mq_messageId The unique message identifer of the message received.
|
||||
* @varOut mq_deliveryTime The time the message was delivered; not received. It is of the `java.util.Date` type as supported by Activiti.
|
||||
* @varOut mq_priority An integer priority of the message; value depends on MQ protocol.
|
||||
* @varOut mq_payload The body of the MQ message. May include expressions. May be `null`.
|
||||
* @varOut mq_payloadMimeType The MIME type of the body of the MQ message. May be `null`.
|
||||
* @varOut mq_priority An integer priority of the message; supported range depends on MQ protocol.
|
||||
* @varOut mq_payload The body of the MQ message; may be `null`.
|
||||
* @varOut mq_payloadMimeType The MIME type of `mq_payload`; may be `null`.
|
||||
* @varOut mq_replyQueueName The name of an MQ destination (queue or topic) to use to reply to the received message. The reply message must have the same correlating identifier. May be `null`.
|
||||
* @varOut mq_statusQueueName The name of an MQ destination (queue or topic) to use to reply to the received message. The reply message must have the same correlating identifier. May be `null`.
|
||||
* @varOut mq_statusQueueName The name of an MQ destination (queue or topic) where status updates on the received message are expected to be sent. The status message must have the same correlating identifier. May be `null`.
|
||||
* @throws BPMNError correlation `mq_correlationId` is required.
|
||||
* @throws BPMNError timeout The MQ connection timed out connecting or waiting for a message.
|
||||
* @throws BPMNError network The MQ connection experienced network issues.
|
||||
|
Loading…
x
Reference in New Issue
Block a user