Skip to main content

I use the serial number to open a worklistItem in my own application.


For each manual activity, a send a mail to a person in charge with the URL + serial number to able him to act on item. In the same process(activity), i update my own database column with the current  URL + serial number(on the correct process instance line) and update the process instance datafield with the current  URL + serial number.


But i get some problems because values are not the same : process instance datafield value = database column value <> mail value. And it's really amazing that the correct value to use is mail value!


So, i want to know the real compistion of serial number. If i get 'SOR2,163,139' 'SOR' = server name; 163 = process instance number; 139 = activity number. I am not sure and my question is : How cant i find in my process the activity corresponding to this number 139? 


Thanks in advance,


 


Ahlonko.

For K2 [blackpearl] the serial number is composed of:
<%ProcInstID%>_<%ActInstDestinationID%.


 


From the serial number you've listed it looks like a K2.net 2003 serial. For 2003, the serial number is made up of:
<%ServerName%>,<%ProcInstID%>,<%EventInstID%>.


 


Just something to watch out for, if you are using 2003, you will need to update your database in the same event, as you will not have a handle on the event instance ID outside of the event itself unless you save it to a datafield (but this again needs to happen inside the event of course).


Thank you!


After investigation, i found that the destination rule for this activity is for AD group. In this AD group, we have two persons; the first one have the same value of sn in the mail and in process instance datafield and in the database column. The second one receive mail with a different value of sn!
Only first one can act on process instance with the datafield value of sn or database value or mail value; the second person must use the sn value in his mail. 


Each person in AD group has his own EnventInstID and only one datafield in process instance for this information. And only one column in database.


I have to change the application and database and insert one line by user which can act on this activity in database.


Best regards,


Ahlonko.


I am using BlackPearl and having trouble getting the serial numbr.

The serial number I get back from <%ProcInstID%>_<%ActInstDestinationID%> differs from the correct one from the K2 Worklist. It seems like my serial number always ends with "31" but the ActInstDestinationID is returning "19". Anyone has any idea why this is happening?


Many thanks in advance.


 


Is it K2.Net 2003 or Blackpearl?

Blackpearl. Do you have any luck with that?

 


After much digging around, I discovered the K2 Context has the serial number! You can simply retrieve the serial number with this code:

K2.SerialNumber

 


Remember that this is only available within the activity scope.

I moved the Mail Event to a different Server Event container, and the ProcInstID + ActInstDestinationID returned the correct serial number. Apparently, the Mail Event was running too early in the workflow. It started working once the event was fired off at a later time.

What a relief! 


Reply