I am creating a process to handle task management within my Sharepoint portal.
The process is built and basically works. However, the first event after "start" is create workspace in sharepoint. This works fine, but I need to set the "workspace name" to be a unique value everytime (I can't hang this from task title, date, etc as none of these will be a unique value).
I have added a new activity inbetween start and create task site. Within the]is new activity (set folio field) I have a default server event with the following:
public void Main(object Bevel, ServerEventContext K2)
{
K2.Synchronous = true;
K2.ProcessInstance.Folio = K2.ProcessInstance.ID.ToString();
}
The idea is that when the process triggers, I set the folio field to be = process instance ID. I can then use the folio field as my workspace name on the next activity.
However, when I run the process, I get an error in the K2 Server Console. I have tried to run it three times now with the following errors (nothing changed inbetween)
Set Folio Field ServerEvent: Method K2Code188.Main not found
Set Folio Field ServerEvent: Method K2Code214.Main not found
Set Folio Field ServerEvent: Method K2Code240.Main not found
Can anyone help me identify the problem here? Obviously my code is C#. Am I going about this in the best way?
Many thanks for any help
Rich