Skip to main content
Skip table of contents

MP Metadata Mapping for Advanced Workflow Input Controls [ENT 20.2 OG]

It is also possible to use existing metadata fields, defined in ConfigPortal, to provide some more flexibility and control for the input parameters of SendTo workflows.
When defining a SendTo workflow for MediaPortal in ConfigPortal, a new section is made available for creating a "Workflow Input Parameter" layout – similar to that in Edit Metadata Layout definitions.
Imagine you have e.g. a workflow "AddDeletionLock-Collection" as shown in the next image:



This multi-instance workflow can be triggered on single assets as well as on collections in MediaPortal. For each asset, it will finally call the workflow "AddDeletionLock".
The workflow provides one standard input parameter "WorkflowObjects" which takes a list of objects as described above. Additionally, it provides the custom input parameter "Reason" of type string and an "ExpirationDate" of type DateTime.
When you add this workflow as a SendTo workflow in MediaPortal, the SendTo dialog will typically appear as depicted below:



As the input parameter for "Reason" is a string, you get a simple input field and the label for that field is the name of the actual workflow input parameter.
However, one may often want to change the name of the label and maybe have a dropdown which provides valid values for the input.
Let us assume the label is "Reason for Deletion Lock", and only the following values are made available:

  • ExtendedUsage
  • EditingNeeded
  • UpcomingEvent

All you need is a metadata field defined in ConfigPortal which has the desired label and is of type enum with those values. Maybe you can use an already exiting metadata field or create a new one as follows:



In the SendTo workflow configuration page, one can now select this metadata field and add it to a layout region, like you can do for metadata layouts.



Now you will already see an enum in the SendTo dialog for that value. One still has to define to which actual workflow input parameter the value of that filed is assigned.
You can do so by selecting the three dots "…" on the filled in layout area. Then you will get a pop-up dialog as shown below:



In the field "Workflow Input Parameter Name" you will have to type in the name of the workflow input parameter to which the value will be assigned.
The name has to be specified manually, because the current version ConfigPortal is not aware of the available input parameters of a workflow. This might be supported in future.
Additionally, one can provide a default value.


Please note that the following options are currently not supported:

  • Mandatory
  • ReadOnly
  • Multi Value


When you save the changes, as shown in the previous screenshot, the SendTo dialog will look like follows.



With the layout editor's support, you are able to add any amount and types of additional input parameters. You can also arrange the order of the fields. However, MediaPortal only supports ordering from top to down, no column-like ordering. If you define a layout with columns this will be "flattened" to rows.


Unsupported Features for 20.2

The following features are not supported:

  • In the SendTo dialog, DateTime values are only shown as Date. Provision of time is currently not possible.
  • Restrictions of metadata fields will not be considered in SendTo dialog so far, such as e.g. String restrictions

  • The following options in metadata mapping specification are not supported in SendTo dialog:
    • Mandatory
    • ReadOnly
    • Multi Value
    • Tag
    • Multiline


JavaScript errors detected

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

If this problem persists, please contact our support.