Workflow Rules Implementation

Workflow rules are implemented as Java classes that are called workflow rule service classes, or simply "services".

Using Java as an implementation language provides a number of benefits:

  • Access to the full Web Central Java API.
  • Workflow rules are portable and run on any platform supported by Web Central.
  • Java is an ideal platform to create safe, reliable and fast code.
  • Java is a mainstream language that has extremely wide adoption and is easy to learn.
  • As a compiled language, Java is much more scalable than interpreted languages -- a key consideration for Web Central business logic, which may need to be run simultaneously by hundreds of users on the same server.


Typical workflow rule implementation uses a narrow subset of the Java programming language, so we refer to it as “using Java as a scripting language.” However, the full power of the language and its libraries is available for those who need it.

As discussed above, there are two steps to defining a workflow rule:

  • Add a workflow rule definition by creating a record in the Workflow Rules table
  • Create a Java service class to which the Workflow Rule dispatches

Here is an example of a simple service class and method:

public class HelloWorld {

public String sayHello(String name) {
return "Hello, " + name + "!";
}

}

The service class can contain multiple event-handler methods, as well as additional "helper" methods. When the class-level workflow rule security is used, all public methods in the class can be called from the clients.

Workflow Rule Definitions

Workflow Rule Definitions

Creating Your First Rule