Arguments for MyApp.MyFlow.run!()

How do I pass arguments to Flow.run?

Examples I see on AshHq (shown below) seems to suggest that I should be able to pass any number of arguments needed, but I get MyApp.MyFlow.run!/5 is undefined or private error if I pass 5 arguments separated by comma like MyFlow.run!(name,age,city,state,country)

    AshHq.Docs.Search.run!(
      socket.assigns.search,
      versions,
      %{types: socket.assigns[:selected_types]}
    )

I also see MyFlow.run!(argument_value, %{}, actor: user) pattern as well here (Discord) but I can’t seem to find any documentation on ash-hq.org on this.

Ash 2.17

Found the answer here. So only the required arguments with no defaults should be passed individually and the rest should be in a map.

If you have a minute to copy over some of the text from discord here that would be great, would make it easier for others who are on the hunt for a similar answer.

I believe the key part of the answer from Discord was included in my previous response. (It was a concise answer there to begin with :slight_smile:

1 Like

:laughing: right you are. Thanks!