The Talmud records a similar parable by Rabbi Johanan b. Zakkai - b. Shabbat 153a* [It is like] a king who invited his servants to a feast and did not appoint them a time. The wise among them adorned themselves and sat down by the door of the palace, for they said: Is anything lacking in a palace? The foolish among them went to their work, for they said: Is a feast ever given without preparation? Suddenly the king summoned his servants. The wise among them went in before him adorned as they were, and the foolish went in before him in their working clothes. The king rejoiced to see the wise and was angry to see the foolish, and said: These who adorned themselves for the feast shall sit down and eat and drink; but those who did not adorn themselves for the feast shall stand and look on.
[source: http://www.crossmarks.com/parable/5supper.htm]