All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.flowable.dmn.api.DmnRuleService Maven / Gradle / Ivy

/* Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.flowable.dmn.api;

import java.util.List;
import java.util.Map;

import org.flowable.engine.common.api.FlowableException;
import org.flowable.engine.common.api.FlowableObjectNotFoundException;

/**
 * Service for executing DMN decisions (decision tables)
 *
 * @author Tijs Rademakers
 * @author Yvo Swillens
 */
public interface DmnRuleService {

    /**
     * Create a builder to execute a decision.
     *
     * @return the {@link ExecuteDecisionBuilder} build
     */
    ExecuteDecisionBuilder createExecuteDecisionBuilder();

    /**
     * Execute a decision identified by it's key.
     *
     * @param decisionKey
     *            the decision key, cannot be null
     * @param inputVariables
     *            map with input variables
     * @return List with Maps containing rule outputs for this execution
     * @throws FlowableObjectNotFoundException
     *             when the decision with given key does not exist.
     * @throws FlowableException
     *             when an error occurs while executing the decision.
     * @deprecated Use the createExecuteDecisionBuilder method instead
     */
    List> executeDecisionByKey(String decisionKey, Map inputVariables);

    /**
     * Execute a decision identified by it's key. Expecting a single result.
     *
     * @param decisionKey
     *            the decision key, cannot be null
     * @param inputVariables
     *            map with input variables
     * @return Map containing rule output(s) for this execution
     * @throws FlowableObjectNotFoundException
     *             when the decision with given key does not exist.
     * @throws FlowableException
     *             when execution has multiple rule results or when an error occurs while executing the decision.
     * @deprecated Use the createExecuteDecisionBuilder method instead
     */
    Map executeDecisionByKeySingleResult(String decisionKey, Map inputVariables);

    /**
     * Execute a decision identified by it's key.
     * Result contains audit trail.
     *
     * @param decisionKey
     *            the decision key, cannot be null
     * @param inputVariables
     *            map with input variables
     * @return the {@link DecisionExecutionAuditContainer} for this execution
     * @throws FlowableObjectNotFoundException
     *             when the decision with given key does not exist.
     * @throws FlowableException
     *             when an error occurs while executing the decision.
     * @deprecated Use the createExecuteDecisionBuilder method instead
     */
    DecisionExecutionAuditContainer executeDecisionByKeyWithAuditTrail(String decisionKey, Map inputVariables);

    /**
     * Execute a decision identified by it's key and tenant id
     *
     * @param decisionKey
     *            the decision key, cannot be null
     * @param inputVariables
     *            map with input variables
     * @return List with Maps containing rule outputs for this execution
     * @throws FlowableObjectNotFoundException
     *             when the decision with given key does not exist.
     * @throws FlowableException
     *             when an error occurs while executing the decision.
     * @deprecated Use the createExecuteDecisionBuilder method instead
     */
    List> executeDecisionByKeyAndTenantId(String decisionKey, Map inputVariables, String tenantId);

    /**
     * Execute a decision identified by it's key and tenant id. Expecting a single result.
     *
     * @param decisionKey
     *            the decision key, cannot be null
     * @param inputVariables
     *            map with input variables
     * @return Map containing rule output(s) for this execution
     * @throws FlowableObjectNotFoundException
     *             when the decision with given key does not exist.
     * @throws FlowableException
     *             when execution has multiple rule results or when an error occurs while executing the decision.
     * @deprecated Use the createExecuteDecisionBuilder method instead
     */
    Map executeDecisionByKeyAndTenantIdSingleResult(String decisionKey, Map inputVariables, String tenantId);

    /**
     * Execute a decision identified by it's key and tenant id.
     * Result contains audit trail.
     *
     * @param decisionKey
     *            the decision key, cannot be null
     * @param inputVariables
     *            map with input variables
     * @return the {@link DecisionExecutionAuditContainer} for this execution
     * @throws FlowableObjectNotFoundException
     *             when the decision with given key does not exist.
     * @throws FlowableException
     *             when an error occurs while executing the decision.
     * @deprecated Use the createExecuteDecisionBuilder method instead
     */
    DecisionExecutionAuditContainer executeDecisionByKeyAndTenantIdWithAuditTrail(String decisionKey, Map inputVariables, String tenantId);

