congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ActivatedJob.getPayload
Code IndexAdd Tabnine to your IDE (free)

How to use
getPayload
method
in
io.zeebe.client.api.response.ActivatedJob

Best Java code snippets using io.zeebe.client.api.response.ActivatedJob.getPayload (Showing top 5 results out of 315)

origin: zeebe-io/zeebe

 @Override
 public void handle(final JobClient client, final ActivatedJob job) {
  // here: business logic that is executed with every job
  System.out.println(
    String.format(
      "[type: %s, key: %s, lockExpirationTime: %s]\n[headers: %s]\n[payload: %s]\n===",
      job.getType(),
      job.getKey(),
      job.getDeadline().toString(),
      job.getHeaders(),
      job.getPayload()));
  client.newCompleteCommand(job.getKey()).send().join();
 }
}
origin: berndruecker/flowing-retail

@Override
public void handle(JobClient client, ActivatedJob job) {
 OrderFlowContext context = OrderFlowContext.fromJson(job.getPayload());
 Order order = orderRepository.findById( context.getOrderId() ).get();
 
 // generate an UUID for this communication
 String correlationId = UUID.randomUUID().toString();
   
 messageSender.send(new Message<FetchGoodsCommandPayload>( //
     "FetchGoodsCommand", //
     context.getTraceId(), //
     new FetchGoodsCommandPayload() //
      .setRefId(order.getId()) //
      .setItems(order.getItems())) //
   .setCorrelationId(correlationId));
 
 client.newCompleteCommand(job.getKey()) //
  .payload(Collections.singletonMap("CorrelationId_FetchGoods", correlationId)) //
  .send().join();
}

origin: berndruecker/flowing-retail

@Override
public void handle(JobClient client, ActivatedJob job) {
 OrderFlowContext context = OrderFlowContext.fromJson(job.getPayload());
 
 Order order = orderRepository.findById(context.getOrderId()).get();   
     
 // generate an UUID for this communication
 String correlationId = UUID.randomUUID().toString();
 messageSender.send( //
   new Message<RetrievePaymentCommandPayload>( //
     "RetrievePaymentCommand", //
     context.getTraceId(), //
     new RetrievePaymentCommandPayload() //
      .setRefId(order.getId()) //
      .setReason("order") //
      .setAmount(order.getTotalSum())) //
   .setCorrelationId(correlationId));
 
 client.newCompleteCommand(job.getKey()) //
   .payload(Collections.singletonMap("CorrelationId_RetrievePayment", correlationId)) //
   .send().join();
}
origin: berndruecker/flowing-retail

@Override
public void handle(JobClient client, ActivatedJob job) {
 OrderFlowContext context = OrderFlowContext.fromJson(job.getPayload());
 Order order = orderRepository.findById(context.getOrderId()).get(); 
 
 // generate an UUID for this communication
 String correlationId = UUID.randomUUID().toString();
 messageSender.send(new Message<ShipGoodsCommandPayload>( //
     "ShipGoodsCommand", //
     context.getTraceId(), //
     new ShipGoodsCommandPayload() //
      .setRefId(order.getId())
      .setPickId(context.getPickId()) //
      .setRecipientName(order.getCustomer().getName()) //
      .setRecipientAddress(order.getCustomer().getAddress())) //
   .setCorrelationId(correlationId));
 
 client.newCompleteCommand(job.getKey()) //
   .payload(Collections.singletonMap("CorrelationId_ShipGoods", correlationId)) //
   .send().join();
}  
origin: berndruecker/flowing-retail

@Override
public void handle(JobClient client, ActivatedJob job) {
 OrderFlowContext context = OrderFlowContext.fromJson(job.getPayload());
    messageSender.send( //
   new Message<OrderCompletedEventPayload>( //
     "OrderCompletedEvent", //
     context.getTraceId(), //
     new OrderCompletedEventPayload() //
      .setOrderId(context.getOrderId())));
 
 //TODO: Reintorduce traceId?     .setCorrelationId(event.get)));
 
 client.newCompleteCommand(job.getKey()).send().join();
}
io.zeebe.client.api.responseActivatedJobgetPayload

Popular methods of ActivatedJob

  • getKey
  • getType
  • getDeadline
  • getHeaders
  • getPayloadAsType
  • getRetries
  • getWorker

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getApplicationContext (Context)
  • getContentResolver (Context)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JFileChooser (javax.swing)
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now