Processes
7 nodes
On this page 7
Command Line
FunctionThe command line a program and its arguments make, quoted as the system reads it - for showing in a log what Run Command or Start Process runs.
CommandLine(program: Text, arguments: Any Array) -> Text
string CommandLine(string program, object[] arguments)
Parameters
| name | type | default | description |
|---|---|---|---|
| program | Text | — | The program: a name on the PATH, or a path to it. |
| arguments | Any Array | — | The arguments, each value one argument; empty for none. |
Returns
| Command Line | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Processes
- Package
- Standard Library
Is Running
FunctionWhether a program begun with Start Process is still running.
IsRunning(process: Running Process) -> Truth
bool IsRunning(RunningProcess process)
Parameters
| name | type | default | description |
|---|---|---|---|
| process | Running Process | — | The program, from Start Process. |
Returns
| Running | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Processes
- Package
- Standard Library
Run Command
FunctionRuns a program with arguments, waits for it to end, and answers the code it ended with and what it printed.
RunCommand -> Command Result
program: Text
arguments: Any Array
workingFolder: Text
timeoutSeconds: NumberCommandResult RunCommand(
string program,
object[] arguments,
string workingFolder = "",
double timeoutSeconds = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| program | Text | — | The program: a name on the PATH, or a path to it. |
| arguments | Any Array | — | The arguments, each value one argument; empty for none. |
| workingFolder | Text | — | The folder the program runs in; empty for the folder the run is in. |
| timeoutSeconds | Number | 0 | How long the program may take, in seconds, before it is stopped and the node fails; 0 for no limit. |
Returns
| Result | Command Result |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Processes
- Package
- Standard Library
Run Shell Command
FunctionRuns one command line through the system's shell - cmd on Windows, sh elsewhere - waits for it to end, and answers the code it ended with and what it printed.
RunShellCommand -> Command Result
commandLine: Text
workingFolder: Text
timeoutSeconds: NumberCommandResult RunShellCommand(
string commandLine,
string workingFolder = "",
double timeoutSeconds = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| commandLine | Text | — | The command line, as typed at the shell's prompt. |
| workingFolder | Text | — | The folder the shell runs in; empty for the folder the run is in. |
| timeoutSeconds | Number | 0 | How long it may take, in seconds, before it is stopped and the node fails; 0 for no limit. |
Returns
| Result | Command Result |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Processes
- Package
- Standard Library
Start Process
FunctionStarts a program with arguments and goes on at once, answering the running program for Wait For Process, Is Running and Stop Process.
StartProcess -> Running Process
program: Text
arguments: Any Array
workingFolder: TextRunningProcess StartProcess(
string program,
object[] arguments,
string workingFolder = "")Parameters
| name | type | default | description |
|---|---|---|---|
| program | Text | — | The program: a name on the PATH, or a path to it. |
| arguments | Any Array | — | The arguments, each value one argument; empty for none. |
| workingFolder | Text | — | The folder the program runs in; empty for the folder the run is in. |
Returns
| Process | Running Process |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Processes
- Package
- Standard Library
Stop Process
FunctionStops a program begun with Start Process, and every program it started; a program that has ended already is left as it is.
StopProcess(process: Running Process)
void StopProcess(RunningProcess process)
Parameters
| name | type | default | description |
|---|---|---|---|
| process | Running Process | — | The program, from Start Process. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Processes
- Package
- Standard Library
Wait For Process
FunctionWaits for a program begun with Start Process to end, and answers the code it ended with and what it printed.
WaitForProcess -> Command Result
process: Running Process
timeoutSeconds: NumberCommandResult WaitForProcess(
RunningProcess process,
double timeoutSeconds = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| process | Running Process | — | The program, from Start Process. |
| timeoutSeconds | Number | 0 | How long to wait, in seconds, before the node fails; 0 for no limit. |
Returns
| Result | Command Result |
Remarks
A program that has ended already answers at once. When the time limit passes the program is left running and the node fails, which a Try can take; Stop Process ends it. The run's Stop ends the wait, not the program.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Processes
- Package
- Standard Library