Initialize a gateway in TaskManager