add TaskEnvironment.lock() method and implement AbstractTaskEnvironment
implement draft of task execution