Class AbstractActivityRun<WD extends WorkDefinition,​AH extends ActivityHandler<WD,​AH>,​WS extends AbstractActivityWorkStateType>

  • Type Parameters:
    WD - Definition of the work that this activity has to do.
    AH - Type of the activity handler.
    WS - Type of the activity work (business) state.
    All Implemented Interfaces:
    ExecutionSupport, DebugDumpable
    Direct Known Subclasses:
    DelegatingActivityRun, DistributingActivityRun, LocalActivityRun

    public abstract class AbstractActivityRun<WD extends WorkDefinition,​AH extends ActivityHandler<WD,​AH>,​WS extends AbstractActivityWorkStateType>
    extends Object
    implements ExecutionSupport, DebugDumpable
    Implements (represents) a run of an activity. Responsibilities _at this [highest] level of abstraction_: 1. During execution - see run(OperationResult): a. initializes activity state (if needed), b. skips run of the activity if the activity realization is complete, c. executes "before run" and the real code, d. handles exceptions thrown by the execution code, converting them into ActivityRunResult (such conversion is done at various other levels, btw), e. logs the start/end, f. updates execution and result (op) status in the repository, 2. Maintains links to other activity framework objects: task run, activity, activity state (and its definition), activity state for counters. 3. Provides methods for navigation to more distant objects of the framework and other auxiliary objects (beans).