Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Common Event Fields

Each incoming event passes an event payload to the listener depending on the event type. Below are example payloads for each event type.

...

Key

Description

eventType

The event type that triggered this Event. e.g. Workflow Completed, Task Created.

actor

The actor, generally a user, that triggered this event.

object

The object the event occurred on. This could be the Project name, Release name etc.

timestamp

The time the event occurred.

payload

The specific event payload (see examples below)

Events

Pipeline Stage Completed

The Pipeline Stage Completed event is triggered whenever a stage succeeds or fails in a Release Pipeline Execution. Common use cases can include logic you want to perform after EVERY pipeline execution regardless of the Pipeline or Release being used. For example you may want to create a Service Now incident whenever the Production Stage fails in any pipeline. This could be easily accomplished by listening for this event but filtering for a status of FAILED and environment of PRODUCTION.

code
Expandcode
titlePipeline Stage Completed
languagejson
{
    "eventType":"Pipeline Stage Completed",
    "actor":"buildmonitorworker",
    "object":"REST Release 1",
    "timestamp":"2020-12-16 15:12:41 -0500",
    "payload":{
        "pipelineExecutionId":null,
        "pipelineStageExecution":{
            "stageExecutionId":104516,
            "environmentId":11595,
            "executionStatus":"FAILED",
            "startTime":"2020-12-16 15:12:19 -0500",
            "endTime":"2020-12-16 15:12:41 -0500",
            "activeStep":null
        },
        "pipeline":{
            "pipelineId":10001,
            "pipelineName":"Simple"
        },
        "environment":{
            "environmentId":11595,
            "environmentName":"Dev",
            "environmentCode":"DEV"
        },
        "release":{
            "releaseId":11611,
            "releaseName":"REST Release 1"
        },
        "snapshot":{
            "snapshotId":104506,
            "snapshotName":"07-16-2020 15:12:18",
            "snapshotStatus":"INITIATED",
            "description":null,
            "releaseId":11611
        }
    }
}

Release Started

The Release Started event is triggered whenever a release is started in FlexDeploy. Common use cases can include logic you want to perform after any release is started. For example you may want to start a sprint in Jira whenever the release is started.

...

titleRelease Started Payload
Code Block
languagejson
{
    "eventType":"Release Started",
    "actor":"fdadmin",
    "object":"testRelease",
    "timestamp":"2020-08-18 16:08:48 -0500",
    "payload":{
        "release":{
            "releaseId":54052,
            "releaseName":"testRelease",
            "releaseDescription":null
        },
        "startDate":"2020-09-18",
        "endDate":null,
        "projects":[
            {
                "projectId":440135,
                "projectName":"partialFile",
                "streamName":"master",
                "buildEnvironment":{
                    "environmentId":null,
                    "environmentName":null,
                    "environmentCode":null
                },
                "groupName":null
            }
        ],
        "pipeline":{
            "pipelineId":17854,
            "pipelineName":"DanPipeline"
        }
    }
}

Release Ended

The Release Ended event is triggered whenever a release is endedin FlexDeploy. Common use cases can include logic you want to perform after any release is ended. For example you may want to end a sprint in Jira whenever the release is ended.

...

Release Ended Payload
Code Block
languagejson
{
    "eventType":"Release Ended",
    "actor":"fdadmin",
    "object":"testRelease",
    "timestamp":"2020-10-18 16:10:55 -0500",
    "payload":{
        "release":{
            "releaseId":54052,
            "releaseName":"testRelease",
            "releaseDescription":null
        },
        "startDate":"2020-09-18",
        "endDate":null,
        "projects":[
            {
                "projectId":440135,
                "projectName":"partialFile",
                "streamName":"master",
                "buildEnvironment":{
                    "environmentId":null,
                    "environmentName":null,
                    "environmentCode":null
                },
                "groupName":null
            }
        ],
        "pipeline":{
            "pipelineId":17854,
            "pipelineName":"DanPipeline"
        }
    }
}

Snapshot Completed

The Snapshot Completed event is triggered whenever a snapshot eventually completes successfully or fails to build.

...

