Search in sources :

Example 1 with HistoricDecisionInstanceQueryImpl

use of org.camunda.bpm.engine.impl.HistoricDecisionInstanceQueryImpl in project camunda-bpm-platform by camunda.

the class DeleteHistoricDecisionInstancesBatchCmd method collectHistoricDecisionInstanceIds.

protected List<String> collectHistoricDecisionInstanceIds() {
    Set<String> collectedDecisionInstanceIds = new HashSet<String>();
    List<String> decisionInstanceIds = getHistoricDecisionInstanceIds();
    if (decisionInstanceIds != null) {
        collectedDecisionInstanceIds.addAll(decisionInstanceIds);
    }
    final HistoricDecisionInstanceQueryImpl decisionInstanceQuery = (HistoricDecisionInstanceQueryImpl) historicDecisionInstanceQuery;
    if (decisionInstanceQuery != null) {
        for (HistoricDecisionInstance hdi : decisionInstanceQuery.list()) {
            collectedDecisionInstanceIds.add(hdi.getId());
        }
    }
    return new ArrayList<String>(collectedDecisionInstanceIds);
}
Also used : HistoricDecisionInstanceQueryImpl(org.camunda.bpm.engine.impl.HistoricDecisionInstanceQueryImpl) ArrayList(java.util.ArrayList) HistoricDecisionInstance(org.camunda.bpm.engine.history.HistoricDecisionInstance) HashSet(java.util.HashSet)

Aggregations

ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 HistoricDecisionInstance (org.camunda.bpm.engine.history.HistoricDecisionInstance)1 HistoricDecisionInstanceQueryImpl (org.camunda.bpm.engine.impl.HistoricDecisionInstanceQueryImpl)1