...
Excerpt | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FunctionschildrenReturns an array of the children of the pico. Has optional parameter "name" which returns just the attributes for the children with the specific name if they exist, otherwise it returns attributes on every child if not provided. Has also optional parameter "allowRogue" which is by default true. Will not return child picos that are currently being deleted. Parameters
ReturnsAn array containing a map for each returned pico. Each map contains: parent_eci: The ECI from the pico to the respective child. Should be used for parent-child interaction. name: The child pico's name id: The id of the child pico eci: The main Wrangler ECI for the child pico
myselfReturns a map giving basic meta information about the pico. This information includes the pico's ID, Wrangler ECI, and name. ReturnsA map giving basic information about a pico with the following contents: id: The ID of the pico eci: The main Wrangler ECI of the pico name: The name of the pico
nameReturns the name of the pico as recorded by Wrangler ReturnsA string containing the name of the pico
idReturns the ID of the pico as recorded by Wrangler ReturnsA string containing the ID of the pico
parent_eciReturns a string containing an ECI to the parent of the pico. If no parent exists then it will return the empty string. ReturnsA string with the ECI of the parent pico. If no parent exists, then the string is the empty string.
randomPicoNameReturns a random English word that is unique among the children of the pico it is called on, if the pico has <= 200 children. Otherwise it will return a UUID. ReturnsA string that is a common English word
getPicoMapReturns the same data as wrangler:myself except it includes an ECI to the parent pico. ReturnsA map containing meta information about the pico, including its Wrangler ECI, its Wrangler name, the pico ID, and an ECI for the parent pico.
isMarkedForDeathReturns true if this pico is in the process of being deleted. This function is used internally in Wrangler to lock tasks that cannot be interrupted by the pico being deleted, such as creating a new child pico. See Managing Pico Lifecycle for information on how to respond to notification of imminent pico deletion and allowing a ruleset to cleanup. ReturnsTrue if the pico is in the process of being deleted False if the pico is not in the process of being deleted
timeForCleanupReturns the maximum amount of time given to a pico for its rulesets to cleanup before it is deleted. It is given in the format of the second parameter of the time:add() function. ReturnsA map containing the set time allowed for ruleset cleanup before a pico is deleted.
getChildGiven the pico ID of a child of Wrangler return the associated child map. Fast as it is a map access. Parameters
ReturnsEither A child pico map for the relevant child of this pico. NULL if the child does not exist
Received Eventscreate_childwrangler:child_creation or wrangler:new_child_requestCreates a new child for this pico with optional arguments for the child's name, and rulesets to install on it upon creation. It is important to note any additional attributes passed to it will also be accessible to the newly created child and its rulesets as event attributes, as long as their keys do not conflict with the keys used for the internal event chain. See Managing Pico Lifecycle for a more in-depth explanation.
Corresponding Raised Events: delete_childwrangler:child_deletion or wrangler:delete_childrenDeletes the direct child of this pico that has either the name or ID given as an event attribute. It will also delete that child's entire subtree of children. If both name and ID are given, they both will be evaluated. Deleting a child this way allows the child time for its rulesets to do any cleanup that they may have asked time for. It also cleans up parent-child channels, etc.
Corresponding Raised Events: force_child_deletionwrangler:force_child_deletion or wrangler:force_children_deletionThrough engine calls forcibly removes children picos without necessary direct interaction with the children and without any opportunity for cleanup. Allows for deletion of misbehaving picos, picos that do not comply with Wrangler's deletion process, and other such issues.
Corresponding Raised Events: child_syncwrangler:child_syncThis event will both find children that Wrangler does not have recorded internally and delete children that Wrangler has recorded internally but do not exist anymore. Use this to detect any children added by rulesets other than Wrangler. Wrangler will ask the children first if they have Wrangler installed, if they do not then Wrangler will grab their admin channel through engine calls and add them to its children with a "rogue" attribute. Corresponding Raised Events: Raised Events
child_initializedwrangler:child_initializedThis is sent from the child to the parent once the child is done initializing. You can react to new children being created using this event. This event also guarantees that any rulesets passed to the create_child event have been installed. Note that any attributes passed to the wrangler:child_creation will also be present. Attributes
child_deletedwrangler:child_deletedThis event is raised within the pico when a child of this pico has been deleted through use of wrangler:child_deletion. Attributes
child_creation_failurewrangler:child_creation_failure Raised when a pico is not able to be created. The most common cause of this is attempting to create a child pico with a duplicate name to another child pico. AttributesThe same as the ones passed to wrangler:child_creation
pico_forcibly_removedwrangler:pico_forcibly_removedThis event is raised within the pico when a child of this pico has been deleted through a force deletion using wrangler:force_child_deletion. Attributes
ghost_children_addedwrangler:ghost_children_addedThis event is raised as a result of a wrangler:child_sync event if any children that Wrangler did not have recorded are found. Their info is given in the attributes. Attributes
nonexistent_children_removed wrangler:nonexistent_children_removed This event is raised as a result of a wrangler:child_sync event if any children that Wrangler had recorded did not actually exist. Attributes
|
...