Add/Remove Text
Add/Remove Text action tasks can be used to perform the following actions on the data file they receive:
- To add or remove characters.
- To add or remove lines of data.
- To add the content of a text file.
Note that the content must be located at the beginning or the end of the data file.
Input
Any text-based file can be used in this task, even formats that are not directly compatible with PlanetPress. As long as the text is visible in a text-based editor (such as Notepad), it is readable and supported by this task.
Processing
The selected operation (adding or removing lines, text or pages) is made on the data file.
Output
The modified data file is output from this task. Metadata is not modified in any way if it is present.
Add/Remove Text action task properties are as follows:
General tab
- Action group
- Add: Select if you want the task to add content to the job file.
- Remove: Select if you want the task to remove content from the job file.
- Content: Select what the task will actually add or remove. Select Text file to add the whole content of a text file to the beginning or end of the job file. Select Characters to add the string of characters entered in the Characters box to the beginning or end of the job file, or to remove a given number of characters from the beginning or end of the job file. Select Lines to add the lines of text entered in the Lines box to the beginning or end of the job file, or to remove a given number of lines from the beginning or end of the job file.
- Position: Select whether you want the task to add or remove content from the beginning or end of the job file.
- Add CRLF after last line: Select if you want to add a CRLF (carriage return/line feed) character after the last line of text added to the job file. This option is only available when you choose to add lines of text to the job file.
- ASCII file: Enter the path and name of the text file to be added to the job file, or use the browse button to navigate to this file. This box is only displayed when the Text file option is selected in the Content box.
- Characters: Enter the string of characters to be added to the job file. This box is only displayed when the Characters option is selected in the Content box.
- Lines: Enter the lines of text to be added to the job file.This box is only displayed when the Lines option is selected in the Content box.
- Remove: Enter the number of characters or lines to be removed from the job file. This box is only displayed when Remove is selected in the Action group and when the Characters or Lines option is selected in the Content box.
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.