# TaskWorkStateType (Complex Type)

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

Describes the task work state: what has been processed, what is being processed and what is yet to be done. Useful for work distribution as well as for stateful suspend+resume feature.

Item Summary
Name | Type | Multiplicity | Description
--- | --- | --- | ---
bucket | container WorkBucketType | [0,-1] | Current buckets of work.
numberOfBuckets | property int | [0,1] | How many buckets are there? This is an indicative information, e.
allWorkComplete | property boolean | [0,1] | True if all the work is complete.

- ### Items

  - #### bucket

    Flags: RAM,runtime

    Multiplicity: [0,-1]

    Current buckets of work. Some buckets might be present implicitly: if a bucket with sequence number of N is present, it is expected that all unlisted buckets with numbers lower than N are either complete (for coordinator and standalone tasks) or not relevant (for worker tasks). In a similar way, if no free bucket is available and we are not at the end it is expected that some free buckets are yet to be created (for coordinator tasks).

  - #### numberOfBuckets

    Flags: RAM,runtime

    Multiplicity: [0,1]

    How many buckets are there? This is an indicative information, e.g. to be used when estimating total progress.

  - #### allWorkComplete

    Flags: RAM,runtime

    Multiplicity: [0,1]

    True if all the work is complete. This means that on next run the task should start from the beginning. (We do not simply erase workState because of progress reporting needs.)