:wave: Hello, team! I'm very knew to Flyte and to ...
# ask-the-community
b
👋 Hello, team! I'm very knew to Flyte and to workflow orchestration tools in general, so please forgive my newbie questions! I'm a bit confused when it comes to chaining tasks and workflows. I need to calculate the number of frames in a trajectory file for later use (depending on this number, I'll have to split the trajectory or not). So I wrote 2 tasks and 1 workflow to accomplish this. Problem is: how can I use this seamlessly in workflow ? Any help would be very much appreciated. Cheers,
g
This is understandably confusing 🙂 The tasks in a workflow return promises because the workflow doesn't execute instantly. It is parsed by Flyte's engine to create a graph of tasks that are chained together and run, some in parallel and some sequentially. To accomplish what you want, you would actually need to define a third task ("add_frames" for example), which would take as an input the results of the first two tasks, and perform the addition inside it. The way flyte will parse this workflow is that it will run the "number_of_frames" tasks in parallel, and once they are both complete, will run the "add_frames" task to add them together.