Code Block
languagejson
{
    "eventType":"Snapshot Completed",
    "actor":"fdadmin",
    "object":"07-16-2020 15:58:59",
    "timestamp":null,
    "payload":{
        "createdBy":"fdadmin",
        "createdOn":"2020-58-16 15:58:57 -0500",
        "updatedBy":"completedsnapshotsmonitor",
        "updatedOn":"2020-59-16 15:59:13 -0500",
        "snapshot":{
            "snapshotId":104530,
            "snapshotName":"07-16-2020 15:58:59",
            "snapshotStatus":"INITIATED",
            "description":null,
            "releaseId":50157
        }
    }
}

Task Created

The Task Created event is triggered whenever a human task is created. This can be triggered from either a standalone project/application or a release.

code
Expandcode
titleTask Created Payload
languagejson
{
    "eventType":"Task Created",
    "actor":"completedsnapshotsmonitor",
    "object":"Test Release",
    "timestamp":"2020-03-16 16:03:43 -0500",
    "payload":{
        "createdBy":"completedsnapshotsmonitor",
        "createdOn":"2020-03-16 16:03:43 -0500",
        "updatedBy":"completedsnapshotsmonitor",
        "updatedOn":"2020-03-16 16:03:43 -0500",
        "taskId":50702,
        "taskStatus":"PENDING",
        "externalId":null,
        "externalSystemId":null,
        "externalSystemType":null,
        "taskNotes":null,
        "groupId":10942,
        "roleId":11601,
        "environment":{
            "environmentId":11595,
            "environmentName":"Dev",
            "environmentCode":"DEV"
        },
        "release":{
            "releaseId":50157,
            "releaseName":"Test Release"
        },
        "pipelineExecution":{
            "pipelineId":54957,
            "pipelineExecutionId":104553,
            "executionStatus":"RUNNING",
            "activeStageExecution":{
                "stageExecutionId":104554,
                "environmentId":11595,
                "executionStatus":"RUNNING_GATES",
                "startTime":null,
                "endTime":null,
                "activeStep":{
                    "id":54961,
                    "executionId":104555,
                    "executionStatus":"PENDING_APPROVAL",
                    "isGate":true
                }
            }
        },
        "snapshotId":104549,
        "workflow":null,
        "workflowRequestId":null,
        "project":null
    }
}

Workflow Completed

The Workflow Completed event is triggered whenever a workflow execution succeeds or fails. Note that this event will trigger for ALL workflow types.

...

The testSuiteExec array in the payload will return all test suite executions from the workflow. This is most common in TEST workflows but tests can be run from any workflow type (Build, Deploy, Utility, etc..).

Workflow Completed (DEPLOY) Event Payload

Code Block
languagejson
title
{
    "eventType":"Workflow Completed",
    "actor":"fdadmin",
    "object":"currentStatusPartial",
    "timestamp":"2020-23-14 14:23:39 -0500",
    "payload":{
        "createdBy":"fdadmin",
        "createdOn":"2020-23-14 14:23:25 -0500",
        "updatedBy":"fdadmin",
        "updatedOn":"2020-23-14 14:23:39 -0500",
        "executionStatus":"SUCCESS",
        "workflowExecutionId":12408,
        "startTime":"2020-23-14 14:23:25 -0500",
        "endTime":"2020-23-14 14:23:39 -0500",
        "workflow":{
            "workflowId":1130,
            "workflowName":"SimpleDeployPartial",
            "workflowType":"DEPLOY",
            "workflowVersionId":1131
        },
        "project":{
            "projectId":10002,
            "projectName":"currentStatusPartial"
        },
        "projectVersionId":13101,
        "projectVersionName":"1.0.37",
        "packageName": "TestPackage",
        "projectStreamId":10003,
        "projectStreamName":"master",
        "instance":{
            "instanceId":1168,
            "instanceName":"Current Status",
            "instanceCode":"CURRENTSTATUS"
        },
        "environment":{
            "environmentId":1166,
            "environmentName":"Development",
            "environmentCode":"DEV"
        },
        "release":{
            "releaseId":null,
            "releaseName":null
        },
        "snapshot":{
            "snapshotId":null,
            "snapshotName":null,
            "snapshotStatus":null,
            "description":null,
            "releaseId":null
        },
        "workflowRequest":{
            "workflowRequestId":12505,
            "forceDeploy":true,
            "triggerType":"MANUAL",
            "flexFields":[
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null
            ],
            "priority":1,
            "allFilesRequested":false
        },
        "issueNumbers":[
        ],
        "cmsTickets":[
        ],
        "
testRun
testSuiteExec":
null
[
     
} }
Expand
   ]
    }
}

