Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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);
Expand Down
57 changes: 57 additions & 0 deletions rest/src/main/resources/siren/workflows/sirenCampaignWorkflow.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]",
"timeoutSeconds": 0,
"variables": {},
"inputTemplate": {}
}