From ad5e45d7d5f37d396c1d4d20c05d1f6e4ddeec55 Mon Sep 17 00:00:00 2001 From: Igor Dianov Date: Thu, 14 Jan 2021 10:07:51 -0800 Subject: [PATCH] fix(GH-3229): Update Activiti Cloud to Spring Boot 2.4.1 (#253) * fix: Update Spring Boot version to 2.4.1 * fix: Update Spring Cloud version to 2020.0.0-M6 * build: add Spring Milestones repository * fix: use Spring Boot version 2.4.1 * build: move Spring Milestones repository to build * fix: update deprecated websocket client spec builder * fix: remove SI deprecated classes from messages core module * fix: update spring-integration-hazelcast to 3.0.0 * fix: add io.projectreactor.addons:reactor-extra module events * fix: update removed api in graphql-ws * fix: update removed api in graphq-starter test * fix(modeling): set default spring.jackson.dateFormat to yyyy-MM-dd'T'HH:mm:ss.SSSZ * fix(rb): set default spring.jackson.dateFormat to yyyy-MM-dd'T'HH:mm:ss.SSSZ * fix: extract default jackson.date-format to activiti-cloud-service-common-config * fix: update default date format to yyyy-MM-dd'T'HH:mm:ss.SSSZZZ * fix: set jackson.date-format to yyyy-MM-dd'T'HH:mm:ss.SSSZ * fix: override StdDateFormat without colon in time zone * fix: use super constructor for StdDateFormat override * fix(version): update spring-cloud.version to 2020.0.0-RC1 * fix(build): add activiti-snapshots repository * fix(version): update spring-cloud.version to 2020.0.0 (GA) * fix: add argLine -Xmx2048m -XX:MaxPermSize=256m for maven-failsafe-plugin * Revert "fix: add argLine -Xmx2048m -XX:MaxPermSize=256m for maven-failsafe-plugin " This reverts commit 0cddb00c051de9f20c9baa15ca59161559cc46fa. * Include error message * Remove Spring milestones repository Co-authored-by: Elias Ricken de Medeiros <26007058+erdemedeiros@users.noreply.github.com> --- .../notifications/NotificationsSteps.java | 34 +- .../pom.xml | 2 +- activiti-cloud-build/pom.xml | 6 +- ...MessageConnectorAggregatorFactoryBean.java | 63 +- .../starters/hazelcast/pom.xml | 4 +- .../pom.xml | 4 + .../activiti-cloud-starter-modeling/pom.xml | 4 + .../services/events/pom.xml | 4 + ...EngineEventsConsumerAutoConfiguration.java | 8 +- ...bSocketMessageBrokerAutoConfiguration.java | 14 +- .../starter/ActivitiGraphQLStarterIT.java | 39 +- .../test/EngineEventsMessageProducer.java | 706 +++++++++--------- .../pom.xml | 4 + .../pom.xml | 4 + .../StdDateFormatWithoutColonInTimeZone.java | 29 + .../conf/common-configuration.properties | 6 +- pom.xml | 4 + 17 files changed, 487 insertions(+), 448 deletions(-) create mode 100644 activiti-cloud-service-common/activiti-cloud-service-common-config/src/main/java/org/activiti/cloud/common/properties/StdDateFormatWithoutColonInTimeZone.java diff --git a/activiti-cloud-acceptance-tests/activiti-cloud-acceptance-tests-core/src/main/java/org/activiti/cloud/acc/core/steps/notifications/NotificationsSteps.java b/activiti-cloud-acceptance-tests/activiti-cloud-acceptance-tests-core/src/main/java/org/activiti/cloud/acc/core/steps/notifications/NotificationsSteps.java index ad32275a37..2379af34e6 100644 --- a/activiti-cloud-acceptance-tests/activiti-cloud-acceptance-tests-core/src/main/java/org/activiti/cloud/acc/core/steps/notifications/NotificationsSteps.java +++ b/activiti-cloud-acceptance-tests/activiti-cloud-acceptance-tests-core/src/main/java/org/activiti/cloud/acc/core/steps/notifications/NotificationsSteps.java @@ -17,13 +17,11 @@ import static org.assertj.core.api.Assertions.assertThat; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; import java.time.Duration; import java.util.LinkedHashMap; import java.util.Map; import java.util.function.Consumer; -import net.thucydides.core.annotations.Step; + import org.activiti.cloud.acc.core.config.RuntimeTestsConfigurationProperties; import org.activiti.cloud.acc.core.rest.RuntimeDirtyContextHandler; import org.activiti.cloud.acc.core.rest.feign.EnableRuntimeFeignContext; @@ -31,10 +29,15 @@ import org.reactivestreams.Subscription; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import net.thucydides.core.annotations.Step; import reactor.core.publisher.Mono; import reactor.core.publisher.ReplayProcessor; import reactor.netty.http.client.HttpClient; import reactor.netty.http.client.HttpClient.WebsocketSender; +import reactor.netty.http.client.WebsocketClientSpec; import reactor.test.StepVerifier; @EnableRuntimeFeignContext @@ -43,6 +46,9 @@ public class NotificationsSteps { private static final String GRAPHQL_WS = "graphql-ws"; private static final String AUTHORIZATION = "Authorization"; private static final Duration TIMEOUT = Duration.ofMillis(90000); + private static final WebsocketClientSpec graphqlWsClientSpec = WebsocketClientSpec.builder() + .protocols(GRAPHQL_WS) + .build(); @Autowired private RuntimeDirtyContextHandler dirtyContextHandler; @@ -56,30 +62,30 @@ public class NotificationsSteps { @Autowired private ObjectMapper objectMapper; - + @Step public void checkServicesHealth() { assertThat(baseService.isServiceUp()).isTrue(); } - + public String getRuntimeBundleServiceName() { return properties.getRuntimeBundleServiceName(); } @SuppressWarnings({"serial"}) @Step - public ReplayProcessor subscribe(String accessToken, - String query, - Map variables, + public ReplayProcessor subscribe(String accessToken, + String query, + Map variables, Consumer action) throws InterruptedException { ReplayProcessor data = ReplayProcessor.create(); WebsocketSender client = HttpClient.create() .wiretap(true) .headers(h -> h.add(AUTHORIZATION, "Bearer " + accessToken)) - .websocket(GRAPHQL_WS) + .websocket(graphqlWsClientSpec) .uri(properties.getGraphqlWsUrl()); - + Map json = new LinkedHashMap() {{ put("type", "start"); put("id", "1"); @@ -95,8 +101,8 @@ public ReplayProcessor subscribe(String accessToken, } catch (JsonProcessingException e) { throw new RuntimeException(e); } - - + + // handle start subscription client.handle((i, o) -> { o.sendString(Mono.just(startMessage)) @@ -125,11 +131,11 @@ public ReplayProcessor subscribe(String accessToken, @Step public void verifyData(ReplayProcessor data, String...messages) { - + StepVerifier.create(data) .expectNext(messages) .expectComplete() .verify(TIMEOUT); } - + } diff --git a/activiti-cloud-build/activiti-cloud-build-dependencies-parent/pom.xml b/activiti-cloud-build/activiti-cloud-build-dependencies-parent/pom.xml index 22fa348546..5bdab1c252 100755 --- a/activiti-cloud-build/activiti-cloud-build-dependencies-parent/pom.xml +++ b/activiti-cloud-build/activiti-cloud-build-dependencies-parent/pom.xml @@ -12,7 +12,7 @@ pom Activiti Cloud :: Dependencies Parent - Hoxton.SR5 + 2020.0.0 1.14.2 diff --git a/activiti-cloud-build/pom.xml b/activiti-cloud-build/pom.xml index a1effff4a5..545bbda00a 100644 --- a/activiti-cloud-build/pom.xml +++ b/activiti-cloud-build/pom.xml @@ -199,7 +199,7 @@ 3.8.2 3.2.1 2.22.2 - 2.2.8.RELEASE + 2.4.1 activiti-cloud-build-dependencies-parent @@ -218,6 +218,10 @@ activiti-releases https://artifacts.alfresco.com/nexus/content/repositories/activiti-releases + + activiti-snapshots + https://artifacts.alfresco.com/nexus/content/repositories/activiti-snapshots + diff --git a/activiti-cloud-messages-service/services/core/src/main/java/org/activiti/cloud/services/messages/core/aggregator/MessageConnectorAggregatorFactoryBean.java b/activiti-cloud-messages-service/services/core/src/main/java/org/activiti/cloud/services/messages/core/aggregator/MessageConnectorAggregatorFactoryBean.java index 503b35da1a..d8cabc1c63 100644 --- a/activiti-cloud-messages-service/services/core/src/main/java/org/activiti/cloud/services/messages/core/aggregator/MessageConnectorAggregatorFactoryBean.java +++ b/activiti-cloud-messages-service/services/core/src/main/java/org/activiti/cloud/services/messages/core/aggregator/MessageConnectorAggregatorFactoryBean.java @@ -28,7 +28,6 @@ import org.springframework.integration.handler.advice.HandleMessageAdvice; import org.springframework.integration.store.MessageGroupStore; import org.springframework.integration.support.locks.LockRegistry; -import org.springframework.integration.support.management.AbstractMessageHandlerMetrics; import org.springframework.messaging.MessageChannel; import org.springframework.messaging.MessageHandler; import org.springframework.scheduling.TaskScheduler; @@ -49,12 +48,6 @@ public class MessageConnectorAggregatorFactoryBean extends AbstractSimpleMessage private String outputChannelName; - private AbstractMessageHandlerMetrics metrics; - - private Boolean statsEnabled; - - private Boolean countsEnabled; - private LockRegistry lockRegistry; private MessageGroupStore messageStore; @@ -80,32 +73,30 @@ public class MessageConnectorAggregatorFactoryBean extends AbstractSimpleMessage private Boolean expireGroupsUponTimeout; private Boolean completeGroupsWhenEmpty; - + private Boolean popSequence; private Boolean releaseLockBeforeSend; - + public MessageConnectorAggregatorFactoryBean() { super(); - + // defaults this.popSequence(false) .completeGroupsWhenEmpty(true) .expireGroupsUponCompletion(true) - .sendPartialResultOnExpiry(true) - .statsEnabled(true) - .countsEnabled(true); + .sendPartialResultOnExpiry(true); } public MessageConnectorAggregatorFactoryBean processorBean(MessageGroupProcessor processorBean) { this.processorBean = processorBean; - + return this; } public MessageConnectorAggregatorFactoryBean expireGroupsUponCompletion(Boolean expireGroupsUponCompletion) { this.expireGroupsUponCompletion = expireGroupsUponCompletion; - + return this; } @@ -127,24 +118,6 @@ public MessageConnectorAggregatorFactoryBean outputChannel(MessageChannel output return this; } - public MessageConnectorAggregatorFactoryBean metrics(AbstractMessageHandlerMetrics metrics) { - this.metrics = metrics; - - return this; - } - - public MessageConnectorAggregatorFactoryBean statsEnabled(Boolean statsEnabled) { - this.statsEnabled = statsEnabled; - - return this; - } - - public MessageConnectorAggregatorFactoryBean countsEnabled(Boolean countsEnabled) { - this.countsEnabled = countsEnabled; - - return this; - } - public MessageConnectorAggregatorFactoryBean lockRegistry(LockRegistry lockRegistry) { this.lockRegistry = lockRegistry; @@ -195,7 +168,7 @@ public MessageConnectorAggregatorFactoryBean discardChannel(MessageChannel disca public MessageConnectorAggregatorFactoryBean discardChannelName(String discardChannelName) { this.discardChannelName = discardChannelName; - + return this; } @@ -234,19 +207,19 @@ public MessageConnectorAggregatorFactoryBean completeGroupsWhenEmpty(Boolean com return this; } - + public MessageConnectorAggregatorFactoryBean beanFactory(BeanFactory beanFactory) { this.setBeanFactory(beanFactory); - + return this; } public MessageConnectorAggregatorFactoryBean adviceChain(List adviceChain) { this.setAdviceChain(Arrays.asList(adviceChain.toArray(new HandleMessageAdvice[] {}))); - + return this; } - + @Override protected MessageConnectorAggregator createHandler() { MessageConnectorAggregator aggregator = new MessageConnectorAggregator(this.processorBean); @@ -263,18 +236,6 @@ protected MessageConnectorAggregator createHandler() { aggregator.setOutputChannelName(this.outputChannelName); } - if (this.metrics != null) { - aggregator.configureMetrics(this.metrics); - } - - if (this.statsEnabled != null) { - aggregator.setStatsEnabled(this.statsEnabled); - } - - if (this.countsEnabled != null) { - aggregator.setCountsEnabled(this.countsEnabled); - } - if (this.lockRegistry != null) { aggregator.setLockRegistry(this.lockRegistry); } @@ -326,7 +287,7 @@ protected MessageConnectorAggregator createHandler() { if (this.completeGroupsWhenEmpty != null) { aggregator.setCompleteGroupsWhenEmpty(this.completeGroupsWhenEmpty); } - + if (this.popSequence != null) { aggregator.setPopSequence(this.popSequence); } diff --git a/activiti-cloud-messages-service/starters/hazelcast/pom.xml b/activiti-cloud-messages-service/starters/hazelcast/pom.xml index 6f8e1913fc..6f10805b2d 100644 --- a/activiti-cloud-messages-service/starters/hazelcast/pom.xml +++ b/activiti-cloud-messages-service/starters/hazelcast/pom.xml @@ -9,8 +9,8 @@ activiti-cloud-starter-messages-hazelcast - 2.0.0.RELEASE - 3.12.4 + 3.0.0 + 4.0.3 diff --git a/activiti-cloud-modeling-service/activiti-cloud-services-modeling/activiti-cloud-services-modeling-rest/pom.xml b/activiti-cloud-modeling-service/activiti-cloud-services-modeling/activiti-cloud-services-modeling-rest/pom.xml index d6b5cede50..9394c5dbc7 100644 --- a/activiti-cloud-modeling-service/activiti-cloud-services-modeling/activiti-cloud-services-modeling-rest/pom.xml +++ b/activiti-cloud-modeling-service/activiti-cloud-services-modeling/activiti-cloud-services-modeling-rest/pom.xml @@ -10,6 +10,10 @@ activiti-cloud-services-modeling-rest Activiti Cloud Services :: Modeling REST + + org.activiti.cloud + activiti-cloud-service-common-config + org.activiti.cloud activiti-cloud-services-modeling-core diff --git a/activiti-cloud-modeling-service/activiti-cloud-starter-modeling/pom.xml b/activiti-cloud-modeling-service/activiti-cloud-starter-modeling/pom.xml index 06c3801dc9..704daedab2 100644 --- a/activiti-cloud-modeling-service/activiti-cloud-starter-modeling/pom.xml +++ b/activiti-cloud-modeling-service/activiti-cloud-starter-modeling/pom.xml @@ -11,6 +11,10 @@ activiti-cloud-starter-modeling Activiti Cloud Starter :: Modeling + + org.activiti.cloud + activiti-cloud-service-common-config + org.activiti.cloud activiti-cloud-services-modeling-api diff --git a/activiti-cloud-notifications-graphql-service/services/events/pom.xml b/activiti-cloud-notifications-graphql-service/services/events/pom.xml index 2e96897c38..38817a41d9 100644 --- a/activiti-cloud-notifications-graphql-service/services/events/pom.xml +++ b/activiti-cloud-notifications-graphql-service/services/events/pom.xml @@ -74,5 +74,9 @@ spring-boot-configuration-processor true + + io.projectreactor.addons + reactor-extra + diff --git a/activiti-cloud-notifications-graphql-service/services/events/src/main/java/org/activiti/cloud/services/notifications/graphql/events/consumer/EngineEventsConsumerAutoConfiguration.java b/activiti-cloud-notifications-graphql-service/services/events/src/main/java/org/activiti/cloud/services/notifications/graphql/events/consumer/EngineEventsConsumerAutoConfiguration.java index 6ff513b215..4e43f9098c 100644 --- a/activiti-cloud-notifications-graphql-service/services/events/src/main/java/org/activiti/cloud/services/notifications/graphql/events/consumer/EngineEventsConsumerAutoConfiguration.java +++ b/activiti-cloud-notifications-graphql-service/services/events/src/main/java/org/activiti/cloud/services/notifications/graphql/events/consumer/EngineEventsConsumerAutoConfiguration.java @@ -39,7 +39,7 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.FluxSink; -import reactor.core.publisher.TopicProcessor; +import reactor.extra.processor.TopicProcessor; /** * Notification Gateway configuration that enables messaging channel bindings @@ -51,7 +51,7 @@ @EnableConfigurationProperties(EngineEventsConsumerProperties.class) @ConditionalOnProperty(name = "spring.activiti.cloud.services.notifications.graphql.events.enabled", matchIfMissing = true) @PropertySources({ - @PropertySource(value = "classpath:META-INF/graphql-events.properties"), + @PropertySource(value = "classpath:META-INF/graphql-events.properties"), @PropertySource(value = "classpath:graphql-events.properties", ignoreResourceNotFound = true) }) public class EngineEventsConsumerAutoConfiguration { @@ -88,7 +88,7 @@ public EngineEventsConsumerMessageHandler engineEventsMessageHandler(Transformer } } - + @Configuration public static class EngineEventsFluxProcessorConfiguration implements SmartLifecycle { @@ -142,5 +142,5 @@ public boolean isRunning() { return running; } } - + } diff --git a/activiti-cloud-notifications-graphql-service/services/ws/src/main/java/org/activiti/cloud/services/notifications/graphql/ws/config/GraphQLWebSocketMessageBrokerAutoConfiguration.java b/activiti-cloud-notifications-graphql-service/services/ws/src/main/java/org/activiti/cloud/services/notifications/graphql/ws/config/GraphQLWebSocketMessageBrokerAutoConfiguration.java index 3db83e3c1a..c05eb80cf8 100644 --- a/activiti-cloud-notifications-graphql-service/services/ws/src/main/java/org/activiti/cloud/services/notifications/graphql/ws/config/GraphQLWebSocketMessageBrokerAutoConfiguration.java +++ b/activiti-cloud-notifications-graphql-service/services/ws/src/main/java/org/activiti/cloud/services/notifications/graphql/ws/config/GraphQLWebSocketMessageBrokerAutoConfiguration.java @@ -15,8 +15,6 @@ */ package org.activiti.cloud.services.notifications.graphql.ws.config; -import graphql.GraphQL; -import graphql.schema.GraphQLSchema; import org.activiti.cloud.services.notifications.graphql.ws.transport.GraphQLBrokerMessageHandler; import org.activiti.cloud.services.notifications.graphql.ws.transport.GraphQLBrokerSubProtocolHandler; import org.activiti.cloud.services.notifications.graphql.ws.transport.GraphQLSubscriptionExecutor; @@ -30,6 +28,7 @@ import org.springframework.messaging.MessageHandler; import org.springframework.messaging.SubscribableChannel; import org.springframework.messaging.simp.config.MessageBrokerRegistry; +import org.springframework.messaging.support.AbstractSubscribableChannel; import org.springframework.scheduling.TaskScheduler; import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration; @@ -41,6 +40,9 @@ import org.springframework.web.socket.server.support.DefaultHandshakeHandler; import org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor; +import graphql.GraphQL; +import graphql.schema.GraphQLSchema; + @Configuration @ConditionalOnWebApplication @ConditionalOnClass({GraphQL.class, EnableWebSocketMessageBroker.class}) @@ -98,9 +100,11 @@ public MessageHandler graphQLBrokerMessageHandler(SubscribableChannel clientInbo @Override @Bean @ConditionalOnMissingBean(SubProtocolWebSocketHandler.class) - public WebSocketHandler subProtocolWebSocketHandler() { - SubProtocolWebSocketHandler handler = new SubProtocolWebSocketHandler(clientInboundChannel(), - clientOutboundChannel()); + public WebSocketHandler subProtocolWebSocketHandler(AbstractSubscribableChannel clientInboundChannel, + AbstractSubscribableChannel clientOutboundChannel) { + SubProtocolWebSocketHandler handler = new SubProtocolWebSocketHandler(clientInboundChannel, + clientOutboundChannel); + handler.addProtocolHandler(graphQLBrokerSubProtocolHandler()); handler.setDefaultProtocolHandler(graphQLBrokerSubProtocolHandler()); diff --git a/activiti-cloud-notifications-graphql-service/starter/src/test/java/org/activiti/cloud/notifications/graphql/starter/ActivitiGraphQLStarterIT.java b/activiti-cloud-notifications-graphql-service/starter/src/test/java/org/activiti/cloud/notifications/graphql/starter/ActivitiGraphQLStarterIT.java index d9e706fac3..410fbb306e 100644 --- a/activiti-cloud-notifications-graphql-service/starter/src/test/java/org/activiti/cloud/notifications/graphql/starter/ActivitiGraphQLStarterIT.java +++ b/activiti-cloud-notifications-graphql-service/starter/src/test/java/org/activiti/cloud/notifications/graphql/starter/ActivitiGraphQLStarterIT.java @@ -15,11 +15,8 @@ */ package org.activiti.cloud.notifications.graphql.starter; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.introproventures.graphql.jpa.query.web.GraphQLController.GraphQLQueryRequest; +import static org.assertj.core.api.Assertions.assertThat; + import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; @@ -29,6 +26,7 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.concurrent.TimeoutException; + import org.activiti.api.runtime.model.impl.BPMNMessageImpl; import org.activiti.api.runtime.model.impl.BPMNSignalImpl; import org.activiti.api.runtime.model.impl.BPMNTimerImpl; @@ -66,7 +64,6 @@ import org.activiti.cloud.services.test.containers.RabbitMQContainerApplicationInitializer; import org.activiti.cloud.services.test.identity.keycloak.interceptor.KeycloakTokenProducer; import org.apache.groovy.util.Maps; -import static org.assertj.core.api.Assertions.assertThat; import org.assertj.core.util.Arrays; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -84,11 +81,17 @@ import org.springframework.http.ResponseEntity; import org.springframework.messaging.support.MessageBuilder; import org.springframework.test.context.ContextConfiguration; + +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.introproventures.graphql.jpa.query.web.GraphQLController.GraphQLQueryRequest; import reactor.core.publisher.Mono; import reactor.core.publisher.ReplayProcessor; -import reactor.netty.NettyPipeline; import reactor.netty.http.client.HttpClient; import reactor.netty.http.client.HttpClient.WebsocketSender; +import reactor.netty.http.client.WebsocketClientSpec; import reactor.test.StepVerifier; @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @@ -104,7 +107,9 @@ public class ActivitiGraphQLStarterIT { private static final String GRAPHQL_URL = "/graphql"; private static final Duration TIMEOUT = Duration.ofMillis(20000); - + private static final WebsocketClientSpec graphqlWsClientSpec = WebsocketClientSpec.builder() + .protocols(GRAPHQL_WS) + .build(); @LocalServerPort private String port; @@ -159,7 +164,7 @@ public void testGraphqlWsSubprotocolConnectionInitXAuthorizationSupported() thro HttpClient.create() .baseUrl("ws://localhost:" + port) .wiretap(true) - .websocket(GRAPHQL_WS) + .websocket(graphqlWsClientSpec) .uri(WS_GRAPHQL_URI) .handle((i, o) -> { o.sendString(Mono.just(initMessage)) @@ -255,7 +260,7 @@ public void testGraphqlWsSubprotocolServerStartStopSubscription() throws JsonPro .baseUrl("ws://localhost:" + port) .wiretap(true) .headers(h -> h.add(AUTHORIZATION, auth)) - .websocket(GRAPHQL_WS) + .websocket(graphqlWsClientSpec) .uri(WS_GRAPHQL_URI); // start subscription @@ -347,7 +352,7 @@ public void testGraphqlSubscriptionPROCESS_DEPLOYED() throws JsonProcessingExcep .baseUrl("ws://localhost:" + port) .wiretap(true) .headers(h -> h.add(AUTHORIZATION, auth)) - .websocket(GRAPHQL_WS) + .websocket(graphqlWsClientSpec) .uri(WS_GRAPHQL_URI); // start subscription @@ -441,7 +446,7 @@ public void testGraphqlSubscriptionSIGNAL_RECEIVED() throws JsonProcessingExcept .baseUrl("ws://localhost:" + port) .wiretap(true) .headers(h -> h.add(AUTHORIZATION, auth)) - .websocket(GRAPHQL_WS) + .websocket(graphqlWsClientSpec) .uri(WS_GRAPHQL_URI); // start subscription @@ -539,7 +544,7 @@ public void testGraphqlSubscriptionShouldFilterEmptyResults() throws JsonProcess .baseUrl("ws://localhost:" + port) .wiretap(true) .headers(h -> h.add(AUTHORIZATION, auth)) - .websocket(GRAPHQL_WS) + .websocket(graphqlWsClientSpec) .uri(WS_GRAPHQL_URI); // start subscription @@ -724,7 +729,7 @@ public void testGraphqlSubscriptionCloudBPMNTimerEvents() throws JsonProcessingE .baseUrl("ws://localhost:" + port) .wiretap(true) .headers(h -> h.add(AUTHORIZATION, auth)) - .websocket(GRAPHQL_WS) + .websocket(graphqlWsClientSpec) .uri(WS_GRAPHQL_URI); // start subscription @@ -890,7 +895,7 @@ public void testGraphqlSubscriptionCloudBPMNMessageEvents() throws JsonProcessin .baseUrl("ws://localhost:" + port) .wiretap(true) .headers(h -> h.add(AUTHORIZATION, auth)) - .websocket(GRAPHQL_WS) + .websocket(graphqlWsClientSpec) .uri(WS_GRAPHQL_URI); // start subscription @@ -968,7 +973,7 @@ public void testGraphqlWsSubprotocolServerWithUserRoleNotAuthorized() HttpClient.create() .baseUrl("ws://localhost:" + port) .wiretap(true) - .websocket(GRAPHQL_WS) + .websocket(graphqlWsClientSpec) .uri(WS_GRAPHQL_URI) .handle((i, o) -> { o.sendString(Mono.just(initMessage)) @@ -1004,7 +1009,7 @@ public void testGraphqlWsSubprotocolServerUnauthorized() throws JsonProcessingEx .baseUrl("ws://localhost:" + port) .wiretap(true) //.headers(h -> h.add(AUTHORIZATION, auth)) // Anonymous request - .websocket(GRAPHQL_WS) + .websocket(graphqlWsClientSpec) .uri(WS_GRAPHQL_URI) .handle((i, o) -> { o.sendString(Mono.just(initMessage)) diff --git a/activiti-cloud-notifications-graphql-service/starter/src/test/java/org/activiti/cloud/notifications/graphql/test/EngineEventsMessageProducer.java b/activiti-cloud-notifications-graphql-service/starter/src/test/java/org/activiti/cloud/notifications/graphql/test/EngineEventsMessageProducer.java index f1a7ce17eb..d07b60dd4f 100644 --- a/activiti-cloud-notifications-graphql-service/starter/src/test/java/org/activiti/cloud/notifications/graphql/test/EngineEventsMessageProducer.java +++ b/activiti-cloud-notifications-graphql-service/starter/src/test/java/org/activiti/cloud/notifications/graphql/test/EngineEventsMessageProducer.java @@ -15,8 +15,12 @@ */ package org.activiti.cloud.notifications.graphql.test; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.stream.annotation.EnableBinding; @@ -25,37 +29,35 @@ import org.springframework.messaging.MessageChannel; import org.springframework.messaging.support.MessageBuilder; import org.springframework.stereotype.Component; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; import reactor.core.Disposable; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; import reactor.util.context.Context; - -import java.io.IOException; -import java.time.Duration; -import java.util.List; -import java.util.Map; -import java.util.concurrent.atomic.AtomicInteger; +import reactor.util.retry.RetrySpec; @Component @EnableBinding(EngineEventsMessageProducer.EngineEvents.class) public class EngineEventsMessageProducer implements SmartLifecycle { - + public static final String ENGINE_EVENTS_PRODUCER = "engineEventsOutput"; - - + + private static final Logger logger = LoggerFactory.getLogger(EngineEventsMessageProducer.class); - + public interface EngineEvents { @Output(ENGINE_EVENTS_PRODUCER) MessageChannel output(); - } + } private final EngineEvents producerChannels; - + private Disposable control; - + public EngineEventsMessageProducer(EngineEvents producerChannels) { this.producerChannels = producerChannels; } @@ -63,7 +65,7 @@ public EngineEventsMessageProducer(EngineEvents producerChannels) { @Override public void start() { List> events; - + try { events = new ObjectMapper().readValue(json, new TypeReference>>(){}); @@ -76,7 +78,7 @@ public void start() { .build())) .doOnNext(producerChannels.output()::send) .doOnError(e -> logger.error("Error during processing: ", e)) - .retryBackoff(Integer.MAX_VALUE, Duration.ofSeconds(1)) + .retryWhen(RetrySpec.backoff(Integer.MAX_VALUE, Duration.ofSeconds(1))) .doOnEach(signal -> signal.getContext().get(AtomicInteger.class).getAndIncrement()) .subscriberContext(Context.of(AtomicInteger.class, new AtomicInteger())) .subscribe(); @@ -88,357 +90,357 @@ public void start() { @Override public void stop() { control.dispose(); - + } @Override public boolean isRunning() { return (control != null && !control.isDisposed()); } - -// // Does not recover on RabbitMq restart + +// // Does not recover on RabbitMq restart // @StreamEmitter // @Output("producer") // public void emit(FluxSender output) throws JsonParseException, JsonMappingException, IOException { // List> events = new ObjectMapper().readValue(json, new TypeReference>>(){}); -// +// // output.send(Flux.interval(Duration.ofMillis(0), Duration.ofMillis(1000), Schedulers.single()) // .map(interval -> MessageBuilder.withPayload(events) // .setHeader("routingKey", String.valueOf(interval)) // .build())); // } - + private static String json = - "[ \r\n" + - " { \r\n" + - " \"eventType\":\"PROCESS_CREATED\",\r\n" + - " \"id\":\"ebe2cb3b-c9ea-4d22-9c01-57c363405617\",\r\n" + - " \"timestamp\":1545701139583,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"id\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"initiator\":\"hruser\",\r\n" + - " \"startDate\":\"2018-12-25T01:25:39.583+0000\",\r\n" + - " \"status\":\"RUNNING\",\r\n" + - " \"processDefinitionVersion\":1\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\"\r\n" + - " },\r\n" + - " { \r\n" + - " \"eventType\":\"VARIABLE_CREATED\",\r\n" + - " \"id\":\"0b127388-3a2e-4b32-a19c-5de775fafa8f\",\r\n" + - " \"timestamp\":1545701139583,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"name\":\"firstName\",\r\n" + - " \"type\":\"string\",\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"value\":\"Paulo\",\r\n" + - " \"taskVariable\":false\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"firstName\"\r\n" + - " },\r\n" + - " { \r\n" + - " \"eventType\":\"VARIABLE_CREATED\",\r\n" + - " \"id\":\"19b30145-8109-424b-9437-2f0fbb07031e\",\r\n" + - " \"timestamp\":1545701139583,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"name\":\"lastName\",\r\n" + - " \"type\":\"string\",\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"value\":\"Silva\",\r\n" + - " \"taskVariable\":false\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"lastName\"\r\n" + - " },\r\n" + - " { \r\n" + - " \"eventType\":\"VARIABLE_CREATED\",\r\n" + - " \"id\":\"f743f526-34a1-45b1-b040-7c94ca742c58\",\r\n" + - " \"timestamp\":1545701139583,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"name\":\"age\",\r\n" + - " \"type\":\"integer\",\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"value\":25,\r\n" + - " \"taskVariable\":false\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"age\"\r\n" + - " },\r\n" + - " { \r\n" + - " \"eventType\":\"PROCESS_STARTED\",\r\n" + - " \"id\":\"743aa709-2450-42c4-ac53-b4f2ac92e558\",\r\n" + - " \"timestamp\":1545701139583,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"id\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"initiator\":\"hruser\",\r\n" + - " \"startDate\":\"2018-12-25T01:25:39.583+0000\",\r\n" + - " \"status\":\"RUNNING\",\r\n" + - " \"processDefinitionVersion\":1\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\"\r\n" + - " },\r\n" + - " { \r\n" + - " \"eventType\":\"ACTIVITY_STARTED\",\r\n" + - " \"id\":\"c57c3f3c-b54a-4312-be70-73662cf4a79d\",\r\n" + - " \"timestamp\":1545701139583,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"elementId\":\"startEvent1\",\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"activityType\":\"startEvent\"\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"startEvent1\"\r\n" + - " },\r\n" + - " { \r\n" + - " \"eventType\":\"ACTIVITY_COMPLETED\",\r\n" + - " \"id\":\"73811f1b-2d77-4558-846a-8ae0327e844a\",\r\n" + - " \"timestamp\":1545701139583,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"elementId\":\"startEvent1\",\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"activityType\":\"startEvent\"\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"startEvent1\"\r\n" + - " },\r\n" + - " { \r\n" + - " \"eventType\":\"SEQUENCE_FLOW_TAKEN\",\r\n" + - " \"id\":\"0dfb8430-86a5-4932-8d40-1ae45cc46ae1\",\r\n" + - " \"timestamp\":1545701139583,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"elementId\":\"sid-68945AF1-396F-4B8A-B836-FC318F62313F\",\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"sourceActivityElementId\":\"startEvent1\",\r\n" + - " \"sourceActivityType\":\"org.activiti.bpmn.model.StartEvent\",\r\n" + - " \"targetActivityElementId\":\"sid-CDFE7219-4627-43E9-8CA8-866CC38EBA94\",\r\n" + - " \"targetActivityName\":\"Perform action\",\r\n" + - " \"targetActivityType\":\"org.activiti.bpmn.model.UserTask\"\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"sid-68945AF1-396F-4B8A-B836-FC318F62313F\"\r\n" + - " },\r\n" + - " { \r\n" + - " \"eventType\":\"ACTIVITY_STARTED\",\r\n" + - " \"id\":\"56e3b7d3-61f7-4918-a729-2b9e3205bde2\",\r\n" + - " \"timestamp\":1545701139583,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"elementId\":\"sid-CDFE7219-4627-43E9-8CA8-866CC38EBA94\",\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"activityName\":\"Perform action\",\r\n" + - " \"activityType\":\"userTask\"\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"sid-CDFE7219-4627-43E9-8CA8-866CC38EBA94\"\r\n" + - " },\r\n" + - " { \r\n" + - " \"eventType\":\"VARIABLE_CREATED\",\r\n" + - " \"id\":\"36c3ef0a-af93-4181-8a83-a389b09c1c47\",\r\n" + - " \"timestamp\":1545701139584,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"name\":\"firstName\",\r\n" + - " \"type\":\"string\",\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"value\":\"Paulo\",\r\n" + - " \"taskId\":\"fd0b08e0-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"taskVariable\":true\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"firstName\"\r\n" + - " },\r\n" + - " { \r\n" + - " \"eventType\":\"VARIABLE_CREATED\",\r\n" + - " \"id\":\"219cb834-88f3-461b-bcb7-61876b0a882c\",\r\n" + - " \"timestamp\":1545701139584,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"name\":\"lastName\",\r\n" + - " \"type\":\"string\",\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"value\":\"Silva\",\r\n" + - " \"taskId\":\"fd0b08e0-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"taskVariable\":true\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"lastName\"\r\n" + - " },\r\n" + - " { \r\n" + - " \"eventType\":\"VARIABLE_CREATED\",\r\n" + - " \"id\":\"fa844c56-8081-4b28-b683-01b172406f17\",\r\n" + - " \"timestamp\":1545701139584,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"name\":\"age\",\r\n" + - " \"type\":\"integer\",\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"value\":25,\r\n" + - " \"taskId\":\"fd0b08e0-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"taskVariable\":true\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"age\"\r\n" + - " },\r\n" + - " { \r\n" + - " \"eventType\":\"TASK_CANDIDATE_GROUP_ADDED\",\r\n" + - " \"id\":\"ce5bc8ec-f3d1-424f-a683-914a58213630\",\r\n" + - " \"timestamp\":1545701139585,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"taskId\":\"fd0b08e0-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"groupId\":\"hr\"\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"hr\"\r\n" + - " },\r\n" + - " { \r\n" + - " \"eventType\":\"TASK_CREATED\",\r\n" + - " \"id\":\"cf639247-bdd9-4f9f-99ba-1efec7d301d3\",\r\n" + - " \"timestamp\":1545701139585,\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + - " \"processDefinitionVersion\":1,\r\n" + - " \"entity\":{ \r\n" + - " \"id\":\"fd0b08e0-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"name\":\"Perform action\",\r\n" + - " \"status\":\"CREATED\",\r\n" + - " \"createdDate\":\"2018-12-25T01:25:39.583+0000\",\r\n" + - " \"priority\":50,\r\n" + - " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + - " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\"\r\n" + - " },\r\n" + - " \"appName\":\"default-app\",\r\n" + - " \"serviceFullName\":\"rb-my-app\",\r\n" + - " \"appVersion\":\"\",\r\n" + - " \"serviceName\":\"rb-my-app\",\r\n" + - " \"serviceVersion\":\"\",\r\n" + - " \"serviceType\":\"runtime-bundle\",\r\n" + - " \"entityId\":\"fd0b08e0-07e3-11e9-a0d3-0a580a2c00cd\"\r\n" + - " }\r\n" + + "[ \r\n" + + " { \r\n" + + " \"eventType\":\"PROCESS_CREATED\",\r\n" + + " \"id\":\"ebe2cb3b-c9ea-4d22-9c01-57c363405617\",\r\n" + + " \"timestamp\":1545701139583,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"id\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"initiator\":\"hruser\",\r\n" + + " \"startDate\":\"2018-12-25T01:25:39.583+0000\",\r\n" + + " \"status\":\"RUNNING\",\r\n" + + " \"processDefinitionVersion\":1\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\"\r\n" + + " },\r\n" + + " { \r\n" + + " \"eventType\":\"VARIABLE_CREATED\",\r\n" + + " \"id\":\"0b127388-3a2e-4b32-a19c-5de775fafa8f\",\r\n" + + " \"timestamp\":1545701139583,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"name\":\"firstName\",\r\n" + + " \"type\":\"string\",\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"value\":\"Paulo\",\r\n" + + " \"taskVariable\":false\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"firstName\"\r\n" + + " },\r\n" + + " { \r\n" + + " \"eventType\":\"VARIABLE_CREATED\",\r\n" + + " \"id\":\"19b30145-8109-424b-9437-2f0fbb07031e\",\r\n" + + " \"timestamp\":1545701139583,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"name\":\"lastName\",\r\n" + + " \"type\":\"string\",\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"value\":\"Silva\",\r\n" + + " \"taskVariable\":false\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"lastName\"\r\n" + + " },\r\n" + + " { \r\n" + + " \"eventType\":\"VARIABLE_CREATED\",\r\n" + + " \"id\":\"f743f526-34a1-45b1-b040-7c94ca742c58\",\r\n" + + " \"timestamp\":1545701139583,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"name\":\"age\",\r\n" + + " \"type\":\"integer\",\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"value\":25,\r\n" + + " \"taskVariable\":false\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"age\"\r\n" + + " },\r\n" + + " { \r\n" + + " \"eventType\":\"PROCESS_STARTED\",\r\n" + + " \"id\":\"743aa709-2450-42c4-ac53-b4f2ac92e558\",\r\n" + + " \"timestamp\":1545701139583,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"id\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"initiator\":\"hruser\",\r\n" + + " \"startDate\":\"2018-12-25T01:25:39.583+0000\",\r\n" + + " \"status\":\"RUNNING\",\r\n" + + " \"processDefinitionVersion\":1\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\"\r\n" + + " },\r\n" + + " { \r\n" + + " \"eventType\":\"ACTIVITY_STARTED\",\r\n" + + " \"id\":\"c57c3f3c-b54a-4312-be70-73662cf4a79d\",\r\n" + + " \"timestamp\":1545701139583,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"elementId\":\"startEvent1\",\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"activityType\":\"startEvent\"\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"startEvent1\"\r\n" + + " },\r\n" + + " { \r\n" + + " \"eventType\":\"ACTIVITY_COMPLETED\",\r\n" + + " \"id\":\"73811f1b-2d77-4558-846a-8ae0327e844a\",\r\n" + + " \"timestamp\":1545701139583,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"elementId\":\"startEvent1\",\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"activityType\":\"startEvent\"\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"startEvent1\"\r\n" + + " },\r\n" + + " { \r\n" + + " \"eventType\":\"SEQUENCE_FLOW_TAKEN\",\r\n" + + " \"id\":\"0dfb8430-86a5-4932-8d40-1ae45cc46ae1\",\r\n" + + " \"timestamp\":1545701139583,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"elementId\":\"sid-68945AF1-396F-4B8A-B836-FC318F62313F\",\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"sourceActivityElementId\":\"startEvent1\",\r\n" + + " \"sourceActivityType\":\"org.activiti.bpmn.model.StartEvent\",\r\n" + + " \"targetActivityElementId\":\"sid-CDFE7219-4627-43E9-8CA8-866CC38EBA94\",\r\n" + + " \"targetActivityName\":\"Perform action\",\r\n" + + " \"targetActivityType\":\"org.activiti.bpmn.model.UserTask\"\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"sid-68945AF1-396F-4B8A-B836-FC318F62313F\"\r\n" + + " },\r\n" + + " { \r\n" + + " \"eventType\":\"ACTIVITY_STARTED\",\r\n" + + " \"id\":\"56e3b7d3-61f7-4918-a729-2b9e3205bde2\",\r\n" + + " \"timestamp\":1545701139583,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"elementId\":\"sid-CDFE7219-4627-43E9-8CA8-866CC38EBA94\",\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"activityName\":\"Perform action\",\r\n" + + " \"activityType\":\"userTask\"\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"sid-CDFE7219-4627-43E9-8CA8-866CC38EBA94\"\r\n" + + " },\r\n" + + " { \r\n" + + " \"eventType\":\"VARIABLE_CREATED\",\r\n" + + " \"id\":\"36c3ef0a-af93-4181-8a83-a389b09c1c47\",\r\n" + + " \"timestamp\":1545701139584,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"name\":\"firstName\",\r\n" + + " \"type\":\"string\",\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"value\":\"Paulo\",\r\n" + + " \"taskId\":\"fd0b08e0-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"taskVariable\":true\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"firstName\"\r\n" + + " },\r\n" + + " { \r\n" + + " \"eventType\":\"VARIABLE_CREATED\",\r\n" + + " \"id\":\"219cb834-88f3-461b-bcb7-61876b0a882c\",\r\n" + + " \"timestamp\":1545701139584,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"name\":\"lastName\",\r\n" + + " \"type\":\"string\",\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"value\":\"Silva\",\r\n" + + " \"taskId\":\"fd0b08e0-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"taskVariable\":true\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"lastName\"\r\n" + + " },\r\n" + + " { \r\n" + + " \"eventType\":\"VARIABLE_CREATED\",\r\n" + + " \"id\":\"fa844c56-8081-4b28-b683-01b172406f17\",\r\n" + + " \"timestamp\":1545701139584,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"name\":\"age\",\r\n" + + " \"type\":\"integer\",\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"value\":25,\r\n" + + " \"taskId\":\"fd0b08e0-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"taskVariable\":true\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"age\"\r\n" + + " },\r\n" + + " { \r\n" + + " \"eventType\":\"TASK_CANDIDATE_GROUP_ADDED\",\r\n" + + " \"id\":\"ce5bc8ec-f3d1-424f-a683-914a58213630\",\r\n" + + " \"timestamp\":1545701139585,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"taskId\":\"fd0b08e0-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"groupId\":\"hr\"\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"hr\"\r\n" + + " },\r\n" + + " { \r\n" + + " \"eventType\":\"TASK_CREATED\",\r\n" + + " \"id\":\"cf639247-bdd9-4f9f-99ba-1efec7d301d3\",\r\n" + + " \"timestamp\":1545701139585,\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processDefinitionKey\":\"SimpleProcess\",\r\n" + + " \"processDefinitionVersion\":1,\r\n" + + " \"entity\":{ \r\n" + + " \"id\":\"fd0b08e0-07e3-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"name\":\"Perform action\",\r\n" + + " \"status\":\"CREATED\",\r\n" + + " \"createdDate\":\"2018-12-25T01:25:39.583+0000\",\r\n" + + " \"priority\":50,\r\n" + + " \"processDefinitionId\":\"SimpleProcess:1:715f2fd2-07b1-11e9-a0d3-0a580a2c00cd\",\r\n" + + " \"processInstanceId\":\"fd0ae1ca-07e3-11e9-a0d3-0a580a2c00cd\"\r\n" + + " },\r\n" + + " \"appName\":\"default-app\",\r\n" + + " \"serviceFullName\":\"rb-my-app\",\r\n" + + " \"appVersion\":\"\",\r\n" + + " \"serviceName\":\"rb-my-app\",\r\n" + + " \"serviceVersion\":\"\",\r\n" + + " \"serviceType\":\"runtime-bundle\",\r\n" + + " \"entityId\":\"fd0b08e0-07e3-11e9-a0d3-0a580a2c00cd\"\r\n" + + " }\r\n" + "]"; } diff --git a/activiti-cloud-runtime-bundle-service/activiti-cloud-starter-runtime-bundle/pom.xml b/activiti-cloud-runtime-bundle-service/activiti-cloud-starter-runtime-bundle/pom.xml index 38bbf08992..5407a7238e 100644 --- a/activiti-cloud-runtime-bundle-service/activiti-cloud-starter-runtime-bundle/pom.xml +++ b/activiti-cloud-runtime-bundle-service/activiti-cloud-starter-runtime-bundle/pom.xml @@ -16,6 +16,10 @@ org.activiti activiti-engine + + org.activiti.cloud + activiti-cloud-service-common-config + org.activiti.cloud activiti-cloud-services-api diff --git a/activiti-cloud-service-common/activiti-cloud-service-common-config/pom.xml b/activiti-cloud-service-common/activiti-cloud-service-common-config/pom.xml index 7c1e533a24..5b19938cbe 100644 --- a/activiti-cloud-service-common/activiti-cloud-service-common-config/pom.xml +++ b/activiti-cloud-service-common/activiti-cloud-service-common-config/pom.xml @@ -14,5 +14,9 @@ org.springframework spring-context + + com.fasterxml.jackson.core + jackson-databind + diff --git a/activiti-cloud-service-common/activiti-cloud-service-common-config/src/main/java/org/activiti/cloud/common/properties/StdDateFormatWithoutColonInTimeZone.java b/activiti-cloud-service-common/activiti-cloud-service-common-config/src/main/java/org/activiti/cloud/common/properties/StdDateFormatWithoutColonInTimeZone.java new file mode 100644 index 0000000000..540b34dfbd --- /dev/null +++ b/activiti-cloud-service-common/activiti-cloud-service-common-config/src/main/java/org/activiti/cloud/common/properties/StdDateFormatWithoutColonInTimeZone.java @@ -0,0 +1,29 @@ +/* + * Copyright 2017-2020 Alfresco Software, Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.activiti.cloud.common.properties; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +public class StdDateFormatWithoutColonInTimeZone extends StdDateFormat { + + private static final long serialVersionUID = 1L; + + public StdDateFormatWithoutColonInTimeZone() { + super(DEFAULT_TIMEZONE, DEFAULT_LOCALE, null, false); + } + + +} diff --git a/activiti-cloud-service-common/activiti-cloud-service-common-config/src/main/resources/conf/common-configuration.properties b/activiti-cloud-service-common/activiti-cloud-service-common-config/src/main/resources/conf/common-configuration.properties index fbe690b529..0b747e913a 100644 --- a/activiti-cloud-service-common/activiti-cloud-service-common-config/src/main/resources/conf/common-configuration.properties +++ b/activiti-cloud-service-common/activiti-cloud-service-common-config/src/main/resources/conf/common-configuration.properties @@ -1,2 +1,6 @@ # enable deletion endpoints -activiti.rest.enable-deletion=true \ No newline at end of file +activiti.rest.enable-deletion=true +# configure jackson Java Date format +spring.jackson.date-format=org.activiti.cloud.common.properties.StdDateFormatWithoutColonInTimeZone +server.error.include-message=always +server.error.include-binding-errors=always diff --git a/pom.xml b/pom.xml index 6b79d41e2b..b6d31576fb 100644 --- a/pom.xml +++ b/pom.xml @@ -204,6 +204,10 @@ activiti-releases https://artifacts.alfresco.com/nexus/content/repositories/activiti-releases + + activiti-snapshots + https://artifacts.alfresco.com/nexus/content/repositories/activiti-snapshots +