Codota Logo
IncidentRecord.getElementInstanceKey
Code IndexAdd Codota to your IDE (free)

How to use
getElementInstanceKey
method
in
io.zeebe.protocol.impl.record.value.incident.IncidentRecord

Best Java code snippets using io.zeebe.protocol.impl.record.value.incident.IncidentRecord.getElementInstanceKey (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: io.zeebe/zeebe-broker-core

public boolean rejectIncidentCreation(
  IncidentRecord incidentEvent, CommandControl<IncidentRecord> commandControl) {
 final IncidentState incidentState = zeebeState.getIncidentState();
 final boolean isJobIncident = incidentState.isJobIncident(incidentEvent);
 if (isJobIncident) {
  return rejectJobIncident(incidentEvent.getJobKey(), commandControl);
 } else {
  return rejectWorkflowInstanceIncident(incidentEvent.getElementInstanceKey(), commandControl);
 }
}
origin: zeebe-io/zeebe

 public void assertIncident(
   final IncidentRecord expectedRecord, final IncidentRecord storedRecord) {

  assertThat(expectedRecord.getJobKey()).isEqualTo(storedRecord.getJobKey());
  assertThat(expectedRecord.getElementInstanceKey())
    .isEqualTo(storedRecord.getElementInstanceKey());
  assertThat(expectedRecord.getBpmnProcessId()).isEqualTo(storedRecord.getBpmnProcessId());
  assertThat(expectedRecord.getElementId()).isEqualTo(storedRecord.getElementId());

  assertThat(expectedRecord.getErrorMessage()).isEqualTo(storedRecord.getErrorMessage());
  assertThat(expectedRecord.getErrorType()).isEqualTo(storedRecord.getErrorType());
 }
}
origin: zeebe-io/zeebe

public boolean rejectIncidentCreation(
  IncidentRecord incidentEvent, CommandControl<IncidentRecord> commandControl) {
 final IncidentState incidentState = zeebeState.getIncidentState();
 final boolean isJobIncident = incidentState.isJobIncident(incidentEvent);
 if (isJobIncident) {
  return rejectJobIncident(incidentEvent.getJobKey(), commandControl);
 } else {
  return rejectWorkflowInstanceIncident(incidentEvent.getElementInstanceKey(), commandControl);
 }
}
origin: io.zeebe/zeebe-broker-core

 public void assertIncident(
   final IncidentRecord expectedRecord, final IncidentRecord storedRecord) {

  assertThat(expectedRecord.getJobKey()).isEqualTo(storedRecord.getJobKey());
  assertThat(expectedRecord.getElementInstanceKey())
    .isEqualTo(storedRecord.getElementInstanceKey());
  assertThat(expectedRecord.getBpmnProcessId()).isEqualTo(storedRecord.getBpmnProcessId());
  assertThat(expectedRecord.getElementId()).isEqualTo(storedRecord.getElementId());

  assertThat(expectedRecord.getErrorMessage()).isEqualTo(storedRecord.getErrorMessage());
  assertThat(expectedRecord.getErrorType()).isEqualTo(storedRecord.getErrorType());
 }
}
origin: io.zeebe/zeebe-broker-core

private void attemptToContinueWorkflowProcessing(
  TypedResponseWriter responseWriter,
  TypedStreamWriter streamWriter,
  Consumer<SideEffectProducer> sideEffect,
  IncidentRecord incidentRecord) {
 final long elementInstanceKey = incidentRecord.getElementInstanceKey();
 final IndexedRecord failedRecord =
   zeebeState.getWorkflowState().getElementInstanceState().getFailedRecord(elementInstanceKey);
 if (failedRecord != null) {
  typedRecord.wrap(failedRecord);
  queue.clear();
  queue.add(responseWriter::flush);
  stepProcessor.processRecord(typedRecord, responseWriter, streamWriter, queue::add);
  sideEffect.accept(queue);
 }
}
origin: zeebe-io/zeebe

private void attemptToContinueWorkflowProcessing(
  TypedResponseWriter responseWriter,
  TypedStreamWriter streamWriter,
  Consumer<SideEffectProducer> sideEffect,
  IncidentRecord incidentRecord) {
 final long elementInstanceKey = incidentRecord.getElementInstanceKey();
 final IndexedRecord failedRecord =
   zeebeState.getWorkflowState().getElementInstanceState().getFailedRecord(elementInstanceKey);
 if (failedRecord != null) {
  typedRecord.wrap(failedRecord);
  queue.clear();
  queue.add(responseWriter::flush);
  stepProcessor.processRecord(typedRecord, responseWriter, streamWriter, queue::add);
  sideEffect.accept(queue);
 }
}
origin: zeebe-io/zeebe

