Entry point of the user-implemented workflow application.
A workflow application that runs inside the dalma container
needs to have a class that derives from this class. Such class
serves as the entry point to the workflow program, and its fully-qualified
class name must be Main (in the root package.)
Configuring Program
A
Program typically needs to be configured with environment-specific
information to function. For example, perhaps a program is some kind of e-mail
automation system and may use 2 e-mail endpoints and 1 IRC endpoint.
A
Program communicates these configuration requirements to the container
by using
Resource annotation. In the above example, the
Program would be written something like:
class Main extends dalma.Program {
@Resource
public EmailEndPoint externalMail;
@Resource
public EmailEndPoint maintananceMail;
@Resource
public IRCEndPoint chatEndPoint;
@Resource
public String greetingMessage;
...
}
At runtime, the container invokes setters and sets fields to "inject" references
into the program before the
Program.init(Engine) method
is invoked.
author: Kohsuke Kawaguchi |