Batch Components

Last published : Jul 27, 2026
The parameters in the Batch Definition editor correspond to components contained in the Batch Definition. Each Batch Definition can contain one or more Batch components. These components can be commands, events, or other Batch Definitions. For example, a LogCommand Component is shown below. To add a component to a Batch Definition, select a component from the add component list.
A Batch Component
Batch components are processed in a Batch Definition in order when Batch Type, described above, is set to serial. To move a component's order in the Batch Definition, click the Move Up or Move Down buttons in the upper-right corner of each Batch component. You can also remove a Batch component by clicking the Remove button in the upper-right corner.
Each of the types of Batch components that can be added to a Batch Definition are described below. By default, Extended Help is displayed. To display only the first sentence of help, select Help from the Help control in the upper right corner. To suppress the help display, click No Help.
Batch Components
Name
Description
Batch
Contains another Batch Definition. This can be used to create a complex or multi-leveled Batch Definition. For example, a parent Batch Definition can start each day, starting with two child Batch Definitions, each with different schedules or conditions.
For each new Batch component, you must set the same parameters for a Batch Definition as described above. You can then add additional components to the Batch.
Conditional
Provides conditional processing when running Batches. The component specified by the test is run. If it runs successfully, the component specified by success runs. If it fails, the component specified by failed runs.
The component specified in the test, returns success in the following conditions:
  • Command returns Command.SUCCESS
  • ServiceCommand creates the Service and submits the invocation without exception
  • ServiceRunnerCommand creates the Service and submits all invocations without exception
BatchReference
Contains a reference to a registered Batch Definition that gets loaded when scheduled from the Batch Registry.
Command
Runs an implemented method in a deployed class. Properties in Batch commands are based on the Java Beans specification. In a Java class, you define methods that match a pattern to get and set property values. For example, if you have a property called MyName, you can define two methods:
Public class MyCommand implements Command {
     public void setMyName(String value) { MyName = value; }
public String getMyName() { Return MyName; }
public int run()
     {
          ; //do stuff
          return Command.SUCCESS;
     }
} 
On the Batch Registry page, adding this command to a Batch, you can add a property with the name MyName and value Bob by entering these in the two text fields and clicking Add property.
ServiceCommand
Starts a Service. You can specify a Service type registered on the Manager and method name to run. You can also specify a Service reference ID, Service action, and input and init data for the Service. The Service reference ID enables you to reference the Service from another Service Command. Data is comma-delimited.
You can add ServiceDescription, ServiceOptions, and Discriminator components to a Service by using a Service Runner.
ServiceRunnerReference
Loads the specified registered Service Runner. See below for information about registering a Service Runner.
AdminCommand
Runs a command via the GridServer Admin API. For more information about using the Admin API, see the GridServer Developer’s Guide.
EmailCommand
Sends an email message from a Batch Definition, for notification or alerts. You can enter a comma-delimited list of email addresses for recipients, and a message string, used as a subject and a body.
Note that for the batch processor to send an email, you must define an SMTP server and Contact Address in your Manager Configuration. To do this, go to Admin > Manager Configuration > Admin, and enter the values for SMTP Host and Contact Address under the Mail heading. Email sent by the batch processor is sent from the Contact Address.
EmailFilesCommand
Sends an email message from a Batch Definition that includes files as attachments. It is typically used to send the output of a previous command by saving that output to a file. You can enter a subject, a message body string, a comma-delimited list of email addresses, and a semicolon-delimited list of files, which are sent as attachments in the message.
The setup rules given above in the description of the EmailCommand component also apply to the EmailFileCommand component.
ExecCommand
Runs a command from a Batch. This runs a command from the application server’s root directory. You can set an input, output, and error file, plus a log file for the command to be run.
LogCommand
Writes a string to the Manager log. This is useful for testing Batches or indicating when a Batch is starting or stopping.
WaitCommand
Halts for a moment before proceeding. The amount of wait time is specified in seconds. Note that this component is only useful for generating a wait time when the Batch type is serial.
EngineWeightCommand
Sets the Engine distribution weighting relative to other Brokers. Only Brokers that are part of a Broker/Director Manager installation are listed.
Event
Makes a Batch File wait for an implemented event to take place. You can use this to pause until a specific condition in a class you deployed has occurred.
FileEvent
Makes a Batch wait for a file event to occur to the specified file before completing the remaining items in the Batch Definition. Specifically, it enables you to watch a file and wait until it is created, deleted, or modified before proceeding.
The file specified in FileEvent supports wildcards in the base filename. Any file matching the wild-card rule can trigger the file event. Wildcards supported include *, to match the rest of the base filename, and ?, to match one character in the base filename. The wildcard naming role is the same as what is implemented by org.apache.commons.io.filefilter.WildcardFilter (see http://jakarta.apache.org/commons/io/api-release/index.html for more information.)
Related information