How can I determine who completed a Client Event in subsequent Server Event?

  • 23 June 2011
  • 6 replies
  • 0 views

Badge +3

I have an Activity with a Client Event and then a Smart Object Event right after it.  I'd like to be able to pass the destination user that completed the client event (i.e. "contosojdoe") to the Smart Object Method in my Smart Object Event.  Can I do this easily?


I'm using custom ASP pages to surface my client events, so there is likely something I could do with setting process data or something from the client event, but I'm hoping for something more straightforward.


6 replies

Badge +2

You can store the destination user in a DataField on the process and use the same DataField for the value of the input property on the SmartObject.

Badge +3

Thanks.  A couple follow up questions:


What would set the DataField?  My custom aspx page?  Or something in the workflow?  If the former, then I could probably just update my business data directly from the web page.  If the latter, then I think I could just skip that and use the value directly in my call, right? 


And then would I need to create a datafield for each client event I want to do this?  For example, if I have 2 client events ("Do Work", "Review Work") and after each one I want to report something through a smart object I would have to have 2 data fields ("Do Work Completed By" and "Review Work Completed By") and set them upon completion and then use them in my call, right?  Or I could use a CompletedBy field at the Activity level, too, right?


With many client events, this could get tedius, though.  Just looking to keep the process design simple.  Like is there a way to use the smart object for the process or some other built in field (i.e. completedby) to get this?

Badge +10

Not sure if this is any easier in the end but you could query the out of the box Activity Instance Destination SmartObject filtering on the process instance ID and the Activity Name.

Badge +3

If there are multiple destination users (i.e. a "pool" of users that can complete the task), will I have to filter on status then to know who actually completed it? 

Badge +10

You can filter on the Status field for "Completed".  Other destination users who didn't complete the activity will have a status of expired.


Try using the SmartObject Tester tool to see all the properties and it'll become clear what you need to filter on.

Badge +3

This approach actually didn't work because of the timing.  My server event that fired right after the client event seemed to happen before the event instance was marked as completed.  The better option I went with was to set my Destination Rule to "Plan Per Destination" and pass the "Activity Instance Destination User Name" to my smart object method.

Reply