I finded the solution by myself.
Here is the code.
String givenActivityId = "activityId";
BpmnModelInstance instance = repositoryService.getBpmnModelInstance("definitionId");
Collection<SequenceFlow> sequenceFlows = instance.getModelElementsByType(SequenceFlow.class);
for (SequenceFlow flow : sequenceFlows) {
if (flow.getTarget().getId().equals(givenActivityId)) {
LOG.info("Founded the sequenceFlow.");
return flow;
}
}
LOG.error("No such sequenceFlow");