[ActivityName]EventSource

This class is used to add business logic for the process starter and signal-in activities.

Both the process starter and signal-in activities are event source activities and use the same EventSource<N> class.

The following sequence diagram illustrates how the methods in the [ActivityName]EventSource<N> class are invoked:

The [ActivityName]EventSource<N> class contains the following methods:

Methods Description
public synchronized void destroy() Use this method to release or clean resources held by a source, when an event source is destroyed.

This is a BusinessWorks 6 life-cycle method.

public synchronized boolean isStarted() Returns a boolean value indicating the status of an event source.

This is a BusinessWorks 6 life-cycle method.

public synchronized void start() Use this method to start an event source. You cannot start a new event until this method is called.

Once this method is called, the event source uses the {@link EventSourceContext} interface to notify the BusinessWorks engine of a new event. You can use the {@link EventSource#getEventSourceContext()} method to get the {@link EventSource#getEventSourceContext()} object.

This is a BusinessWorks 6 life-cycle method.

protected <A> N evalOutput()

Use this method to generate output when the business is completed.

protected N getOutputRootElement()

Use this method to get the root element of the output.

public synchronized void stop() Use this method to stop the event source from processing new events.

When this method is called, the event source cannot use the {@link EventSourceContext} interface to notify the BusinessWorks engine of a new event.

Caution: Be careful when using this method to release or delete the resources that are used to start an event source. The {@link EventSource#start()} method cannot be called after the {@link Event source#stop()} method.

This is a BusinessWorks 6 life-cycle method.

public void init() Use this method to perform any required initialization.
The <code>eventSourceKind</code> argument of this method indicates that the event source is being initialized by a process starter activity or a signal-in activity.
Note: Do not use this method to start an event source. You can start the event source until the {@link Event source#start()} method is called.

This is a BusinessWorks 6 life-cycle method.