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 |
---|---|---|---|
| String | Yes | Name of an active Inform Workflow Engine. |
| String | Yes | Name of an active workflow within the specified Inform Workflow Engine. |
| Number | No | ID of the Situation you want to send to the workflow. |
| Object | No | Situation object to send to the workflow. |
| Number | No | ID of the alert you want to send to the workflow. |
| Object | No | Alert object to send to the workflow. |
| String | No | Additional context to send with the message. This must be available as an action in the workflow as |
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);