Generic Event Bus Handler

  • 17 October 2014
  • 3 replies
  • 2 views

Badge +4

Say I have a user worklist (MVC app) on the users screen with 10 items.  Say a worklist item gets processed from somewhere else.  I’d like to pick up the client event (presumably at the event bus level), know the event is finished, and call back to the user’s worklist to a javascript function that will remove the item from their worklist without doing a full getworklist again.  SignalR could be used to do this if I could just know when a client task is actioned.

 

I understand that I can create an event bus receiver – but from my reading it looks like it needs to be configured per event per flow or smart object.  I’d like to simply pick up all client events from any workflow, then I can figure out what to do with it (signalR notification or whatever).

 

Ideas are appreciated.

 


3 replies

Badge +3

Hi. jensor. I have the same task - subscribe for all client events in K2. Did you found any solution?

Badge +8

We have considered something like this in the past but abondoned the idea because of the pain associated with subscribing to events in the event bus.  As jensor mentioned, events must be subscribed to per activity per process.  This is very painful when you have lots of large processes, as we do.  In addition to this, SignalR requires an IIS app pool that uses integrated pipeline mode, but the K2 APIs require classic mode to get all the impersonation and authentication correct in our environment.

 

Just a brainstorm: Create a web service that all of your applications call when a worklsit item has been completed.  The web service then raises the appropriate event in the SignalR hub.  Still not sure this will work with impersonation, etc. in a custom worklist, but its just a thought.

Badge +4

My front end calls a single method to action workflows.  So when an action is performed, I call a signalR service method giving it a serial number of the task.  That service then brodcasts the ProcessID and Activity ID such that a javascript receiver  on the front-end searches the DOM/grid for that row and deletes the row.  Works great.  This would need to be modified if you need more than one actioner to complete a task though.

Reply