Where is it best to put validation on an excel input file?

Hello I am kind of new,

Just wanted to ask for those who have quite a lot of experience, I am wondering where is it best to put validation on an excel input file. Is it during the dispatcher process or the performer?

How do you validate each column that is required to have a value? If null we throw new BusinessRuleException(“Incomplete Details.”)


in should be in the dispatcher process, so once the data is validated, it will just upload all the data that the perfomer will process, based on that our performer process will just executed the validated data and will process all without need any validation (only validations about applications but not about data)


1 Like

the check we can do like:

  • Excel to DataTable with a read range - outcome: dtData
    if Activity: Condition -
dtData.AsEnumerable.Any(Function (x) isNothing(x(YourColNameOrIndex)) OrElse String.IsNullorEmpty(x(YourColNameOrIndex).toString.Trim))

Then: throw the BusinessRuleException
Else: optional do action when it is needed

Depending on the role from the excel

when the excel is the source for queueitems which should not further processed when not all required data is present: Dispatcher

when the excel will be used for processing a queueitem: Performer

1 Like