President Trump's executive order relating to "Foreign Terrorist Entry" has been criticized by Democrats and Republicans, on both policy and legal grounds. Though I too wish to deny the entry of foreign terrorists into the United States, I share many of their concerns.

There is another issue, one that is largely obscure from the public: the process by which Trump signed the order. As a legal matter, where the president has legal authority, whether constitutional or statutory, the president may keep his own counsel and make his own decisions. If he wished, Trump could pen his own orders. After all, the executive order claims to be exercising the president's constitutional and statutory authority.

Yet, no wise president would ever sign an order without input from others. A draft of a proposed executive order invariably comes from subordinates in the executive branch, hopefully people with specialized knowledge. In the ordinary course, these proposed executive orders are then circulated to the relevant executive departments so that the cabinet secretaries and their subordinates can ponder the changes and offer advice to the president. As stands to reason, sound executive orders are more likely to emerge from a process of deliberation than a secretive, closed process.

With this executive order (and perhaps others issued last week), news outlets are claiming that White House officials drafted the order with little or no input from the relevant agencies. The New York Times reports that Secretary of Homeland Security John Kelly was being briefed on the order just as Trump was on television signing it. Also, Kelly's department was not asked to supply a "legal review" of the order. Secretary of Defense Jim Mattis apparently saw the order merely hours before it was finalized and was never given a chance to provide input.

This is no way to make executive sausage. The nation was ill-served by those who sought to keep the circle of trust small. This is seen in the flips and flops on the treatment of green card holders.

Initially, it seemed that green card holders from the effected countries were not covered by the executive order. Then they were, and now it seems they are not. Had the executive order been properly vetted these and other wrinkles could have been ironed out.

Additionally, someone could have crafted guidance to give to immigration officials at our entry points. Instead, these officers were left trying to make sense of the order with little in the way of direction.

Moreover, the defense and homeland security secretaries, who are two former generals, should tell White House officials that they cannot be excluded from the process of crafting proposals to be sent to the president. More precisely, they should make it clear that, although they don't expect the president to unvaryingly follow their advice, they do expect the opportunity to offer it for his consideration. Anything less would be lending their good names to decisions over which they have no sway.

There are drawbacks with a more open process, but they are costs well worth paying. White House officials seemed concerned about terrorists getting whiff of their actions and trying to slip into the country on short notice, before the executive order took effect. There was also a fear that opponents in the bureaucracy might leak the information to the press in order to drum up opposition.

But these concerns seem overwrought. Unless there was some particular intelligence about immediate infiltration plots, the delay of a few days (or even 12 hours) hardly seems problematic. Can't the secretary of homeland security have a say in these questions, say for a couple of hours?

The concern about sabotage of presidential plans by the permanent bureaucracy is real. But Trump cannot run the executive branch via the White House alone. He has appointed trustworthy and intelligent secretaries and his advisors in the White House, however close they may be to the president, should have no monopoly on his attention or confidence.

Moreover, over the long term, Trump will be unable to retain the services of departmental secretaries if they come to believe they are being frozen out of policies that they have to execute but have had no hand in formulating. When they leave, he will find few luminaries willing to serve under such conditions.

Presidents face enough criticism for their substantive policies. White House officials should not trigger more brickbats by running a closed and secretive policy process. While they may be loyal to Trump, they did him no favors last week.

Saikrishna Prakash is the James Monroe Distinguished Professor of Law and Senior Fellow at the Miller Center for Public Affairs, at the University of Virginia. If you would like to write an op-ed for the Washington Examiner, please read our guidelines on submissions here.