Exception handling on a Smart Object Event

  • 2 September 2008
  • 2 replies
  • 2 views

Badge +3

Hi

I have created a Smart Object which uses a web service.

If the web service isn't available i have an exception. In this case i want to go to previous activity, send an email (destination is in a process DataField) and change the process status from error to active.

How to do this exception handling ?

Must i edit the generated code and where ? 

 


2 replies

Badge +4

Hi,


In the activity containing the Smart Object Event, please try the Exception Handling Property in the Activity Properties.


In the wizard, tick enable and edit code.


Create a K2 DataField called "bHadSmOError" as boolean. Set it to true (or use 1 or 0 as  a bit type) in the above code.


Set the value to true or 1  or whatever you d like to use.


Then draw a new line underneath the activity and apply a line rule ( if bHadSmOError == true) ; create a activity it will fire up your email; Then the line below the email activity will loop back to the activity just before the Smart Object Event.


Hope this makes sense?


Regards, 


 

Badge +3

Thank for your reply.

I already tried your methods but my  datafield is always false and my process status is Error.

I don't think we can change the process status it is Error. 

Reply