When I am doing force finish for all active process using the core service, for some processes (apparently at random) I see the following message:
EventSystem.DeliverEvent must be called with EventDeliveryPhase.Initiated before it is called with EventDeliveryPhase.Processed.
What are the likely causes of this problem, and how can I improve my design to avoid it
ProcessesFilterData filter = new ProcessesFilterData { BaseColumns = ListBaseColumns.IdAndTitle, ProcessType = ProcessType.Active };
IEnumerable datas client.GetSystemWideList(filter).Cast();
datas = datas.Where(data => data.Title.StartsWith("Quick"));
foreach (ProcessInstanceData data in datas) {
client.ForceFinishProcess(data.Id, "tcm:0-51-131073", new ReadOptions());
}