cancel
Showing results for 
Search instead for 
Did you mean: 
NicholasZejdlik
Level 9
Status: New
I think it would be useful to be able to validate the schema of work queue items before they get added to a work queue. My thought is an XSD validation string or or some such mechanism could be associated with the work queue. The Add to Queue action could use it to validate that the data being added to the queue is valid before proceeding.

The advantage of this is that processes that use the work queue would be able to safely assume that any data entered into the queue is valid. Further, it would mean that exceptions due to invalid data would happen at the time that data is being added to the queue, as opposed to when the data is being read from the queue.

On a practical level, this may not happen often since users should be testing what data is being added into queues before going live with it. However, this would still be a gain because it would be one less thing that you have to think about while building processes.
3 Comments
HarshitRawat
Level 8
Nice thought
AndreyKudinov
Level 10
I don't get it. How do you even let users add data directly to queue? Just validate it before adding in any way you want..
NicholasZejdlik
Level 9
I should clarify that by "users" I meant other developers/processes, since they are the "users" of the work queues so to speak.

Think of it like if you create a table on a database, and a field within that table has to be within a certain range. Technically, you can simply validate that the field is within the proper range on any application that touches that table. However, you're spreading validation logic out and if the structure of the table ever changed, it would be nightmare. Instead, you'd use a check constraint on the table so that it would automatically reject any bad data that goes into it. Then if one of the applications misbehaves and tries to insert an improper value, it will get rejected.