Activation sequences
To complete all its work, an activity might need to run as a sequence of separate processing steps, or activations . For example, a parent activity typically needs to run for a while, stop temporarily, and then continue execution when one of its children has completed.
Each activation is triggered by a BTS event , and consists of a single transaction. First activation of the activity is triggered by the system event DFHINITIAL, supplied by BTS after the first RUN or LINK command is issued against the activity. (In the case of a root activity, DFHINITIAL occurs after the first RUN or LINK command is issued against the process. It is possible to issue multiple RUN or LINK commands against a process - see Using client/server processing. ) When the last activation ends, the activity completion event is fired, which might, in turn, trigger another activation of the activity. See BTS events.

- 1
- The first event that “wakes up” the activity is DFHINITIAL. The activity determines that the event which caused it to be activated was DFHINITIAL and therefore performs its first processing step. Typically, this involves defining further events for which it might be activated. The activity program issues an EXEC CICS RETURN command to relinquish control. The activity “sleeps”.
- 2
- The next event occurs and “wakes up” the activity. The activity program determines which event caused it to be activated and performs the processing step appropriate for that event. It issues an EXEC CICS RETURN command to relinquish control.
- 3
- Eventually, no more processing steps are necessary. To confirm that its current activation is the last, and that it is not to be reactivated for any future events, the activity program issues an EXEC CICS RETURN ENDACTIVITY command. The activity completion event is fired.
