Moogsoft Docs

updateWorkflows

A MoogDb v2 method that updates one or more existing workflows in the Workflow Engine.

Back to MoogDb V2 API Method Reference.

Request arguments

Method updateWorkflows takes the following request arguments:

Name

Type

Required

Description

id

Integer

Yes

ID of the workflow you want to update.

details

JSON Object

Yes

A JSON object containing the details of the workflow(s) to be updated.

The object details contains the following information:

Name

Type

Required

Description

workflow_name

String

Yes

Name of the workflow.

active

Boolean

No

Determines whether the workflow is active or not. If true, the workflow is active.

description

String

No

Description of the workflow.

entry_filter

String

No

Filter to determine which events, alerts or Situations can enter the workflow. You can use an SQL-like query. If empty, the workflow accepts all events, alerts or Situations.

sweep_up_filter

String

No

Filter to intake any additional events, alerts or Situations from the database. You can use an SQL-like query.

first_match_only

Boolean

No

Determines whether to perform workflow operations only once on each object.

operation

JSON Array

No

List of properties relating to each operation:

Name

Type

Required

Description

type

String

Yes

Type of operation. Options are: 'action', 'decision' and 'delay'.

operation_name

String

Yes, for 'action' and 'decision' types.

Name of the operation.

function_name

String

Yes, for 'action' and 'decision' types.

Name of the function.

forwarding_behavior

String

No

function_args

JSON Object

No

Arguments for the function.

duration

Integer

Yes, for 'delay' type.

Length of time before the message goes to the next operation.

reset

Boolean

Yes, for 'delay' type.

Determines whether the timer resets after each occurrence.

reset

Boolean

No

Mandatory for 'delay' type.

Response

Method updateWorkflows returns the following response:

Examples

The following examples demonstrate typical use of method updateWorkflows:

Request example

Example request to update workflow ID 1 with a new workflow name:

moogdb.updateWorkflows(1, {workflow_name: “new name”});

Response example