About processes and subprocesses

Processes

A process is a single workflow within a configuration (see About Workflow Configurations). A process begins with a single input task, contains one or more tasks and/or branches, and terminates with one or more output tasks. In its simplest form, a process can retrieve data from a given folder and save it in a different folder. In most cases, though, processes are more elaborate and configurations, which may include many processes, can be extremely complex.

PlanetPress Workflow processes act as dispatchers: on the one hand, they retrieve data and control plugins that retrieve data from watched locations, and on the other hand they can perform a variety of operations on the data and send data to various devices.
A given process may include Output tasks that generate files used by Input tasks from other processes.
Each process’s schedule determines when its initial input task can be performed. Other tasks included in the process are performed regardless of schedule, granted that the previous task was performed.

The available processes in your PlanetPress Workflow Configuration are listed in the Configuration Components pane.

There are several types of processes available to you:

  • A regular process will run as soon as an input file is available through its input task or, if it is scheduled not to run at that time, will start processing as soon as the schedule permits it. To learn how to create a process see: Adding a process.
  • Startup processes run only once before every other process in a given configuration (see Startup processes).
  • Subprocesses can be called by any other process (see Subprocesses).
  • Error processes can only be used in the On Error tab of a task in your process (see Creating and using Error processes).

Self-replicating processes are in fact regular processes that replicate themselves in the background when multiple input files are received simultaneously. The input task in a self-replicating process polls its source once, determines the number of files to process, then replicates itself up to the maximum allowed and treats the files simultaneously. The initial process runs again once it has completed itself and replicates again as necessary, until all files have been processed.
You can either create a regular process that is set to be self-replicating from the start (see Creating a process) or change a regular process into a self-replicating process and vice versa (see Process properties).

Processes in a configuration (except startup processes) will always run concurrently. You can schedule processes to run only at certain times or intervals via their properties (see Process properties).

Regular and startup processes can be set to be Active (process runs normally) or Inactive (process will not run at all); see Activating or deactivating a process.

Startup processes

Startup processes run only once before every other process in a given configuration. They can be used to perform operations that need to be completed once before the configuration can actually be run, such as to map network drives.

The order in which the Startup processes are arranged in the Configuration Components pane determines, from top to bottom, the order in which the Startup processes are executed when the Workflow Service launches. To learn how to reorder processes see: Reordering objects in the Configuration Components pane.
Startup processes always run sequentially.

To learn how to create a startup process see: Adding a startup process.

Subprocesses

Subprocesses are special processes that can be called by any other process. Subprocesses act exactly as subroutines in programming languages, allowing users to reuse existing processes by sharing them to the whole configuration file. They can thus be used to perform redundant operations that may need to be executed numerous times; for instance, archiving a copy of a zipped file received as the input job file, then decompressing it before sending the unzipped version of it back to the calling process.

To learn how to create a subprocess see: Adding a subprocess. Every subprocess starts with a BeginSub input task and ends with a EndSub output task, both of which have nothing to configure and cannot be replaced or deleted. They simply represent entry and exit points for the subprocess.

To call a subprocess from another process, use the Go Sub Process logic task. Information can be passed from a process to a subprocess by setting the value of runtime parameters in the Go Sub task. The list of runtime parameters is filled with the list of local variables found in the selected subprocess.

Whenever a process calls a subprocess, the main process (the caller) will wait for the called subprocess to finish its execution before carrying on with its own. This means the subprocess feature is synchronous with the main process. This also means the calling process actually appends the subprocess to its own workflow.