Client Event not triggered after SmartObject event


Hi all,

 

I design a workflow using K2 desginer for Visual Studio.

Then I create an ASP.NET page to execute the workflow using API/Services.

 

In workflow activities, there are client event and smartobject (insert, update, etc). SmartObjects are used to insert/update data to my own database. 

 

in Activity one, there are client event and then SmartObject event. User input some information to create an Event Header, and SmartObject event is triggered to save data to my own database. then the workflow is started and proceeded to next acitivity Create Item. This work well, but workitem serial number is not saved correctly. Refer to the image in attached file K2Event.png

 

So I move the SmartObject event to the second activity, before the client event. Now correct serial number is save, but there is anohter problem, the subsequent client event is not triggered. please refer to the image in attached file K2Event_error.png

 

Is there any restriction that SmartObject  could be placed before Client Event in one activity?

 

Thank you.

 

SHWU


12294i24807A7155869F9E.png
13199i60121B62632E01E0.png
13967iBDD1A61325781C88.png


4 replies

only works when Destination Rule option = Plan Just Once.

Badge +6

can you elaborate in more details.?  There will not be any problem if you place any event before client event.

 

Multiple Destination Users will trigger SmartObject event multiple times, causing Primiary Key issue in the database. 

Hi, I have figured out why. If there are multiple destination users, the samrtobject event will be executed multiple times too, causing violation for primary key in DB, so the workflow will stop. thank you. 

Reply