Skip to content

DEV workflows and runs

simonedegiacomi edited this page May 23, 2019 · 1 revision

A Run is the execution of a workflow. In the applications we often need to show the execution state of a workflow, so there is the RunnableWorkflowService which takes care of aggregating a workflow with its runs.

RunnableWorkflowService

RunnableWorkflowService
├── adapters
├── models
└── RunnableWorkflowService.js

The RunnableWorkflowService uses the WorkflowsService and RunsService (both in Services/rest) to merge these entities together, since they are used by the same components throughout the components in the Workflow folder.

Notes:

  • This service also contains the polling logic used to keep the application updated with the status of runs associated to workflows;
  • Objects returned by this service are instances of classes declared in the models subfolder;
  • Since do blocks have two runs (publish and wait), the adapters/DoBlockRunAdapter.js can be used to treat these two runs as a single one;

Current or latest run

The service takes care of sorting the runs in order of date and, if the workflow is currently running, the application considers as the current run the latest run.