runProcess method
Run a Process and retrieve the ProcessSummary
See (https://wiki.idempiere.org/en/REST_Web_Services#Processses_api.2Fv1.2Fprocesses)
params
is columnName:value to be passed to the process
Implementation
Future<ProcessSummary> runProcess(String endpoint,
{Map<String, dynamic>? params}) async {
var response = await http.post(Uri.parse(_baseURL + endpoint),
headers: _getReqHeaders(), body: jsonEncode(params));
if (response.statusCode != HttpStatus.ok) {
final message = jsonDecode(utf8.decode(response.bodyBytes));
throw APIException(message["detail"], response.statusCode);
} else {
return ProcessSummary.fromJson(
jsonDecode(utf8.decode(response.bodyBytes)));
}
}