package cn.axzo.workflow.core.engine.cmd;

import org.flowable.common.engine.impl.interceptor.Command;
import org.flowable.common.engine.impl.interceptor.CommandContext;
import org.flowable.common.engine.impl.interceptor.CommandContextFactory;

/**
 * CommandContextFactory
 *
 * @author wangli
 * @since 2024/5/21 09:45
 */
public class CustomCommandContextFactory extends CommandContextFactory {

    @Override
    public CommandContext createCommandContext(Command<?> cmd) {
        CommandContext commandContext = new CustomCommandContext(cmd);
        commandContext.setSessionFactories(sessionFactories);
        return commandContext;
    }
}
