Skip to main content
Skip table of contents

Workflow Notification [C IG]

It is also possible to subscribe to certain workflow events in VidiFlow via the Notification API. The following describes the notification registration model.

Path Swagger Reference: Creating a new Workflow Notification

POST  /v1/Workflow

Vidispine Notification Registration Model

CODE
{
  "registrant": "string",
  "target": "string",
  "action": "string",
  "definition": "object"
}

Field

Type

Description

Example

Registrant

String

A unique name represents the party that subscribes to this notification.

YourSystemName

Definition

Object

The workflow notification definition (described further below).


Workflow Definition Model

Section

Field

Type

Description

Example

Trigger

Name

String

The workflow name. This is a mandatory field.

WatchfolderMediaIngest


Version

String

The workflow version.

1.0


State

String

The workflow state.

  • Started

  • Completed

  • CompletedWithError

  • Failed

  • Canceled

Action/Http

Url

String

The url to be invoked to deliver the notification.

http://server/notify


Method

String

The HTTP method to be invoked to deliver the notification.

  • POST

  • PUT


TimeOut

Integer

Http call timeout (in seconds). Increase this value if the http server requires more time on processing the notification.

60


Retry

Integer

Number of retries before the invoked call gives up.

5


RetryInterval

Integer

Fixed interval (in seconds) before the next retry starts.

60


ShowFullInfo

Boolean

Indicates whether to deliver full workflow information or simple workflow information.
By default, simple workflow information is used.

Example below


Currently, VidiFlow only supports the possibility to notify workflow events changes via REST HTTP calls. The following are the different REST body based on the different scenarios.

Sample Workflow Notification Body (Full Info = true)

CODE
{
      "Id": "f1328db6-b357-11ea-98f6-ce2dfadb085d",
      "WorkflowName": "NewTestAgent",
      "WorkflowVersion": "1.0",
      "WorkflowId": "NewTestAgent:1:f0fe3743-b357-11ea-98f6-ce2dfadb085d",
      "StartTime": "2020-06-21T00:41:27.851+0000",
      "EndTime": null,
      "StartedBy": "admin",
      "State": "Failed",
      "Description": null,
      "Data": {
        "InputParameters": [],
        "OutputParameters": [
          {
            "Name": "OutBool_23t64s4",
            "Value": null,
            "Type": "Unknown"
          },
          {
            "Name": "OutDateTime_11411lc",
            "Value": null,
            "Type": "Unknown"
          },
          {
            "Name": "OutDouble_0nhn4fo",
            "Value": null,
            "Type": "double"
          },
          {
            "Name": "OutFloat_0c7vbte",
            "Value": null,
            "Type": "double"
          },
          {
            "Name": "OutInt_3q6tuk4",
            "Value": null,
            "Type": "long"
          },
          {
            "Name": "OutLong_2r0fb3j",
            "Value": null,
            "Type": "long"
          },
          {
            "Name": "OutString_2u5113q",
            "Value": null,
            "Type": "string"
          }
        ]
      },
      "IsInvalid": false,
      "Priority": 100,
      "Status": {
        "TotalStepsExecuted": 1,
        "CurrentSteps": [
          {
            "Name": "Test task for new agent SDK",
            "Id": "Task_0tnqf7w",
            "Progress": 0,
            "Error": true,
            "ErrorMessage": "Agent task f1770fed-b357-11ea-98f6-ce2dfadb085d TestTask V1.0 failed: Missing mandatory parameter 'TriggerBoundaryEvent' for TaskProcessor TestTask V1.0."
          }
        ]
      },
      "Metadata": {},
      "ParentWorkflowId": null,
      "RootWorkflowId": null
 }


Sample Workflow Notification Body (Full Info = false)

CODE
{
      "Id": "f1328db6-b357-11ea-98f6-ce2dfadb085d",
      "Name": "NewTestAgent",
      "Version": "1.0",
      "State": "Failed"
}


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.