Writing Tasks

Note: The following section highlights the major APIs and how to use them. Refer to the Java™ documentation for more information about methods and their signatures.
Custom tasks for processing in the Services Framework may be required based on business requirements. The task being written must be a Java program that extends the com.ibm.paydir.iyb.services.util.task.BaseIPDTask (base task) abstract class. The base task is in the SDK library file, iybservicesapi.jar, which is located in the install_directory/shared/v409/pfs/ServicesFramework/sdk/java/lib directory. An example is shown here:
import com.ibm.paydir.iyb.services.util.task.BaseIPDTask;

public class MyCustomTask extends BaseIPDTask
{
}
A custom task must implement abstract methods for completion when the base task is sub-classed by it. The following example outlines the abstract methods a custom task must implement before registering it in the Services Framework.
public abstract CompleteStatus runTask ( ) throws TaskProcessingException;

public abstract boolean validateConfigParameters (Map<String,TaskParm> configParms)
   throws ParameterValidationException;

public abstract UOW validateManualParameters (Map<String,TaskParm> runtimeParms)
   throws ParameterValidationException;

public abstract String getTaskName( );

public abstract Locale getDefaultLocale( );

public abstract void initConfigParameters( );

public abstract void initManualParameters( );

public abstract void releaseResources ( );

public abstract CleanUpResponse boolean cleanup(CleanUpRequest cleanUpRequest)
   throws CleanupException;

public abstract EODQueryResponse endOfDayQuery (EODQueryRequest eodQueryRequest)
   throws EndOfDayException;

public abstract EODExecResponse  endOfDayExec (EODExecRequest eodExecRequest)
   throws EndOfDayException;
Note: Custom tasks that use the BaseTask abstract class must be updated to use BaseIPDTask. These tasks must also implement the abstract methods shown in the example.