Skip to main content

sendToWorkflow

A MoogDb v2 method that sends a Moolet Inform message to a workflow in an Inform Workflow Engine.

See Workflow Engine for more information on Inform Workflow Engines.

Back to MoogDb V2 API Method Reference.

Request arguments

Method sendToWorkflow takes the following request arguments:

Name

Type

Required

Description

engineName

String

Yes

Name of an active Inform Workflow Engine.

workflowName

String

Yes

Name of an active workflow within the specified Inform Workflow Engine.

situationId

Number

No

ID of the Situation you want to send to the workflow.

situation

Object

No

Situation object to send to the workflow.

alertId

Number

No

ID of the alert you want to send to the workflow.

alert

Object

No

Alert object to send to the workflow.

context

String

No

Additional context to send with the message. This must be available as an action in the workflow as getWorkflowContext().

Response

Method sendToWorkflow returns the following response:

Examples

The following examples demonstrate typical use of method sendToWorkflow:

Request example

Example request to send a message to an Inform Workflow Engine:

var engineName = “Alert Inform Engine”;
var workflowName = “My Alert Workflow ”;
var context = {	“key” : “value” , “key1” : “value” };
var sent = moogdb.sendToWorkflow(engineName,workflowName,alert,context);

Response example