Skip to main content

Hi Guys


I need some help because I don´t know how to do it. I need to know if there is any process data field in K2 2003 that persists over single process instances.


What I want to do:


Read the value of a data field when a process instance is started, increase it by 1 and write the new increased value back to the datafield so that every process instance has its own number (I want to use as a kind of a counter). So you see it´s quite easy but I cannot find a datafield that persists data over the particular process instances.


Hope you understand what I mean and can help me.


Thanks in advance for the inconveniences.


Cheers,
Chris

Hy cyclops


Yes thats exactly what I want.  damn. ok then I have to do it with a database that stores the information.


Thank you very much for your VERY quick answer.


Cheers,


Chris


Isn't K2.ProcessInstance.ID unique to the K2 system per process and that's incremented by 1 each time?  


You just need an unique number not necc. a consecutive sequential number right?


For SQL Server use Identity column in a table, for Oracle use sequence.     Don't create your own custom table and try to get the value and increment by 1, which could be your bottleneck and if you don't implement it correctly you could fetch the same number in concurrent operations.


 


 


Reply