What is the use of global container ? Is it necessary to create all the variable and components inside global container ? If yes, why cant i create or drag and drop locally which will be used only one automation .os file ?
The global container is a place to locate components or other items that you wish to make global. You can make items global within an automation, however that makes it harder to locate them. If you want to create a variable or component that is to be used only in one automation, then making it local to that automation will accomplish that. The reason you want to make certain components global is because there is a performance hit to loading multiple copies of the same thing (however slight that may be). Certain components must be global for them to operate properly (lookup tables for example). The nice thing about a global container, is that you can rename it to start with an underscore ( the _ character) and it will appear at the top of the Object Explorer window, allowing you easy access to its contents within other automations. Practically speaking though, there's no difference between a Global Container and making components global in an automation.