Current section
Files
Jump to
Current section
Files
src/samples/tasks/choose_storable_task.erl
-module(choose_storable_task).
-behaviour(bt_task).
-export([
get_params/0,
run/3
]).
get_params() ->
["rack_id", "storable"].
run(#{"rack_id" := RackId_key, "storable" := Storable_key}, BB, _) ->
%% just choose a static storable location
Storable = "011.011",
RackId = blackboard:eval(RackId_key, BB),
io:format("Choosing storable ~p for rack ~p~n", [Storable, RackId]),
NewBB = blackboard:write(Storable_key, Storable, BB),
{success, NewBB}.