Is it possible to recognize the (BPMN) task type (service task, send task, receive task, ...) by execution-id in Activiti? How can i achieve that?
With only that information you can not get what you want. Task types are about activities and activity ids. You can use execution.getCurrentActivityId()
to retrieve activity id of execution. That can be helpful for you:
final Execution execution = runtimeService.createExecutionQuery().executionId(executionId).singleResult();
final ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(execution.getProcessInstanceId()).singleResult();
final BpmnModel bpmnModel = repositoryService.getBpmnModel(processInstance.getProcessDefinitionId());
final org.activiti.bpmn.model.FlowElement flowElement = bpmnModel.getFlowElement(((DelegateExecution) execution).getCurrentActivityId());
flowElement
will be the activity you are looking for. You can check the type of it.