Work Definition screen shows list of existing workflows and utility to create or import workflows.
Project Management -> Workflow -> Workflow Definition, enter the
Workflow Definition page, and click the
Create Workflow button to enter the workflow DAG edit page, as shown in the following figure:
Drag from the toolbar to the canvas, to add a shell task to the canvas, as shown in the figure below:
Add parameter settings for shell task:
Run Flag. If
Prohibit Executionis checked, the task will not execute when the workflow runs.
Task Priority: when the number of worker threads is insufficient, high priority tasks will execute first in the execution queue, and tasks with the same priority will execute in the order of first in, first out.
Resource Center -> File Managementpage. For example, the file name is
test.sh, and the command to use the resource in the script is
sh test.sh. Please note that you need to use the full path to the resource files.
Confirm Addbutton to save the task settings.
Click the plus sign on the right of the task node to connect the task; as shown in the figure below, task Node_B and task Node_C execute in parallel, When task Node_A finished execution, tasks Node_B and Node_C will execute simultaneously.
If the DAG contains stream tasks, the relationship between stream tasks is displayed as a dotted line, and the execution of stream tasks will be skipped when the workflow instance is executed.
Delete dependencies: Using your mouse to select the connection line, and click the "Delete" icon in the upper right corner , delete dependencies between tasks.
Save button, and the "Set DAG chart name" window pops up, as shown in the figure below. Enter the workflow definition name, workflow definition description, and set global parameters (optional, refer to global parameters), click the
Add button to finish workflow definition creation.
Save button and configure
process execution type in the pop-up window. There are four process execution types:
Parallel: If there are multiple instances of the same workflow definition, execute the instances in parallel.
Serial Wait: If there are multiple instances of the same workflow definition, execute the instances in serial.
Serial Discard: If there are multiple instances of the same workflow definition, discard the later ones and kill the current running ones.
Serial Priority: If there are multiple instances of the same workflow definition, execute the instances according to the priority in serial.
Project Management -> Workflow -> Workflow Definition to enter the workflow definition page, as shown below:
Workflow running parameter description:
Failure strategy: When a task node fails to execute, other parallel task nodes need to execute the strategy. "Continue" means: After a task fails, other task nodes execute normally; "End" means: Terminate all tasks being executed, and terminate the entire process.
Notification strategy: When the process ends, send process execution information notification emails according to the process status, including no status, success, failure, success or failure.
Process priority: The priority of process execution, there are five different priorities: the highest (HIGHEST), high (HIGH), medium (MEDIUM), low (LOW), the lowest (LOWEST). When the number of master threads is insufficient, processes with higher priorities in the execution queue will run first. Processes with the same priority will run in first-come-first-served fashion.
Worker grouping: This process can only be executed in the specified worker machine group. The default is Default, which can be executed on any worker.
Notification Group: Select Notification Policy||Timeout Alarm||When fault tolerance occurs, process information or emails will be sent to all members in the notification group.
Startup parameters: Set or override the value of global parameters when starting a new process instance.
Complement(Backfill): Run workflow for a specified historical period. There are two strategies: serial complement and parallel complement. You could select the time period or fill in it manually in UI.
Complement with or without scheduling：
The following are the operation functions of the workflow definition list:
Project Management -> Workflow -> Workflow Definitionto enter the workflow definition page, as shown in the figure below, click the "Go Online" button to make workflow online.
Runbutton to pop up the startup parameter setting window, as shown in the figure below, set the startup parameters, click the
Runbutton in the pop-up box, the workflow starts running, and the workflow instance page generates a workflow instance.
Description of workflow operating parameters:
Default, which can execute on any worker.
Serial complement: within the specified time range, complement is executed from the start date to the end date, and multiple process instances are generated in turn; Click Run workflow and select the serial complement mode: for example, from July 9 to July 10, execute in sequence, and generate two process instances in sequence on the process instance page.
Parallel Replenishment: within the specified time range, replenishment is performed simultaneously for multiple days, and multiple process instances are generated at the same time. Enter date manually: manually enter a date in the comma separated date format of 'yyyy MM DD hh:mm:ss'.Click Run workflow and select the parallel complement mode: for example, execute the workflow definition from July 9 to July 10 at the same time, and generate two process instances on the process instance page at the same time.
Concurrency: refers to the maximum number of instances executed in parallel in the parallel complement mode.For example, if tasks from July 6 to July 10 are executed at the same time, and the concurrency is 2, then the process instance is:
Dependency mode: whether to trigger the replenishment of workflow instances that downstream dependent nodes depend on the current workflow (the timing status of workflow instances that require the current replenishment is online, which will only trigger the replenishment of downstream directly dependent on the current workflow).
Relationship between complement and timing configuration:
Startbutton (only online tasks can be clicked to run).
Create schedule: Click
Project Management -> Workflow-> Workflow Definition, enter the workflow definition page, make the workflow online, click the "timing" button , the timing parameter setting dialog box pops up, as shown in the figure below:
Select a start and end time. Within the start and end time range, the workflow is run regularly; outside the start and end time range, no timed workflow instance will be generated.
Add a timing that execute 5 minutes once, as shown in the following figure:
Failure strategy, notification strategy, process priority, worker group, notification group, recipient, and CC are the same as workflow running parameters.
Click the "Create" button to create the timing. Now the timing status is "Offline" and the timing needs to be Online to make effect.
Schedule online: Click the
Timing Management button , enter the timing management page, click the
online button, the timing status will change to
online, as shown in the below figure, the workflow makes effect regularly.
Project Management -> Workflow -> Workflow Definition to enter the workflow definition page, click the
Import Workflow button to import the local workflow file, the workflow definition list displays the imported workflow and the status is offline.