K2 Workflow Reports - ActivityInstanceDestination SmartObject

  • 17 April 2013
  • 1 reply
  • 31 views

Badge +1

Hello everyone


I have a big problem regarding this Activity Instance Destination Smart Object. I started to use before 1 month, and I was thinking that the results get from this SO are correct, but when I go deeper I saw several issues.


First of my question is how this K2 SO get the results, from which table in K2?


My first issue was the following:


I have activity with destination user: All at once, Create a slot for each destination, and resolve all roles and groups to users. So if I have 2 users K2:user and K2:requester. In this case I have the follow table:
ActInstDestID. ActInstID, ProcID, User
33                      54              43          K2:requester
38                      54              43          K2:user


So I have two solution to finish this activity, one is K2:user to finish this activity, and another is K2:request to finish this activity. If K2:requester finish this acitivity everything is OK, but if K2:user is finish this activity then I got ActInstDestID from first user (in this case K2:requester), replace with own ActInstDestID and I got the following table:


ActInstDestID. ActInstID, ProcID, User
33                      54              43          K2:requester
33                      54              43          K2:user


Later I need to merge this table with my custom SO which I have ActivityInstanceDestinationId but in the case if K2:user finish the activity I'm not possible to join this two tables (my SO and ActivitiyInstanceDest SO)


This is VERY strange!!! 


Later I open the K2.ServerLog.ActInstDest table and I saw that I have original data with expected values. So question is what happen with this ActivitiyInstanceDest SO. Where is taking that values. Why I got bad values.


Another issue, second, is also regarding on this SO. I update K2.ServerLog.ActInstDest FinishDate field with + 1min. I open the SO and I got correct value for everybody except for user who finish the activity. If I open the database everything is OK, I saw correct values. 


I was testing all this issues directly on the K2 database, with SmartObject Service Tester, and into my web application.


Please help me regarding this two problems. Maybe it is some bug in K2 Blackpearl, maybe I wrong, but please tell me how to resolve this issues.


Thank you and sorry for by bad English.


Regards
Darko 


1 reply

Badge

Hi Darko


 


The Activity Instance Destination SMO retrieves data from several places in the DB.


It starts by getting a list of all completed users, by joining data from the K2serverlog._ActInstDest and K2serverlog._Actinst table.


It then proceeds to get all dest destinations, so it will reference the K2serverlog._worklist and _actinst tables once more.


It will use this information along with the ProcSets, to retrieve the results for the Activity Instance.


I have however tested the scenario that you describe and it appears what is happening is, that the first slott allocated receives an activity instance ID and that ID is used by whoever the destination user is.


I have tested this with multiple users, I have for example a destination set with three users where it is reported as follows:


 


Act Inst Dest ID                 User


8                                           a


12                                         b


16                                         c


 


For the three destinations if user ‘a’ takes the item the act inst ID remains 8 however if any other user actions the activity their activity instance destination ID is updated to 8 as well.


I would suggest you log a call regarding this behaviour, as this does appear to be a bug although it might also be by design.


Regards


Theo

Reply