Serial number compisition

Last post 08-19-2008, 12:45 PM by kennethlo. 8 replies.
Sort Posts: Previous Next
  •  05-14-2008, 1:53 AM 23793

    Serial number compisition

    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.

  •  05-14-2008, 9:30 PM 23806 in reply to 23793

    Re: Serial number compisition

    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).

  •  05-15-2008, 1:37 AM 23812 in reply to 23806

    Re: Serial number compisition

    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.

  •  08-05-2008, 8:23 AM 25359 in reply to 23806

    Re: Serial number compisition

    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.

     

  •  08-11-2008, 12:45 PM 25457 in reply to 25359

    Re: Serial number compisition

    Is it K2.Net 2003 or Blackpearl?
    Yousef T. Eqtait
    K2 Consultant - DXB
  •  08-18-2008, 8:22 AM 25545 in reply to 25457

    Re: Serial number compisition

    Blackpearl. Do you have any luck with that?

     

  •  08-18-2008, 2:29 PM 25554 in reply to 25359

    Re: Serial number compisition

    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

     

  •  08-18-2008, 9:40 PM 25563 in reply to 25554

    Re: Serial number compisition

    Remember that this is only available within the activity scope.
    Yousef T. Eqtait
    K2 Consultant - DXB
  •  08-19-2008, 12:45 PM 25578 in reply to 25563

    Re: Serial number compisition

    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! 

View as RSS news feed in XML