Steplet class

The Steplet class within the AJAPI encapsulates the data synchronization for a step application component.

Syntax

public abstract class Steplet extends AgentryJavaBackEndManagedObject

Members

All members of Steplet, including inherited members.

Variables
Modifier and Type Variable Description
protected Session _session Session data, set by the constructor.
Constructors
Modifier and Type Constructor Description
public Steplet(FetchSession) Constructs a new Steplet that will be used as part of a fetch.
public Steplet(PushSession) Constructs a new Steplet that will be used as part of a push.
public Steplet(PushUserSession) Constructs a new Steplet that will be used as part of a push.
public Steplet(TransactionSession) Constructs a new Steplet that will be used as part of a transaction.
public Steplet(ServiceEventSession) Constructs a new Steplet that will be used as part of a service event.
Methods
Modifier and Type Method Description
public abstract boolean doSteplet() Perform the necessary actions of this steplet.
public String getNotificationText() This method is called for Transaction Error-Handling Steplets.
public String getNotificationTitle() This method is called for Transaction Error-Handling Steplets.
public String getOkButtonLabel() This method is called for Transaction Error-Handling Steplets.
public Object getReturnData() The Agentry server will call this method to obtain the data produced by the doSteplet method.
public Session getSession() Returns the Session object for this steplet.
public String notificationText() Deprecated. Override getNotificationText() instead. The default implementation of this method will call that method. This method may be made final or removed in a future release. Use getNotificationText() instead.
public String notificationTitle() Deprecated. Override getNotificationTitle() instead. The default implementation of this method will call that method. This method may be made final or removed in a future release. Use getNotificationTitle() instead.
public String okButtonLabel() Deprecated. Override getOkButtonLabel() instead. The default implementation of this method will call that method. This method may be made final or removed in a future release. Use getOkButtonLabel() instead.

Usage

The Agentry Editor provides a template subclass of this class for each step in the application that uses a Java system connection; these subclasses must override the methods in this class to implement their behavior. A basic steplet needs to implement doSteplet() and getReturnData(). Steplets that will be used in Agentry transaction error-handling steps can also override the notificationTitle(), notificationText(), and okButtonLabel() methods to control the contents of a failed transaction's error notification windows.

A typical steplet implementation will implement doSteplet() to retrieve a set of data from a remote system, package that data into an object or array of objects, and save the data in a member field. The implementation of the getReturnData() method will then return that data as either a single object or an array of objects. These objects will will in turn contain publicly-visible fields that are mapped within the Agentry application (via the Agentry Editor) to the fields of corresponding Agentry objects. The Agentry server will read data directly from the fields of these objects; the server will not use getter/setter methods to read them.

A steplet can throw StepletStopException to stop processing of itself but allow processing of subsequence steplets in a session to continue, or it can throw StepletAbortException to stop processing of itself and any subsequent steplets in the session. It can also throw a BusinessLogicException exception to report an error message to the client's transmit window. Steplets that are used in transaction steps can also throw RetryTransactionException, RetryTransactionWithChangeException, or FatalTransactionException to abort the transaction in various ways.