Skip to main content
Skip table of contents

Register the Asset

Assets in the object repository are called items. To create an item for a given video file one can use the "RegisterItem" task. Add a service task to the workflow and select the corresponding task as described in the Start Event and Append Task and Change Task Type sections.

This task expects a file ID as Input. Whenever the configured watchfolder detects a file it will automatically create a file ID and pass this to the configured workflow as an abstract URI as described in the Uri Parameters section.
One is able to see the expected input variables and the generated output variables of the task in the "Input/Output" tab of the property menu, when the task is selected.
As described in the Input and Output Parameters section, one can add a global workflow parameter which provides the abstract URI as a value to the corresponding input variable of the task.
Workflows that handle watchfolder ingest use cases must provide a workflow input variable with the name "SourcePlatformUri" of type string. The actual watchfolder use case that will be created, as described in Watchfolder Creation section, will expect a workflow variable with that name and another one called "TargetPlatformUri" – the usage of which is explained later. One must provide the following expression to the value of the tasks input parameter
"SourcePlatformUri": "#{SourcePlatformUri}".

By adding this value, one implicitly creates a new global workflow parameter with that name. This can be seen when selecting the global workflow scope by clicking into a white area of the workflow designer (unselecting the task).

Global Workflow Input Parameters
In the tab "Workflow Parameters" one can now see the global input parameter "SourcePlatformUri" of type string.

As you can see, this global input parameter has the same name as the local input parameter of the "RegisterItem" task. For input variables this is not a problem. The watchfolder will pass the file id as an abstract URI to the global workflow parameter "SourcePlatformUri". The assignment (via expression language in the task's input section) of this global parameter to the local parameter of the task with same parameter name, will finally pass the value of the global parameter to the local parameter of that task.

Global Workflow Input Parameters and Local Task Output Parameters
The global workflow output parameter "TargetPlatformUri_..." is visible under "Output Parameters". This is automatically implicitly created by the output parameter of the "RegisterItem" task. By selecting this task again and selecting its "Input/Output" parameters one will see one output parameter of the task. By selecting this output parameter one will get the following view.

As one can see, the concept of output variables is different to that of input variables. One is only able to change the name of the output parameter, but not its value. This might be confusing at first glance, but is logical having read the following explanation.
The task generates output values based on its input values. Those values are written into its defined output variables. In above example, the RegisterItem task has one output parameter called "TargetPlatfromUri". The task creates an asset (item) for the video file (represented by the abstract URI of the input parameter) and adds the file to that asset. The newly created asset gets an item Id and this is actually the output of that task. The item Id itself will be represented again by an abstract URI that is written as a string to the task's output parameter "TargetPlatformUri". To use this later, e.g. as input for another task, one has to assign this local task output parameter to a global workflow parameter. This is already implicitly created whenever one adds a task to the workflow.
All output parameters of a task implicitly create a global workflow parameter that has the same name as the local parameter, but with a suffix to make it unique. In the above example the suffix is "_3bvtlpt". This is a randomly created unique Id. The uniqueness of global output variables is to avoid ambiguity, in order to avoid using several tasks with the same output parameters. If one were to use the same task in a workflow twice, each task will normally create a different value for its output parameter. If both would assign this to a global parameter of the same name, one task would overwrite the value of the other task. This is why one should take care to keep names of output parameters unique if these are meant for use. By default this uniqueness is granted by the automatic appending of the automatically generated unique suffixes. However, one can change this name to whatever you like. One should just take care that the name is meaningful and unique if used in other places of the workflow.
In this example the output parameter is named "NewItemUri". Only one RegisterItem task will be used and one should be careful that no other task will create a global output parameter with the same name. Under the global workflow parameters one can now see the global parameter named "NewItemUri".

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.