Skip to content

Commit

Permalink
Merge bcca5e4 into 5a6d3c8
Browse files Browse the repository at this point in the history
  • Loading branch information
jas34 committed Jul 19, 2021
2 parents 5a6d3c8 + bcca5e4 commit 3531fc8
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 38 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
## Schedule Conductor Workflows
## Schedule Conductor Workflows ([A Netflix Conductor Community Project](https://github.com/Netflix/conductor/blob/main/RELATED.md#schedule-conductor-workflow))
Schedule Conductor workflow is a _scheduler as a service_ that runs in the cloud with [Netflix conductor](https://github.com/Netflix/conductor)
embedded in it. It runs as an extension module of conductor.
embedded in it. It runs as an extension module of conductor. This is one of community project of netflix conductor community.

[![Build Status](https://travis-ci.com/jas34/scheduledwf.svg?token=k2Upd1dy5qz2VgAZDCYD&branch=master)]()
[![GitHub Release](https://img.shields.io/github/release/jas34/scheduledwf.svg?style=flat)](https://github.com/jas34/scheduledwf/releases)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.jas34/scheduledwf-parent.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.jas34%22%20AND%20a:%22scheduledwf-parent%22)
[![Coverage Status](https://coveralls.io/repos/github/jas34/scheduledwf/badge.svg?branch=master)](https://coveralls.io/github/jas34/scheduledwf?branch=master)


## Builds
| Module | Build |
|:------:|:-------------------------------------------------------------------------------------------------------------:|
Expand Down Expand Up @@ -96,9 +97,12 @@ then you can use scheduled workflow as an additional dependency.
Scheduling And Managing A Workflow
-------------
- REST operations for scheduling can be accessed on the conductor swagger at http://{host}:{port}
- _Example_: Let us schedule sample workflow with name [testwf](scheduledwf-server/src/test/resources/testwf-def.json).
Assuming workflow definition already exists in conductor server. You can use [Cron Maker](http://www.cronmaker.com/) to generate cron expression.
- From swagger use`Scheduled Workflow Metadata Management` to add/update [scheduling metadata](scheduledwf-server/src/test/resources/schedule-testwf-def.json).
- _Example_: Let us schedule sample workflow which checks health of conductor server every 1 minute. Sample definitions are:
1. [check-conductor-health-task def](scheduledwf-server/src/test/resources/check_conductor_health_task_def.json)
2. [check-conductor-health-workflow def](scheduledwf-server/src/test/resources/check_conductor_health_workflow_def.json)
2. [check-conductor-health-schedule def](scheduledwf-server/src/test/resources/check_conductor_health_schedule_def.json) <br/>
(Tip: You can use [Cron Maker](http://www.cronmaker.com/) to generate cron expression.)
- From swagger use`Scheduled Workflow Metadata Management`
- POST /scheduling/metadata/scheduleWf: Schedule new workflow
- GET /scheduling/metadata/scheduleWf: Get scheduling metadata of scheduled workflows.
- GET /scheduling/metadata/scheduleWf/{name}: Get scheduling metadata of scheduled workflows by workflow name.
Expand All @@ -108,7 +112,9 @@ Assuming workflow definition already exists in conductor server. You can use [Cr
- to search about schedule manager running on different nodes of cluster.
- to search about scheduled jobs based upon scheduling metadata.
- to search about different runs of scheduled jobs at scheduled time. The detailed data returned by [IndexScheduledWfDAO](#IndexScheduledWfDAO)

- Glimpse of workflow scheduling.
![caption](docs/img/demo.gif)

### Runtime Model

![Scheduled Conductor](docs/img/scheduled-wf-runtime-model.svg)
Expand Down
Binary file added docs/img/demo.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"wfName": "testwf",
"wfName": "check-conductor-health-workflow",
"wfVersion": 1,
"status": "RUN",
"cronExpression": "0 0/1 * 1/1 * ? *",
"wfInput": {
"name": "Jasbir Singh"
"testInput": "test input. just for example."
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"name": "check-conductor-health-task",
"description": "This task will check health of conductor server at http://localhost:8080/api/health",
"inputKeys": [],
"outputKeys": [],
"timeoutPolicy": "TIME_OUT_WF",
"retryLogic": "FIXED",
"retryDelaySeconds": 2,
"responseTimeoutSeconds": 5,
"retryCount": 2,
"timeoutSeconds": 15,
"concurrentExecLimit": 0,
"ownerEmail": "jasbirsinghkamboj@gmail.com",
"pollTimeoutSeconds": 100,
"type": "HTTP"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "check-conductor-health-workflow",
"description": "This workflow will check health of conductor server.",
"version": 1,
"tasks": [
{
"name": "check-conductor-health-task",
"taskReferenceName": "check-conductor-health-task",
"inputParameters": {
"http_request": {
"uri": "http://localhost:8080/api/health",
"method": "GET"
}
},
"type": "HTTP",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": []
}
],
"inputParameters": [],
"outputParameters": {},
"schemaVersion": 2,
"ownerEmail": "jasbirsinghkamboj@gmail.com",
"restartable": true,
"workflowStatusListenerEnabled": true
}
13 changes: 0 additions & 13 deletions scheduledwf-server/src/test/resources/log-name-task-def.json

This file was deleted.

17 changes: 0 additions & 17 deletions scheduledwf-server/src/test/resources/testwf-def.json

This file was deleted.

0 comments on commit 3531fc8

Please sign in to comment.