Workflow Operation Handler
Introduction
Workflows are the central element to define how a media package is being processed by the Opencast services. Their definitions consist of a list of workflow operations, which basically map a piece of configuration to Opencast code:
<definition xmlns="http://workflow.opencastproject.org">
....
<operation
id="tag"
<configurations>
<configuration key="source-flavors">presentation/trimmed</configuration>
<configuration key="target-flavor">presentation/tagged</configuration>
</configurations>
</operation>
...
</definition>
Default Workflow Operations
The following table contains the workflow operations that are available in an out-of-the-box Opencast installation:
Operation Handler | Description | Details |
---|---|---|
add-catalog | Add a catalog to the media package | Documentation |
analyze-audio | Analyze first audio stream | Documentation |
analyze-tracks | Analyze tracks in media package | Documentation |
analyze-mediapackage | Analyze media package | Documentation |
animate | Create animated video sequence | Documentation |
amberscript-start-transcription | Start AmberScript Transcription | Documentation |
amberscript-attach-transcription | Attach AmberScript Transcription | Documentation |
assert | Verify preconditions with assertion | Documentation |
asset-delete | Deletes the current mediapackage from the Archive | Documentation |
attach-watson-transcription | Attaches automated transcripts to mediapackage | Documentation |
changetype | Change type of media package elements | Documentation |
cleanup | Cleanup the working file repository | Documentation |
clone | Clone media package elements to another flavor | Documentation |
comment | Add, resolve or delete a comment | Documentation |
composite | Compose two videos on one canvas. | Documentation |
concat | Concatenate multiple video tracks into one video track | Documentation |
conditional-config | Configure workflow configuration variable based on coditions | Documentation |
configure-by-dcterm | Set workflow parameter if dublincore term matches value | Documentation |
copy | Copy media package elements to target directory | Documentation |
cover-image | Generate a cover-image containing metadata | Documentation |
crop-video | Checks for black bars on the sides of the video | Documentation |
cut-marks-to-smil | Parses timestamps into a SMIL for the editor workflow | Documentation |
defaults | Applies default workflow configuration values | Documentation |
demux | Demuxes streams to multiple output files | Documentation |
duplicate-event | Create an event by cloning an existing one | Documentation |
editor | Waiting for user to review, then cut video based on edit-list | Documentation |
encode | Encode media files to differents formats in parallel | Documentation |
error-resolution | Internal operation to pause a workflow in error | Documentation |
execute-many | Execute a command for each matching element in a MediaPackage | Documentation |
execute-once | Execute a command for a MediaPackage | Documentation |
export-wf-properties | Export workflow properties | Documentation |
extract-text | Extracting text from presentation segments | Documentation |
google-speech-attach-transcription | Attaches automated transcripts to mediapackage | Documentation |
google-speech-start-transcription | Starts automated transcription provided by Google Speech | Documentation |
http-notify | Notifies an HTTP endpoint about the process of the workflow | Documentation |
image | Extract images from a video using FFmpeg | Documentation |
image-convert | Convert images using FFmpeg | Documentation |
image-to-video | Create a video track from a source image | Documentation |
import-wf-properties | Import workflow properties | Documentation |
incident | Testing incidents on a dummy job | Documentation |
include | Include workflow definition in current workflow | Documentation |
ingest-download | Download files from external URL for ingest | Documentation |
inspect | Inspect the media (check if it is valid) | Documentation |
log | Log workflow status | Documentation |
mattermost-notify | Send messages to Mattermost | Documentation |
metadata-to-acl | Add read/write access based on metadata | Documentation |
microsoft-azure-attach-transcription | Attach Microsoft Azure Transcription | Documentation |
microsoft-azure-start-transcription | Start Microsoft Azure Transcription | Documentation |
move-storage | Move files between asset manager storage systems | Documentation |
multiencode | Encode to multiple profiles in one operation | Documentation |
normalize-audio | Normalize first audio stream | Documentation |
partial-import | Import partial tracks and process according to a SMIL document | Documentation |
post-mediapackage | Send mediapackage to remote service | Documentation |
prepare-av | Preparing audio and video work versions | Documentation |
probe-resolution | Set workflow instance variables based on video resolution | Documentation |
process-smil | Edit and Encode media defined by a SMIL file | Documentation |
publication-to-workspace | Copy publication element to mediapackage in workspace | Documentation |
publish-configure-aws | Distribute and publish media to the configured publication using Amazon S3 and Cloudfront | Documentation |
publish-configure | Distribute and publish media to the configured publication | Documentation |
publish-engage-aws | Distribute and publish media to the engage player using Amazon S3 and Cloudfront | Documentation |
publish-engage | Distribute and publish media to the engage player | Documentation |
publish-oaipmh | Distribute and publish media to a OAI-PMH repository | Documentation |
publish-youtube | Distribute and publish media to YouTube | Documentation |
rename-files | Rename media files using metadata | Documentation |
republish-oaipmh | Update media in a OAI-PMH repository | Documentation |
retract-configure-aws | Retracts media from configured publication in AWS S3 and Cloudfront | Documentation |
retract-configure | Retracts media from configured publication | Documentation |
retract-engage-aws | Retracts media from AWS S3 and Cloudfront publication | Documentation |
retract-engage | Retracts media from Opencast Media Module publication | Documentation |
retract-partial-aws | Retract a subset of the mediapackage from a publication in Amazon S3 and Cloudfront | Documentation |
retract-partial | Retract a subset of the mediapackage from a publication | Documentation |
retract-oaipmh | Retracts media from a OAI-PMH repository | Documentation |
retract-partial | Retract a subset of the mediapackage from a publication | Documentation |
retract-youtube | Retracts media from YouTube | Documentation |
sanitize-adaptive | Fix references to media files in a playlist | Documentation |
segment-video | Extracting segments from presentation | Documentation |
segmentpreviews | Extract segment images from a video using FFmpeg | Documentation |
select-streams | Select streams for further processing | Documentation |
select-version | Select a version of the media package to run the current workflow with | Documentation |
send-email | Sends email notifications at any part of a workflow | Documentation |
series | Apply series to the mediapackage | Documentation |
silence | Silence detection on audio of the mediapackage | Documentation |
snapshot | Archive the current state of the mediapackage | Documentation |
speechtotext | Create subtitles for video and audio sources | Documentation |
speechtotext-attach | Attach results of asynchronous speechtotext jobs | Documentation |
start-watson-transcription | Starts automated transcription provided by IBM Watson | Documentation |
start-workflow | Start a new workflow for given media package ID | Documentation |
statistics-writer | Log statistical data about the video | Documentation |
subtitle-timeshift | Shift the timestamps of subtitles | Documentation |
tag | Modify the tag sets of media package elements | Documentation |
tag-by-dcterm | Modify the tags if dublincore term matches value | Documentation |
tag-engage | Modify the tag sets of media package elements in the engage publication | Documentation |
theme | Make settings of themes available to processing | Documentation |
timelinepreviews | Create a preview image stream from a given video track | Documentation |
transfer-metadata | Transfer metadata fields between catalogs | Documentation |
video-grid | Put parallel video streams on a single video canvas | Documentation |
waveform | Create a waveform image of the audio of the mediapackage | Documentation |
webvtt-to-cutmarks | Create cutting suggestions from subtitles | Documentation |
zip | Create zipped archive of the current state of the mediapackage | Documentation |
State Mappings
Technically, a workflow can be in one of the following states:
Technical State | Description | What the Admin UI displays in the events table |
---|---|---|
instantiated | The workflow is queued and will be started as soon as possible | "Pending" |
running | The workflow is running, no problems so far | "Running" |
stopped | The workflow was aborted by the user | "Processing canceled" |
paused | The workflow was paused and can be continued | "Paused" |
succeeded | The workflow has completed successfully | "Finished" |
failed | The workflow failed due to an error | "Processing failure" |
failing | The workflow is still running, but there were errors. It will fail. | "Running" |
Using state mappings, it is possible to refine the labels displayed in the Admin UI events table for a particular workflow.
Here is an example which displays "Retracting" instead of "Running" for the retract workflow:
<?xml version="1.0" encoding="UTF-8"?>
<definition xmlns="http://workflow.opencastproject.org">
<id>retract</id>
...
<state-mappings>
<state-mapping state="running">retracting</state-mapping>
<state-mapping state="failing">retracting</state-mapping>
</state-mappings>
When no state mappings are configured for a workflow, the generic default labels will be displayed.
When a workflow includes other workflows, the event table only shows the state of the including workflow.