You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A scheduler in general makes two decisions: (1) *when* (at which point in time) and (2) *where* (on which node) to run a *workflow task*. To this end, three API functions are provided:
3
+
This project demonstrates how to use the HyperFlow scheduler API in workflows.
4
4
5
-
```
6
-
let node = await scheduler.getTaskExecutionPermission(context.appId, context.procId);
7
-
```
8
-
This function will wait until the scheduler permits to execute the task (*when*) and return the node name on which the task should be executed (*where*).
9
-
10
-
```
11
-
scheduler.addTaskItem(taskItem, taskFunction2Cb)
12
-
```
13
-
This is an asynchronous alternative of `getTaskExecutionPermission`, also enabling the scheduler to [agglomerate tasks](https://github.com/hyperflow-wms/hyperflow/wiki/Task-agglomeration). See documentation in the code for details.
This function should be used to notify that a task has been completed. This allows the scheduler to trigger subsequent tasks, or even update the execution schedule.
19
-
20
-
## Running the example
21
-
22
-
See [Hyperflow simple scheduler](https://github.com/hyperflow-wms/hyperflow-simple-scheduler)
5
+
See [Hyperflow simple scheduler](https://github.com/hyperflow-wms/hyperflow-simple-scheduler) project for information on API and running the workflow.
0 commit comments