Hi all – I think I'm having a slow morning, but do...
# ask-community
s
Hi all – I think I'm having a slow morning, but does anyone have a good heuristic around where to start debugging when you're trying to pass the result of one task to another, but your flow schematic is showing them as being unconnected? For example, I have something like:
Copy code
@task
def custom_task_1(input) -> str:
  return f"Custom Input: {input}"

with Flow(...) as flow: 
    custom_task_1_results = custom_task_1("Hello World!")
    custom_task_2 = CustomTask2(message=custom_task_1_results)
but when I look at my flow's schematic, it doesn't show
custom_task_1
as being upstream of
CustomTask2
...I don't remember ever having run into this, so I feel like there's something quite obvious that I must be missing. I appreciate any help!
k
Hey @Sean Talia definitely out of the ordinary. If I have to guess, you may want to try adding
CustomTask2()(message=custom_task_1_results)
so that both the init and run are called? Otherwise it’s just the init called. I assume that is a class.
s
yep, my problem was that I hadn't set up my custom task to let the
message
be passed in as runtime, only at task initialization, so it didn't like it when I tried to pass a task result to the constructor πŸ™‚
πŸ‘ 1
k
In that case it could have just been
CustomTask2(message=custom_task_1_results)()
maybe?