Global Variables and Methods

Model ro model

The currently active model.


void alert(Object message)

Gives a simple message to the user, in the form of a pop-up notification.


Parameters:
message 


Map<String, Object> ask(Map<String, Object> query)

Provides a simple form for user input. Takes a map from form labels to value types (Integer, String, Date, and list of options are currently supported), and returns a map from labels to values, or null if the user cancels.


Parameters:
query 


Map<String, Object> ask(String message, Map<String, Object> query)

Alternate version of ask that accepts a message to precede the fields in the input dialog.


Parameters:
message 
query 


void pause(int seconds)

Waits a given number of seconds before executing the next command.


Parameters:
seconds 


void privileged(Closure<Object> block)

Execute a block of code with Modeler-level permissions, including the ability to operate on hidden views. This can be useful to allow your users with tightened security to perform actions in a way you prefer (such as the ability to add items to or update the DataLink of a Matrix which they cannot interact with directly).


Parameters:
block