The way I have done this in the past is to set up a message queue for units. A unit can broadcast a message to other units that will be placed into their message queue. The receiving unit can then examine the messages and take the appropriate action. Using a message queue allows you to set up priorities for the unit so that they can perform an action based either on a message it received or what is currently happening.
For example, Unit X is in a battle and needs help. It broadcasts a help message to the other units. Unit A is in a battle and can't respond, but unit B is idle and can respond. Unit B heads for the battle but uncovers a hidden patrol and can't respond. The calling unit is now without help, so it decides to retreat. Unit B finished off the patrol and is again available, so messages Unit X that it is available. Unit X can now regroup wait for Unit B and re-attack the position.
This is fairly simple to implement. The message queue would contain a list of messages and priority values. The Help message would have a fairly high priority so it would go to the top of the message queue until either the unit got help, or the calling unit canceled the help message. Using this scheme you can send multiple orders to units and have them work on the orders based on priority and availability and current events.