Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Feature: Webhooks for workflow and task status #228

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
892d0ed
Added readme.
Apr 19, 2023
312a25f
Added gradle build files.
Apr 19, 2023
2e7f722
Added webhook module in gradle files.
Apr 19, 2023
d5c9cd6
Added Publisher related files.
Apr 19, 2023
70db9c0
Added ConfigProp interface in contribs, as it was removed from
Apr 19, 2023
9097cbf
Added javax.inject dependency explicitly.
Apr 19, 2023
314b173
TaskStatusListener interface is not present in conductor-core.
Apr 19, 2023
e5c0ab4
ExecutionDAOFacade package changed from orhestration to dal.
Apr 19, 2023
e8c63dc
Added apache commons-lang3 dependency.
Apr 19, 2023
05dff97
Added http client dependency.
Apr 19, 2023
52c432f
Added conductor-annotations dependecy.
Apr 19, 2023
a469d54
Convert WorkflowModel to Workflow.
May 3, 2023
3a7e8eb
Merge branch 'main' of https://github.com/charybr/conductor-community…
May 5, 2023
d5d0f99
Able to build after removing webhook project from dependencies.lock.
May 5, 2023
c643e9d
Include only required modules. Jar reduced from 141M to 50M.
May 5, 2023
a856d34
Added new config files.
May 9, 2023
4a8bdfd
Merge branch 'main' of https://github.com/charybr/conductor-community…
May 16, 2023
7ba9608
Uncomment lines that are required for community repo
charybr May 20, 2023
bfbe6a5
TaskStatusListener implementation. For now using local libs till
May 24, 2023
a6eeb4e
Task SCHEDULED status notification going out from conductor.
May 24, 2023
23352eb
Fix for Error unmarshalling input data.
May 25, 2023
0c4460e
Added TBD - config to subscribe for interested Task statuses.
May 26, 2023
f3d556c
Added config to specify subscribed Task Status list.
May 26, 2023
ce62067
Added attributes required for SerialLoop, Fork-Join workflows in Task…
Jun 5, 2023
521c0ce
TaskNotification - taskDescription should come from WorkflowTask.
Jun 6, 2023
6c5a1c4
Merge branch 'Netflix:main' into feature/task_webhook
charybr Jun 13, 2023
2e5a0de
Remove custom attributes from TaskNotification
charybr Jul 11, 2023
658f703
Remove custom attributes from WorkflowNotification
charybr Jul 11, 2023
78691d0
TaskStatusListner PR merged to conductor main
charybr Jul 19, 2023
3642e2b
Merge branch 'Netflix:main' into feature/task_webhook
charybr Jul 24, 2023
a4a22dc
Merge branch 'Netflix:main' into feature/task_webhook
charybr Jul 25, 2023
51a13b6
Removed references to custom attributes.
Jul 31, 2023
412fabe
Merge branch 'feature/task_webhook' of https://github.com/charybr/con…
Jul 31, 2023
809c68b
Remove local_lib reference.
charybr Aug 1, 2023
fd44c24
Update conductor version
charybr Aug 1, 2023
1aa24ed
Merge branch 'Netflix:main' into feature/task_webhook
charybr Aug 24, 2023
20a609d
Added webhook files.
youngledo Jun 29, 2023
42c7ae2
Fix variable error
youngledo Jul 18, 2023
27c3a0e
Merge branch 'feature/task_webhook' of https://github.com/charybr/con…
Aug 24, 2023
2eee92e
Merge branch 'Netflix:main' into feature/task_webhook
charybr Sep 5, 2023
b00755b
Merge branch 'Netflix:main' into feature/task_webhook
charybr Oct 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions community-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ dependencies {
implementation project(':task:conductor-kafka')

implementation project(':conductor-workflow-event-listener')
implementation project(':conductor-webhook')

implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-validation'
Expand Down
26 changes: 26 additions & 0 deletions community-server/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,29 @@ management.metrics.export.datadog.enabled=false
#optional - default Datadog instance is https://app.datadoghq.com/
# management.metrics.export.datadog.uri=<your DD instance>
#management.metrics.export.datadog.step=10s

# To enable webhook module for TaskStatus and WorkflowStatus notifications
conductor.workflow-status-listener.type=workflow_publisher
conductor.task-status-listener.type=task_publisher

# To enable Workflow/Task Summary Input/Output JSON Serialization, use the following:
conductor.app.summary-input-output-json-serialization.enabled=true

# Webhook Push notification properties
conductor.webhook.notification.url=
conductor.webhook.notification.endpointTask=
#use enums in TaskModel.Status
conductor.webhook.notification.subscribedTaskStatuses=SCHEDULED,IN_PROGRESS,COMPLETED,CANCELED
conductor.webhook.notification.endpointWorkflow=
conductor.webhook.notification.headerDomainGroup=
conductor.webhook.notification.headerAccountCookie=
conductor.webhook.notification.headerPrefer=
conductor.webhook.notification.headerPreferValue=
conductor.webhook.notification.requestTimeoutMsConnect=100
conductor.webhook.notification.requestTimeoutMsRead=300
conductor.webhook.notification.requestTimeoutMsConnMgr=300
conductor.webhook.notification.requestRetryCount=3
conductor.webhook.notification.requestRetryIntervalMs=50
conductor.webhook.notification.connectionPoolMaxRequest=3
conductor.webhook.notification.connectionPoolMaxRequestPerRoute=3

1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ include 'index'
include 'test-util'
include 'lock'
include 'workflow-event-listener'
include 'webhook'

include 'persistence:common-persistence'
include 'persistence:mysql-persistence'
Expand Down
16 changes: 16 additions & 0 deletions webhook/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Webhook for publishing workflow and task status changes

WorkflowStatusListener and TaskStatusListener interfaces can be implemented to call webhooks when there is a change in status of workflow and task. We can add new module called 'webhook'.


## Published Artifacts

Group: `com.netflix.conductor`

| Published Artifact | Description |
| ----------- | ----------- |
| conductor-webhook | Webhook to publish workflow and task status |


## Configuration

24 changes: 24 additions & 0 deletions webhook/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
plugins {
id 'groovy'
}
dependencies {

implementation "com.netflix.conductor:conductor-common:${revConductor}"
implementation "com.netflix.conductor:conductor-core:${revConductor}"
implementation "com.netflix.conductor:conductor-annotations:${revConductor}"
implementation group: 'javax.inject', name: 'javax.inject', version: '1'
implementation "org.apache.commons:commons-lang3:"
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.14'

compileOnly 'org.springframework.boot:spring-boot-starter'
compileOnly 'org.springframework.boot:spring-boot-starter-web'

testImplementation "org.codehaus.groovy:groovy-all:${revGroovy}"
testImplementation "org.spockframework:spock-core:${revSpock}"
testImplementation "org.spockframework:spock-spring:${revSpock}"


testImplementation "com.netflix.conductor:conductor-server:${revConductor}"
testImplementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation project(':conductor-test-util').sourceSets.test.output
}
153 changes: 153 additions & 0 deletions webhook/dependencies.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"annotationProcessor": {
"org.springframework.boot:spring-boot-configuration-processor": {
"locked": "2.6.7"
}
},
"compileClasspath": {
"com.netflix.conductor:conductor-common": {
"locked": "3.13.8"
},
"com.netflix.conductor:conductor-core": {
"locked": "3.13.8"
},
"org.apache.logging.log4j:log4j-api": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-core": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-jul": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-slf4j-impl": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-web": {
"locked": "2.17.1"
},
"org.springframework.boot:spring-boot-starter": {
"locked": "2.6.7"
},
"org.springframework.boot:spring-boot-starter-web": {
"locked": "2.6.7"
}
},
"runtimeClasspath": {
"com.netflix.conductor:conductor-common": {
"locked": "3.13.8"
},
"com.netflix.conductor:conductor-core": {
"locked": "3.13.8"
},
"org.apache.logging.log4j:log4j-api": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-core": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-jul": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-slf4j-impl": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-web": {
"locked": "2.17.1"
}
},
"testCompileClasspath": {
"com.netflix.conductor:conductor-common": {
"locked": "3.13.8"
},
"com.netflix.conductor:conductor-core": {
"locked": "3.13.8"
},
"com.netflix.conductor:conductor-server": {
"locked": "3.13.8"
},
"org.apache.logging.log4j:log4j-api": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-core": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-jul": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-slf4j-impl": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-web": {
"locked": "2.17.1"
},
"org.codehaus.groovy:groovy-all": {
"locked": "3.0.9"
},
"org.junit.vintage:junit-vintage-engine": {
"locked": "5.8.2"
},
"org.spockframework:spock-core": {
"locked": "2.1-groovy-3.0"
},
"org.spockframework:spock-spring": {
"locked": "2.1-groovy-3.0"
},
"org.springframework.boot:spring-boot-starter-log4j2": {
"locked": "2.6.7"
},
"org.springframework.boot:spring-boot-starter-test": {
"locked": "2.6.7"
},
"org.springframework.boot:spring-boot-starter-web": {
"locked": "2.6.7"
}
},
"testRuntimeClasspath": {
"com.netflix.conductor:conductor-common": {
"locked": "3.13.8"
},
"com.netflix.conductor:conductor-core": {
"locked": "3.13.8"
},
"com.netflix.conductor:conductor-server": {
"locked": "3.13.8"
},
"org.apache.logging.log4j:log4j-api": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-core": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-jul": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-slf4j-impl": {
"locked": "2.17.1"
},
"org.apache.logging.log4j:log4j-web": {
"locked": "2.17.1"
},
"org.codehaus.groovy:groovy-all": {
"locked": "3.0.9"
},
"org.junit.vintage:junit-vintage-engine": {
"locked": "5.8.2"
},
"org.spockframework:spock-core": {
"locked": "2.1-groovy-3.0"
},
"org.spockframework:spock-spring": {
"locked": "2.1-groovy-3.0"
},
"org.springframework.boot:spring-boot-starter-log4j2": {
"locked": "2.6.7"
},
"org.springframework.boot:spring-boot-starter-test": {
"locked": "2.6.7"
},
"org.springframework.boot:spring-boot-starter-web": {
"locked": "2.6.7"
}
}
}
Loading