Package org.flowable.dmn.api

# Interface DmnDecisionService

public interface DmnDecisionService
Service for executing DMN decisions

Author:
  Tijs Rademakers, Yvo Swillens

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ExecuteDecisionBuilder`
  `createExecuteDecisionBuilder()`
  Create a builder to execute a decision or decision service.
  `List<Map<String,Object>>`
  `executeDecision(ExecuteDecisionBuilder builder)`
  Execute a single decision
  `Map<String,List<Map<String,Object>>>`
  `executeDecisionService(ExecuteDecisionBuilder builder)`
  Execute a decision service
  `DecisionServiceExecutionAuditContainer`
  `executeDecisionServiceWithAuditTrail(ExecuteDecisionBuilder builder)`
  Execute a decision service
  `Map<String,Object>`
  `executeDecisionServiceWithSingleResult(ExecuteDecisionBuilder builder)`
  Execute a decision service
  `DecisionExecutionAuditContainer`
  `executeDecisionWithAuditTrail(ExecuteDecisionBuilder builder)`
  Execute a single decision
  `Map<String,Object>`
  `executeDecisionWithSingleResult(ExecuteDecisionBuilder builder)`
  Execute a single decision
  `DecisionExecutionAuditContainer`
  `executeWithAuditTrail(ExecuteDecisionBuilder builder)`
  Execute a single decision or a decision service depending on the provided decision key
  `Map<String,Object>`
  `executeWithSingleResult(ExecuteDecisionBuilder builder)`
  Execute a single decision or a decision service depending on the provided decision key

- ## Method Details

  - ### createExecuteDecisionBuilder

    ExecuteDecisionBuilder createExecuteDecisionBuilder()
    Create a builder to execute a decision or decision service.
    Returns:
      the `ExecuteDecisionBuilder` build

  - ### executeWithSingleResult

    Map<String,Object> executeWithSingleResult(ExecuteDecisionBuilder builder)
    Execute a single decision or a decision service depending on the provided decision key
    Returns:
      a Map with the decision(s) result(s). When multiple output decisions use the same variable IDs the last occurrence will be present in the Map. An `FlowableException` will be thrown when multiple rules were hit.

  - ### executeWithAuditTrail

    DecisionExecutionAuditContainer executeWithAuditTrail(ExecuteDecisionBuilder builder)
    Execute a single decision or a decision service depending on the provided decision key
    Returns:
      the `DecisionExecutionAuditContainer` when a decision was executed or a `DecisionServiceExecutionAuditContainer` when a decision service was executed

  - ### executeDecision

    List<Map<String,Object>> executeDecision(ExecuteDecisionBuilder builder)
    Execute a single decision
    Returns:
      a List with decision result(s)

  - ### executeDecisionService

    Map<String,List<Map<String,Object>>> executeDecisionService(ExecuteDecisionBuilder builder)
    Execute a decision service
    Returns:
      a Map with decision result(s) per output decision

  - ### executeDecisionWithSingleResult

    Map<String,Object> executeDecisionWithSingleResult(ExecuteDecisionBuilder builder)
    Execute a single decision
    Returns:
      a Map with the decision result. An `FlowableException` will be thrown when multiple rules were hit.

  - ### executeDecisionServiceWithSingleResult

    Map<String,Object> executeDecisionServiceWithSingleResult(ExecuteDecisionBuilder builder)
    Execute a decision service
    Returns:
      a Map with the decision service result. An `FlowableException` will be thrown when multiple rules were hit.

  - ### executeDecisionWithAuditTrail

    DecisionExecutionAuditContainer executeDecisionWithAuditTrail(ExecuteDecisionBuilder builder)
    Execute a single decision
    Returns:
      a List with decision result(s)

  - ### executeDecisionServiceWithAuditTrail

    DecisionServiceExecutionAuditContainer executeDecisionServiceWithAuditTrail(ExecuteDecisionBuilder builder)
    Execute a decision service
    Returns:
      a `DecisionServiceExecutionAuditContainer` when a decision service was executed