Package org.flowable.dmn.api

# Interface ExecuteDecisionBuilder

public interface ExecuteDecisionBuilder
Helper for execution a decision.

An instance can be obtained through `DmnDecisionService.createExecuteDecisionBuilder()`.

decisionKey should be set before calling `execute()` to execute a decision.

Author:
  Tijs Rademakers

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ExecuteDecisionBuilder`
  `activityId(String activityId)`
  Set the activity id
  `ExecuteDecisionContext`
  `buildExecuteDecisionContext()`
  `ExecuteDecisionBuilder`
  `decisionKey(String decisionKey)`
  Set the key of the decision
  `List<Map<String,Object>>`
  `execute()`
  Deprecated.
  Use `executeDecision()` to execute a Decision (table)
  `List<Map<String,Object>>`
  `executeDecision()`
  Executes a decision (table)
  `Map<String,List<Map<String,Object>>>`
  `executeDecisionService()`
  Execute a decision service
  `DecisionServiceExecutionAuditContainer`
  `executeDecisionServiceWithAuditTrail()`
  Execute a decision service
  `Map<String,Object>`
  `executeDecisionServiceWithSingleResult()`
  Execute a decision service
  `DecisionExecutionAuditContainer`
  `executeDecisionWithAuditTrail()`
  Execute a decision (table)
  `Map<String,Object>`
  `executeDecisionWithSingleResult()`
  Execute a decision (table)
  `DecisionExecutionAuditContainer`
  `executeWithAuditTrail()`
  Execute a single decision or a decision service depending on the provided decision key
  `Map<String,Object>`
  `executeWithSingleResult()`
  Execute a single decision or a decision service depending on the provided decision key
  `ExecuteDecisionBuilder`
  `executionId(String executionId)`
  Set the execution id
  `ExecuteDecisionBuilder`
  `fallbackToDefaultTenant()`
  allow to search for definition by key in the default tenant when tenant specific search fails
  `ExecuteDecisionBuilder`
  `instanceId(String instanceId)`
  Set the instance id
  `ExecuteDecisionBuilder`
  `parentDeploymentId(String parentDeploymentId)`
  Set the parent deployment id
  `ExecuteDecisionBuilder`
  `scopeType(String scopeType)`
  Set the scope type
  `ExecuteDecisionBuilder`
  `tenantId(String tenantId)`
  Set the tenantId
  `ExecuteDecisionBuilder`
  `variable(String variableName, Object value)`
  Adds a variable
  `ExecuteDecisionBuilder`
  `variables(Map<String,Object> variables)`
  Sets the variables

- ## Method Details

  - ### decisionKey

    ExecuteDecisionBuilder decisionKey(String decisionKey)
    Set the key of the decision

  - ### parentDeploymentId

    ExecuteDecisionBuilder parentDeploymentId(String parentDeploymentId)
    Set the parent deployment id

  - ### instanceId

    ExecuteDecisionBuilder instanceId(String instanceId)
    Set the instance id

  - ### executionId

    ExecuteDecisionBuilder executionId(String executionId)
    Set the execution id

  - ### activityId

    ExecuteDecisionBuilder activityId(String activityId)
    Set the activity id

  - ### scopeType

    ExecuteDecisionBuilder scopeType(String scopeType)
    Set the scope type

  - ### tenantId

    ExecuteDecisionBuilder tenantId(String tenantId)
    Set the tenantId

  - ### fallbackToDefaultTenant

    ExecuteDecisionBuilder fallbackToDefaultTenant()
    allow to search for definition by key in the default tenant when tenant specific search fails

  - ### variables

    ExecuteDecisionBuilder variables(Map<String,Object> variables)
    Sets the variables

  - ### variable

    ExecuteDecisionBuilder variable(String variableName, Object value)
    Adds a variable

  - ### execute

    @Deprecated List<Map<String,Object>> execute()
    Deprecated.
    Use `executeDecision()` to execute a Decision (table)
    Executes a decision returning one or more output results with variables

  - ### executeWithSingleResult

    Map<String,Object> executeWithSingleResult()
    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()
    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()
    Executes a decision (table)
    Returns:
      A List with one or more rule results mapped to variables

  - ### executeDecisionService

    Map<String,List<Map<String,Object>>> executeDecisionService()
    Execute a decision service
    Returns:
      a Map with decision rule result(s) mapped to variables per output decision

  - ### executeDecisionWithAuditTrail

    DecisionExecutionAuditContainer executeDecisionWithAuditTrail()
    Execute a decision (table)
    Returns:
      a `DecisionExecutionAuditContainer`

  - ### executeDecisionServiceWithAuditTrail

    DecisionServiceExecutionAuditContainer executeDecisionServiceWithAuditTrail()
    Execute a decision service
    Returns:
      a `DecisionServiceExecutionAuditContainer`

  - ### executeDecisionWithSingleResult

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

  - ### executeDecisionServiceWithSingleResult

    Map<String,Object> executeDecisionServiceWithSingleResult()
    Execute a decision service
    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.

  - ### buildExecuteDecisionContext

    ExecuteDecisionContext buildExecuteDecisionContext()