I keep thinking about the problem the OP describes, because I face it, for example, with getting milk turned into cheese. (Dfhack workflow and stockflow routines are very useful, but the manager's artificial unintelligence makes stockflow less helpful than it could be.) I have two solutions which I keep coming back to.
Solution 1: restrict a workshop in terms of what orders it can receive from the manager. For instance, you have a Farmer's Workshop which is intended to be solely for shearing and milking: specify that this FW can only take shearing and milking orders. You would of course need to set all your other FWs not to take milking and shearing orders at all.
My view is that this isn't really the best way to deal with that kind of primary industry: the better way to resolve this is something like the dfhack-workflow solution where you simply give a Farmer's Workshop a repeat order to shear or milk and a figure to keep in stock. Since the milk and wool are taken away and processed fairly quickly (you hope), those orders will rarely be suspended due to having filled the stock requirement.
Solution 2: some way to get the manager to respect whatever resources are already available at a workshop when allocating work orders, so that if he is choosing between a workshop where the order can currently be fulfilled and one where it cannot he doesn't choose to send it to the one where it cannot! This resolves problems with input-based orders where the manager sends the order to the wrong workshop.
Now, there is already a mechanism for checking what a given workshop has available to it: I know this exists for brewers and smelters, for example, because they have some reactions which simply cannot be called unless the ingredients are available. For lots of other workshops, reactions can be called without the ingredients being available, but even there you obviously get the "Urist McFutileWork cancels Make widgets: item unavailable" messages. All I think this needs is for the manager's routine to contain a check built into it which basically says
workshopsGreen = workshops where the current order is "good to go";
IF (length(workshopsGreen) > 0)
THEN (allocate the current order to workshops only in workshopsGreen)
ELSE (don't send the orders at all but leave them on the books)
There are doubtless things I have not considered from a technical point of view, but it looks to me like the complicated work of checking whether a given workshop can carry out a certain order has already been done and can be re-used. I can't see any problems arising from this behaviour (apart from adding some lag to long-chain production processes) but I'm sure someone else can!