print_task_info = { label = "Print Task Info" shortcut = "pti" parameters = { task_id = { shortcut = "ti" } active_only = { shortcut = "ao" default = true } show_progress = { shortcut = "sp" default = false } } expression = ` string string_result = ""; # Get the database info node task_info = get_task_info(); if (task_id ne "(unspecified)") then ( string_result .= node_as_string(task_info{task_id}); ); else ( # If active_only was specified, print only the active tasks if (active_only) then ( node task; foreach task task_info ( if (@task{"active"}) then ( string_result .= node_as_string(task); # If show_progress was specified, also show the progress information for this task if (show_progress) then ( v.progress = ''; get_progress_info(node_name(task), 'v.progress'); string_result .= node_as_string('v.progress'); delete_node('v.progress'); ); # if show_progress ); # if active ); # foreach task ); # if active_only else ( # Print the task info string_result .= node_as_string(task_info); ); string_result; ); ` } # print_task_info