代码之家  ›  专栏  ›  技术社区  ›  Abdullah Tellioglu

卡蒙达不包含任何历史记录

  •  1
  • Abdullah Tellioglu  · 技术社区  · 6 年前

    我有一个问题,每当我在Camunda process Service中创建一个流程实例时,它都不会写入任何ACT_HI_OP_LOG。我不知道为什么它不将历史保存到数据库中。

    @Component
    @Order(Ordering.DEFAULT_ORDER + 1)
    public class ProcessEngineConfiguration implements ProcessEnginePlugin {
    
        private String tenantId;
    
        @Override
        public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
            HistoryLevel historyLevel = new HistoryLevelFull();
            processEngineConfiguration.setHistoryLevel(historyLevel);
            processEngineConfiguration.setTenantCheckEnabled(true);
    //      processEngineConfiguration.setHistory(org.camunda.bpm.engine.ProcessEngineConfiguration.HISTORY_FULL);
            processEngineConfiguration.setTenantIdProvider(new TenantIdProvider() {
    
                @Override
                public String provideTenantIdForProcessInstance(TenantIdProviderProcessInstanceContext ctx) {
                    return tenantId;
                }
    
                @Override
                public String provideTenantIdForHistoricDecisionInstance(TenantIdProviderHistoricDecisionInstanceContext ctx) {
                    return tenantId;
                }
    
                @Override
                public String provideTenantIdForCaseInstance(TenantIdProviderCaseInstanceContext ctx) {
                    return tenantId;
                }
            });
    
            processEngineConfiguration.setJobExecutor(processEngineConfiguration.getJobExecutor());
    
        }
    

    我就是这样开始这个过程的。

    ProcessInstance pi = null;
    
            try {
                identityService.setAuthentication(getAuthentication());
                pi = runtimeService.startProcessInstanceByKey(flowName, businessKey, variables);
    
    
            } finally {
                identityService.setAuthentication(null);
            }
            if (pi == null)
                return null;
    
    0 回复  |  直到 6 年前
        1
  •  0
  •   B. Can BASCI    5 年前

    你检查配置了吗?

    historyLevelCheckEnabled 默认值为 true .

    你能试着设定那个值吗 false .

    如果设置为false,则不会执行此检查。