Skip to main content
I have a problem where I'm trying to start a process from code, and it's then not appearing in the WorkList for the destination user of the first activity.

I start the process using the following code:

.Value = 2;
instance.Folio = "Case: 2";
}
finally
{
k2.Close();
}


And the first Activity has a destination rule that assigns it to the user. Using the Service Manager I can see the instances of the process have been created correctly, and the Workspace shows that the process has advanced to the first activity (it's in blue). However, there are no entries in Worklists in Service Manager.

What am I doing wrong?
Well, it is very strange to me that the process was actually started and advanced to the first activity. Apart from the CreateProcessInstance call, you also need to make a StartProcessInstance call. Please refer to the Help file for code samples - specifically have a look at the StartProcessInstance method of the Connection class of the K2ROM object model.

Regards,
Ockert
Oops, I missed that in the code I cut and pasted.

I have
k2.StartProcessInstance(instance);


Before the exit of the try block.
Probably some error occurring. Easiest way to troubleshoot would be to run K2.net Server in console mode and start another process instance. Hopefully, you'll see some error message displayed in there. Also, have a look at the K2Error.txt file in K2.net's Bin directory for any errors.

Regards,
Ockert

Reply