Link a Received Message to a Process Instance - Link a Received Message to a Process Instance - This operation delivers a message to a process instance using administrative access. Use it when an administrative script needs to correlate a message with a waiting process instance. - Content Innovation Cloud - Hyland Automate Modeler - Current/Hyland-Automate-Modeler/rzr4740805361291 - Current - Current

Hyland Automate Modeler

Platform
Content Innovation Cloud
Product
Hyland Automate Modeler
Release
Current
License
ft:lastPublication
2026-11-02T23:02:36.222215
ft:locale
en-US

This operation delivers a message to a process instance using administrative access. Use it when an administrative script needs to correlate a message with a waiting process instance.

The base request is:

receive(receiveMessagePayload)

The following example delivers a message using a message name and correlation key:

new RuntimeProcessInstanceAdminService()
    .receive({
        name: variables.messageName,
        correlationKey: variables.businessKey
    });

Use ReceiveMessagePayload when a script needs to deliver a BPMN message to a waiting process instance.

The following example defines a message with variables:

const receiveMessagePayload = {
    name: 'updateStatus',
    correlationKey: variables.businessKey,
    variables: {
        status: 'SHIPPED'
    }
};

new RuntimeProcessInstanceAdminService()
    .receive(receiveMessagePayload);

In this example:

  • name: 'updateStatus' specifies the message to deliver.
  • correlationKey: variables.businessKey provides the value used to correlate the message with a process instance.
  • variables provides data with the message. In this example, the status variable is set to SHIPPED.
  • receive(receiveMessagePayload) delivers the message using the specified payload.