Workflow Completed (TEST) Event Payload

Code Block
languagejson
{
    "eventType":"Workflow Completed",
    "actor":"fdadmin",
    "object":"TestProject",
    "timestamp":"2020-44-18 10:44:16 -0500",
    "payload":{
        "createdBy":"fdadmin",
        "createdOn":"2020-43-18 10:43:57 -0500",
        "updatedBy":"fdadmin",
        "updatedOn":"2020-44-18 10:44:16 -0500",
        "executionStatus":"SUCCESS",
        "workflowExecutionId":10409,
        "startTime":"2020-43-18 10:43:58 -0500",
        "endTime":"2020-44-18 10:44:16 -0500",
        "workflow":{
            "workflowId":1193,
            "workflowName":"TestWorkflow",
            "workflowType":"TEST",
            "workflowVersionId":1195
        },
        "project":{
            "projectId":10002,
            "projectName":"TestProject"
        },
        "projectVersionId":10010,
        "projectVersionName":"1.0.1",
        "projectStreamId":10003,
        "projectStreamName":"master",
        "instance":{
            "instanceId":1323,
            "instanceName":"Local",
            "instanceCode":"LOCAL"
        },
        "environment":{
            "environmentId":1320,
            "environmentName":"Development",
            "environmentCode":"DEV"
        },
        "release":null,
        "snapshot":null,
        "workflowRequest":{
            "workflowRequestId":10411,
            "forceDeploy":false,
            "triggerType":"MANUAL",
            "flexFields":[
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null
            ],
            "priority":null,
            "allFilesRequested":false
        },
        "issueNumbers":[
        ],
        "cmsTickets":[
        ],
        "
testRun
testSuiteExec":[
            {
                "
runId
testSuiteExecutionId":
10102
1262620,
                "
runStatus
status":"
PASSED
FAILED",
                "startTime":"
2020
2023-
43
06-
18
12 
10
11:
43
33:
58
37 -0500",
                "endTime":"
2020
2023-
44
06-
18
12 
10
11:
44
34:
16
13 -0500",
                "
testSets
testExecutions":[
                
{
    {
                
"name":"Test
 
Set
 
1",
      "name":"LocalPostmanTest1",
              
"status":"PASSED",
          "status":"FAILED",
                        "toolName":"Postman",
                        "testResults":[
                            {
                                "testCaseName":"http://numbergen.com:8000/JavaRandomNumGenApp/random-number",
                                "status":"FAILED",
                                "message":"Status code is 200 - AssertionFailure - null",
                                "minResponseTime":null,
                                "maxResponseTime":null,
                                "avgResponseTime":null,
                                "duration":0,
                                "executionCount":1,
                                "outputData":null
                            }
                        ]
                    },
                    {
                        "name":"LocalPostmanTest2",
                        "status":"FAILED",
                        "toolName":"Postman",
                        "testResults":[
                            {
                                "testCaseName":"http://numbergen.com:8000/JavaRandomNumGenApp/random-number",
                                "status":"FAILED",
                                "message":"Status code is 200 - AssertionFailure - null",
                                "minResponseTime":null,
                                "maxResponseTime":null,
                                "avgResponseTime":null,
                                "duration":0,
                                "executionCount":1,
                                "outputData":null
                            },                    
                            {
                              "name":"ParameterizedTest",
                              "status":"PASSED",
                              "toolName":"JUnit",
                              "testResults":[
                                  {
                
"testTypeId":10001,
                      "
testTypeName
testCaseName":"
Unit Tests",
my.company.tests.ParameterizedTest.testMultiplication[0]",
                       
"testDefinitions":[
               "status":"PASSED",
         
{
                             "
name
message":
"Test Def 1",
null,
                                      "
status
minResponseTime":
"PASSED"
null,
                            
"testingTool":"Postman",
          "maxResponseTime":null,
                  
"endpointId":10001,
                    "avgResponseTime":null,
        
"results":[
                              "duration":3,
  
{
                                    
"
testCaseName
executionCount":
"GetProjects-
1,
Status
 
code
 
is
 
200",
                                   "
status
outputData":
"PASSED",
null
                                  
"message":null
},
                                  {
 
"maxResponseTime":null,
                                     "
duration
testCaseName":
2999,
"my.company.tests.ParameterizedTest.testMultiplication[1]",
                                      "
executionCount
status":
1
"PASSED",
                                      
},
"message":null,
                                      "minResponseTime":null,
 
{
                                     "
testCaseName
maxResponseTime":
"GetProject- Status code is 200",
null,
                                      "
status
avgResponseTime":
"PASSED"
null,
                                      "
message
duration":
null
0,
                                      "
maxResponseTime
executionCount":
null
1,
                                      "
duration
outputData":
509,
null
                                  }
 
"executionCount":1
                             
]
  
}
                        }
    
]
                    ]
    
}
                }
    
]
            ]
    
}
        }
    
]
    
}
]
    }
}

