Skip to main content
Quick Background: Our application is a .Net Winforms client / SOA architecture. We will use K2.Net, but the client will present all UI ... we're not using any of the provided web-based UI.

The first question revolves around a business requirement to show completed Activities. It's clear to me that K2ROM won't do this. I thought K2MNG could do this, but I have since read material elsewhere discouraging that usage because K2MNG is using the transactional database. Given that I am not able to use the provided UI (IE, I can't use the reporting or searching UI in K2.NET) it seems the only other possibility is to hit the log database directly. I am hesitant to do this because of the lack of support and risk of breaking changes when service packs/upgrades are introduced. Any comments or suggestions?

The second question should be far easier. The documentation is a little unclear about the Finish method in K2ROM. Does it force the Activity to finish regardless of the rules in the designer or does it cause the server to evaulate the rules and complete the Activity based on those rules? More to the point, how can I cause the latter to happen from the client?

Read on if you want to know why I ask: We're setting this up so that instead of server-initiated events there will be one event in the Activity that essentially does nothing. The rule to move past the Activity will be based on Activity-level or Process-level data. The client UI will offer one or more 'Actions' that are our equivalent of events. When the Action completes (including updating data in the Activity) we need to get the Activity to move forward and I was wondering if the Finish method was for this, or if simply updating the data will cause that to happen.

Thanks!!!
I have the same dilemma with completed items. Even with K2MNG you can not display the process data values since by security it restricts even K2 Admins from having access to actual data.

I believe folks here have recommended to use FilterService.asmx to generate the report. That approach doesn't allow display of the original data in the application (WinForm or WebForm).

One way around this that I can see is to assign this to the initiator at the very end of the process and never finishes it so it can be accessed by K2ROM and they could open the original application and get the process data in read only mode.

However that would clutter the transactional database until workitems are retired 365 days from initiation.

Not sure about the .Finish method.
When a worklist item is finished (via the Finish() method) it instructs K2 that this worklist item is completed and is removed from the person's worklist.

What happens next really depends on the design of the acitvity. If there are events immediate following the client event that had spawned this worklist item within this activity, those events are fired. Once all events within an actvity have completed, then the activity's Succeeding Rule is evaluated to determine if the activity can complete. Once the Succeeding Rule evaluates to true (an empty rule automatically evaluates to true) the line rules coming off of the activity are evaluated and execution will move to all activities that have a line rule connection that evaluates to true.

So, yes the Finish() is required in order for process execution to proceed, but in and of itself, it does intitiate the line evaluations.

FYI, if you wish to simply update process data, you can use the Update() method. Keep in mind this will save the data to K2, but the worklist item is not completed, so execution never proceeds.

I hope this helps.
Thanks Bob ... that helped alot.

Now I just need to get an answer on how a WinForm based client should best query completed activities...

Reply