org.activiti.engine.impl.interceptor.CommandContext Maven / Gradle / Ivy
The newest version!
/* 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.activiti.engine.impl.interceptor;
import org.activiti.engine.*;
import org.activiti.engine.delegate.event.ActivitiEventDispatcher;
import org.activiti.engine.impl.asyncexecutor.JobManager;
import org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.activiti.engine.impl.db.DbSqlSession;
import org.activiti.engine.impl.history.HistoryManager;
import org.activiti.engine.impl.jobexecutor.FailedJobCommandFactory;
import org.activiti.engine.impl.persistence.cache.EntityCache;
import org.activiti.engine.impl.persistence.entity.*;
import org.activiti.engine.logging.LogMDC;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
public class CommandContext {
private static Logger log = LoggerFactory.getLogger(CommandContext.class);
protected Command> command;
protected Map, SessionFactory> sessionFactories;
protected Map, Session> sessions = new HashMap<>();
protected Throwable exception;
protected ProcessEngineConfigurationImpl processEngineConfiguration;
protected FailedJobCommandFactory failedJobCommandFactory;
protected List closeListeners;
protected Map attributes; // General-purpose storing of anything during the lifetime of a command context
protected boolean reused;
protected ActivitiEngineAgenda agenda;
protected Map involvedExecutions = new HashMap<>(1); // The executions involved with the command
protected LinkedList