Skip to content

Commit

Permalink
feature: update workflow task dag
Browse files Browse the repository at this point in the history
  • Loading branch information
wangqi committed Apr 11, 2024
1 parent 7880c15 commit c6dd19a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
@Data
public class WorkflowTaskDefinitionAttrs {

@Schema(description = "refered workflow definition id")
private Long referenceWorkflowDefinitionId;

@Schema(description = "workflow task param")
private Map<String, Object> param;

Expand Down
30 changes: 17 additions & 13 deletions tools/docker/mysql/init.d/scaleph-workflow-mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,23 @@ VALUES (4, '0', 'FlinkJobStatusSyncJob2', '1', '0', NULL, NULL, 7, 'sys', 'sys')
DROP TABLE IF EXISTS `workflow_instance`;
CREATE TABLE `workflow_instance`
(
`id` BIGINT NOT NULL AUTO_INCREMENT,
`workflow_definition_id` BIGINT NOT NULL,
`dag_id` BIGINT NOT NULL,
`task_id` VARCHAR(128),
`state` VARCHAR(4) NOT NULL,
`start_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`end_time` DATETIME,
`message` TEXT,
`creator` VARCHAR(32),
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`editor` VARCHAR(32),
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`id` BIGINT NOT NULL AUTO_INCREMENT,
`parent_workflow_instance_id` BIGINT,
`workflow_definition_id` BIGINT NOT NULL,
`dag_id` BIGINT NOT NULL,
`trigger` VARCHAR(255) COMMENT '触发原因',
`task_id` VARCHAR(128),
`state` VARCHAR(4) NOT NULL,
`start_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`end_time` DATETIME,
`outputs` TEXT,
`message` TEXT,
`creator` VARCHAR(32),
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`editor` VARCHAR(32),
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_workflow_definition` (`workflow_definition_id`)
KEY `idx_workflow_definition` (`workflow_definition_id`)
) ENGINE = InnoDB COMMENT ='workflow instance';

DROP TABLE IF EXISTS `workflow_task_instance`;
Expand All @@ -94,6 +97,7 @@ CREATE TABLE `workflow_task_instance`
`stage` VARCHAR(4) NOT NULL,
`start_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`end_time` DATETIME,
`outputs` TEXT,
`message` TEXT,
`creator` VARCHAR(32),
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
Expand Down

0 comments on commit c6dd19a

Please sign in to comment.