Compute
Description: Computes a Rulex process.
URL: /compute
Method: POST
Header: You must provide the authentication token in the header, using the following syntax:
{ 
	Authorization : "Bearer" + " " + token 
}
Parameters
The Compute method uses the following parameters:
| Name | Data Type | Mandatory | Default Value | Description | 
|---|---|---|---|---|
| 
 | string | 
 | The name of the process you want to compute. | |
| 
 | boolean | 
 | 
 | If you want to compute the process "inmemory". | 
| 
 | string | 
 | 
 | The computation mode of the process. | 
| 
 | array | 
 | The list of tasks to compute. This option only applies when options.mode is different than "all" | |
| 
 | boolean | 
 | false | If you want to compute the process "inmemory" but saving the results of source (input) tasks. This option only applies to inmemory computation | 
| 
 | object | 
 | null | The dictionary containing the process variables to write to the current process This option only applies to non-inmemory computation. Previously stored values will be overwritten by a variable with the same name. | 
| 
 | object | 
 | The input data to feed inside the specific tasks. Each task used for input of new data has to belong to the input category. | |
| 
 | string | 
 | 
 | The format of the data to feed as input. | 
| 
 | object | 
 | An object representing the columns to feed as input. There must be an array for each column. | |
| 
 | array | 
 | An array representing the rows to feed as input. There must be an object for each row. | |
| 
 | object | 
 | The task to select to show in output. | |
| 
 | array | 
 | 
 | The list of attributes to show as output commands. | 
Syntax example
Data Params
{ 
	process : process name, 
	options : { 
		inmemory : [true] | false,
		mode : ["all"] | null | "onwards"| "downon",
		tasks : task list | null,
		storeSources : [false] | true,
		processVariables : [null] | {
			ProcessVariable1 : "A",
			ProcessVariable2 : 1
		}
		inputs : {
			task label : {
				format : ["cols"] | "rows",
				data (cols) : {
					Var_1 : ["A", "B", null, "Z"],
					Var_2 : [1, 2, 4, null],
					Var_3 : [0.1, 3.14, 4, 1.1]
				}
				data (rows) : [
					{
						Var_1 : "A",
						Var_2 : 1,
						Var_3 : 0.1
					},
					{
						Var_1 : "B",
						Var_2 : 2,
						Var_3 : 3.14
					},
					{
						Var_1 : null,
						Var_2 : 4,
						Var_3 : 4
					},
					{
						Var_1 : "Z",
						Var_3 : 1.1,
					}
				]
			},
		},
		outputs : {
			task label : ["*"] | attributes list
		}
	}
}
Response Codes
| Code | Result | Response | 
|---|---|---|
| Success | ||
| 200 | Success | { 
	data : required computation data
} | 
| Warnings | ||
| 307 | Temporary redirect | { 
	resultUrl : url 
} | 
| Client Errors | ||
| 400 | Bad request | |
| 404 | Not found | |
 
 