An apparatus for remotely controlling fluid flow in tubular strings and a wellbore annulus, comprising a. a body defining the boundaries between an inner flow passage through the apparatus and an annular flow passage within the wellbore annulus, the body having two end connections and at least one lateral hole for connecting the inner flow passage and the annular flow passage; b. a controllable valve operable in a plurality of desired states for altering fluid flow pattern within the wellbore, characterized in that the valve is having at least one rotatable element having a curved outer surface and a corresponding curved inner surface, wherein the rotatable element is arranged within the inner flow passage and is rotatable to a plurality of desired positions, wherein the valve further divides the inner flow passage into an upstream section and a downstream section, wherein the upstream section is the portion of the inner flow passage from the valve and through one end connection of the body and the downstream section is the portion of the inner flow passage from the valve and through the other end connection of the body; the apparatus further comprising: c. an activator disposed within the body capable of selectively changing the apparatus into either one of two modes: a disabled mode, wherein the valve is not operable, and an enabled mode, wherein the valve is operable to a desired state, wherein the activator further comprises a plurality of suitable sensor means for detecting an intended change in at least one physical property of the environment resulting in a signal within the apparatus suitable for processing, and d. an actuator for changing the position of the rotatable element to cause the valve into a desired state comprising a means for transforming a suitably available energy source into a mechanical movement, wherein the rotatable element of the valve is capable of forming one of more possible flow passage: i. no flow pattern wherein the flow passage between the upstream section and the downstream section is restricted and the flow passage between the inner flow passage and the annular flow passage is also restricted; ii. through flow pattern wherein the passage between the upstream section and the downstream section of the inner flow passage is not restricted whereas the flow passage between the inner flow passage and the annular flow passage is also restricted; iii. diverted flow pattern wherein the flow passage between the upstream section and the annular flow passage is not restricted whereas the flow passage to the downstream section is restricted; and iv. full flow pattern wherein the flow passage between the upstream section and the downstream section of the inner flow passage is not restricted and the flow passage between the inner flow passage and the annular flow passage is not restricted. a. a body defining the boundaries between an inner flow passage through the apparatus and an annular flow passage within the wellbore annulus, the body having two end connections and at least one lateral hole for connecting the inner flow passage and the annular flow passage; b. a controllable valve operable in a plurality of desired states for altering fluid flow pattern within the wellbore, c. an activator disposed within the body capable of selectively changing the apparatus into either one of two modes: a disabled mode, wherein the valve is not operable, and an enabled mode, wherein the valve is operable to a desired state, wherein the activator further comprises a plurality of suitable sensor means for detecting an intended change in at least one physical property of the environment resulting in a signal within the apparatus suitable for processing, and d. an actuator for changing the position of the rotatable element to cause the valve into a desired state comprising a means for transforming a suitably available energy source into a mechanical movement, i. no flow pattern wherein the flow passage between the upstream section and the downstream section is restricted and the flow passage between the inner flow passage and the annular flow passage is also restricted; ii. through flow pattern wherein the passage between the upstream section and the downstream section of the inner flow passage is not restricted whereas the flow passage between the inner flow passage and the annular flow passage is also restricted; iii. diverted flow pattern wherein the flow passage between the upstream section and the annular flow passage is not restricted whereas the flow passage to the downstream section is restricted; and iv. full flow pattern wherein the flow passage between the upstream section and the downstream section of the inner flow passage is not restricted and the flow passage between the inner flow passage and the annular flow passage is not restricted.