You are viewing limited content. For full access, please sign in.

Question

Question

Try-Catch on Warning - Workflow Feature Request

asked on April 16, 2014 Show version history

The use case for this is assigning a field value and the value is incompatible with the field datatype. This generates a warning message "The data assigned to field 'Amount_Temp' is not valid. 9017 [Bad field value. [9017]] [0265-WF10]". I would like to have special handling for this event but I can't try-catch on a warning.

 

As a workaround I could retrieve the field value after the Assigned Field Value activity and if it is blank then I know the Assign Field Value activity was unsuccessful. Then I could handle that event.

 

I think the feature request would allow a cleaner solution to my use case. The activity would then be more dynamic and useful to other users as well.

1 0

Replies

replied on April 16, 2014

++;

 

I run into this with Script Activities. A null reference exception in a script will only cause a warning and the workflow continues on like nothing happened.

1 0
replied on April 16, 2014

Devin, you should see Miruna's response in the link below regarding errors in script activities being reported as warnings in Workflow. This may help in your particular situation.

http://answers.laserfiche.com/questions/53189/Workflow-the-TryCatch-activity-and-triggering-an-exception-in-script

1 0
replied on April 16, 2014

Nice. Thanks!

0 0
replied on April 18, 2014

Would the ability to retrieve a multivalued token of the names of the bad fields and possibly another token with their bad values be sufficient? You could then use a condition to check for failures.

 

I'm hesitating at the idea of throwing an error from an assign fields value activity just due to the 'best effort' nature of the activity to get all assignable field values assigned when only one field may be invalid.

0 0
replied on April 18, 2014 Show version history

Ed, I'm not suggesting changing the warning to an error on a failed Assign Field Value. I'm suggesting that the Try-Catch could be enhanced to allow catch on Warning. 

 

My workaround (screenshot below) works fine but the feature request would be more efficient. Maybe I missed your point so I'll clarify mine in case there was a miscommunication on my part. Thanks for the reply!

0 0
replied on April 18, 2014 Show version history

I was trying to minimize the scope of the request from a lot of work to a little bit of work. This change would also be more backwards compatible with previous versions of the software. So something like:

 

0 0
replied on April 18, 2014

Ed,

What you described would allow the workflow to take action on a failed Assign Field Value activity so I see your proposed idea as a useful enhancement. I still see value in enhancing the Try-Catch activity for Warning level messages because it could have a broad range of uses since you can wrap it around any activity type. Thanks for spending some time on this.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.