The following TaskBeans come packaged with JobServer. The HelloWorld TaskBeans
are a good way to learn more about the API. Review the documentation
for these TaskBeans including the source code to learn more about how to develop
your own TaskBeans. There are also several
functional TaskBeans like EMailAlert and ShellScript that are part of the BeanSoup
project which are also packaged with JobServer. You may find these useful for actual
use and they are also a good way to learn about how to develop your own TaskBeans.
Javadoc details for these TaskBeans can be found here. You can also view additional details on a specific TaskBean by using the TaskBean Manager tool. With this tool you can view the developer meta information and view the actual GUI Customizer associated with the TaskBean (if one exists). Additional information including source code can be found at the BeanSoup project web site.
Get started creating your own TaskBeans! If you think others would find them useful feel free to share them by adding them to the beansoup project.
Hello world (part 1) example TaskBean. This is the simplest possible implementation of a TaskBean. It does not use any of the more advanced features like Customizers, input JavaBeans, output JavaBeans, etc.
When the Job is run, this TaskBean logs the message "Hello out there" using the Java Logging API.
Hello world (part 2) example TaskBean. This is a simple implementation of a TaskBean. It expands on the part 1 version by having the TaskBean use an input JavaBean to store the person's name used in the hello message.
The TaskBean uses the Java Logging API to log the hello the message when the Job is run. The message includes the person's name found in the input JavaBean.
Note, that since no Customizer is used in this example the input JavaBean can't be manually edited by the user. It can only be set in the code.
Hello world (part 3) example TaskBean. This is a slightly more advanced implementation than the part 2 example. It expands on the part 2 version buy including a simple Customizer to edit the input JavaBean
In this example the input JavaBean property, personName
can be edited directly by the Customizer. The Customizer also
persists any changes made to the input JavaBean.
The TaskBean uses the Java Logging API to log the hello message when the Job is run. The message includes the person's name found in the input JavaBean.
Hello world (part 4) example TaskBean. Useful as a template for implementing new TaskBeans. This example is more advanced version than the part 3 example. It exercises many of the features available to TaskBeans.
This TaskBean sends email alerts and notifications. It can be used in a variety of ways by a Job. For example, it can be used as the first TaskBean to inform the user that the Job has started processing or it can be used as the last TaskBean to inform the user that the Job has completed.
The Customizer for this TaskBean allows the user to set the default values of the to/from/subject/body of the email message. These properties can also be set dynamically when the Job runs and thus passed in on the fly as input from another TaskBean. So you could dynamically set the email addresses or the body of the message as necessary from another TaskBean.
This TaskBean can execute an arbitrary unix shell script. It includes a Customizer where the script can be defined. The standard out and standard error of the script are saved in an output JavaBean and can be viewed using the output Viewer.
TaskBean used within the JobServer environment for cleaning up various logging data and outdated database records. When run regularly, it keeps the JobServer environment well maintained.
TaskBean can send and pull files.
Can transform source XML file to target XML file using XSLT spec.
Can execute arbitrary Beanshell script.
Can execute arbitrary Groovy script.