POST /decision/{decisionId}/operations/{operation} method

Execute a decision service that is specified in the decision ID.

Sample method invocation

POST https://<server>/api/v1/decision/{decisionId}/operations/{operation}

Parameters

Parameter Mandatory/Optional Description
decisionId Mandatory

URL path that uniquely identifies a decision to execute.

This value is concatenated to the base storage URL to form a full download URL for the decision service.

operation Mandatory

This parameter is used to identify which decision service to execute within the decision service archive.

Its value is generated from the name of the decision model by using the following rules:
  • Use only a–z, A–Z, 0–9, underscore (_), and hyphen (-). Other characters are replaced with hyphens (-).
  • Use a lowercase letter for the first character of the first word except when the second character is in uppercase.
  • Remove all spaces.
Examples:
  • My Model => myModel
  • myModel => myModel
  • MY MODEL => MYMODEL
  • MY MOdel => MYMOdel

For more information about decision models, see Creating a decision model.

Request body

Value / Schema:
{
  "executionId": "string",
  "input": {
    "additionalProp1": {},
    "additionalProp2": {},
    "additionalProp3": {}
  },
  "executionTraceFilters": {
    "executionDuration": true,
    "printedMessages": true,
    "decisionModel": {
      "inputParameters": "Object",
      "outputParameters": "Object",
      "inputNode": "Object",
      "outputNode": "Object"
    },
    "rules": {
      "boundObjectsAtStart": "Object",
      "boundObjectsAtEnd": "Object",
      "allRules": true,
      "executedRules": true,
      "nonExecutedRules": true
    }
  }
}

Response status code

Status code Description
200

The execution was successful.

404

The value of decisionId or operation is invalid.

You see the following message in the response body:
"incidentCategory": "Decision not found",
500

The execution failed.

Response body

Value / Schema for status code 200:
{
  "decisionId": "string",
  "decisionOperation": "string",
  "executionId": "string",
  "output": {}
}
For example:
{
  "decisionId": "decisions/My-Getting-Started/mySalutationDecisionService/1.0.0-SNAPSHOT/mySalutationDecisionService-1.0.0-20200120.153649-11.jar",
  "decisionOperation": "myModel",
  "executionId": "24543a29-ce83-4e20-afbc-93fccf7949d5",
  "executionTrace": null,
  "output": "Good evening Prof. Jones!"
}
Value / Schema for status code 500:
{
  "decisionId": "string",
  "decisionOperation": "string",
  "executionId": "string",
  "output": {},
  "incident": {
    "incidentId": "string",
    "incidentCategory": "string",
    "stackTrace": "string"
  }
}
For example:
{
  "decisionId": "decisions/My-Getting-Started/mySalutationDecisionService/1.0.0-SNAPSHOT/mySalutationDecisionService-1.0.0-20200120.153649-11.jar",
  "decisionOperation": "myModel",
  "executionId": "1f10653a-c21f-4653-854e-c6e56da4bdaf",
  "executionTrace": null,
  "output": null,
  "incident": {
    "incidentId": "edee977a-5d2e-47ca-b31e-4e866649016c",
    "incidentCategory": "Decision error",
    "stackTrace": "com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field \"nme\" (class newtype),  ...  }
}