diff --git a/components/api/api-bpm/src/main/java/org/eclipse/dirigible/components/api/bpm/BpmFacade.java b/components/api/api-bpm/src/main/java/org/eclipse/dirigible/components/api/bpm/BpmFacade.java index 1755ba47a2f..624b5903434 100644 --- a/components/api/api-bpm/src/main/java/org/eclipse/dirigible/components/api/bpm/BpmFacade.java +++ b/components/api/api-bpm/src/main/java/org/eclipse/dirigible/components/api/bpm/BpmFacade.java @@ -53,7 +53,7 @@ public void afterPropertiesSet() throws Exception { * * @return the BPM engine object */ - public static final Object getEngine() { + public static final BpmProviderFlowable getEngine() { return BpmFacade.get() .getBpmProviderFlowable(); } diff --git a/components/api/api-modules-javascript/src/main/resources/META-INF/dirigible/modules/src/db/database.ts b/components/api/api-modules-javascript/src/main/resources/META-INF/dirigible/modules/src/db/database.ts index bd80c38ba5f..318d12f7950 100644 --- a/components/api/api-modules-javascript/src/main/resources/META-INF/dirigible/modules/src/db/database.ts +++ b/components/api/api-modules-javascript/src/main/resources/META-INF/dirigible/modules/src/db/database.ts @@ -84,7 +84,7 @@ export function getProductName(datasourceName) { return productName; }; -export function getConnection(datasourceName: string | undefined) : Connection { +export function getConnection(datasourceName?: string | undefined) : Connection { var native; if (datasourceName) { native = DatabaseFacade.getConnection(datasourceName); diff --git a/components/api/api-modules-javascript/src/main/resources/META-INF/dirigible/modules/src/http/client.ts b/components/api/api-modules-javascript/src/main/resources/META-INF/dirigible/modules/src/http/client.ts index 2f7cddb214e..8a0665d3124 100644 --- a/components/api/api-modules-javascript/src/main/resources/META-INF/dirigible/modules/src/http/client.ts +++ b/components/api/api-modules-javascript/src/main/resources/META-INF/dirigible/modules/src/http/client.ts @@ -17,7 +17,7 @@ const HttpClientFacade = Java.type("org.eclipse.dirigible.components.api.http.HttpClientFacade"); export class HttpClient { - get(_url, options) { + get(_url, options?) { let url = buildUrl(_url, options); let opts = '{}'; if (options) { @@ -111,4 +111,4 @@ export const put = httpClient.put; export const patch = httpClient.patch; export const head = httpClient.head; export const trace = httpClient.trace; -export const del = httpClient.delete; \ No newline at end of file +export const del = httpClient.delete; diff --git a/components/engine/engine-camel/src/main/java/org/eclipse/dirigible/components/engine/camel/invoke/IntegrationMessage.java b/components/engine/engine-camel/src/main/java/org/eclipse/dirigible/components/engine/camel/invoke/IntegrationMessage.java index d9affca92f5..e63d02a76ae 100644 --- a/components/engine/engine-camel/src/main/java/org/eclipse/dirigible/components/engine/camel/invoke/IntegrationMessage.java +++ b/components/engine/engine-camel/src/main/java/org/eclipse/dirigible/components/engine/camel/invoke/IntegrationMessage.java @@ -66,6 +66,25 @@ public Map getHeaders() { return message.getHeaders(); } + public Object getHeader(String headerName) { + return message.getHeader(headerName); + } + + public void setExchangeProperty(String propertyName, Object propertyValue) { + message.getExchange() + .setProperty(propertyName, propertyValue); + } + + public Object getExchangeProperty(String propertyName) { + return message.getExchange() + .getProperty(propertyName); + } + + public Map getExchangeProperties() { + return message.getExchange() + .getProperties(); + } + /** * Sets the headers. * diff --git a/tests/tests-integrations/src/test/java/org/eclipse/dirigible/integration/tests/ui/tests/BPMStarterTemplateIT.java b/tests/tests-integrations/src/test/java/org/eclipse/dirigible/integration/tests/ui/tests/BPMStarterTemplateIT.java index 037931465f9..544cb5420ca 100644 --- a/tests/tests-integrations/src/test/java/org/eclipse/dirigible/integration/tests/ui/tests/BPMStarterTemplateIT.java +++ b/tests/tests-integrations/src/test/java/org/eclipse/dirigible/integration/tests/ui/tests/BPMStarterTemplateIT.java @@ -11,6 +11,7 @@ package org.eclipse.dirigible.integration.tests.ui.tests; import ch.qos.logback.classic.Level; +import org.eclipse.dirigible.components.api.bpm.BpmFacade; import org.eclipse.dirigible.tests.FormView; import org.eclipse.dirigible.tests.IDE; import org.eclipse.dirigible.tests.WelcomeView; @@ -82,6 +83,8 @@ void testCreateProjectFromTemplate() { workbench.clickPublishAll(); ide.assertPublishedAllProjectsMessage(); + waitUntilProcessIsDeployed(); + browser.openPath(TRIGGER_PROCESS_FORM_PATH); browser.enterTextInElementById(PARAM_1_ID, PARAM_1_VALUE); browser.enterTextInElementById(PARAM_2_ID, PARAM_2_VALUE); @@ -91,4 +94,14 @@ void testCreateProjectFromTemplate() { .until(() -> consoleLogAsserter.containsMessage(EXPECTED_TASK_LOGGED_MESSAGE, Level.INFO)); } + private void waitUntilProcessIsDeployed() { + await().atMost(25, TimeUnit.SECONDS) + .until(() -> BpmFacade.getEngine() + .getProcessEngine() + .getRepositoryService() + .createDeploymentQuery() + .deploymentKeyLike("%" + TEST_PROCESS + "%") + .count() == 1); + } + } diff --git a/tests/tests-integrations/src/test/resources/logback-test.xml b/tests/tests-integrations/src/test/resources/logback-test.xml index 6d33719e1dc..f2a2a5e55ef 100644 --- a/tests/tests-integrations/src/test/resources/logback-test.xml +++ b/tests/tests-integrations/src/test/resources/logback-test.xml @@ -71,5 +71,7 @@ + +