he secret is on the States you return on each State , of an State.
For a simple example like this on the enterstate return Running , then in the Tick put an delay returning running each frame, the when the time finish return success, then the Task goes to the Exit/Complete stage.
The task will react depending on the returns:
return EStateTreeRunStatus::Running;
return EStateTreeRunStatus::Failed;
EStateTreeRunStatus::Succeeded
EStateTreeRunStatus::Stopped
EStateTreeRunStatus::Unset
and your code vcan react for this to get external data too..etc…