A job is a core concept in FlowForce Server. It represents a task or a sequence of tasks to be executed by the server. Jobs can be as simple as one-step tasks such sending an email. However, you can also create jobs that perform multiple actions and pass the result (for example, a file) as parameter to another job. A job consists of input parameters, steps, triggers, and other settings.
Structure of a FlowForce job
In FlowForce Server, input parameters are similar to function arguments in a programming language. Input parameters can be of various types (for example, file or directory references, text, numbers, Boolean values, and others).
When you create a job, you must specify conditions (or criteria) that will trigger the job. These conditions are known as triggers. FlowForce Server monitors any defined triggers and executes the job whenever the trigger condition is met.
In FlowForce Server, steps define what a job must do (e.g., delete a file, execute a MapForce mapping, send an email). In its simplest form, a step is an operation with failed or successful outcome. The step requires an execution of a function. You can execute steps conditionally, unconditionally, and in a loop. You can create as many steps as required for your job, and you can set the order in which the steps must take place.
In the context of a job, a function is an instruction understood by FlowForce Server that performs some operation on the target file system. A function can be one of the following:
•A built-in FlowForce function (see Built-in Functions)
•A StyleVision transformation
•A MapForce mapping
•The execution step of a job
Most functions have input parameters. Any mandatory input parameters must be supplied by the caller in order for the step to execute successfully.
In FlowForce Server, a step's execution result defines what is returned after the step is executed (for example, a file, or some text). When working with jobs, you can explicitly declare a step's execution result to be of a specific data type (such as String or Boolean), or be discarded. You typically need to declare the data type of the execution result if you intend to use it in other jobs, or if you want to cache the result.
A credential object stores authentication information. This is typically the combination of user name and password associated with a user account on the operating system where the FlowForce Server job runs, but it can also be a set of HTTP or FTP credentials.
When creating a job, you can configure the following optional settings:
•Make the job available as a Web service (see also Exposing Jobs as Web Services)
•Limit the number of instances running in parallel for the same job (see also Defining Queue Settings).
•Cache the result returned by the job (see also Caching Job Results).