No Op_Log entry for created task

Hi

I am using 7.5.1 and the following test


@Deployment(resources = "test-processes/OneUserTask.bpmn")
public class TaskOpLogTest {


    @Rule
    public final ProcessEngineRule processEngineRule = new ProcessEngineRule(new StandaloneInMemProcessEngineConfiguration(){{
        expressionManager = new MockExpressionManager();
        restrictUserOperationLogToAuthenticatedUsers = false;
        history = "full";
    }}.buildProcessEngine());

    @Test
    public void name() throws Exception {
        ProcessInstance processInstance = runtimeService().startProcessInstanceByKey(OneTaskProcess.PROCESS_KEY);

        assertThat(processInstance).isWaitingAt(OneTaskProcess.USER_TASK);
        historyService().createUserOperationLogQuery().list().stream().map(s -> ToStringBuilder.reflectionToString(s, ToStringStyle.SHORT_PREFIX_STYLE)).map(s -> "----" + s + "\n").forEach(System.out::println);

        assertThat(historyService().createUserOperationLogQuery().entityType(EntityTypes.TASK).list()).isNotEmpty();
    }
}

I would expect to see an opLogEntry for Task#Create.

I am using HistoryLevel full. Did I miss anything or is there something wrong? Task Op Log should have worked since 7.1

Thanks

jan

Hi Jan,

the user operation log entry Task#create is only created when the user creates the task via task service. If the process arrives a user task then it creates no log entry. It only logs the user operations :wink:

Best regards,
Philipp

Ok. So last time i used the op log to track task creation I obviously had used a create listener on the task writing the log. Will do that again.