Search in sources :

Example 1 with TimerInstance

use of io.camunda.zeebe.engine.state.instance.TimerInstance in project zeebe by camunda.

the class TimerCancelledApplier method applyState.

@Override
public void applyState(final long key, final TimerRecord value) {
    final TimerInstance timerInstance = timerInstanceState.get(value.getElementInstanceKey(), key);
    timerInstanceState.remove(timerInstance);
}
Also used : TimerInstance(io.camunda.zeebe.engine.state.instance.TimerInstance)

Example 2 with TimerInstance

use of io.camunda.zeebe.engine.state.instance.TimerInstance in project zeebe by camunda.

the class CancelTimerProcessor method processRecord.

@Override
public void processRecord(final TypedRecord<TimerRecord> record, final TypedResponseWriter responseWriter, final TypedStreamWriter streamWriter) {
    final TimerRecord timer = record.getValue();
    final TimerInstance timerInstance = timerInstanceState.get(timer.getElementInstanceKey(), record.getKey());
    if (timerInstance == null) {
        rejectionWriter.appendRejection(record, RejectionType.NOT_FOUND, String.format(NO_TIMER_FOUND_MESSAGE, record.getKey()));
    } else {
        stateWriter.appendFollowUpEvent(record.getKey(), TimerIntent.CANCELED, timer);
    }
}
Also used : TimerRecord(io.camunda.zeebe.protocol.impl.record.value.timer.TimerRecord) TimerInstance(io.camunda.zeebe.engine.state.instance.TimerInstance)

Example 3 with TimerInstance

use of io.camunda.zeebe.engine.state.instance.TimerInstance in project zeebe by zeebe-io.

the class TimerCancelledApplier method applyState.

@Override
public void applyState(final long key, final TimerRecord value) {
    final TimerInstance timerInstance = timerInstanceState.get(value.getElementInstanceKey(), key);
    timerInstanceState.remove(timerInstance);
}
Also used : TimerInstance(io.camunda.zeebe.engine.state.instance.TimerInstance)

Example 4 with TimerInstance

use of io.camunda.zeebe.engine.state.instance.TimerInstance in project zeebe by zeebe-io.

the class TimerTriggeredApplier method applyState.

@Override
public void applyState(final long key, final TimerRecord value) {
    final long elementInstanceKey = value.getElementInstanceKey();
    final TimerInstance timerInstance = timerInstanceState.get(elementInstanceKey, key);
    timerInstanceState.remove(timerInstance);
}
Also used : TimerInstance(io.camunda.zeebe.engine.state.instance.TimerInstance)

Example 5 with TimerInstance

use of io.camunda.zeebe.engine.state.instance.TimerInstance in project zeebe by camunda-cloud.

the class CancelTimerProcessor method processRecord.

@Override
public void processRecord(final TypedRecord<TimerRecord> record, final TypedResponseWriter responseWriter, final TypedStreamWriter streamWriter) {
    final TimerRecord timer = record.getValue();
    final TimerInstance timerInstance = timerInstanceState.get(timer.getElementInstanceKey(), record.getKey());
    if (timerInstance == null) {
        rejectionWriter.appendRejection(record, RejectionType.NOT_FOUND, String.format(NO_TIMER_FOUND_MESSAGE, record.getKey()));
    } else {
        stateWriter.appendFollowUpEvent(record.getKey(), TimerIntent.CANCELED, timer);
    }
}
Also used : TimerRecord(io.camunda.zeebe.protocol.impl.record.value.timer.TimerRecord) TimerInstance(io.camunda.zeebe.engine.state.instance.TimerInstance)

Aggregations

TimerInstance (io.camunda.zeebe.engine.state.instance.TimerInstance)9 TimerRecord (io.camunda.zeebe.protocol.impl.record.value.timer.TimerRecord)3