Metadata Fields Management
The Metadata Fields Management task can be used to add new fields into your metadata, either for every element or through conditions.
This task will automatically "loop" through the metadata and repeat its action for each of your metadata's datapage. This task should not be placed after a Metadata Sequencer.
Input
Any data file with accompanying metadata.
Processing
Fields are added, removed, modified, etc, according to the actions defined in the task properties. If the field is present in a level that repeats (for example, the data page level), this task loops so that the action may take place on each of the occurence of that level.
Output
The original data file is output, along with the modified metadata.
Task Properties
General tab
- Action: Select the type of Metadata Field Management action to perform. 5 action types are available:
- Add/Replace: Create a new metadata field. If the name already exists, the value is overwritten with the new one.
- Duplicate: Create a new metadata field. If the fields already exist, a new instance is created.
- Append: Append the new value at the end of the current one. If no field with that name exists, a new one is created.
- Sum: Calculate the sum of all values found in all fields of a given name, at a given level. The resulting number is formatted by default with the dot decimal separator.
- Delete: Delete the metadata field if it exists and disables the Field information column's Field value option.
- Field Information: Specify the metadata node level, field name and field value of the specified action.
- Level: Choose between Job, Group, Document, Datapage. The task will loop through each selected node of the chosen metadata level.
- Job: Apply the action on the specified field at the Job level.
- Group: Apply the action on the specified field at the Group level.
- Document: Apply the action on the specified field at the Document level.
- Data page: Apply the action on the specified field at the Data page level.
- Field Name: Enter the metadata field name on which the task will operate.
- Field Value: Enter the metadata field value. Note that if the chosen action is Delete, this parameter is disabled. For other action types, in order to set the field value, click the [...] button. This button opens the Data Selector, which allows to specify a data selection as the field's value.
- Decimal Separator: Set the decimal separator for the Sum option. 3 possible modes are offered:
- Auto-detect: Interpret automatically the value. This option is ideal for documents using mixed decimal separators. Note that the auto-detect option encountering the value 1,000 (with a comma separator), interprets it as a thousand while interpreting 1.000 (with a dot separator), as one.
- .: Treat every value with the dot (".") decimal separator. Commas (",") are treated as thousand separator.
- ,: Treat every value with the comma (",") decimal separator. Dots (".") are treated as thousand separator.
- Condition: Define criteria for the Metadata Field Management action execution. The condition must be TRUE for the action to execute. To set up conditions, the Rule Interface is displayed, allowing to edit the condition for the given action. See the Rule Interface page for more details.
On Error Tab
By default, any action task, branch, splitter or condition that generates an error will simply be ignored, and the task just under it (not within a branch) will be given control of the job file without any modification. Any initial input task that generates an error will stop the process from running as a whole, and output tasks will not generate output. The On Error tab can be used to overwrite the default behaviors.
- Send to Process: Check this option to send the job file to an error management process.
- Error Process drop-down: Enabled only when the Send to Process option is checked. Lists any process of which the initial input task is the Input Error Bin task.
- Action Group: This group is disabled in the initial input tasks and defaults to Stop Process. In all other tasks where the On Error tab is present, the following options are available:
- Ignore: The task is ignored as if it did not exist, and the job file is passed on to the next task in the process.
- Stop Branch: If the task is in a branch of the process, the branch is stopped and the job file is returned to the process after the branch. The branch will not produce any output.
- Stop Process: The process is stopped and no more processing is done. No further output is produced.
- Log Message: Check this option to enable logging a custom error message in the PlanetPress Suite Workflow Tools' log file.
- Message: Enabled only when the Log Message option is checked. Enter a message that will be logged in the PlanetPress Suite Workflow Tools' log file. You can use any variables available in PlanetPress Workflow to customize the message.
- Store the message in variable: Select in which jobinfo, local or global variable you want to store the message content.
- ID: Enter an error ID. This ID will be visible in the Windows Event Viewer. However, the ID is not visible in the PlanetPress Suite Workflow Tools' log file.
- Store the ID in variable: Select in which jobinfo, local or global variable you want to store the error ID.
- Reset to defaults: Resets all options in this tab to their default values.
If storing the message or ID, if they are store in a jobinfo they will be available in any error handling process where errors are being forwarded. In all cases, if your process continues after the error, the contents of the variables selected in this window will be available for the rest of your process, or whenever they are overwritten.
Common Errors
Though some error messages are specific to a task in particular, others may apply to any and all tasks because they are related more to the system than to PlanetPress itself. Some examples would be W3813, W3830, W3991, W4005. These correspond to issues such as not having any space to write files, permission errors on folders or files, etc.
Comments Tab
The Comments tab, added in PlanetPress Suite 7.5, is common to all tasks. It contains a single text area (Task comments) that lets you write comments about the task. These comments are saved when the dialog is closed with the OK button, and are displayed in The Task Comments Pane.
New Wild Card
For a given Metadata Field Management action, all nodes of a given level might be updated with a new Field Value. To accommodate this, metadata/data selection functions have been modified to accept a wild card parameter "?", indicating the function operates on all nodes (not just one) of a given level. For example, in a PDF emulation, the format of a selected region is:
region(?,0.59375,2.21875,1.85416,2.51041,KeepCase,NoTrim)
where “?” represents the current physical data page processed by the task.
Limitations
- The name of the metadata field to add must adhere to thess syntax rules: start with a letter, followed by zero or more letters, numbers, underscore or dash. The name is not case-sensitive.
- Metadata Fields Management actions on the Page level are not possible since the entire task execution is based on the data page node.
- The task raises an error if the selected Metadata Fields Management action is Sum and if one of the field values is not numeric. The task supports approximately 15 digits of precision in a range from 2.23 x 10-308 to 1.79 x 10308.