We have the following scenario...
Create a purchase order with two lines, first line is for a regular stock item, second line is for a procurement category (not stock).
Need to create a workflow to reject the total order if one of the PO lines is a procurement category, our PO's should be stock or non stock and not mixed..

If we just use PO header workflow, AX looks at one line (not both) and depending if the first line is stock or procurement category makes a decision.
Have tried to create a PO line level workflow, and it detects if one line is a procurement category or not. - Correct
We set the PO line workflow to approve the PO line if it is a stock item or reject PO line if procurement category.
The idea was that if a line is rejected, the header would also be rejected, but it doesn't work...
When the workflow runs:- if the line is for a stock item the line approves and the workflow control returns to the PO header workflow. - Correct
if the line is procurement category the line rejects but the workflow does not return to the PO header workflow, the PO line workflow sits in a pending state! - Not correct
Any other ideas how to build a workflow to allow this level of control?