I have created an extremely simple workflow. I want to start it from outside k2 using the CreateProcessInstance function. Then I will action the workflow steps from outside K2 as well. The problem I'm having is I don't know the serial number when the process instance gets created.
I created a smartobject that can update a table and put in the serial number into a field. I also created a data field to store the primary key of the record in the table to set the serial number for. I assign the primary key to the process instance before starting it (pi.DataFields[1].Value = <ID here>;). the first step in the workflow I tried a smartobject event to use my update smart object. I set the ID = the variable, and the serial number = ProcessId_ActivityInstanceDestId.
Every time I try to run the process I get an error message about "Nullable object must have a value". Any ideas on this?