I have 8 finishing lines that all have different associated ingredients that can be used when making a batch. Each ingredient has a deviation alarm that will trigger if something goes out of spec. If a deviation alarm triggers, I need to be able to send out an email that lists the ingredient that was out of spec as well as a variable list of the other ingredients in that batch with their targets recalculated to correct for the deviation.
What I have so far:
Each of my batch ingredients for a weighup has a UDT that has all of it’s associated info such as target weight, actual weight, error %, error makeup weight and finally an alarm that’s triggered when that ingredient weighup goes out of spec. The alarm has custom properties for the target, actual error and makeup weights that I pull from the UDT.
In the notification email I send out, I include the alarm info to let the operators know what happened. Path tells them which line and ingredient and the custom alarm properties. This all works just fine.
I have a named query that will grab the alarm information and then dynamically build a list of all the ingredients being used for this batch and will recalculate the batch target weights. This also works just fine.
What I need:
I am looking for a way to include the information from this named query into the alarm notification. I figure the script block int he alarm pipeline should be able to do that. I’m just not sure how to get the information from the named query into the actual notification block.
Suggestions would be appreciated!