    /**
     * Execute a decision identified by it's key and parent deployment id.
     *
     * @param decisionKey
     *            the decision key, cannot be null
     * @param inputVariables
     *            map with input variables
     * @return List with Maps containing rule outputs for this execution
     * @throws FlowableObjectNotFoundException
     *             when the decision with given key does not exist.
     * @throws FlowableException
     *             when an error occurs while executing the decision.
     * @deprecated Use the createExecuteDecisionBuilder method instead
     */
    List> executeDecisionByKeyAndParentDeploymentId(String decisionKey, String parentDeploymentId, Map inputVariables);

    /**
     * Execute a decision identified by it's key and parent deployment id. Expecting a single result.
     *
     * @param decisionKey
     *            the decision key, cannot be null
     * @param inputVariables
     *            map with input variables
     * @return Map containing rule output(s) for this execution
     * @throws FlowableObjectNotFoundException
     *             when the decision with given key does not exist.
     * @throws FlowableException
     *             when execution has multiple rule results or when an error occurs while executing the decision.
     * @deprecated Use the createExecuteDecisionBuilder method instead
     */
    Map executeDecisionByKeyAndParentDeploymentIdSingleResult(String decisionKey, String parentDeploymentId, Map inputVariables);

    /**
     * Execute a decision identified by it's key and parent deployment id.
     * Result contains audit trail.
     *
     * @param decisionKey
     *            the decision key, cannot be null
     * @param inputVariables
     *            map with input variables
     * @return the {@link DecisionExecutionAuditContainer} for this execution
     * @throws FlowableObjectNotFoundException
     *             when the decision with given key does not exist.
     * @throws FlowableException
     *             when an error occurs while executing the decision.
     * @deprecated Use the createExecuteDecisionBuilder method instead
     */
    DecisionExecutionAuditContainer executeDecisionByKeyAndParentDeploymentIdWithAuditTrail(String decisionKey, String parentDeploymentId, Map inputVariables, String tenantId);

    /**
     * Execute a decision identified by it's key, parent deployment id and tenant id.
     *
     * @param decisionKey
     *            the decision key, cannot be null
     * @param inputVariables
     *            map with input variables
     * @return List with Maps containing rule outputs for this execution
     * @throws FlowableObjectNotFoundException
     *             when the decision with given key does not exist.
     * @throws FlowableException
     *             when an error occurs while executing the decision.
     * @deprecated Use the createExecuteDecisionBuilder method instead
     */
    List> executeDecisionByKeyParentDeploymentIdAndTenantId(String decisionKey, String parentDeploymentId, Map inputVariables, String tenantId);

    /**
     * Execute a decision identified by it's key, parent deployment id and tenant id. Expecting a single result.
     *
     * @param decisionKey
     *            the decision key, cannot be null
     * @param inputVariables
     *            map with input variables
     * @return Map containing rule output(s) for this execution
     * @throws FlowableObjectNotFoundException
     *             when the decision with given key does not exist.
     * @throws FlowableException
     *             when execution has multiple rule results or when an error occurs while executing the decision.
     * @deprecated Use the createExecuteDecisionBuilder method instead
     */
    Map executeDecisionByKeyParentDeploymentIdAndTenantIdSingleResult(String decisionKey, String parentDeploymentId, Map inputVariables, String tenantId);

    /**
     * Execute a decision identified by it's key, parent deployment id and tenant id.
     * Result contains audit trail.
     *
     * @param decisionKey
     *            the decision key, cannot be null
     * @param inputVariables
     *            map with input variables
     * @return the {@link DecisionExecutionAuditContainer} for this execution
     * @throws FlowableObjectNotFoundException
     *             when the decision with given key does not exist.
     * @throws FlowableException
     *             when an error occurs while executing the decision.
     * @deprecated Use the createExecuteDecisionBuilder method instead
     */
    DecisionExecutionAuditContainer executeDecisionByKeyParentDeploymentIdAndTenantIdWithAuditTrail(String decisionKey, String parentDeploymentId, Map inputVariables, String tenantId);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy