Hi all
I have a custom method that starts a workflow process. I intermittently get this error.
Collection was modified; enumeration operation may not execute.
According to the stack trace it occurs in the StartProcessInstance method. Anything above the third line is K2 code, and that is where it seems to be throwing the error. Just wondering if anyone has had a similar issue. I have read some post on programming forum and the general error seems to be when you modify the object you are currently looping. But I don’t know what code is being executed where this stack trace is pointing.
at SourceCode.Workflow.Client.InternalConnection.Call(ArchiveX ar, MessageType msgtype)
at SourceCode.Workflow.Client.Connection.StartProcessInstance(ProcessInstance ProcInst, Boolean Sync)
at MyCustomServiceObject.MyCustomStartProcessMethod()
Any help would be appreciated.