Today is the Feast of the Holy Family of Jesus, Mary and Joseph. In the Gospel reading from Matthew 2, after Jesus was born in Bethlehem of Judea in the days of King Herod, the angel of the Lord appeared to Joseph in a dream and said, "Rise, take the child and his mother, flee to Egypt, and stay there until I tell you. Herod is going to search for the child to destroy him." Joseph rose and took the child and his mother by night and departed for Egypt. What the Lord had said through the prophet was fulfilled, Out of Egypt I called my son. When Herod had died, the angel of the Lord appeared in a dream to Joseph again and said, "Rise, take the child and his mother and go to the land of Israel, for those who sought the child's life are dead." But when Joseph heard that Herod's son was ruling over Judea, he was afraid to go back there. So he departed for the region of Galilee. He went and dwelt in a town called Nazareth. Again what had been spoken through the prophets was fulfilled, He shall be called a Nazorean.
We can see that God had ordained everything, yet Joseph was allowed to discern what right action to take. That's how we should follow the Lord: fully believing that he'll guide us in all things and using our best judgment in carrying out what we are asked to do.