Work Item Created

The Work Item Created event is triggered whenever work item is created.

code
Expandcode
titleWork Item Created Event Payload
languagejson
{
    "eventType":"Work Item Created",
    "actor":"fdadmin",
    "object":"5903",
    "timestamp":"2023-05-26 18:19:38 -0500",
    "payload":{
        "createdBy":"fdadmin",
        "createdOn":"2023-05-26 18:19:38 -0500",
        "updatedBy":"fdadmin",
        "updatedOn":"2023-05-26 18:19:38 -0500",
        "flxWorkItemId":5903,
        "workItemNumber":"5903",
        "title":"POSTMAN_Test_FlxWorkItem_2",
        "description":"POSTMAN test FlxWorkitem 2",
        "type":{
            "name":"12345678901234567890123456789012345678901234567890",
            "code":"12345678901234567890123456789012345678901234567890"
        },
        "status":{
            "id":1,
            "name":"TODO"
        },
        "assignee":{
            "id":1,
            "userName":"fdadmin",
            "email":"erick.jones@flexagon.com"
        },
        "tags":null,
        "customFields":[
        ],
        "workItemUpdates":null
    }
}

Work Item Updated

The Work Item Updated event is triggered whenever work item is updated.

code
Expandcode
titleWork Item Updated Event Payload
languagejson
{
    "eventType":"Work Item Updated",
    "actor":"fdadmin",
    "object":"5901",
    "timestamp":"2023-05-26 18:19:40 -0500",
    "payload":{
        "createdBy":"fdadmin",
        "createdOn":"2023-05-26 18:19:37 -0500",
        "updatedBy":"fdadmin",
        "updatedOn":"2023-05-26 18:19:40 -0500",
        "flxWorkItemId":5901,
        "workItemNumber":"5901",
        "title":"POSTMAN_Test_FlxWorkItem_1",
        "description":"Updated POSTMAN test FlxWorkitem 1",
        "type":{
            "name":"12345678901234567890123456789012345678901234567890",
            "code":"12345678901234567890123456789012345678901234567890"
        },
        "status":{
            "id":1,
            "name":"TODO"
        },
        "assignee":{
            "id":1,
            "userName":"fdadmin",
            "email":"erick.jones@flexagon.com"
        },
        "tags":null,
        "customFields":[
            {
                "fieldName":"PRIORITY",
                "fieldValue":"Priority2"
            },
            {
                "fieldName":"KARLS8519",
                "fieldValue":null
            },
            {
                "fieldName":"MORE_AND_MORE",
                "fieldValue":null
            },
            {
                "fieldName":"SDFSDF",
                "fieldValue":null
            },
            {
                "fieldName":"FIELD6",
                "fieldValue":null
            },
            {
                "fieldName":"VENDOR_NOT_FOUND",
                "fieldValue":"false"
            }
        ],
        "workItemUpdates":[
            {
                "fieldName":"Description",
                "newValue":"Updated POSTMAN test FlxWorkitem 1",
                "oldValue":"POSTMAN test FlxWorkitem 1"
            }
        ]
    }
}