Where to connect object pin from cast to node?

I don’t know what kind of object requires in order to make my cast to node working in the right way. The blueprint I want to cast to is a Task name of AI_Patrol used in behavior tree, and its parents class is BTTask Bluprintbase. The blueprint I want to use the cast to AI_Patrol node is a service node used in different BT. Basically its job is to figure out if the task node is executing or not. However I do not know what to connect for object pin of cast to node. What do I connect? I will include some screenshots.

I updated your attached image.

This might work for you. But you should watch some tutorials on AI to learn best practices.

Why do you think you need to use that node?

I couldn’t find that green one so I had to use blue one instead. I don’t think it is working. I tried to find a tutorial that explains how to use that Is task executing node but I couldn’t find one.

So I can access the behavior tree using that task?