WIGGLES
WIGGLES
AEAsh Elixir
Created by WIGGLES on 7/6/2023 in #support
Polymorphic Self References
but I guess I can write a macro module to generate the resources for me. In the meantime I'll probably write up a feature request on the github.
9 replies
AEAsh Elixir
Created by WIGGLES on 7/6/2023 in #support
Polymorphic Self References
I think all I really want to do is to pass on what the consumer specifies in the data_layer context
9 replies
AEAsh Elixir
Created by WIGGLES on 7/6/2023 in #support
Polymorphic Self References
I guess I might not be able to use polymorphic resources for this.
9 replies
AEAsh Elixir
Created by WIGGLES on 7/6/2023 in #support
Polymorphic Self References
No I guess that doesn't work since the foreign key constraint will never be set.
9 replies
AEAsh Elixir
Created by WIGGLES on 7/6/2023 in #support
Polymorphic Self References
My guess is that this is where I want to reach for manual relationships?
9 replies
AEAsh Elixir
Created by WIGGLES on 6/27/2023 in #support
custom step inside of map step in a flow.
Yeah that did it.
17 replies
AEAsh Elixir
Created by WIGGLES on 6/27/2023 in #support
custom step inside of map step in a flow.
or will I have to get it from teh github branch
17 replies
AEAsh Elixir
Created by WIGGLES on 6/27/2023 in #support
custom step inside of map step in a flow.
is the RC on hex?
17 replies
AEAsh Elixir
Created by WIGGLES on 6/27/2023 in #support
custom step inside of map step in a flow.
I'm on 2.10
17 replies
AEAsh Elixir
Created by WIGGLES on 6/27/2023 in #support
custom step inside of map step in a flow.
Putting the custom step at the root will let it compile, but I think this is a bug.
17 replies
AEAsh Elixir
Created by WIGGLES on 6/27/2023 in #support
custom step inside of map step in a flow.
== Compilation error in file lib/butsby/scheduler/invoke.ex ==
** (CompileError) lib/butsby/scheduler/invoke.ex:18: undefined function custom/3 (there is no such import)
(ash 2.10.2) expanding macro: Ash.Flow.Dsl.Steps.Map.map/3
== Compilation error in file lib/butsby/scheduler/invoke.ex ==
** (CompileError) lib/butsby/scheduler/invoke.ex:18: undefined function custom/3 (there is no such import)
(ash 2.10.2) expanding macro: Ash.Flow.Dsl.Steps.Map.map/3
17 replies
AEAsh Elixir
Created by WIGGLES on 6/27/2023 in #support
custom step inside of map step in a flow.
defmodule Butsby.Scheduler.Invoke do
use Ash.Flow

alias Butsby.Scheduler
alias Scheduler.Job

flow do
api Scheduler
returns :run_jobs
end

steps do
read :get_jobs, Job, :invokable

map :run_jobs, result(:get_jobs) do
output :invoke_job

custom :invoke_job, &invoke_job/2 do
input %{
job: element(:run_jobs)
}
end
end
end

defp invoke_job(%{job: job} = input, context) do
flow = Ash.Flow.run!(job.flow, job.input)
{:ok, flow.result}
end
end
defmodule Butsby.Scheduler.Invoke do
use Ash.Flow

alias Butsby.Scheduler
alias Scheduler.Job

flow do
api Scheduler
returns :run_jobs
end

steps do
read :get_jobs, Job, :invokable

map :run_jobs, result(:get_jobs) do
output :invoke_job

custom :invoke_job, &invoke_job/2 do
input %{
job: element(:run_jobs)
}
end
end
end

defp invoke_job(%{job: job} = input, context) do
flow = Ash.Flow.run!(job.flow, job.input)
{:ok, flow.result}
end
end
17 replies
AEAsh Elixir
Created by WIGGLES on 6/27/2023 in #support
custom step inside of map step in a flow.
The weird thing is I believe this worked until I updated Ash today.
17 replies
AEAsh Elixir
Created by WIGGLES on 6/1/2023 in #support
Read Action Prepare does not load aggregate
Yeah, you're right. Thanks!
3 replies
AEAsh Elixir
Created by WIGGLES on 5/31/2023 in #support
Ash Form Questions
thank you.
57 replies
AEAsh Elixir
Created by WIGGLES on 5/31/2023 in #support
Ash Form Questions
that was way easier than I would've thought.
57 replies
AEAsh Elixir
Created by WIGGLES on 5/31/2023 in #support
Ash Form Questions
okay
57 replies
AEAsh Elixir
Created by WIGGLES on 5/31/2023 in #support
Ash Form Questions
I had to go in and actually look at the errors that were in the form.
57 replies
AEAsh Elixir
Created by WIGGLES on 5/31/2023 in #support
Ash Form Questions
And no, no warning logs anywhere.
57 replies
AEAsh Elixir
Created by WIGGLES on 5/31/2023 in #support
Ash Form Questions
Let me see if a call to manage_relationships resolves this.
57 replies