public void deleteIncident(long key) {
 final IncidentRecord incidentRecord = getIncidentRecord(key);
 if (incidentRecord != null) {
  zeebeDb.batch(
    () -> {
     incidentColumnFamily.delete(incidentKey);
     if (isJobIncident(incidentRecord)) {
      jobKey.wrapLong(incidentRecord.getJobKey());
      jobIncidentColumnFamily.delete(jobKey);
     } else {
      elementInstanceKey.wrapLong(incidentRecord.getElementInstanceKey());
      workflowInstanceIncidentColumnFamily.delete(elementInstanceKey);
     }
    });
 }
}
origin: io.zeebe/zeebe-broker-core

public void deleteIncident(long key) {
 final IncidentRecord incidentRecord = getIncidentRecord(key);
 if (incidentRecord != null) {
  zeebeDb.batch(
    () -> {
     incidentColumnFamily.delete(incidentKey);
     if (isJobIncident(incidentRecord)) {
      jobKey.wrapLong(incidentRecord.getJobKey());
      jobIncidentColumnFamily.delete(jobKey);
     } else {
      elementInstanceKey.wrapLong(incidentRecord.getElementInstanceKey());
      workflowInstanceIncidentColumnFamily.delete(elementInstanceKey);
     }
    });
 }
}
origin: zeebe-io/zeebe

public void createIncident(long incidentKey, IncidentRecord incident) {
 zeebeDb.batch(
   () -> {
    this.incidentKey.wrapLong(incidentKey);
    this.incidentRecordToWrite.wrapObject(incident);
    incidentColumnFamily.put(this.incidentKey, this.incidentRecordToWrite);
    if (isJobIncident(incident)) {
     jobKey.wrapLong(incident.getJobKey());
     jobIncidentColumnFamily.put(jobKey, this.incidentKey);
    } else {
     elementInstanceKey.wrapLong(incident.getElementInstanceKey());
     workflowInstanceIncidentColumnFamily.put(elementInstanceKey, this.incidentKey);
    }
   });
}
origin: io.zeebe/zeebe-broker-core

public void createIncident(long incidentKey, IncidentRecord incident) {
 zeebeDb.batch(
   () -> {
    this.incidentKey.wrapLong(incidentKey);
    this.incidentRecordToWrite.wrapObject(incident);
    incidentColumnFamily.put(this.incidentKey, this.incidentRecordToWrite);
    if (isJobIncident(incident)) {
     jobKey.wrapLong(incident.getJobKey());
     jobIncidentColumnFamily.put(jobKey, this.incidentKey);
    } else {
     elementInstanceKey.wrapLong(incident.getElementInstanceKey());
     workflowInstanceIncidentColumnFamily.put(elementInstanceKey, this.incidentKey);
    }
   });
}
origin: zeebe-io/zeebe

private IncidentRecordValue ofIncidentRecord(final LoggedEvent event) {
 final IncidentRecord record = new IncidentRecord();
 event.readValue(record);
 return new IncidentRecordValueImpl(
   objectMapper,
   record.getErrorType().name(),
   asString(record.getErrorMessage()),
   asString(record.getBpmnProcessId()),
   asString(record.getElementId()),
   record.getWorkflowInstanceKey(),
   record.getElementInstanceKey(),
   record.getJobKey());
}
origin: io.zeebe/zeebe-broker-core

private IncidentRecordValue ofIncidentRecord(final LoggedEvent event) {
 final IncidentRecord record = new IncidentRecord();
 event.readValue(record);
 return new IncidentRecordValueImpl(
   objectMapper,
   record.getErrorType().name(),
   asString(record.getErrorMessage()),
   asString(record.getBpmnProcessId()),
   asString(record.getElementId()),
   record.getWorkflowInstanceKey(),
   record.getElementInstanceKey(),
   record.getJobKey(),
   record.getVariableScopeKey());
}
io.zeebe.protocol.impl.record.value.incidentIncidentRecordgetElementInstanceKey

Popular methods of IncidentRecord

  • <init>
  • setBpmnProcessId
  • setElementId
  • setElementInstanceKey
  • setWorkflowInstanceKey
  • getBpmnProcessId
  • getElementId
  • getErrorMessage
  • getErrorType
  • getJobKey
  • setErrorMessage
  • setErrorType
  • setErrorMessage,
  • setErrorType,
  • setJobKey,
  • setVariableScopeKey,
  • declareProperty,
  • getVariableScopeKey,
  • getWorkflowInstanceKey,
  • initFromWorkflowInstanceFailure,
  • reset

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • getContentResolver (Context)
  • getExternalFilesDir (Context)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now