The calls to Activiti are made in Alfresco code, however, there are some hook points like form filters, I should try this variant.
My listener is a create listener. As far as I understood Activiti manual, assignment-listener can be called before it to set task assignee, so I used create listener.
First two tasks (on which I check this behaviour) are connected sequentally, no multi-instance, nothing special…
Perhaps, newer version allows to complete task from listener, I can check this process in latest Alfresco 4.2.c with Activiti 5.10.
Another question:
When in listener, the code is executed from wrapped LogInterceptor, SpringTransactionInterceptor, CommandContextInterceptor.
When I call TaskService method from listener its code is also wrapped in this interceptors - i.e. another transaction will be opened.
Wouldn't this cause any transaction-related problems?