Codota Logo
JobHeaders.getElementId
Code IndexAdd Codota to your IDE (free)

How to use
getElementId
method
in
io.zeebe.protocol.impl.record.value.job.JobHeaders

Best Java code snippets using io.zeebe.protocol.impl.record.value.job.JobHeaders.getElementId (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: zeebe-io/zeebe

 public TypedRecord<JobRecord> awaitJobInState(final String activityId, final JobIntent state) {
  final DirectBuffer activityIdBuffer = wrapString(activityId);
  final Supplier<TypedRecordStream<JobRecord>> lookupStream =
    () ->
      environmentRule
        .events()
        .onlyJobRecords()
        .filter(r -> r.getValue().getHeaders().getElementId().equals(activityIdBuffer))
        .withIntent(state);

  waitUntil(() -> lookupStream.get().findFirst().isPresent());
  return lookupStream.get().findFirst().get();
 }
}
origin: io.zeebe/zeebe-broker-core

 public TypedRecord<JobRecord> awaitJobInState(final String activityId, final JobIntent state) {
  final DirectBuffer activityIdBuffer = wrapString(activityId);
  final Supplier<TypedRecordStream<JobRecord>> lookupStream =
    () ->
      environmentRule
        .events()
        .onlyJobRecords()
        .filter(r -> r.getValue().getHeaders().getElementId().equals(activityIdBuffer))
        .withIntent(state);

  waitUntil(() -> lookupStream.get().findFirst().isPresent());
  return lookupStream.get().findFirst().get();
 }
}
origin: zeebe-io/zeebe

private static JobHeaders fromBrokerJobHeaders(
  io.zeebe.protocol.impl.record.value.job.JobHeaders headers) {
 return JobHeaders.newBuilder()
   .setWorkflowInstanceKey(headers.getWorkflowInstanceKey())
   .setBpmnProcessId(bufferAsString(headers.getBpmnProcessId()))
   .setWorkflowDefinitionVersion(headers.getWorkflowDefinitionVersion())
   .setWorkflowKey(headers.getWorkflowKey())
   .setElementId(bufferAsString(headers.getElementId()))
   .setElementInstanceKey(headers.getElementInstanceKey())
   .build();
}
origin: zeebe-io/zeebe

private JobRecordValue ofJobRecord(JobRecord record) {
 final JobHeaders jobHeaders = record.getHeaders();
 final HeadersImpl headers =
   new HeadersImpl(
     asString(jobHeaders.getBpmnProcessId()),
     asString(jobHeaders.getElementId()),
     jobHeaders.getElementInstanceKey(),
     jobHeaders.getWorkflowInstanceKey(),
     jobHeaders.getWorkflowKey(),
     jobHeaders.getWorkflowDefinitionVersion());
 final Instant deadline;
 if (record.getDeadline() != Protocol.INSTANT_NULL_VALUE) {
  deadline = Instant.ofEpochMilli(record.getDeadline());
 } else {
  deadline = null;
 }
 return new JobRecordValueImpl(
   objectMapper,
   asJson(record.getPayload()),
   asString(record.getType()),
   asString(record.getWorker()),
   deadline,
   headers,
   asMsgPackMap(record.getCustomHeaders()),
   record.getRetries(),
   asString(record.getErrorMessage()));
}
origin: io.zeebe/zeebe-broker-core

private JobRecordValue ofJobRecord(JobRecord record) {
 final JobHeaders jobHeaders = record.getHeaders();
 final HeadersImpl headers =
   new HeadersImpl(
     asString(jobHeaders.getBpmnProcessId()),
     asString(jobHeaders.getElementId()),
     jobHeaders.getElementInstanceKey(),
     jobHeaders.getWorkflowInstanceKey(),
     jobHeaders.getWorkflowKey(),
     jobHeaders.getWorkflowDefinitionVersion());
 final Instant deadline;
 if (record.getDeadline() != Protocol.INSTANT_NULL_VALUE) {
  deadline = Instant.ofEpochMilli(record.getDeadline());
 } else {
  deadline = null;
 }
 return new JobRecordValueImpl(
   objectMapper,
   asJson(record.getPayload()),
   asString(record.getType()),
   asString(record.getWorker()),
   deadline,
   headers,
   asMsgPackMap(record.getCustomHeaders()),
   record.getRetries(),
   asString(record.getErrorMessage()));
}
origin: zeebe-io/zeebe

 @Override
 public void processRecord(
   TypedRecord<JobRecord> event,
   TypedResponseWriter responseWriter,
   TypedStreamWriter streamWriter) {
  final JobRecord value = event.getValue();

  if (value.getRetries() <= 0) {
   final JobHeaders jobHeaders = value.getHeaders();

   final DirectBuffer jobErrorMessage = value.getErrorMessage();
   DirectBuffer incidentErrorMessage = DEFAULT_ERROR_MESSAGE;
   if (jobErrorMessage.capacity() > 0) {
    incidentErrorMessage = jobErrorMessage;
   }

   incidentEvent.reset();
   incidentEvent
     .setErrorType(ErrorType.JOB_NO_RETRIES)
     .setErrorMessage(incidentErrorMessage)
     .setBpmnProcessId(jobHeaders.getBpmnProcessId())
     .setWorkflowInstanceKey(jobHeaders.getWorkflowInstanceKey())
     .setElementId(jobHeaders.getElementId())
     .setElementInstanceKey(jobHeaders.getElementInstanceKey())
     .setJobKey(event.getKey());

   streamWriter.appendNewCommand(IncidentIntent.CREATE, incidentEvent);
  }
 }
}
origin: io.zeebe/zeebe-broker-core

.setBpmnProcessId(jobHeaders.getBpmnProcessId())
.setWorkflowInstanceKey(jobHeaders.getWorkflowInstanceKey())
.setElementId(jobHeaders.getElementId())
.setElementInstanceKey(jobHeaders.getElementInstanceKey())
.setJobKey(event.getKey())
io.zeebe.protocol.impl.record.value.jobJobHeadersgetElementId

Popular methods of JobHeaders

  • setElementId
  • getBpmnProcessId
  • getElementInstanceKey
  • getWorkflowDefinitionVersion
  • getWorkflowInstanceKey
  • getWorkflowKey
  • setBpmnProcessId
  • setElementInstanceKey
  • setWorkflowDefinitionVersion
  • setWorkflowInstanceKey
  • setWorkflowKey
  • declareProperty
  • setWorkflowKey,
  • declareProperty

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
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