Hello! I was wondering if its possible to modify w...
# ask-the-community
Hello! I was wondering if its possible to modify workflow parameters outside of a task like this:
Copy code
def print_stuff(input: str):

def wf1(test: str = "test"):
    print_stuff(input=f"hello {test}")
is a Promise in that context i am getting weird prints. Is there a way to extract the string value?
Only in a @dynamic workflow
Thanks 🙏 Looks like dynamic workflows are the way to go for a lot of use cases
so workflow code look like python but it’s really more of a dsl.
at run time, the all the tasks are overloaded to return promise objects instead
so if you run that example, at compile time, i think what you would get is a statically bound string of “hello Promise<…>”
dynamic tasks are workflows that are not compiled until run-time.
basically if you say to yourself, i don’t know what the structure of the workflow will be until i know the inputs, then you definitely want a dynamic task.
a more concrete example
Copy code
def wf(a: int)
   for i in range(a): ... # this fails.

def dwf(a: int)
   for i in range(a): ... # this succeeds.

# however tasks in a dynamic task still produce promises
def dwf()
   a = task_that_produces_an_int()
   for i in range(a): ... # this still fails.
in your case however, can you not
as a separate input to the task?
Thanks for making this clear!
For my example i wanted to modify the string before putting it into an input of the type FlyteFile. I think in this case i cannot do it inside of the task.