Perform the following steps to exit a module based on the value of a variable.
From within the Project Designer page, expand the Job Control folder in the Component Library, and then drag the Exit Module task to the Project Outline.
On the Control tab of the Exit Module task, specify the Execute Only If condition for when the module should exit.