[ActivityName]AsynchronousActivity
This class is used to add business logic for an asynchronous activity.
The following sequence diagram illustrates how the methods in the [ActivityName]AsynchronousActivity<N> class are invoked:
The [ActivityName]AsynchronousActivity<N> class contains an internal class and the following methods:
Methods | Description |
---|---|
public void init() | Use this method to initialize the activity.
This is a BusinessWorks 6 life-cycle method. |
public 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 void requestCancel() |
Use this method to revoke the execution of an asynchronous activity, when the application is closed, or the asynchronous activity is still running within the waiting time that is specified in the {@link AsyncActivityController#setPending} method. This is a BusinessWorks 6 life-cycle method. This method sets the instance variable cancelRequested. Business logic in run() method may check it periodically and may end if the value is True |
public void execute() | Use this method to execute an asynchronous activity.
This is a BusinessWorks 6 life-cycle method. |
public N postExecute() | Use this method to complete the execution of an asynchronous activity, when the asynchronous activity issues a signal of completion by invoking the
{@link AsyncActivityCompletionNotifier#setReady} method in a different thread.
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> N getOutputRootElement() | Use this method to get the root element of the output. |
public String getInputParameterStringValueByName() | Use this method to get the value of a string parameter according to the parameter name from the input. |
public String getInputAttributeStringValueByName() | Use this method to get the value of an attribute according to the parameter name from the input. |
public boolean getInputParameterBooleanValueByName() | Use this method to get the value of a boolean parameter according to the parameter name from the input. |
The [ActivityName]AsynchActivityExecutor<A> internal class contains the following method: | |
public void run() | Use this method to add business logic before calling the evalOutput() method. This method is executed in another thread. |