Permalink
Browse files

Inline Reactor + Tests + Fix of ClassCastException + use of Eclipse C…

…ollections (#63)

* prepare 2.0, java8

* no dep to projectreactor anymore

* move to projectreactor package

* replace java functional

* reformat

* update disruptor

* half way there

* move examples to profile, remove deprecated helpers

* add default goal

* wip

* added missing filtering of consumers

* some refactorings

* some refactorings

* Fixed ClassCastException: String cannot be cast to Void

* replace with lambda

* testng fails

* Fixed tests
  • Loading branch information...
pschalk authored and jangalinski committed Nov 29, 2017
1 parent c7541d7 commit 28061b4507e09d2e718341f2e781114c0d33d69f
Showing with 19,226 additions and 153 deletions.
  1. +1 −1 .java-version
  2. +6 −6 examples/bpmn-execution-listener/pom.xml
  3. +6 −6 examples/bpmn-task-listener/pom.xml
  4. +6 −7 examples/cmmn-task-listener/pom.xml
  5. +5 −5 examples/pom.xml
  6. +8 −12 examples/spring-plugin/pom.xml
  7. +4 −4 ...-plugin/src/test/java/org/camunda/bpm/extension/example/reactor/ReactorSpringApplicationTest.java
  8. +12 −3 extension/core/pom.xml
  9. +14 −44 extension/core/src/main/java/org/camunda/bpm/extension/reactor/bus/CamundaEventBus.java
  10. +2 −4 extension/core/src/main/java/org/camunda/bpm/extension/reactor/bus/SelectorBuilder.java
  11. +1 −1 extension/core/src/main/java/org/camunda/bpm/extension/reactor/bus/UncaughtErrorHandler.java
  12. +1 −1 extension/core/src/main/java/org/camunda/bpm/extension/reactor/event/DelegateCaseExecutionEvent.java
  13. +1 −1 extension/core/src/main/java/org/camunda/bpm/extension/reactor/event/DelegateEvent.java
  14. +1 −1 extension/core/src/main/java/org/camunda/bpm/extension/reactor/event/DelegateEventConsumer.java
  15. +1 −1 extension/core/src/main/java/org/camunda/bpm/extension/reactor/event/DelegateExecutionEvent.java
  16. +2 −7 extension/core/src/main/java/org/camunda/bpm/extension/reactor/event/DelegateTaskEvent.java
  17. +1 −2 extension/core/src/main/java/org/camunda/bpm/extension/reactor/event/ProcessEnginePluginEvent.java
  18. +17 −17 extension/core/src/test/java/org/camunda/bpm/extension/reactor/bus/CamundaEventBusTest.java
  19. +84 −0 extension/eventbus/pom.xml
  20. +1,046 −0 extension/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/Environment.java
  21. +61 −0 extension/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/Bus.java
  22. +477 −0 extension/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/Event.java
  23. +640 −0 extension/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/EventBus.java
  24. +33 −0 ...bus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/filter/AbstractFilter.java
  25. +40 −0 ...on/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/filter/Filter.java
  26. +37 −0 ...entbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/filter/FirstFilter.java
  27. +34 −0 .../src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/filter/PassThroughFilter.java
  28. +40 −0 ...ntbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/filter/RandomFilter.java
  29. +81 −0 ...s/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/filter/RoundRobinFilter.java
  30. +52 −0 ...n/java/org/camunda/bpm/extension/reactor/projectreactor/bus/filter/TraceableDelegatingFilter.java
  31. +91 −0 ...us/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/publisher/BusPublisher.java
  32. +128 −0 ...main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/registry/CachableRegistration.java
  33. +159 −0 .../src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/registry/CachingRegistry.java
  34. +103 −0 ...bus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/registry/Registration.java
  35. +53 −0 ...ntbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/registry/Registries.java
  36. +67 −0 ...ventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/registry/Registry.java
  37. +118 −0 ...ain/java/org/camunda/bpm/extension/reactor/projectreactor/bus/registry/SimpleCachingRegistry.java
  38. +115 −0 ...in/java/org/camunda/bpm/extension/reactor/projectreactor/bus/routing/ConsumerFilteringRouter.java
  39. +50 −0 ...n/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/routing/Router.java
  40. +54 −0 .../java/org/camunda/bpm/extension/reactor/projectreactor/bus/routing/TraceableDelegatingRouter.java
  41. +57 −0 ...us/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/selector/ClassSelector.java
  42. +39 −0 ...s/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/selector/HeaderResolver.java
  43. +324 −0 ...src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/selector/JsonPathSelector.java
  44. +41 −0 ...src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/selector/MatchAllSelector.java
  45. +91 −0 ...s/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/selector/ObjectSelector.java
  46. +47 −0 ...rc/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/selector/PredicateSelector.java
  47. +91 −0 ...us/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/selector/RegexSelector.java
  48. +51 −0 ...ventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/selector/Selector.java
  49. +219 −0 ...entbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/selector/Selectors.java
  50. +53 −0 ...ain/java/org/camunda/bpm/extension/reactor/projectreactor/bus/selector/SetMembershipSelector.java
  51. +73 −0 .../src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/selector/UriPathSelector.java
  52. +145 −0 .../src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/selector/UriPathTemplate.java
  53. +179 −0 ...tbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/selector/UriSelector.java
  54. +126 −0 .../main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/spec/DispatcherComponentSpec.java
  55. +33 −0 ...ventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/spec/EventBusSpec.java
  56. +243 −0 ...ain/java/org/camunda/bpm/extension/reactor/projectreactor/bus/spec/EventRoutingComponentSpec.java
  57. +65 −0 ...bus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/support/CallbackEvent.java
  58. +54 −0 ...bus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/support/EventConsumer.java
  59. +60 −0 ...us/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/support/NotifyConsumer.java
  60. +233 −0 ...eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/bus/timer/EventTimer.java
  61. +110 −0 ...sion/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/Dispatcher.java
  62. +30 −0 ...ntbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/DispatcherSupplier.java
  63. +33 −0 ...c/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/config/ConfigurationReader.java
  64. +77 −0 ...in/java/org/camunda/bpm/extension/reactor/projectreactor/core/config/DispatcherConfiguration.java
  65. +61 −0 ...us/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/config/DispatcherType.java
  66. +204 −0 ...a/org/camunda/bpm/extension/reactor/projectreactor/core/config/PropertiesConfigurationReader.java
  67. +75 −0 .../main/java/org/camunda/bpm/extension/reactor/projectreactor/core/config/ReactorConfiguration.java
  68. +212 −0 ...a/org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/AbstractLifecycleDispatcher.java
  69. +153 −0 .../src/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/MpscDispatcher.java
  70. +78 −0 ...in/java/org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/MultiThreadDispatcher.java
  71. +303 −0 ...ain/java/org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/RingBufferDispatcher.java
  72. +102 −0 ...n/java/org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/SingleThreadDispatcher.java
  73. +112 −0 ...in/java/org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/SynchronousDispatcher.java
  74. +168 −0 ...in/java/org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/TailRecurseDispatcher.java
  75. +157 −0 .../org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/ThreadPoolExecutorDispatcher.java
  76. +123 −0 ...org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/TraceableDelegatingDispatcher.java
  77. +209 −0 ...main/java/org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/WorkQueueDispatcher.java
  78. +76 −0 ...ava/org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/wait/AgileWaitingStrategy.java
  79. +61 −0 ...in/java/org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/wait/ParkWaitStrategy.java
  80. +39 −0 ...rc/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/wait/WaitingMood.java
  81. +77 −0 ...c/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/internal/PlatformDependent.java
  82. +118 −0 .../main/java/org/camunda/bpm/extension/reactor/projectreactor/core/internal/PlatformDependent0.java
  83. +62 −0 ...camunda/bpm/extension/reactor/projectreactor/core/internal/UnsafeAtomicReferenceFieldUpdater.java
  84. +40 −0 ...rc/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/processor/CancelException.java
  85. +86 −0 ...ava/org/camunda/bpm/extension/reactor/projectreactor/core/processor/ExecutorPoweredProcessor.java
  86. +42 −0 ...rg/camunda/bpm/extension/reactor/projectreactor/core/processor/InsufficientCapacityException.java
  87. +17 −0 .../src/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/processor/MutableSignal.java
  88. +95 −0 ...c/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/processor/ReactorProcessor.java
  89. +841 −0 ...ain/java/org/camunda/bpm/extension/reactor/projectreactor/core/processor/RingBufferProcessor.java
  90. +870 −0 ...java/org/camunda/bpm/extension/reactor/projectreactor/core/processor/RingBufferWorkProcessor.java
  91. +247 −0 ...g/camunda/bpm/extension/reactor/projectreactor/core/processor/util/RingBufferSubscriberUtils.java
  92. +115 −0 .../java/org/camunda/bpm/extension/reactor/projectreactor/core/processor/util/SingleUseExecutor.java
  93. +63 −0 ...in/java/org/camunda/bpm/extension/reactor/projectreactor/core/queue/CompletableBlockingQueue.java
  94. +40 −0 ...main/java/org/camunda/bpm/extension/reactor/projectreactor/core/queue/CompletableLinkedQueue.java
  95. +41 −0 ...s/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/queue/CompletableQueue.java
  96. +402 −0 ...in/java/org/camunda/bpm/extension/reactor/projectreactor/core/queue/internal/MpscLinkedQueue.java
  97. +75 −0 .../org/camunda/bpm/extension/reactor/projectreactor/core/queue/internal/MpscLinkedQueueHeadRef.java
  98. +82 −0 ...ava/org/camunda/bpm/extension/reactor/projectreactor/core/queue/internal/MpscLinkedQueueNode.java
  99. +38 −0 ...ava/org/camunda/bpm/extension/reactor/projectreactor/core/queue/internal/MpscLinkedQueuePad0.java
  100. +41 −0 ...ava/org/camunda/bpm/extension/reactor/projectreactor/core/queue/internal/MpscLinkedQueuePad1.java
  101. +59 −0 .../org/camunda/bpm/extension/reactor/projectreactor/core/queue/internal/MpscLinkedQueueTailRef.java
  102. +505 −0 .../java/org/camunda/bpm/extension/reactor/projectreactor/core/reactivestreams/PublisherFactory.java
  103. +274 −0 ...a/org/camunda/bpm/extension/reactor/projectreactor/core/reactivestreams/SerializedSubscriber.java
  104. +149 −0 ...java/org/camunda/bpm/extension/reactor/projectreactor/core/reactivestreams/SubscriberBarrier.java
  105. +317 −0 ...java/org/camunda/bpm/extension/reactor/projectreactor/core/reactivestreams/SubscriberFactory.java
  106. +109 −0 .../org/camunda/bpm/extension/reactor/projectreactor/core/reactivestreams/SubscriberWithContext.java
  107. +87 −0 ...rg/camunda/bpm/extension/reactor/projectreactor/core/reactivestreams/SubscriptionWithContext.java
  108. +142 −0 .../eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/support/Assert.java
  109. +186 −0 ...ntbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/support/Exceptions.java
  110. +92 −0 .../java/org/camunda/bpm/extension/reactor/projectreactor/core/support/NamedDaemonThreadFactory.java
  111. +41 −0 ...tbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/support/NonBlocking.java
  112. +39 −0 ...ain/java/org/camunda/bpm/extension/reactor/projectreactor/core/support/ReactorFatalException.java
  113. +32 −0 ...ntbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/support/Recyclable.java
  114. +32 −0 ...n/java/org/camunda/bpm/extension/reactor/projectreactor/core/support/SpecificationExceptions.java
  115. +111 −0 ...entbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/core/support/UUIDUtils.java
  116. +46 −0 extension/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/fn/Pausable.java
  117. +60 −0 extension/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/fn/Resource.java
  118. +495 −0 ...ntbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/fn/timer/HashWheelTimer.java
  119. +69 −0 ...n/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/fn/timer/TimeUtils.java
  120. +90 −0 ...nsion/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/fn/timer/Timer.java
  121. +219 −0 extension/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/IO.java
  122. +1,435 −0 ...ion/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/buffer/Buffer.java
  123. +156 −0 ...eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/BufferCodec.java
  124. +55 −0 ...ntbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/ByteArrayCodec.java
  125. +220 −0 ...nsion/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/Codec.java
  126. +123 −0 ...ntbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/DelimitedCodec.java
  127. +42 −0 ...nsion/eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/Frame.java
  128. +164 −0 .../eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/FrameCodec.java
  129. +84 −0 ...c/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/JavaSerializationCodec.java
  130. +152 −0 ...bus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/LengthFieldCodec.java
  131. +75 −0 ...bus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/PassThroughCodec.java
  132. +160 −0 ...s/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/SerializationCodec.java
  133. +54 −0 ...ntbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/StandardCodecs.java
  134. +140 −0 ...eventbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/StringCodec.java
  135. +76 −0 ...rc/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/json/JacksonJsonCodec.java
  136. +130 −0 ...ntbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/codec/json/JsonCodec.java
  137. +99 −0 ...c/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/queue/InMemoryQueuePersistor.java
  138. +95 −0 ...tbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/queue/PersistentQueue.java
  139. +90 −0 ...ntbus/src/main/java/org/camunda/bpm/extension/reactor/projectreactor/io/queue/QueuePersistor.java
  140. +48 −0 extension/eventbus/src/main/resources/META-INF/reactor/reactor-environment.properties
  141. +41 −0 .../eventbus/src/test/java/org/camunda/bpm/extension/reactor/projectreactor/AbstractReactorTest.java
  142. +24 −0 .../java/org/camunda/bpm/extension/reactor/projectreactor/bus/registry/CachableRegistrationTest.java
  143. +217 −0 .../test/java/org/camunda/bpm/extension/reactor/projectreactor/bus/registry/CachingRegistryTest.java
  144. +66 −0 .../eventbus/src/test/java/org/camunda/bpm/extension/reactor/projectreactor/bus/timer/TimerTest.java
  145. +13 −0 ...java/org/camunda/bpm/extension/reactor/projectreactor/core/dispatch/RingBufferDispatcherTest.java
  146. +90 −0 ...t/java/org/camunda/bpm/extension/reactor/projectreactor/core/processor/AbstractProcessorTest.java
  147. +238 −0 ...java/org/camunda/bpm/extension/reactor/projectreactor/core/processor/ConsistentProcessorTest.java
  148. +36 −0 .../org/camunda/bpm/extension/reactor/projectreactor/core/processor/ReactorProcessorGettersTest.java
  149. +32 −0 ...java/org/camunda/bpm/extension/reactor/projectreactor/core/processor/RingBufferProcessorTest.java
  150. +93 −0 .../org/camunda/bpm/extension/reactor/projectreactor/core/processor/RingBufferWorkProcessorTest.java
  151. +25 −0 ...eventbus/src/test/java/org/camunda/bpm/extension/reactor/projectreactor/io/buffer/BufferTest.java
  152. +34 −0 extension/eventbus/src/test/resources/logback.xml
  153. +18 −0 extension/eventbus/src/test/resources/reactor/custom.properties
  154. +17 −0 extension/eventbus/src/test/resources/reactor/override-custom.properties
  155. +17 −0 extension/eventbus/src/test/resources/reactor/override-default.properties
  156. +18 −0 extension/eventbus/src/test/resources/reactor/unrecognized-type.properties
  157. +9 −9 extension/pom.xml
  158. +4 −3 extension/spring-starter/pom.xml
  159. +4 −3 extension/spring/pom.xml
  160. +1 −1 ...on/spring/src/main/java/org/camunda/bpm/extension/reactor/spring/CamundaReactorConfiguration.java
  161. +26 −14 pom.xml
View
@@ -1 +1 @@
1.7
1.8
@@ -3,13 +3,13 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.camunda.bpm.extension.examples</groupId>
<artifactId>camunda-bpm-reactor-examples</artifactId>
<version>1.2</version>
<groupId>org.camunda.bpm.extension.reactor.project</groupId>
<artifactId>camunda-bpm-reactor-example-root</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>org.camunda.bpm.extension.examples</groupId>
<artifactId>camunda-bpm-reactor-examples-bpmn-execution-listener</artifactId>
<groupId>${groupId.example}</groupId>
<artifactId>camunda-bpm-reactor-example-bpmn-execution-listener</artifactId>
<dependencyManagement>
<dependencies>
@@ -30,7 +30,7 @@
</dependency>
<dependency>
<groupId>org.camunda.bpm.extension</groupId>
<groupId>${groupId.extension}</groupId>
<artifactId>camunda-bpm-reactor-core</artifactId>
</dependency>
@@ -3,13 +3,13 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.camunda.bpm.extension.examples</groupId>
<artifactId>camunda-bpm-reactor-examples</artifactId>
<version>1.2</version>
<groupId>org.camunda.bpm.extension.reactor.project</groupId>
<artifactId>camunda-bpm-reactor-example-root</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>org.camunda.bpm.extension.examples</groupId>
<artifactId>camunda-bpm-reactor-examples-bpmn-task-listener</artifactId>
<groupId>${groupId.example}</groupId>
<artifactId>camunda-bpm-reactor-example-bpmn-task-listener</artifactId>
<dependencyManagement>
<dependencies>
@@ -30,7 +30,7 @@
</dependency>
<dependency>
<groupId>org.camunda.bpm.extension</groupId>
<groupId>${groupId.extension}</groupId>
<artifactId>camunda-bpm-reactor-core</artifactId>
</dependency>
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.camunda.bpm.extension.examples</groupId>
<artifactId>camunda-bpm-reactor-examples</artifactId>
<version>1.2</version>
<groupId>org.camunda.bpm.extension.reactor.project</groupId>
<artifactId>camunda-bpm-reactor-example-root</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>org.camunda.bpm.extension.examples</groupId>
<artifactId>camunda-bpm-reactor-examples-cmmn-task-listener</artifactId>
<groupId>${groupId.example}</groupId>
<artifactId>camunda-bpm-reactor-example-cmmn-task-listener</artifactId>
<dependencyManagement>
<dependencies>
@@ -30,7 +29,7 @@
</dependency>
<dependency>
<groupId>org.camunda.bpm.extension</groupId>
<groupId>${groupId.extension}</groupId>
<artifactId>camunda-bpm-reactor-core</artifactId>
</dependency>
View
@@ -3,17 +3,17 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.camunda.bpm.extension</groupId>
<groupId>org.camunda.bpm.extension.reactor.project</groupId>
<artifactId>camunda-bpm-reactor-root</artifactId>
<version>1.2</version>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>org.camunda.bpm.extension.examples</groupId>
<artifactId>camunda-bpm-reactor-examples</artifactId>
<artifactId>camunda-bpm-reactor-example-root</artifactId>
<packaging>pom</packaging>
<properties>
<spring-boot.version>1.3.5.RELEASE</spring-boot.version>
<groupId.example>org.camunda.bpm.extension.reactor.example</groupId.example>
<spring-boot.version>1.5.8.RELEASE</spring-boot.version>
</properties>
<dependencyManagement>
@@ -3,11 +3,12 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.camunda.bpm.extension.examples</groupId>
<artifactId>camunda-bpm-reactor-examples</artifactId>
<version>1.2</version>
<groupId>org.camunda.bpm.extension.reactor.project</groupId>
<artifactId>camunda-bpm-reactor-example-root</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>${groupId.example}</groupId>
<artifactId>camunda-bpm-reactor-examples-spring-plugin</artifactId>
<dependencyManagement>
@@ -25,14 +26,14 @@
<dependencies>
<dependency>
<groupId>org.camunda.bpm.extension</groupId>
<groupId>${groupId.extension}</groupId>
<artifactId>camunda-bpm-reactor-spring-starter</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.extension</groupId>
<groupId>org.camunda.bpm.extension.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
<version>1.1.0</version>
<version>2.2.0</version>
</dependency>
<dependency>
@@ -46,12 +47,7 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm.extension</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<version>1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
@@ -10,13 +10,13 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import static org.assertj.core.api.Assertions.assertThat;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = {ReactorSpringApplication.class})
@RunWith(SpringRunner.class)
@SpringBootTest(classes = ReactorSpringApplication.class)
public class ReactorSpringApplicationTest {
@Autowired
View
@@ -2,12 +2,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>camunda-bpm-reactor-core</artifactId>
<parent>
<groupId>org.camunda.bpm.extension</groupId>
<groupId>org.camunda.bpm.extension.reactor.project</groupId>
<artifactId>camunda-bpm-reactor-extension-root</artifactId>
<version>1.2</version>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>${groupId.extension}</groupId>
<artifactId>camunda-bpm-reactor-core</artifactId>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>camunda-bpm-reactor-eventbus</artifactId>
</dependency>
</dependencies>
</project>
@@ -18,13 +18,13 @@
import org.camunda.bpm.extension.reactor.event.ProcessEnginePluginEvent.PostInitEvent;
import org.camunda.bpm.extension.reactor.event.ProcessEnginePluginEvent.PreInitEvent;
import org.slf4j.Logger;
import reactor.bus.EventBus;
import reactor.bus.selector.Selectors;
import reactor.bus.spec.EventBusSpec;
import reactor.core.dispatch.SynchronousDispatcher;
import reactor.fn.Consumer;
import org.camunda.bpm.extension.reactor.projectreactor.bus.EventBus;
import org.camunda.bpm.extension.reactor.projectreactor.bus.selector.Selectors;
import org.camunda.bpm.extension.reactor.projectreactor.bus.spec.EventBusSpec;
import org.camunda.bpm.extension.reactor.projectreactor.core.dispatch.SynchronousDispatcher;
import java.io.Serializable;
import java.util.function.Consumer;
import static org.camunda.bpm.extension.reactor.bus.SelectorBuilder.selector;
import static org.slf4j.LoggerFactory.getLogger;
@@ -66,7 +66,7 @@ public void notify(final ProcessEnginePluginEvent processEnginePluginEvent) {
}
/**
* @return this eventbus downcasted to standard api
* @return this projectreactor downcasted to standard api
*/
public EventBus get() {
return eventBus;
@@ -76,36 +76,21 @@ public EventBus get() {
* @return caseExecutionListener that fires all parse events to bus
*/
public CaseExecutionListener getCaseExecutionListener() {
return new CaseExecutionListener() {
@Override
public void notify(DelegateCaseExecution caseExecution) throws Exception {
CamundaEventBus.this.notify(caseExecution);
}
};
return caseExecution -> CamundaEventBus.this.notify(caseExecution);
}
/**
* @return ExecutionListener that fires all parse events to bus
*/
public ExecutionListener getExecutionListener() {
return new ExecutionListener() {
@Override
public void notify(final DelegateExecution execution) throws Exception {
CamundaEventBus.this.notify(execution);
}
};
return execution -> CamundaEventBus.this.notify(execution);
}
/**
* @return taskListener that fires all parse events to bus
*/
public TaskListener getTaskListener() {
return new TaskListener() {
@Override
public void notify(DelegateTask task) {
CamundaEventBus.this.notify(task);
}
};
return task -> CamundaEventBus.this.notify(task);
}
/**
@@ -121,26 +106,11 @@ public void register(final TaskListener listener) {
public void register(final ProcessEnginePlugin processEnginePlugin) {
eventBus.on(Selectors.type(PreInitEvent.class), new Consumer<PreInitEvent>() {
@Override
public void accept(PreInitEvent event) {
processEnginePlugin.preInit(event.getData());
}
});
eventBus.on(Selectors.type(PostInitEvent.class), new Consumer<PostInitEvent>() {
@Override
public void accept(PostInitEvent event) {
processEnginePlugin.postInit(event.getData());
}
});
eventBus.on(Selectors.type(PostProcessEngineBuild.class), new Consumer<PostProcessEngineBuild>() {
@Override
public void accept(PostProcessEngineBuild event) {
processEnginePlugin.postProcessEngineBuild(event.getData());
}
});
eventBus.on(Selectors.type(PreInitEvent.class), (Consumer<PreInitEvent>) event -> processEnginePlugin.preInit(event.getData()));
eventBus.on(Selectors.type(PostInitEvent.class), (Consumer<PostInitEvent>) event -> processEnginePlugin.postInit(event.getData()));
eventBus.on(Selectors.type(PostProcessEngineBuild.class), (Consumer<PostProcessEngineBuild>) event -> processEnginePlugin.postProcessEngineBuild(event.getData()));
}
/**
@@ -5,7 +5,6 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.camunda.bpm.engine.delegate.BpmnModelExecutionContext;
import org.camunda.bpm.engine.delegate.CaseExecutionListener;
@@ -16,12 +15,11 @@
import org.camunda.bpm.engine.delegate.ExecutionListener;
import org.camunda.bpm.engine.delegate.TaskListener;
import org.camunda.bpm.extension.reactor.CamundaReactor;
import org.camunda.bpm.extension.reactor.plugin.parse.RegisterAllBpmnParseListener;
import org.camunda.bpm.model.bpmn.instance.FlowElement;
import org.camunda.bpm.model.cmmn.instance.CmmnElement;
import reactor.bus.selector.Selector;
import reactor.bus.selector.Selectors;
import org.camunda.bpm.extension.reactor.projectreactor.bus.selector.Selector;
import org.camunda.bpm.extension.reactor.projectreactor.bus.selector.Selectors;
public class SelectorBuilder {
@@ -2,7 +2,7 @@
import org.camunda.bpm.engine.ProcessEngineException;
import reactor.fn.Consumer;
import java.util.function.Consumer;
/**
* Singleton instance of errorHandler that applies when execution of listeners fails.
@@ -3,7 +3,7 @@
import org.camunda.bpm.engine.ProcessEngineException;
import org.camunda.bpm.engine.delegate.CaseExecutionListener;
import org.camunda.bpm.engine.delegate.DelegateCaseExecution;
import reactor.fn.Consumer;
import java.util.function.Consumer;
public class DelegateCaseExecutionEvent extends DelegateEvent<DelegateCaseExecution> {
@@ -3,7 +3,7 @@
import org.camunda.bpm.engine.delegate.DelegateCaseExecution;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.DelegateTask;
import reactor.bus.Event;
import org.camunda.bpm.extension.reactor.projectreactor.bus.Event;
public abstract class DelegateEvent<T> extends Event<T> {
@@ -1,6 +1,6 @@
package org.camunda.bpm.extension.reactor.event;
import reactor.fn.Consumer;
import java.util.function.Consumer;
public abstract class DelegateEventConsumer implements Consumer<DelegateEvent> {
@@ -3,7 +3,7 @@
import org.camunda.bpm.engine.ProcessEngineException;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.ExecutionListener;
import reactor.fn.Consumer;
import java.util.function.Consumer;
public class DelegateExecutionEvent extends DelegateEvent<DelegateExecution> {
@@ -2,17 +2,12 @@
import org.camunda.bpm.engine.delegate.DelegateTask;
import org.camunda.bpm.engine.delegate.TaskListener;
import reactor.fn.Consumer;
import java.util.function.Consumer;
public class DelegateTaskEvent extends DelegateEvent<DelegateTask> {
public static Consumer<DelegateTaskEvent> consumer(final TaskListener listener) {
return new Consumer<DelegateTaskEvent>() {
@Override
public void accept(DelegateTaskEvent event) {
listener.notify(event.getData());
}
};
return event -> listener.notify(event.getData());
}
private static final long serialVersionUID = 1L;
Oops, something went wrong.

0 comments on commit 28061b4

Please sign in to comment.