Job Async Executor: Running Long Running or Multi-step Async Tasks

  • Long Running Jobs: These are jobs that take several minutes or hours to execute.  
  • Multi-step Async Tasks: This is a task consisting of multiple steps. An example is as follows:

1) Transcoding a file.

2) Creating an asset from the file.

3) Adding technical metadata to the asset.

There are two scenarios in which a developer could implement long running and multi-step async tasks in JEF:

Scenario 1

A developer could develop an action executor that configures async behaviour by listening to an external event (example: register to message queue, or prepare to receive a REST request) to continue progress and finally complete / fail / cancel the job.

Scenario 2

A developer could develop an action executor that configures async behaviour via an active component, that needs to be run periodically in order to retrieve the current status and finally complete / fail / cancel the job.

Example: Periodically polling a third party service in order to retrieve the status of a job.

JEF currently supports the infrastructure for both these scenarios. However, in scenario 2 we have provided an ActionProgress mechanism which can help with implementation.

https://help.ooyala.com/sites/all/libraries/dita/en/media-logistics/flex/dev/70/jef_programming_guide_async_long_running_or_multi_step_tasks.html

Was this article helpful?