diff --git a/rest/src/main/java/com/netflix/conductor/rest/startup/SirenInitializer.java b/rest/src/main/java/com/netflix/conductor/rest/startup/SirenInitializer.java index f3a5a50970..7a3fc396b6 100644 --- a/rest/src/main/java/com/netflix/conductor/rest/startup/SirenInitializer.java +++ b/rest/src/main/java/com/netflix/conductor/rest/startup/SirenInitializer.java @@ -65,6 +65,9 @@ public class SirenInitializer { @Value("classpath:./siren/workflows/sirenWebhookWorkflow.json") private Resource sirenWebhookWorkflow; + @Value("classpath:./siren/workflows/sirenCampaignWorkflow.json") + private Resource sirenCampaignWorkflow; + public SirenInitializer(RestTemplateBuilder restTemplateBuilder) { this.restTemplate = restTemplateBuilder.build(); } @@ -82,6 +85,7 @@ private void createSirenResources() { headers.add(CONTENT_TYPE, APPLICATION_JSON_VALUE); createWorkflow(sirenFinalizeExecutionWorkflow, headers); createWorkflow(sirenWebhookWorkflow, headers); + createWorkflow(sirenCampaignWorkflow, headers); LOGGER.info("Siren workflows are created"); updateTask(sendNotificationTask, headers); diff --git a/rest/src/main/resources/siren/workflows/sirenCampaignWorkflow.json b/rest/src/main/resources/siren/workflows/sirenCampaignWorkflow.json new file mode 100644 index 0000000000..b0246432ff --- /dev/null +++ b/rest/src/main/resources/siren/workflows/sirenCampaignWorkflow.json @@ -0,0 +1,57 @@ +{ + "accessPolicy": {}, + "name": "siren_campaign_workflow", + "description": "Workflow for executing campaigns", + "version": 1, + "tasks": [ + { + "name": "template_fork", + "taskReferenceName": "temp_pSzeL9pM3AMtpm7hD-WcA_template_fork", + "inputParameters": {}, + "type": "FORK_JOIN", + "forkTasks": [ + [ + { + "name": "send_notification_task", + "taskReferenceName": "prov_j7ooKIGve0iG2n2tH-1Ds_send_notification_task", + "inputParameters": { + "workflowExecutionId": "${workflow.input.workflowExecutionId}", + "providerIntegrationId": "${workflow.input.providerIntegrationId}", + "templateId": "${workflow.input.templateId}", + "notifyVariables": "${workflow.input.notifyVariables}", + "templateVariables": "${workflow.input.templateVariables}" + }, + "type": "SIMPLE", + "startDelay": 0, + "optional": false, + "asyncComplete": false, + "permissive": false + } + ] + ], + "startDelay": 0, + "optional": false, + "asyncComplete": false, + "permissive": false + }, + { + "name": "template_join", + "taskReferenceName": "temp_pSzeL9pM3AMtpm7hD-WcA_template_join", + "inputParameters": {}, + "type": "JOIN", + "startDelay": 0, + "optional": false, + "asyncComplete": false, + "permissive": false + } + ], + "inputParameters": [], + "outputParameters": {}, + "schemaVersion": 2, + "restartable": true, + "workflowStatusListenerEnabled": false, + "ownerEmail": "admin@sirenapp.io", + "timeoutSeconds": 0, + "variables": {}, + "inputTemplate": {} +} \ No newline at end of file