Symptoms
The values/ID in the [K2].[ServerLog].[Status] table vs what the 'SourceCode.Workflow.Client' and 'SourceCode.Workflow.Management' API brings back differs.
Both 'SourceCode.Workflow.Client' and 'SourceCode.Workflow.Management':
[K2].[ServerLog].[Status] > Worklist group > Allocated = 1, but API > WorklistItem.Status > Allocated = 2
[K2].[ServerLog].[Status] > Worklist group > Open = 2, but API > WorklistItem.Status > Allocated = 1
[K2].[ServerLog].[Status] > Worklist group > Completed = [missing], but APIt > WorklistItem.Status > Completed = 4
[K2].[ServerLog].[Status] > Process group > Undefined = [missing], but SourceCode.Workflow.Client > WorklistItem.Status > Undefined = 99
Diagnoses
N/A
Resolution
This differences in the APIs and in the [Serverlog].[Status] is by design.
The statuses that are returned from the APIs is correct.
As there are extra calculations done by the APIs to account for the different destination planning options (slots calculations, resolving groups/roles to users, etc.), the WorklistItem.Open(bool Alloc) method is called to whether allocated the item or not (worklist item status changing from 'available' to 'open/allocated' and vice versa), the redirect and delegate functionality when exposed from the Workflow.Client API vs the Workflow.Management API.