9 6 6 Initialize Terminate and Execute

LANSA Composer

9.6.6 Initialize, Terminate and Execute

You can redefine two methods of the DXACTBAS1 ancestor class to perform initialization and termination processing for your Activity Processor for each and every instance that your Activity is executed in a Processing Sequence. These methods are:

  • ActivityInit
  • ActivityTerm.

These methods are a good place to put processing such as startup and completion logging and initializing, accessing or updating variables and lists in the variable pool. You can see that the supplied Activity Processor in DXACTSKEL has suggested implementations for these methods that you can adapt to your own requirements.

It is important that you understand the distinction between methods provided for load and unload and those provided for initialize and terminate.  Be sure that you place your logic in the appropriate method, having regard to your choice for the KeepActive attribute in the Activity definition.  Refer to 9.6.5 Load and Unload for more information.

A third method of the DXACTBAS1 ancestor class, ActivityRun, is intended to be redefined in all cases to perform the main body of custom Activity processing.