Codota Logo
TimerRecordValue.getHandlerFlowNodeId
Code IndexAdd Codota to your IDE (free)

How to use
getHandlerFlowNodeId
method
in
io.zeebe.exporter.record.value.TimerRecordValue

Best Java code snippets using io.zeebe.exporter.record.value.TimerRecordValue.getHandlerFlowNodeId (Showing top 13 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: zeebe-io/zeebe

public TimerRecordStream withHandlerNodeId(final String handlerNodeId) {
 return valueFilter(v -> v.getHandlerFlowNodeId().equals(handlerNodeId));
}
origin: io.zeebe/zb-test-util

public TimerRecordStream withHandlerNodeId(final String handlerNodeId) {
 return valueFilter(v -> v.getHandlerFlowNodeId().equals(handlerNodeId));
}
origin: zeebe-io/zeebe

/**
 * Verifies that the actual TimerRecordValue's handlerFlowNodeId is equal to the given one.
 * @param handlerFlowNodeId the given handlerFlowNodeId to compare the actual TimerRecordValue's handlerFlowNodeId to.
 * @return this assertion object.
 * @throws AssertionError - if the actual TimerRecordValue's handlerFlowNodeId is not equal to the given one.
 */
public S hasHandlerFlowNodeId(String handlerFlowNodeId) {
 // check that actual TimerRecordValue we want to make assertions on is not null.
 isNotNull();
 // overrides the default error message with a more explicit one
 String assertjErrorMessage = "\nExpecting handlerFlowNodeId of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";
 // null safe check
 String actualHandlerFlowNodeId = actual.getHandlerFlowNodeId();
 if (!Objects.areEqual(actualHandlerFlowNodeId, handlerFlowNodeId)) {
  failWithMessage(assertjErrorMessage, actual, handlerFlowNodeId, actualHandlerFlowNodeId);
 }
 // return the current assertion for method chaining
 return myself;
}
origin: io.zeebe/zeebe-broker-core

@Test
public void shouldCancelTimer() {
 // given
 testClient.deploy(WORKFLOW_WITH_TIMERS);
 testClient.createWorkflowInstance(PROCESS_ID, asMsgPack("key", "123"));
 assertThat(RecordingExporter.timerRecords(TimerIntent.CREATED).limit(2).exists()).isTrue();
 // when
 brokerRule.getClock().addTime(Duration.ofSeconds(1));
 // then
 assertThat(RecordingExporter.timerRecords(TimerIntent.CANCELED).limit(1))
   .extracting(r -> r.getValue().getHandlerFlowNodeId())
   .hasSize(1)
   .contains("timer-2");
}
origin: zeebe-io/zeebe

@Test
public void shouldCreateTimerBasedOnBoundaryEvent() {
 // given
 testClient.deploy(BOUNDARY_EVENT_WORKFLOW);
 brokerRule.getClock().pinCurrentTime();
 final long nowMs = brokerRule.getClock().getCurrentTimeInMillis();
 testClient.createWorkflowInstance("process");
 // when
 final Record<TimerRecordValue> timerCreatedRecord =
   RecordingExporter.timerRecords(TimerIntent.CREATED).getFirst();
 final Record<WorkflowInstanceRecordValue> activityRecord =
   RecordingExporter.workflowInstanceRecords(WorkflowInstanceIntent.ELEMENT_ACTIVATED)
     .withElementId("task")
     .getFirst();
 // then
 assertThat(timerCreatedRecord.getValue().getDueDate()).isEqualTo(nowMs + 1000);
 assertThat(timerCreatedRecord.getValue().getElementInstanceKey())
   .isEqualTo(activityRecord.getKey());
 assertThat(timerCreatedRecord.getValue().getHandlerFlowNodeId()).isEqualTo("timer");
}
origin: io.zeebe/zeebe-broker-core

@Test
public void shouldCreateTimerBasedOnBoundaryEvent() {
 // given
 testClient.deploy(BOUNDARY_EVENT_WORKFLOW);
 brokerRule.getClock().pinCurrentTime();
 final long nowMs = brokerRule.getClock().getCurrentTimeInMillis();
 testClient.createWorkflowInstance("process");
 // when
 final Record<TimerRecordValue> timerCreatedRecord =
   RecordingExporter.timerRecords(TimerIntent.CREATED).getFirst();
 final Record<WorkflowInstanceRecordValue> activityRecord =
   RecordingExporter.workflowInstanceRecords(WorkflowInstanceIntent.ELEMENT_ACTIVATED)
     .withElementId("task")
     .getFirst();
 // then
 assertThat(timerCreatedRecord.getValue().getDueDate()).isEqualTo(nowMs + 1000);
 assertThat(timerCreatedRecord.getValue().getElementInstanceKey())
   .isEqualTo(activityRecord.getKey());
 assertThat(timerCreatedRecord.getValue().getHandlerFlowNodeId()).isEqualTo("timer");
}
origin: zeebe-io/zeebe

@Test
public void shouldCancelTimer() {
 // given
 testClient.deploy(WORKFLOW_WITH_TIMERS);
 testClient.createWorkflowInstance(PROCESS_ID, asMsgPack("key", "123"));
 assertThat(RecordingExporter.timerRecords(TimerIntent.CREATED).limit(2).exists());
 // when
 brokerRule.getClock().addTime(Duration.ofSeconds(1));
 // then
 assertThat(RecordingExporter.timerRecords(TimerIntent.CANCELED).limit(1))
   .extracting(r -> r.getValue().getHandlerFlowNodeId())
   .hasSize(1)
   .contains("timer-2");
}
origin: zeebe-io/zeebe

RecordingExporter.timerRecords(TimerIntent.CREATE)
  .limit(2)
  .map(r -> r.getValue().getHandlerFlowNodeId())
  .collect(Collectors.toList());
origin: io.zeebe/zeebe-broker-core

RecordingExporter.timerRecords(TimerIntent.CREATE)
  .limit(2)
  .map(r -> r.getValue().getHandlerFlowNodeId())
  .collect(Collectors.toList());
origin: io.zeebe/zeebe-broker-core

@Test
public void shouldCancelSubscriptionsWhenScopeIsTerminated() {
 // given
 testClient.deploy(WORKFLOW_WITH_TIMER_AND_MESSAGE);
 final long workflowInstanceKey =
   testClient.createWorkflowInstance(PROCESS_ID, asMsgPack("key", "123"));
 assertThat(RecordingExporter.timerRecords(TimerIntent.CREATED).limit(1).exists()).isTrue();
 assertThat(
     RecordingExporter.workflowInstanceSubscriptionRecords(
         WorkflowInstanceSubscriptionIntent.OPENED)
       .limit(1)
       .exists())
   .isTrue();
 // when
 testClient.cancelWorkflowInstance(workflowInstanceKey);
 // then
 assertThat(RecordingExporter.timerRecords(TimerIntent.CANCELED).limit(1))
   .extracting(r -> r.getValue().getHandlerFlowNodeId())
   .hasSize(1)
   .contains("timer");
 assertThat(
     RecordingExporter.workflowInstanceSubscriptionRecords(
         WorkflowInstanceSubscriptionIntent.CLOSED)
       .limit(1))
   .extracting(r -> r.getValue().getMessageName())
   .hasSize(1)
   .contains("msg");
}
origin: zeebe-io/zeebe

@Test
public void shouldCreateTimer() {
 // given
 testClient.deploy(WORKFLOW_WITH_TIMERS);
 // when
 testClient.createWorkflowInstance(PROCESS_ID);
 // then
 final Record<WorkflowInstanceRecordValue> gatewayEvent =
   RecordingExporter.workflowInstanceRecords(WorkflowInstanceIntent.GATEWAY_ACTIVATED)
     .getFirst();
 final List<Record<TimerRecordValue>> timerEvents =
   RecordingExporter.timerRecords(TimerIntent.CREATED).limit(2).asList();
 assertThat(timerEvents)
   .hasSize(2)
   .extracting(
     r -> tuple(r.getValue().getHandlerFlowNodeId(), r.getValue().getElementInstanceKey()))
   .contains(tuple("timer-1", gatewayEvent.getKey()), tuple("timer-2", gatewayEvent.getKey()));
}
origin: zeebe-io/zeebe

@Test
public void shouldCancelSubscriptionsWhenScopeIsTerminated() {
 // given
 testClient.deploy(WORKFLOW_WITH_TIMER_AND_MESSAGE);
 final long workflowInstanceKey =
   testClient.createWorkflowInstance(PROCESS_ID, asMsgPack("key", "123"));
 assertThat(RecordingExporter.timerRecords(TimerIntent.CREATED).limit(1).exists());
 assertThat(
   RecordingExporter.workflowInstanceSubscriptionRecords(
       WorkflowInstanceSubscriptionIntent.OPENED)
     .limit(1)
     .exists());
 // when
 testClient.cancelWorkflowInstance(workflowInstanceKey);
 // then
 assertThat(RecordingExporter.timerRecords(TimerIntent.CANCELED).limit(1))
   .extracting(r -> r.getValue().getHandlerFlowNodeId())
   .hasSize(1)
   .contains("timer");
 assertThat(
     RecordingExporter.workflowInstanceSubscriptionRecords(
         WorkflowInstanceSubscriptionIntent.CLOSED)
       .limit(1))
   .extracting(r -> r.getValue().getMessageName())
   .hasSize(1)
   .contains("msg");
}
origin: io.zeebe/zeebe-broker-core

@Test
public void shouldCreateTimer() {
 // given
 testClient.deploy(WORKFLOW_WITH_TIMERS);
 // when
 testClient.createWorkflowInstance(PROCESS_ID);
 // then
 final Record<WorkflowInstanceRecordValue> gatewayEvent =
   RecordingExporter.workflowInstanceRecords(WorkflowInstanceIntent.ELEMENT_ACTIVATED)
     .withElementType(BpmnElementType.EVENT_BASED_GATEWAY)
     .getFirst();
 final List<Record<TimerRecordValue>> timerEvents =
   RecordingExporter.timerRecords(TimerIntent.CREATED).limit(2).asList();
 assertThat(timerEvents)
   .hasSize(2)
   .extracting(
     r -> tuple(r.getValue().getHandlerFlowNodeId(), r.getValue().getElementInstanceKey()))
   .contains(tuple("timer-1", gatewayEvent.getKey()), tuple("timer-2", gatewayEvent.getKey()));
}
io.zeebe.exporter.record.valueTimerRecordValuegetHandlerFlowNodeId

Javadoc

The handlerFlowNodeID property represent the ID, from the BPMN XML of the workflow, of the flow node which will handle the timer trigger's event. In normal flow, this is usually the same as the related activity's ID, but when the timer was created due to a boundary event, it will be that event's ID.

Popular methods of TimerRecordValue

  • getDueDate
  • getElementInstanceKey

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • onRequestPermissionsResult (Fragment)
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
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