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 the context of a FlowForce Server job, input parameters represent some arbitrary information supplied to the job based on which the job will execute in a particular way. Job 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). For some job types, FlowForce Server creates the input parameters automatically.
When creating a job, you must specify the conditions (or criteria) that will trigger the job, known as triggers. FlowForce Server monitors any defined triggers and executes the job whenever the trigger condition is met.
Steps define what the FlowForce Server job must actually do (for example, delete a file, execute a MapForce mapping, or send an email). In its simplest form, a step is just an operation with either failed or successful outcome, and it requires a function to be executed (see Execution step). However, there are also steps that provide means to execute other steps conditionally or in a loop (see Choose step, Error/success Handling step, and For-Each step). You can create as many steps as required within the same job, and you can set the order in which they 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 record is the combination of user name and password associated with a user account on the operating system where the FlowForce Server job runs. When you define a job in FlowForce Server, you must supply the credentials with which the job must be executed. Note that if the user account associated with the supplied credentials does not have sufficient rights on the operating system, the job cannot execute successfully.
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).|
© 2019 Altova GmbH