Skip to main content

Eventless Workflows

The sendToWorkflow API makes it possible for you to initiate a named workflow from the Graze API or from the Workflow Engine. This means that you can trigger an "eventless workflow" that does not require an event, alert, or Situation object.

Eventless workflows let you modify the system without modifying a specific event object within it. For example, you can “script” a workflow that performs a series of topology API actions using a workflow. You can call the workflow directly without writing an external Graze API script. See Graze API for more information.

sendToWorkflow API

The sendToWorkflow API accepts a “context” object that is copied into the workflowContext of the target workflow. This way, you can pass reference data to use in the target workflow. The following example illustrates how you can use this for a topology source that advertises connectivity between two nodes:

{
    "application" : "APP001",
    "linkEstablished" : "Resource server001 connected to resource db001"
}

See sendToWorkflow for more information.

Example

In this example, we create a workflow called "Build Topology link" in a workflow inform engine named "Alert Inform Engine" using the Graze API.

workflowSearchAndReplace

The sendToWorkflow method has the following body:

{
	"engine_name" : "Alert Inform Engine",
	"workflow_name" : "Build Topology link",	
	"context" : { "application" : "app001", "linkEstablished" : "Resource server001 connected to resource db001" } 
}

This method triggers the target workflow (Build Topology link) and extracts the data from the context passed into the workflowContext from the sendToWorkflow API call.

Eventless Workflow actions

A list of eventless workflow functions:

  • between

  • mooletInform

  • logWorkflowContext

  • createTopology

  • deleteTopology

  • checkTopology

  • cloneTopology

  • activateTopology

  • deactivateTopology

  • addTopologyLink

  • deleteTopologyLink

  • checkTopologyLink

  • addTopologyNode

  • deleteTopologyNode

  • checkTopologyNode

  • sendToWorkflow

  • workflowContextSearchAndReplace

See Workflow Engine Functions Reference for descriptions of the preceding actions.