# ActivityStateType (Complex Type)

### Namespace: http://midpoint.evolveum.com/xml/ns/public/common/common-3

Describes the state of an activity: everything the activity needs to record in the repository in order to function properly. Most parts are maintained by the activity framework. The "workState" is a business state specific to the particular activity type.

Item Summary
Name | Type | Multiplicity | Description
--- | --- | --- | ---
identifier | property string | [0,1] | Identifier of the activity.
displayOrder | property int | [0,1] | Display order of the activity.
taskRunIdentifier | property string | [0,1] |
executionAttempt | property int | [0,1] |
realizationState | property ActivityRealizationStateType | [0,1] | State of the activity realization: in progress local/delegated/distributed, complete, or aborted.
abortingInformation | container ActivityAbortingInformationType | [0,1] | More details about why and how was the activity aborted.
resultStatus | property OperationResultStatusType | [0,1] | Operation result status of this activity.
message | property LocalizableMessageType | [0,1] | Explanation of the status, especially if it indicates an error.
realizationStartTimestamp | property dateTime | [0,1] | When did the current (or last) realization start? For workers, this information is copied from the coordinator when the worker starts.
realizationEndTimestamp | property dateTime | [0,1] | When did the current (or last) realization end? If null, this means that the current realization is in progress.
runStartTimestamp | property dateTime | [0,1] | When did the current (or last) run start?
runEndTimestamp | property dateTime | [0,1] | When did the current (or last) run end? If null, this means that the current run is in progress.
progress | container ActivityProgressType | [0,1] | Progress of this activity.
statistics | container ActivityStatisticsType | [0,1] | Statistical information related to activity execution.
bucketing | container ActivityBucketingStateType | [0,1] | Information about the bucket processing within the activity.
counters | container ActivityCounterGroupsType | [0,1] | Counters related to the execution of the activity, grouped into related categories.
policies | container ActivityPoliciesStateType | [0,1] | State of the policies related to the execution of the activity, grouped into related categories.
simulation | container ActivitySimulationStateType | [0,1] | State related to the "simulated" execution of this activity (and its children).
reports | container ActivityReportsType | [0,1] | Reports related to activity execution.
workState | container AbstractActivityWorkStateType | [0,1] | Work (business) state of the activity.
persistence | property ActivityStatePersistenceType | [0,1] | How much is this state information persistent?
activity | container ActivityStateType | [0,-1] | Work state of child activities.

- ### Items

  - #### identifier

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    Identifier of the activity.

  - #### displayOrder

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    Display order of the activity. Optional.

  - #### taskRunIdentifier

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

  - #### executionAttempt

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

  - #### realizationState

    Flags: RAM,runtime,AVals:5

    Multiplicity: [0,1]

    Display order:

    State of the activity realization: in progress local/delegated/distributed, complete, or aborted.

  - #### abortingInformation

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    More details about why and how was the activity aborted. Used when realizationState = ABORTED.

  - #### resultStatus

    Flags: RAM,runtime,AVals:8

    Multiplicity: [0,1]

    Display order:

    Operation result status of this activity.

  - #### message

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    Explanation of the status, especially if it indicates an error. Optional. Avoid use for distributed activities.

  - #### realizationStartTimestamp

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    When did the current (or last) realization start? For workers, this information is copied from the coordinator when the worker starts. For delegates, this information describes when the realization started in the delegate. (Can be a moment after it started in the delegator task.)

  - #### realizationEndTimestamp

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    When did the current (or last) realization end? If null, this means that the current realization is in progress. The meaning in workers is undefined. The meaning in delegates is "the realization end from the point of view of the delegate", i.e. just a moment before the realization ends from the point of view of the delegator.

  - #### runStartTimestamp

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    When did the current (or last) run start?

  - #### runEndTimestamp

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    When did the current (or last) run end? If null, this means that the current run is in progress. Note that this is different from the last finish timestamp in tasks, which is set to the previous run value even if the new run is in progress.

  - #### progress

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    Progress of this activity. Relevant for worker and standalone tasks. (Can be copied to coordinator e.g. if workers are deleted.)

  - #### statistics

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    Statistical information related to activity execution.

  - #### bucketing

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    Information about the bucket processing within the activity.

  - #### counters

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    Counters related to the execution of the activity, grouped into related categories. One of the categories are counters needed to implement thresholds for policy rules. Note: The counters may be moved to separate repository object later to improve performance.

  - #### policies

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    State of the policies related to the execution of the activity, grouped into related categories. Note: The policies may be moved to separate repository object later to improve performance.

  - #### simulation

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    State related to the "simulated" execution of this activity (and its children). Contains e.g. the OID of the simulation result object after it is created.

  - #### reports

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    Reports related to activity execution.

  - #### workState

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display order:

    Work (business) state of the activity.

  - #### persistence

    Flags: RAM,runtime,AVals:3

    Multiplicity: [0,1]

    Display order:

    How much is this state information persistent?

  - #### activity

    Flags: elaborate,RAM,runtime

    Multiplicity: [0,-1]

    Display order:

    Work state of child activities.