Last active
April 19, 2020 17:03
-
-
Save meetchandan/65c0357f6b050ceed8833adc1ceadeeb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Workflow struct { | |
Root Statement | |
} | |
// Statement is the building block of DSL workflow. | |
// A Statement can be a simple ActivityInvocation or it | |
// could be a Sequence or Parallel. | |
Statement struct { | |
Activity *ActivityInvocation | |
Sequence *Sequence | |
Parallel *Parallel | |
} | |
// Sequence consist of a collection of Statements that runs in sequential. | |
Sequence struct { | |
Elements []*Statement | |
} | |
// Parallel can be a collection of Statements that runs in parallel. | |
Parallel struct { | |
Branches []*Statement | |
} | |
ActivityInvocation struct { | |
TaskId string | |
Arguments map[string]interface{} | |
} | |
// Example: | |
/* | |
root: | |
sequence: | |
elements: | |
- activity: | |
name: executesql | |
arguments: | |
sql: "select 1" | |
- parallel: | |
branches: | |
- sequence: | |
elements: | |
- activity: | |
name: matviewpartition | |
arguments: | |
sql: "execute sql 1" | |
destination_table: "dest table 1" | |
- activity: | |
name: matviewpartition | |
arguments: | |
sql: "execute sql 2" | |
destination_table: "dest table 2" | |
- sequence: | |
elements: | |
- activity: | |
name: matviewpartition | |
arguments: | |
sql: "execute sq 3l" | |
destination_table: "dest table 3" | |
- activity: | |
name: executesql | |
arguments: | |
sql: "execute sq 3l" | |
destination_table: "dest table 3" | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment