Wrangler events and functions


#1

Questions about the operation of Wrangler, and its events and functions


#2

When sending an event wrangler:createChild(name); this series of messages appears in the log

223341178 WARN b507887x1 createAChild Argument mismatch. wrangler:createChild requires 2 arguments, you passed (1)
223341179 ERROR b507887x1 createAChild [action] Argument mismatch. wrangler:createChild requires 2 arguments, you passed (1)
223341181 INFO b507887x1 createAChild Raising explicit event system:error for b507887x1:prod
223341242 INFO b507887x1 createAChild prototype not found

but the Wrangler rule is robust and creates the child Pico anyway. Can I deduce that the second required argument is a “prototype” Pico (whose rulesets would be installed in the new Pico by Wrangler)? How do I get a prototype Pico? Do I create it myself? Do I refer to it by name in the 2nd argument, or by ECI?


#3

This happens because the createChild() action in the current version of Wrangler is using the second argument as an optional parameter. Actions should use configuration to do optional parameters. Future versions of Wrangler will fix this.

As you see, the system doesn’t usually stop on error, but keeps going. You could catch system:error event if you liked, but if you don’t it will be ignored.

We’ll post a link here to documentation on how prototypes work soon.