diff --git a/.gitattributes b/.gitattributes index dc9b487b4833b8d424c7b845f0eaef6902b3fffd..ee7b116038fe0c4c64db8cd907c174133fd07b6a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -73,3 +73,7 @@ source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/distro/camunda-welco source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/distro/camunda-welcome/assets/fonts/IBMPlexSans-BoldItalic.otf filter=lfs diff=lfs merge=lfs -text source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/distro/camunda-welcome/assets/fonts/IBMPlexSans-Italic.otf filter=lfs diff=lfs merge=lfs -text source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/distro/camunda-welcome/assets/fonts/IBMPlexSans-Regular.otf filter=lfs diff=lfs merge=lfs -text +source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-Bold.otf filter=lfs diff=lfs merge=lfs -text +source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-BoldItalic.otf filter=lfs diff=lfs merge=lfs -text +source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-Italic.otf filter=lfs diff=lfs merge=lfs -text +source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-Regular.otf filter=lfs diff=lfs merge=lfs -text diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/README.md b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f513597f9bb66e35e72e25213381ab778455caf9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/README.md @@ -0,0 +1,22 @@ +REST API Jakarta +================ + +A Jakarta JAX-RS-based REST API for Camunda Platform. + +> This module copies and transforms the `camunda-engine-rest-core` module. +> It contains only implementations for classes where there are breaking changes either in the updated dependencies or due to JakartaEE. + +Running Tests +------------- + +The REST API is tested against one JAX-RS runtime: + +* Resteasy + +In order to run the tests against Resteasy, execute `mvn clean install -Presteasy`. + +Writing Tests +------------- + +See the `camunda-engine-rest-core` module's README about writing tests and add your test in that module. + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..893943e1513ddb574978816abb0bedc5e674f76c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/pom.xml @@ -0,0 +1,732 @@ + + + 4.0.0 + camunda-engine-rest-core-jakarta + Camunda Platform - engine - REST Jakarta + jar + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + + + org.camunda.bpm + camunda-engine-rest-root + ../ + 7.24.0-SNAPSHOT + + + + 38081 + 6.2.3.Final + + + + + + jakarta.platform + jakarta.jakartaee-bom + ${version.jakarta-ee-spec} + import + pom + + + org.jboss.resteasy + resteasy-bom + ${version.resteasy} + pom + import + + + + + + + + commons-fileupload + commons-fileupload + + + commons-io + commons-io + + + + + + commons-io + commons-io + + + + com.fasterxml.jackson.jakarta.rs + jackson-jakarta-rs-json-provider + + + jakarta.activation + jakarta.activation-api + + + jakarta.xml.bind + jakarta.xml.bind-api + + + + + + com.fasterxml.jackson.core + jackson-databind + + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + + + jakarta.servlet + jakarta.servlet-api + provided + + + jakarta.activation + jakarta.activation-api + provided + + + jakarta.ws.rs + jakarta.ws.rs-api + provided + + + jakarta.xml.bind + jakarta.xml.bind-api + provided + + + + org.camunda.bpm + camunda-engine + provided + + + org.springframework + spring-jcl + + + + + + org.camunda.commons + camunda-commons-logging + provided + + + + + org.camunda.bpm + camunda-bom + ${project.version} + pom + test + + + + org.camunda.bpm + camunda-core-internal-dependencies + ${project.version} + pom + test + + + + jakarta.platform + jakarta.jakartaee-bom + ${version.jakarta-ee-spec} + pom + test + + + + + junit + junit + test + + + + org.mockito + mockito-core + test + + + org.hamcrest + hamcrest-core + + + + + + io.rest-assured + rest-assured + test + + + + org.apache.httpcomponents + httpcore + test + + + + commons-codec + commons-codec + test + + + + com.h2database + h2 + test + + + + org.camunda.commons + camunda-commons-testing + test + + + + org.assertj + assertj-core + test + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + initialize + + properties + + + + + + + maven-resources-plugin + + + + copy-main-sources + generate-sources + + copy-resources + + + ${project.build.directory}/generated-sources/jakarta + + + ${basedir}/../engine-rest/src/main/java + false + + **/EmptyBodyFilter.java + + + + + + + copy-main-resources + generate-resources + + copy-resources + + + ${project.build.directory}/generated-resources/jakarta + + + ${basedir}/../engine-rest/src/main/resources + false + + + + + + + copy-test-sources + generate-test-sources + + copy-resources + + + ${project.build.directory}/generated-test-sources/jakarta + + + ${basedir}/../engine-rest/src/test/java + false + + **/TomcatServerBootstrap.java + + + + + + + copy-test-sources-resteasy + generate-test-sources + + copy-resources + + + ${project.build.directory}/generated-test-sources/jakarta-resteasy + + + ${basedir}/../engine-rest/src/test/java-resteasy + false + + **/ResteasyTomcatServerBootstrap.java + **/ResteasySpecifics.java + + + + + + + copy-test-resources + generate-test-resources + + copy-resources + + + ${project.build.directory}/generated-test-resources/jakarta + + + ${basedir}/../engine-rest/src/test/resources + true + + + + + + copy-test-resources-resteasy + generate-test-resources + + copy-resources + + + ${project.build.directory}/generated-test-resources/jakarta-resteasy + + + ${basedir}/../engine-rest/src/test/resources-resteasy + false + + + + + + + + + org.eclipse.transformer + transformer-maven-plugin + + + + transform-jakarta-sources + generate-sources + + transform + + + ${project.build.directory}/generated-sources/jakarta + + + + transform-jakarta-test-sources + generate-test-sources + + transform + + + ${project.build.directory}/generated-test-sources/jakarta + + + + + transform-jakarta-test-sources-resteasy + generate-test-sources + + transform + + + ${project.build.directory}/generated-test-sources/jakarta-resteasy + + + + transform-jakarta-test-resources-resteasy + generate-test-resources + + transform + + + ${project.build.directory}/generated-test-resources/jakarta-resteasy + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-jakarta-source + generate-sources + + add-source + + + + ${project.build.directory}/generated-sources/jakarta + + + + + add-jakarta-resource + generate-resources + + add-resource + + + + + ${project.build.directory}/generated-resources/jakarta + + + + + + add-jakarta-test-source + generate-test-sources + + add-test-source + + + + ${project.build.directory}/generated-test-sources/jakarta + + + + + add-jakarta-test-resource + generate-test-resources + + add-test-resource + + + + + ${project.build.directory}/generated-test-resources/jakarta + + + + + + + + + org.apache.maven.plugins + maven-source-plugin + + + + attach-sources + + jar + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + test-jar + + + + + + + org.apache.maven.plugins + maven-war-plugin + + false + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + ${version.resteasy} + + + + + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-maven-plugin + ${version.shrinkwrap.resolvers} + + + + propagate-execution-context + + + + + + + + + + resteasy + + true + + + + 4.1.89.Final + 2.3.0.Final + + + + + io.undertow + undertow-servlet + ${version.undertow} + test + + + org.jboss.resteasy + resteasy-core + test + + + org.jboss.resteasy + resteasy-undertow + test + + + org.jboss.resteasy + resteasy-netty4 + test + + + io.netty + netty-all + ${version.netty} + test + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-jakarta-resteasy-test-source + generate-test-sources + + add-test-source + + + + ${basedir}/src/test/java-resteasy + ${project.build.directory}/generated-test-sources/jakarta-resteasy + + + + + add-jakarta-resteasy-test-resource + generate-test-resources + + add-test-resource + + + + ${project.build.directory}/generated-test-resources/jakarta-resteasy + + + + + + + + + + + wildfly-compatibility + + + 4.1.89.Final + 2.3.0.Final + + 6.2.1.Final + + + + + io.undertow + undertow-servlet + ${version.undertow} + test + + + org.jboss.resteasy + resteasy-core + test + + + org.jboss.resteasy + resteasy-undertow + test + + + org.jboss.resteasy + resteasy-netty4 + test + + + io.netty + netty-all + ${version.netty} + test + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-jakarta-resteasy-test-source + generate-test-sources + + add-test-source + + + + ${basedir}/src/test/java-resteasy + ${project.build.directory}/generated-test-sources/jakarta-resteasy + + + + + add-jakarta-resteasy-test-resource + generate-test-resources + + add-test-resource + + + + ${project.build.directory}/generated-test-resources/jakarta-resteasy + + + + + + + + + + + below-jdk17 + + (,17) + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + **/AuthenticationFilterPathMatchingTest.java + + + + + + + + + jdk17-and-onwards + + [17,) + + + + ${version.spring.framework6} + + + + + org.springframework + spring-test + ${version.spring.framework} + test + + + org.springframework + spring-jcl + + + + + org.springframework + spring-web + ${version.spring.framework} + test + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/src/main/java/org/camunda/bpm/engine/rest/filter/EmptyBodyFilter.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/src/main/java/org/camunda/bpm/engine/rest/filter/EmptyBodyFilter.java new file mode 100644 index 0000000000000000000000000000000000000000..51231c72744196dd22e0412a863a4cd708a75d72 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/src/main/java/org/camunda/bpm/engine/rest/filter/EmptyBodyFilter.java @@ -0,0 +1,102 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.filter; + +import jakarta.servlet.ReadListener; +import jakarta.servlet.ServletInputStream; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequestWrapper; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.PushbackInputStream; +import java.io.InputStream; + +public class EmptyBodyFilter extends AbstractEmptyBodyFilter { + + @Override + public HttpServletRequestWrapper wrapRequest(HttpServletRequest req, boolean isBodyEmpty, PushbackInputStream requestBody) { + return new HttpServletRequestWrapper(req) { + + @Override + public ServletInputStream getInputStream() throws IOException { + + return new ServletInputStream() { + + final InputStream inputStream = getRequestBody(isBodyEmpty, requestBody); + boolean finished = false; + + @Override + public boolean isFinished() { + return this.finished; + } + + @Override + public boolean isReady() { + return true; + } + + @Override + public void setReadListener(final ReadListener readListener) { + throw new UnsupportedOperationException(); + } + + @Override + public int read() throws IOException { + int data = this.inputStream.read(); + if (data == -1) { + this.finished = true; + } + return data; + } + + @Override + public int available() throws IOException { + return inputStream.available(); + } + + @Override + public void close() throws IOException { + inputStream.close(); + } + + @Override + public synchronized void mark(int readlimit) { + inputStream.mark(readlimit); + } + + @Override + public synchronized void reset() throws IOException { + inputStream.reset(); + } + + @Override + public boolean markSupported() { + return inputStream.markSupported(); + } + + }; + } + + @Override + public BufferedReader getReader() throws IOException { + return EmptyBodyFilter.this.getReader(this.getInputStream()); + } + + }; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasySpecifics.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasySpecifics.java new file mode 100644 index 0000000000000000000000000000000000000000..138e39cf1ab2183d1e8e98c2534248d2daa893e2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasySpecifics.java @@ -0,0 +1,195 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import io.undertow.servlet.Servlets; +import io.undertow.servlet.api.DeploymentInfo; +import jakarta.servlet.DispatcherType; +import jakarta.ws.rs.core.Application; +import java.util.HashMap; +import java.util.Map; +import org.camunda.bpm.engine.rest.CustomJacksonDateFormatTest; +import org.camunda.bpm.engine.rest.ExceptionHandlerTest; +import org.camunda.bpm.engine.rest.application.TestCustomResourceApplication; +import org.camunda.bpm.engine.rest.security.auth.ProcessEngineAuthenticationFilter; +import org.camunda.bpm.engine.rest.standalone.NoServletAuthenticationFilterTest; +import org.camunda.bpm.engine.rest.standalone.NoServletEmptyBodyFilterTest; +import org.camunda.bpm.engine.rest.standalone.ServletAuthenticationFilterTest; +import org.camunda.bpm.engine.rest.standalone.ServletEmptyBodyFilterTest; +import org.jboss.resteasy.plugins.server.servlet.FilterDispatcher; +import org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher; +import org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap; +import org.junit.rules.ExternalResource; +import org.junit.rules.RuleChain; +import org.junit.rules.TemporaryFolder; +import org.junit.rules.TestRule; + +/** + * @author Thorben Lindhauer + */ +public class ResteasySpecifics implements ContainerSpecifics { + + protected static final TestRuleFactory DEFAULT_RULE_FACTORY = new EmbeddedServerRuleFactory(new JaxrsApplication()); + + protected static final Map, TestRuleFactory> TEST_RULE_FACTORIES = new HashMap, TestRuleFactory>(); + + static { + TEST_RULE_FACTORIES.put(ExceptionHandlerTest.class, + new EmbeddedServerRuleFactory(new TestCustomResourceApplication())); + + TEST_RULE_FACTORIES.put(ServletAuthenticationFilterTest.class, new UndertowServletContainerRuleFactory( + Servlets.deployment() + .setDeploymentName("rest-test.war") + .setContextPath("/rest-test/rest") + .setClassLoader(ResteasyUndertowServerBootstrap.class.getClassLoader()) + .addListener(Servlets.listener(ResteasyBootstrap.class)) + .addFilter(Servlets.filter("camunda-auth", ProcessEngineAuthenticationFilter.class) + .addInitParam("authentication-provider", + "org.camunda.bpm.engine.rest.security.auth.impl.HttpBasicAuthenticationProvider")) + .addFilterUrlMapping("camunda-auth", "/*", DispatcherType.REQUEST) + .addServlet(Servlets.servlet("camunda-app", HttpServletDispatcher.class) + .addMapping("/*") + .addInitParam("jakarta.ws.rs.Application", + "org.camunda.bpm.engine.rest.util.container.JaxrsApplication")))); + + TEST_RULE_FACTORIES.put(NoServletAuthenticationFilterTest.class, new UndertowServletContainerRuleFactory( + Servlets.deployment() + .setDeploymentName("rest-test.war") + .setContextPath("/rest-test/rest") + .setClassLoader(ResteasyUndertowServerBootstrap.class.getClassLoader()) + .addListener(Servlets.listener(ResteasyBootstrap.class)) + .addFilter(Servlets.filter("camunda-auth", ProcessEngineAuthenticationFilter.class) + .addInitParam("authentication-provider", + "org.camunda.bpm.engine.rest.security.auth.impl.HttpBasicAuthenticationProvider") + .addInitParam("rest-url-pattern-prefix", "")) + .addFilterUrlMapping("camunda-auth", "/*", DispatcherType.REQUEST) + .addFilter(Servlets.filter("Resteasy", FilterDispatcher.class) + .addInitParam("jakarta.ws.rs.Application", + "org.camunda.bpm.engine.rest.util.container.JaxrsApplication")) + .addFilterUrlMapping("Resteasy", "/*", DispatcherType.REQUEST))); + + TEST_RULE_FACTORIES.put(ServletEmptyBodyFilterTest.class, new UndertowServletContainerRuleFactory( + Servlets.deployment() + .setDeploymentName("rest-test.war") + .setContextPath("/rest-test/rest") + .setClassLoader(ResteasyUndertowServerBootstrap.class.getClassLoader()) + .addListener(Servlets.listener(ResteasyBootstrap.class)) + .addFilter(Servlets.filter("EmptyBodyFilter", org.camunda.bpm.engine.rest.filter.EmptyBodyFilter.class) + .addInitParam("rest-url-pattern-prefix", "")) + .addFilterUrlMapping("EmptyBodyFilter", "/*", DispatcherType.REQUEST) + .addServlet(Servlets.servlet("camunda-app", HttpServletDispatcher.class) + .addMapping("/*") + .addInitParam("jakarta.ws.rs.Application", + "org.camunda.bpm.engine.rest.util.container.JaxrsApplication")))); + + TEST_RULE_FACTORIES.put(NoServletEmptyBodyFilterTest.class, new UndertowServletContainerRuleFactory( + Servlets.deployment() + .setDeploymentName("rest-test.war") + .setContextPath("/rest-test/rest") + .setClassLoader(ResteasyUndertowServerBootstrap.class.getClassLoader()) + .addListener(Servlets.listener(ResteasyBootstrap.class)) + .addFilter(Servlets.filter("EmptyBodyFilter", org.camunda.bpm.engine.rest.filter.EmptyBodyFilter.class) + .addInitParam("rest-url-pattern-prefix", "")) + .addFilterUrlMapping("EmptyBodyFilter", "/*", DispatcherType.REQUEST) + .addFilter(Servlets.filter("Resteasy", FilterDispatcher.class) + .addInitParam("jakarta.ws.rs.Application", + "org.camunda.bpm.engine.rest.util.container.JaxrsApplication")) + .addFilterUrlMapping("Resteasy", "/*", DispatcherType.REQUEST))); + + TEST_RULE_FACTORIES.put(CustomJacksonDateFormatTest.class, new UndertowServletContainerRuleFactory( + Servlets.deployment() + .setDeploymentName("rest-test.war") + .setContextPath("/rest-test") + .setClassLoader(ResteasyUndertowServerBootstrap.class.getClassLoader()) + .addListener(Servlets.listener(ResteasyBootstrap.class)) + .addListener(Servlets.listener(org.camunda.bpm.engine.rest.CustomJacksonDateFormatListener.class)) + .addInitParameter("org.camunda.bpm.engine.rest.jackson.dateFormat", "yyyy-MM-dd'T'HH:mm:ss") + .addFilter(Servlets.filter("Resteasy", FilterDispatcher.class) + .addInitParam("jakarta.ws.rs.Application", + "org.camunda.bpm.engine.rest.util.container.JaxrsApplication")) + .addFilterUrlMapping("Resteasy", "/*", DispatcherType.REQUEST))); + } + + @Override + public TestRule getTestRule(Class testClass) { + TestRuleFactory ruleFactory = DEFAULT_RULE_FACTORY; + + if (TEST_RULE_FACTORIES.containsKey(testClass)) { + ruleFactory = TEST_RULE_FACTORIES.get(testClass); + } + + return ruleFactory.createTestRule(); + } + + public static class EmbeddedServerRuleFactory implements TestRuleFactory { + + protected Application jaxRsApplication; + + public EmbeddedServerRuleFactory(Application jaxRsApplication) { + this.jaxRsApplication = jaxRsApplication; + } + + @Override + public TestRule createTestRule() { + return new ExternalResource() { + + ResteasyServerBootstrap bootstrap = new ResteasyServerBootstrap(jaxRsApplication); + + @Override + protected void before() throws Throwable { + bootstrap.start(); + } + + @Override + protected void after() { + bootstrap.stop(); + } + }; + } + } + + public static class UndertowServletContainerRuleFactory implements TestRuleFactory { + + protected DeploymentInfo deploymentInfo; + + public UndertowServletContainerRuleFactory(DeploymentInfo deploymentInfo) { + this.deploymentInfo = deploymentInfo; + } + + @Override + public TestRule createTestRule() { + final TemporaryFolder tempFolder = new TemporaryFolder(); + + return RuleChain.outerRule(tempFolder).around(new ExternalResource() { + + final AbstractServerBootstrap bootstrap = new ResteasyUndertowServerBootstrap(deploymentInfo); + + @Override + protected void before() { + bootstrap.start(); + } + + @Override + protected void after() { + bootstrap.stop(); + } + }); + } + + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasyUndertowServerBootstrap.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasyUndertowServerBootstrap.java new file mode 100644 index 0000000000000000000000000000000000000000..cedf1ae03f9ec08b93766f93136a15352443dd51 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasyUndertowServerBootstrap.java @@ -0,0 +1,66 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import io.undertow.servlet.api.DeploymentInfo; +import java.net.BindException; +import java.util.Properties; +import org.jboss.resteasy.plugins.server.undertow.UndertowJaxrsServer; + +public class ResteasyUndertowServerBootstrap extends AbstractServerBootstrap { + + protected UndertowJaxrsServer server; + protected DeploymentInfo deploymentInfo; + + public ResteasyUndertowServerBootstrap(DeploymentInfo deploymentInfo) { + this.deploymentInfo = deploymentInfo; + setupServer(); + } + + @Override + public void stop() { + this.server.stop(); + } + + @Override + protected void startServer(int startUpRetries) { + try { + this.server.start(); + } catch (Exception e) { + if ((e instanceof BindException || e.getCause() instanceof BindException) && startUpRetries > 0) { + stop(); + try { + Thread.sleep(1500L); + } catch (Exception ex) { + } + setupServer(); + startServer(--startUpRetries); + } else { + throw new ServerBootstrapException(e); + } + } + } + + protected void setupServer() { + Properties serverProperties = readProperties(); + int port = Integer.parseInt(serverProperties.getProperty(PORT_PROPERTY)); + + this.server = new UndertowJaxrsServer(); + this.server.setPort(port); + this.server.deploy(this.deploymentInfo); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/src/test/resources/META-INF/services/org.camunda.bpm.engine.rest.spi.ProcessEngineProvider b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/src/test/resources/META-INF/services/org.camunda.bpm.engine.rest.spi.ProcessEngineProvider new file mode 100644 index 0000000000000000000000000000000000000000..7710b5d5d9e72fe41e6e3c15b51e6dfafaad59eb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-jakarta/src/test/resources/META-INF/services/org.camunda.bpm.engine.rest.spi.ProcessEngineProvider @@ -0,0 +1 @@ +org.camunda.bpm.engine.rest.spi.impl.MockedProcessEngineProvider \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi-generator/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi-generator/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..6ffbac511d9088a002f6dd8da7e65dd95b88b700 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi-generator/pom.xml @@ -0,0 +1,50 @@ + + 4.0.0 + camunda-engine-rest-openapi-generator + Camunda Platform - engine - REST - OpenAPI (JSON Generator) + jar + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + + + org.camunda.bpm + camunda-engine-rest-root + ../ + 7.24.0-SNAPSHOT + + + + 1.0.76 + + + + + + org.freemarker + freemarker + + + + + com.google.code.gson + gson + + + + + commons-io + commons-io + + + + + com.networknt + json-schema-validator + ${version.json-schema-validator} + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi-generator/src/main/java/org/camunda/bpm/engine/rest/openapi/generator/impl/SchemaValidator.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi-generator/src/main/java/org/camunda/bpm/engine/rest/openapi/generator/impl/SchemaValidator.java new file mode 100644 index 0000000000000000000000000000000000000000..d04aabe8200ffea08124a0af4f6fb49fcf0e4e60 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi-generator/src/main/java/org/camunda/bpm/engine/rest/openapi/generator/impl/SchemaValidator.java @@ -0,0 +1,55 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.openapi.generator.impl; + +import java.io.File; +import java.util.Set; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.networknt.schema.JsonSchema; +import com.networknt.schema.JsonSchemaFactory; +import com.networknt.schema.ValidationMessage; + +public class SchemaValidator { + public static void main(String[] args) throws Exception { + if (args.length != 2) { + throw new RuntimeException("Must provide two arguments: "); + } + + String jsonSchemaPath = args[0]; + String inputFile = args[1]; + + ObjectMapper mapper = new ObjectMapper(); + JsonNode schemaNode = mapper.readTree(new File(jsonSchemaPath)); + JsonNode inputNode = mapper.readTree(new File(inputFile)); + + JsonSchemaFactory factory = JsonSchemaFactory.getInstance(); + JsonSchema schema = factory.getSchema(schemaNode); + + Set errors = schema.validate(inputNode); + + if (errors.size() > 0) { + String messages = errors.stream() + .map(ValidationMessage::getMessage) + .collect(Collectors.joining("\n")); + + throw new RuntimeException("Schema validation errors\n" + messages); + } + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi-generator/src/main/java/org/camunda/bpm/engine/rest/openapi/generator/impl/TemplateParser.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi-generator/src/main/java/org/camunda/bpm/engine/rest/openapi/generator/impl/TemplateParser.java new file mode 100644 index 0000000000000000000000000000000000000000..c7bf56e98436fedadb51fda0260b12074114603b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi-generator/src/main/java/org/camunda/bpm/engine/rest/openapi/generator/impl/TemplateParser.java @@ -0,0 +1,221 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.openapi.generator.impl; + +import java.io.File; +import java.io.IOException; +import java.io.StringWriter; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.io.filefilter.DirectoryFileFilter; +import org.apache.commons.io.filefilter.RegexFileFilter; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; + +import freemarker.template.Configuration; +import freemarker.template.Template; +import freemarker.template.TemplateException; + +public class TemplateParser { + + public static void main(String[] args) throws IOException, TemplateException { + + if (args.length != 4) { + throw new RuntimeException( + "Must provide four arguments: " + + " " + + "
" + + " " + + ""); + } + + String sourceDirectory = args[0]; + String mainTemplate = args[1]; + String outputFile = args[2]; + String debugFile = args[3]; + + Configuration cfg = new Configuration(Configuration.VERSION_2_3_29); + + cfg.setDirectoryForTemplateLoading(new File(sourceDirectory)); + cfg.setDefaultEncoding("UTF-8"); + + Template template = cfg.getTemplate(mainTemplate); + + Map templateData = createTemplateData(sourceDirectory); + + try (StringWriter out = new StringWriter()) { + + template.process(templateData, out); + + // create intermediate json file before the formatting + String path = createOutputFile(debugFile); + FileUtils.forceMkdir(new File(debugFile)); + Files.write(Paths.get(path), out.getBuffer().toString().getBytes()); + + // format json with Gson + String jsonString = out.getBuffer().toString(); + String formattedJson = formatJsonString(jsonString); + + File outFile = new File(outputFile); + FileUtils.forceMkdir(outFile.getParentFile()); + Files.write(outFile.toPath(), formattedJson.getBytes()); + } + + } + + protected static Map createTemplateData(String sourceDirectory) + throws IOException { + Map templateData = new HashMap<>(); + + resolveVersions(templateData); + Map models = resolveModels(sourceDirectory); + templateData.put("models", models); + Map> endpoints = resolvePaths(sourceDirectory); + templateData.put("endpoints", endpoints); + + return templateData; + } + + protected static String formatJsonString(String jsonString) { + Gson gson = new GsonBuilder() + .serializeNulls() + .setPrettyPrinting() + .create(); + + JsonParser jsonParser = new JsonParser(); + JsonElement json = jsonParser.parse(jsonString); + String formattedJson = gson.toJson(json); + + return formattedJson; + } + + protected static String createOutputFile(String debugFile) throws IOException { + DateTimeFormatter timeStampPattern = DateTimeFormatter.ofPattern("MM-dd-HH-mm-ss"); + + return debugFile + "/intermediate-openapi-" + + timeStampPattern.format(java.time.LocalDateTime.now()) + ".json"; + } + + /** + * Resolve the Camunda Platform version and the respective documentation version used in the links. + */ + protected static void resolveVersions(Map templateData) { + String version = TemplateParser.class.getPackage().getImplementationVersion(); + + if (version != null) { + // cambpmVersion = 7.X.Y + templateData.put("cambpmVersion", version); + + if (version.contains("SNAPSHOT")) { + templateData.put("docsVersion", "develop"); + } else if (version.contains("alpha")) { + templateData.put("docsVersion", "latest"); + } else { + // docsVersion = 7.X + templateData.put("docsVersion", version.substring(0, version.lastIndexOf("."))); + } + } else { + // only for debug cases + templateData.put("cambpmVersion", "develop"); + templateData.put("docsVersion", "develop"); + } + } + + /** + * + * @param sourceDirectory the template directory that stores the models + * @return a map of model name and file path to it, + * the map is ordered lexicographically by the model names + */ + protected static Map resolveModels(String sourceDirectory) { + File modelsDir = new File(sourceDirectory + "/models"); + Collection modelFiles = FileUtils.listFiles( + modelsDir, + new RegexFileFilter("^(.*?)"), + DirectoryFileFilter.DIRECTORY + ); + + Map models = new TreeMap<>(); + for (File file : modelFiles) { + String modelName = FilenameUtils.removeExtension(file.getName()); + String filePath = file.getAbsolutePath(); + String modelPackage = filePath + .substring(filePath.lastIndexOf("org"), filePath.lastIndexOf(File.separator)); + + models.put(modelName, modelPackage); + } + + return models; + } + + /** + * + * @param sourceDirectory the template directory that stores the endpoints + * @return a map of endpoint path and HTTP methods pairs, + * the map is ordered lexicographically by the endpoint paths + * the list of methods is ordered as well + */ + protected static Map> resolvePaths(String sourceDirectory) { + File endpointsDir = new File(sourceDirectory + "/paths"); + int endpointStartAt = endpointsDir.getAbsolutePath().length(); + Collection endpointsFiles = FileUtils.listFiles( + endpointsDir, + new RegexFileFilter("^(.*?)"), + DirectoryFileFilter.DIRECTORY + ); + + Map> endpoints = new TreeMap<>(); + for (File file : endpointsFiles) { + String endpointMethod = FilenameUtils.removeExtension(file.getName()); + String filePath = file.getAbsolutePath(); + String endpointPath = filePath + .substring(endpointStartAt, filePath.lastIndexOf(File.separator)) + .replace(File.separator, "/"); + + List operations; + if (endpoints.containsKey(endpointPath)) { + operations = endpoints.get(endpointPath); + operations.add(endpointMethod); + } else { + operations = new ArrayList<>(); + operations.add(endpointMethod); + endpoints.put(endpointPath, operations); + } + + if(operations.size() > 1) { + Collections.sort(operations); + } + } + + return endpoints; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/README.md b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/README.md new file mode 100644 index 0000000000000000000000000000000000000000..546d838cb15be5f941d30e247eedda37938f83ee --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/README.md @@ -0,0 +1,275 @@ +REST API - OpenAPI documentation generation +======== + +This project generates a single openapi.json containing the OpeanAPI documentation of the Engine Rest API. +Aligned with OpenAPI specification version [3.0.2](https://github.com/OAI/OpenAPI-Specification/blob/3.0.2/versions/3.0.2.md). + +# Table of Contents +1. [Build and phases](#build-and-phases) +2. [Contribution](#contribution) + + [main.ftl](#mainftl) + + [utils](#utils) + + [models](#models) + + [paths](#paths) + + [commons](#commons) + + [sorting](#sorting) + + [pagination](#pagination) + + [reuse](#reuse) + + [descriptions](#descriptions) + + [formats](#formats) + + [nullable](#nullable) + + [examples](#examples) +3. [Reviews](#reviews) + + +## Build and phases + +To build the artifact run: `mvn clean install` + +The build contains: +* Generation of a formatted openapi.json file by parsing the [templates](./src/main/templates) +* Validation of the generated file against [schema.json](./src/main/openapi/schema.json) +* Generation of a java client from the openapi.json file +* Run of smoke tests against that client (the tests use [WireMock](http://wiremock.org/docs/)) + +## Contribution + +NOTE: Please follow the next step to get familiar with the structure and the instructions that follow. + +For the generation of the documentation, we use the [Freemarker](https://freemarker.apache.org/docs/index.html) templating language. +The structure of the template is: + +``` + +--main.ftl + +--lib + | +--utils.ftl + | +--commons + | | +--pagination-params.ftl + | | +--process-instance-query-params.ftl + | | +--sort-params.ftl + | | +--sort-props.ftl + +--models + | +--org/camunda/bpm/engine/rest/dto + | | +--ExceptionDto.ftl + | | +--history + | | | +--HistoricProcessInstanceQueryDto.ftl + | | +--repository + | | | +--DeploymentDto.ftl + | | | +--ProcessDefinitionDto.ftl + | | +--runtime + | | | +--ActivityInstanceDto.ftl + +--paths + | +--deployment + | | +--create + | | | +--post.ftl + | +--process-instance + | | +--get.ftl + | | +--suspended + | | | +--put.ftl + | | +--{id} + | | | +--delete.ftl + | | | +--variables + | | | | +--{varName} + | | | | | +--data + | | | | | | +--get.ftl + | | | | | | +--post.ftl + | | | | | +--delete.ftl +``` + +### main.ftl + +The `main.ftl` contains the general information of the OpenAPI doc: +* OpenAPI spec version +* info +* externalDocs +* servers (default and named) +* tags (each resource has a tag) + * Sub-resources should have the parent tag as prefix (e.g. `Task` and `Task Attachment`) +* wrap up of paths and components + +By parsing this file end .json file is generated. + +### utils + +Contains all of the [macros](https://freemarker.apache.org/docs/ref_directive_macro.html) used in paths and models: +* `parameter` (used in paths) +* `property` (used in paths and models) +* `requestBody` (used in paths) +* `response` (used in paths) + +Try to get familiar with them as they are heavily used in the templates. +Keep in mind that in some situations, it is fine not to use them, if the endpoint/dto is too complex, for example. +Feel free to add missing parameters to the macros, however, do not forget to reflect your changes to all usages of the macros. +Some parameters are required (`name` and `description` in most of the cases), +and some need to be provided if necessary (nice to have - `minimum`,`defaultValue`, `deprecated`). + +### models + +This folder contains all of the DTOs used in the request and response bodies. Instructions: +* use the name and package structure of the Rest DTOs when possible +([org.camunda.bpm.engine.rest.dto.ExceptionDto.java](https://github.com/camunda/camunda-bpm-platform/blob/master/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/dto/ExceptionDto.java) --> +[org/camunda/bpm/engine/rest/dto/ExceptionDto.ftl](https://github.com/camunda/camunda-bpm-platform/blob/master/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ExceptionDto.ftl)) +Keep the properties of OpenAPI doc as close as possible to the Java DTOs and add explicit description whenever a property is not applicable to a certain endpoint (e.g. [PUT /process-instance/suspended](https://github.com/camunda/camunda-bpm-platform/blob/master/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/suspended/put.ftl)) +* the definitions of the models are resolved automatically via the folder structure. The `/models` directory should contain only the models that are used in the documentation, any additional files (macros and reusable files) should go to [commons](#commons), do not create empty folders. The models are ordered lexicographically. +* use the [utils](#utils) from the previous section when possible. +* use the `dto` macro to define a DTO + * in case of a DTO hierarchy (`TriggerVariableValueDto extends VariableValueDto`), the `dto` macro provides an `extends` + attribute that makes use of the `allOf` OpenAPI syntax - [example](https://github.com/camunda/camunda-bpm-platform/blob/392d98b61e5e0eff3e1dad0ee15a5ad986e0d93c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/TriggerVariableValueDto.ftl#L2-L19). + * the `property` macros should be nested inside the `dto` macro +* in case the response can be two DTOs depending on request parameter (example - [message correlation](https://docs.camunda.org/manual/develop/reference/rest/message/post-message/#result) and responses `MessageCorrelationResultDto` or `MessageCorrelationResultWithVariableDto` (extending `MessageCorrelationResultDto`)), please use the DTO for the response that contains all of the properties (in the correlation case - `MessageCorrelationResultWithVariableDto`) even some are not applicable for all of the responses, and make sure to document which properties are not applicable in which use cases. (In some use cases `oneOf` approach might be applicable together with `discrimitator` ([spec](https://github.com/OAI/OpenAPI-Specification/blob/3.0.2/versions/3.0.2.md#discriminator-object)), please test this additionally as the clients might have problems to be generated in this approach.) +* for the `property` macros DO NOT forget to put `last = true` param for the last property, that will take care for the commas in the json file. +* the DTOs that have sorting or pagination properties should use the [common templates](#commons). + +### paths + +Contains the endpoints definitions of the Rest API. Instructions: +* each resource has its own folder under /paths (e.g. `/process-instance`, `/deployment`) +* the path of the endpoint is resolved to a folder structure (e.g. get process instance count `GET /process-instance/count` goes to `/paths/process-instance/count`). +NOTE: The endpoints' paths are automatically resolved from the folder structure, please keep the file structure of `/paths` clean, without any additional files, different than the endpoint definitions (for example the reusable templates should go in [commons](#commons), do not create empty folders and so on). +The endpoints' paths are ordered lexicographically. +* the dynamic endpoints should be structured with brakes like `process-instance/{id}/variables/{varName}/data`, +then the path parameters (`id` and `varName`) should always be included in the endpoint definition and marked as `required`. +* endpoints that are almost similar but have a different paths (e.g. [Get Activity Instance Statistics](https://docs.camunda.org/manual/7.12/reference/rest/process-definition/get-activity-statistics/)) needs to be separated in different files. A unique `operationId` should be assigned to each of them. You can consider adding the common parts of the endpoints in [lib/commons](#commons). +* the name of the method's request (GET, POST, PUT, DELETE, OPTIONS) is the name of the template file (get.ftl, post.frl, etc.). +* each endpoint definition has a unique `operationId` that will be used for the generation of clients. +* for `async` endpoints make sure to add `Operation` suffix to prevent collisions in generated C# clients, e.g. `setExternalTaskRetriesAsync` -> `setExternalTaskRetriesAsyncOperation`, `modifyProcessInstanceAsync` -> `modifyProcessInstanceAsyncOperation` +In most of the cases, the java method name should be used (e.g. `deleteProcessInstancesAsync`). When this is not possible, please define it according to the Java conventions. +* each endpoint definition contains a tag of its resource (e.g. `Process instance`, `Deployment`). +* each endpoint definition contains a description and summary (the latter is the title of Rest API doc page). +* each endpoint definition contains at least one HTTP response object defined. +* in the request body try to use a DTO when possible, always check the Java DTO for guidance; +avoid constructing a request body without DTO and only with properties defined in the endpoint description. +* use the [utils](#utils) from the previous section when possible +* for the `property` and `param` macros DO NOT forget to put last = true param for the last property/parameter, that will take care for the commas in the json file +* the endpoints that have sorting or pagination properties/parameter should use the [common templates](#commons). + +#### commons + +Contains common templates that can be reused when it's possible. + +##### sorting + +* [sort-params.ftl](./src/main/templates/lib/commons/sort-params.ftl) +* [sort-props.ftl](./src/main/templates/lib/commons/sort-props.ftl) + +Please set the `sortByValues` enumeration whenever the template is in use and do not forget to assign the `last = true` if this is the last parameter/property (taking care for the commas in the json): +``` +<#-- <#assign last = true > --> <#-- remove comment if last param --> +<#assign sortByValues = ['"instanceId"', '"definitionId"', '"definitionKey"', '"definitionName"', '"definitionVersion"', '"businessKey"', '"startTime"', '"endTime"', '"duration"', '"tenantId"']> +<#include "/lib/commons/sort-props.ftl" > +``` + +##### pagination + +* [pagination-params.ftl](./src/main/templates/lib/commons/pagination-params.ftl) + +Use whenever `firstResult` and `maxResults` are part of the endpoint parameters. Do not forget to assign `last=true` param in case those are the last parameters: +``` + <#-- <#assign last = true > --> <#-- remove comment if last param --> + <#include "/lib/commons/pagination-params.ftl" > +``` + +##### reuse +Sometimes the same bunch of parameters is used in multiple endpoints. In cases like there, feel free to create a template and reuse it. +Example: [process-instance-query-params.ftl](./src/main/templates/lib/commons/process-instance-query-params.ftl) used in `getProcessInstancesCount` and `getProcessInstances` + +### Parameters and properties + +#### Descriptions +Markdown can be used for text descriptions: + + `monospace` (code) + *italic* or _italic_ (cursive) + **bold** or __bold__ + * bullet point + +Recommendations: +* use unix line endings +* to add links use markdown, e.g. `[link](http://example.com)` +* Add `docsUrl` to resolve doc link - [User guide](${docsUrl}/user-guide/process-engine/process-instance-modification/) +`docsUrl="https://docs.camunda.org/manual/${docsVersion}" +* keep line length to a maximum of 120 characters +* use indentation, avoid adding long descriptions on a single line, +improve the readibility by splitting the next with single or multiple line breaks: + +``` + "description": "Submits a list of modification instructions to change a process instance's execution state. + A modification instruction is one of the following: + + * Starting execution before an activity + * Starting execution after an activity on its single outgoing sequence flow + * Starting execution on a specific sequence flow + * Canceling an activity instance, transition instance, or all instances (activity or transition) for an activity + + Instructions are executed immediately and in the order they are provided in this request's body. + Variables can be provided with every starting instruction. + + The exact semantics of modification can be read about in the [User guide](https://docs.camunda.org/manual/develop/user-guide/process-engine/process-instance-modification/)." +``` + +#### Formats + +The `format` fields further define the type of properties and parameters. For more information, please check the [OpenAPI spec](https://github.com/OAI/OpenAPI-Specification/blob/3.0.2/versions/3.0.2.md#dataTypeFormat). The common types used in the documentation are `int32`, `binary`, `date-time`. +Example: +Specify the `date-time` format of the date properties whenever is possible, +``` + <@lib.property + name = "startedBefore" + type = "string" + format = "date-time" + description = "Restrict to instances that were started before the given date. + By default (https://docs.camunda.org/manual/${docsVersion}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200." /> +``` +That will improve the clients that are generated from the OpenAPI documentation. **Note:** When using a 'date-time' in a 'GET' request (as URL parameter), it is important to use proper URL encoding as described in the [Date Format Overview](https://docs.camunda.org/manual/develop/reference/rest/overview/date-format/) + +#### Nullable + +By default, the properties of type `boolean`, `string`, `array`, and `dto` have `nullable` field enabled by default to ensure that the OpenAPI specification can work with C# clients. +That way we create relaxed specification for clients where the fields should be specified explicitly whether they should be null or not. +Disable `nullable` field to the properties where it's sure that they are required: +``` + <@lib.property + name = "version" + type = "integer" + format = "int32" + nullable = false + desc = "The version of the process definition that the engine assigned to it." /> +``` + +#### Examples + +You can add an examples to `requestBody` or `response` as follows: +* pass the example inside single quotes instead of quotes as the examples contain quotes and they should be escaped +* multiple examples are allowed + * each example should be a separate JSON object in the `examples` array (e.g. `example-1`, `example-2`) +* each example should have a unique name +* add a `description` and/or `summary` properties when necessary +* the `value` property is required and should contain the example content +``` + <@lib.requestBody + mediaType = "application/json" + dto = "SetJobRetriesByProcessDto" + requestDesc = "Please note that if both processInstances and processInstanceQuery are provided, + then the resulting execution will be performed on the union of these sets. + **Unallowed property**: `historicProcessInstanceQuery`" + examples = ['"example-1": { + "value": { + "retries": numberOfRetries, + "processInstances": ["aProcess", "secondProcess"], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId" + } + } + }']/> +``` + +## Reviews + +How to do reviews? + +* in case of changes of the macros, please compare the last build openapi.json version with one to review to ensure that the endpoins are complete after the new changes +* double check the path of the endpoints as they are not easy to see if they are not checked additionally +* check for correct parameters, requests, and responses +* check for compliance with the Java endpoints (`endpointInfo` id should be as close as possible to the Java method in the DTO packages - check the `\*RestService.java` and `\*Resource.java` interfaces) +* you can compare the generated client (from the tests) with the actual REST API - most of the case they should look similar diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..57b94f47027022df9f65bcdfc00c40a5acbfa5df --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/pom.xml @@ -0,0 +1,257 @@ + + 4.0.0 + camunda-engine-rest-openapi + Camunda Platform - engine - REST - OpenAPI + jar + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + + + org.camunda.bpm + camunda-engine-rest-root + ../ + 7.24.0-SNAPSHOT + + + + ${project.build.directory}/generated-sources/openapi-json + openapi.json + + 4.2.3 + + + 1.8.3 + 1.5.22 + 3.14.2 + 2.8.9 + 3.18.0 + 1.0.0 + 1.0 + 4.13.1 + + + + + + org.camunda.bpm + camunda-engine-rest-openapi-generator + test + ${project.version} + + + + + org.slf4j + slf4j-jdk14 + test + + + com.github.tomakehurst + wiremock + ${version.wiremock} + test + + + org.assertj + assertj-core + test + + + + + + + io.swagger + swagger-annotations + ${swagger-core-version} + test + + + + com.google.code.findbugs + jsr305 + 3.0.2 + test + + + com.squareup.okhttp3 + okhttp + ${okhttp-version} + test + + + com.squareup.okhttp3 + logging-interceptor + ${okhttp-version} + test + + + com.google.code.gson + gson + ${gson-version} + test + + + io.gsonfire + gson-fire + ${gson-fire-version} + test + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + test + + + javax.annotation + jsr250-api + ${javax-annotation-version} + test + + + + junit + junit + ${junit-version} + test + + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + generate-openapi-json + generate-resources + + java + + + test + org.camunda.bpm.engine.rest.openapi.generator.impl.TemplateParser + + ${project.basedir}/src/main/templates + main.ftl + ${generated-directory}/${generated-file} + ${project.build.directory} + + + + + validate-openapi-json + generate-resources + + java + + + test + org.camunda.bpm.engine.rest.openapi.generator.impl.SchemaValidator + + + + ${project.basedir}/src/main/openapi/schema.json + ${generated-directory}/${generated-file} + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-openapi-json-resources + + add-resource + + generate-resources + + + + ${generated-directory} + + + + + + add-openapi-generated-test-sources + + add-test-source + + generate-test-sources + + + ${project.build.directory}/camunda-openapi-client/src/main/java + + + + + + + + org.openapitools + openapi-generator-maven-plugin + ${openapi.generator.version} + + + generate-java-client + generate-test-sources + + generate + + + ${generated-directory}/${generated-file} + ${project.build.directory}/camunda-openapi-client + java + + legacy + + + + + + + + + + + + javadocs + + + + org.openapitools + openapi-generator-maven-plugin + ${openapi.generator.version} + + true + + + + + maven-compiler-plugin + + + default-testCompile + + testCompile + + not-existing + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/openapi/schema.json b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/openapi/schema.json new file mode 100644 index 0000000000000000000000000000000000000000..f8e63a289ca5213d9275e27d12450f1be5cc2d54 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/openapi/schema.json @@ -0,0 +1,1654 @@ +{ + "id": "https://spec.openapis.org/oas/3.0/schema/2019-04-02", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Validation schema for OpenAPI Specification 3.0.X.", + "type": "object", + "required": [ + "openapi", + "info", + "paths" + ], + "properties": { + "openapi": { + "type": "string", + "pattern": "^3\\.0\\.\\d(-.+)?$" + }, + "info": { + "$ref": "#/definitions/Info" + }, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/Server" + } + }, + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + }, + "uniqueItems": true + }, + "paths": { + "$ref": "#/definitions/Paths" + }, + "components": { + "$ref": "#/definitions/Components" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "definitions": { + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "patternProperties": { + "^\\$ref$": { + "type": "string", + "format": "uri-reference" + } + } + }, + "Info": { + "type": "object", + "required": [ + "title", + "version" + ], + "properties": { + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "termsOfService": { + "type": "string", + "format": "uri-reference" + }, + "contact": { + "$ref": "#/definitions/Contact" + }, + "license": { + "$ref": "#/definitions/License" + }, + "version": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Contact": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + }, + "email": { + "type": "string", + "format": "email" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "License": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Server": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "variables": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ServerVariable" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ServerVariable": { + "type": "object", + "required": [ + "default" + ], + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Components": { + "type": "object", + "properties": { + "schemas": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + } + }, + "responses": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Response" + } + ] + } + } + }, + "parameters": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Parameter" + } + ] + } + } + }, + "examples": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Example" + } + ] + } + } + }, + "requestBodies": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/RequestBody" + } + ] + } + } + }, + "headers": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Header" + } + ] + } + } + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "links": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Link" + } + ] + } + } + }, + "callbacks": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Callback" + } + ] + } + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Schema": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "multipleOf": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { + "type": "integer", + "minimum": 0 + }, + "minLength": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { + "type": "integer", + "minimum": 0 + }, + "minItems": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "type": "integer", + "minimum": 0 + }, + "minProperties": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "required": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "enum": { + "type": "array", + "items": { + }, + "minItems": 1, + "uniqueItems": false + }, + "type": { + "type": "string", + "enum": [ + "array", + "boolean", + "integer", + "number", + "object", + "string" + ] + }, + "not": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "allOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "oneOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "anyOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "properties": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" + }, + { + "$ref": "#/definitions/Reference" + }, + { + "type": "boolean" + } + ], + "default": true + }, + "description": { + "type": "string" + }, + "format": { + "type": "string" + }, + "default": { + }, + "nullable": { + "type": "boolean", + "default": false + }, + "discriminator": { + "$ref": "#/definitions/Discriminator" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "example": { + }, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/XML" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "XML": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string", + "format": "uri" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Response": { + "type": "object", + "required": [ + "description" + ], + "properties": { + "description": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Header" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "content": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MediaType" + } + }, + "links": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Link" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "MediaType": { + "type": "object", + "properties": { + "schema": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "example": { + }, + "examples": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Example" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "encoding": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Encoding" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/ExampleXORExamples" + } + ] + }, + "Example": { + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "value": { + }, + "externalValue": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Header": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "required": { + "type": "boolean", + "default": false + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "allowEmptyValue": { + "type": "boolean", + "default": false + }, + "style": { + "type": "string", + "enum": [ + "simple" + ], + "default": "simple" + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean", + "default": false + }, + "schema": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "content": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MediaType" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "example": { + }, + "examples": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Example" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/ExampleXORExamples" + }, + { + "$ref": "#/definitions/SchemaXORContent" + } + ] + }, + "Paths": { + "type": "object", + "patternProperties": { + "^\\/": { + "$ref": "#/definitions/PathItem" + }, + "^x-": { + } + }, + "additionalProperties": false + }, + "PathItem": { + "type": "object", + "properties": { + "$ref": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/Server" + } + }, + "parameters": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Parameter" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "uniqueItems": true + } + }, + "patternProperties": { + "^(get|put|post|delete|options|head|patch|trace)$": { + "$ref": "#/definitions/Operation" + }, + "^x-": { + } + }, + "additionalProperties": false + }, + "Operation": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + }, + "operationId": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Parameter" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "uniqueItems": true + }, + "requestBody": { + "oneOf": [ + { + "$ref": "#/definitions/RequestBody" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "responses": { + "$ref": "#/definitions/Responses" + }, + "callbacks": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Callback" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/Server" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Responses": { + "type": "object", + "properties": { + "default": { + "oneOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "patternProperties": { + "^[1-5](?:\\d{2}|XX)$": { + "oneOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "^x-": { + } + }, + "minProperties": 1, + "additionalProperties": false + }, + "SecurityRequirement": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ExampleXORExamples": { + "description": "Example and examples are mutually exclusive", + "not": { + "required": [ + "example", + "examples" + ] + } + }, + "SchemaXORContent": { + "description": "Schema and content are mutually exclusive, at least one is required", + "not": { + "required": [ + "schema", + "content" + ] + }, + "oneOf": [ + { + "required": [ + "schema" + ] + }, + { + "required": [ + "content" + ], + "description": "Some properties are not allowed if content is present", + "allOf": [ + { + "not": { + "required": [ + "style" + ] + } + }, + { + "not": { + "required": [ + "explode" + ] + } + }, + { + "not": { + "required": [ + "allowReserved" + ] + } + }, + { + "not": { + "required": [ + "example" + ] + } + }, + { + "not": { + "required": [ + "examples" + ] + } + } + ] + } + ] + }, + "Parameter": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "in": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean", + "default": false + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "allowEmptyValue": { + "type": "boolean", + "default": false + }, + "style": { + "type": "string" + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean", + "default": false + }, + "schema": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "content": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MediaType" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "example": { + }, + "examples": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Example" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "required": [ + "name", + "in" + ], + "allOf": [ + { + "$ref": "#/definitions/ExampleXORExamples" + }, + { + "$ref": "#/definitions/SchemaXORContent" + }, + { + "$ref": "#/definitions/ParameterLocation" + } + ] + }, + "ParameterLocation": { + "description": "Parameter location", + "oneOf": [ + { + "description": "Parameter in path", + "required": [ + "required" + ], + "properties": { + "in": { + "enum": [ + "path" + ] + }, + "style": { + "enum": [ + "matrix", + "label", + "simple" + ], + "default": "simple" + }, + "required": { + "enum": [ + true + ] + } + } + }, + { + "description": "Parameter in query", + "properties": { + "in": { + "enum": [ + "query" + ] + }, + "style": { + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ], + "default": "form" + } + } + }, + { + "description": "Parameter in header", + "properties": { + "in": { + "enum": [ + "header" + ] + }, + "style": { + "enum": [ + "simple" + ], + "default": "simple" + } + } + }, + { + "description": "Parameter in cookie", + "properties": { + "in": { + "enum": [ + "cookie" + ] + }, + "style": { + "enum": [ + "form" + ], + "default": "form" + } + } + } + ] + }, + "RequestBody": { + "type": "object", + "required": [ + "content" + ], + "properties": { + "description": { + "type": "string" + }, + "content": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MediaType" + } + }, + "required": { + "type": "boolean", + "default": false + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "SecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/APIKeySecurityScheme" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + }, + { + "$ref": "#/definitions/OAuth2SecurityScheme" + }, + { + "$ref": "#/definitions/OpenIdConnectSecurityScheme" + } + ] + }, + "APIKeySecurityScheme": { + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "HTTPSecurityScheme": { + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "bearerFormat": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "oneOf": [ + { + "description": "Bearer", + "properties": { + "scheme": { + "enum": [ + "bearer" + ] + } + } + }, + { + "description": "Non Bearer", + "not": { + "required": [ + "bearerFormat" + ] + }, + "properties": { + "scheme": { + "not": { + "enum": [ + "bearer" + ] + } + } + } + } + ] + }, + "OAuth2SecurityScheme": { + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "flows": { + "$ref": "#/definitions/OAuthFlows" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "OpenIdConnectSecurityScheme": { + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri-reference" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "OAuthFlows": { + "type": "object", + "properties": { + "implicit": { + "$ref": "#/definitions/ImplicitOAuthFlow" + }, + "password": { + "$ref": "#/definitions/PasswordOAuthFlow" + }, + "clientCredentials": { + "$ref": "#/definitions/ClientCredentialsFlow" + }, + "authorizationCode": { + "$ref": "#/definitions/AuthorizationCodeOAuthFlow" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ImplicitOAuthFlow": { + "type": "object", + "required": [ + "authorizationUrl", + "scopes" + ], + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "PasswordOAuthFlow": { + "type": "object", + "required": [ + "tokenUrl" + ], + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ClientCredentialsFlow": { + "type": "object", + "required": [ + "tokenUrl" + ], + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "AuthorizationCodeOAuthFlow": { + "type": "object", + "required": [ + "authorizationUrl", + "tokenUrl" + ], + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Link": { + "type": "object", + "properties": { + "operationId": { + "type": "string" + }, + "operationRef": { + "type": "string", + "format": "uri-reference" + }, + "parameters": { + "type": "object", + "additionalProperties": { + } + }, + "requestBody": { + }, + "description": { + "type": "string" + }, + "server": { + "$ref": "#/definitions/Server" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "not": { + "description": "Operation Id and Operation Ref are mutually exclusive", + "required": [ + "operationId", + "operationRef" + ] + } + }, + "Callback": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/PathItem" + }, + "patternProperties": { + "^x-": { + } + } + }, + "Encoding": { + "type": "object", + "properties": { + "contentType": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Header" + } + }, + "style": { + "type": "string", + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean", + "default": false + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/authorization-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/authorization-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a12a0684e9e955faa6a8992c10387dea69112fe0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/authorization-query-params.ftl @@ -0,0 +1,40 @@ + +<#assign sortByValues = [ + '"resourceType"', + '"resourceId"' +]> + +<#assign params = { + "id": { + "type": "string", + "desc": "Filter by the id of the authorization." + }, + "type": { + "type": "integer", + "format": "int32", + "desc": "Filter by authorization type. (0=global, 1=grant, 2=revoke). + See the [User Guide](${docsUrl}/user-guide/process-engine/authorization-service/#authorization-type) + for more information about authorization types." + }, + "userIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a comma-separated list of userIds." + }, + "groupIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a comma-separated list of groupIds." + }, + "resourceType": { + "type": "integer", + "format": "int32", + "desc": "Filter by an integer representation of the resource type. See the + [User Guide](${docsUrl}/user-guide/process-engine/authorization-service/#resources) + for a list of integer representations of resource types." + }, + "resourceId": { + "type": "string", + "desc": "Filter by resource id." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/batch.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/batch.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7bcaeb4ecdd399dce60039b9809cd3c8528334fc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/batch.ftl @@ -0,0 +1,74 @@ +<#assign sortByValues = [ + '"batchId"', + '"tenantId"' +]> + +<#if requestMethod == "GET"> + <#assign listTypeDescription = "Filter by a comma-separated list of `Strings`." /> +<#elseif requestMethod == "POST"> + <#assign listTypeDescription = "Must be a JSON array of `Strings`"> + + +<#assign params = { + "batchId": { + "type": "string", + "desc": "Filter by batch id." + }, + + "type": { + "type": "string", + "desc": "Filter by batch type. + See the [User Guide](${docsUrl}/user-guide/process-engine/batch/#creating-a-batch) + for more information about batch types." + }, + + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "${listTypeDescription} A batch matches if it has one of the given tenant ids." + }, + + "withoutTenantId": { + "type": "boolean", + "desc": "Only include batches which belong to no tenant. + Value can effectively only be `true`, as `false` is the default behavior." + }, + + "suspended": { + "type": "boolean", + "desc": "A `Boolean` value which indicates whether only active or suspended batches should be included. + When the value is set to `true`, only suspended batches will be returned and + when the value is set to `false`, only active batches will be returned." + }, + + "createdBy": { + "type": "string", + "desc": "Only include batches that were started by this user id." + }, + + "startedBefore": { + "type": "string", + "format": "date-time", + "desc": "Only include batches that were started before the given date. By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + + "startedAfter": { + "type": "string", + "format": "date-time", + "desc": "Only include batches that were started after the given date. By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + + "withFailures": { + "type": "boolean", + "desc": "Only include batches having jobs with failures. + Value can only be `true`." + }, + + "withoutFailures": { + "type": "boolean", + "desc": "Only include batches having jobs without failures. + Value can only be `true`." + } +}> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/decision-definition.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/decision-definition.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e8db85232da1cafb946c0fa6a709e7c5db7a9d01 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/decision-definition.ftl @@ -0,0 +1,147 @@ +<#assign sortByValues = [ + '"category"', + '"decisionRequirementsDefinitionKey"', + '"key"', + '"id"', + '"name"', + '"version"', + '"deploymentId"', + '"deployTime"', + '"versionTag"', + '"tenantId"' +]> + +<#if requestMethod == "GET"> + <#assign listTypeDescription = "Filter by a comma-separated list of `Strings`." /> +<#elseif requestMethod == "POST"> + <#assign listTypeDescription = "Must be a JSON array of `Strings`"> + + +<#assign params = { + "decisionDefinitionId": { + "type": "string", + "desc": "Filter by decision definition id." + }, + + "decisionDefinitionIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by decision definition ids." + }, + + "name": { + "type": "string", + "desc": "Filter by decision definition name." + }, + + "nameLike": { + "type": "string", + "desc": "Filter by decision definition names that the parameter is a substring of." + }, + + "deploymentId": { + "type": "string", + "desc": "Filter by the deployment the id belongs to." + }, + + "deployedAfter": { + "type": "string", + "format": "date-time", + "desc": "Filter by the deploy time of the deployment the decision definition belongs to. + Only selects decision definitions that have been deployed after (exclusive) a specific time." + }, + + "deployedAt": { + "type": "string", + "format": "date-time", + "desc": "Filter by the deploy time of the deployment the decision definition belongs to. + Only selects decision definitions that have been deployed at a specific time (exact match)." + }, + + "key": { + "type": "string", + "desc": "Filter by decision definition key, i.e., the id in the DMN 1.0 XML. Exact match." + }, + + "keyLike": { + "type": "string", + "desc": "Filter by decision definition keys that the parameter is a substring of." + }, + + "category": { + "type": "string", + "desc": "Filter by decision definition category. Exact match." + }, + + "categoryLike": { + "type": "string", + "desc": "Filter by decision definition categories that the parameter is a substring of." + }, + + "version": { + "type": "integer", + "format": "int32", + "desc": "Filter by decision definition version." + }, + + "latestVersion": { + "type": "boolean", + "desc": "Only include those decision definitions that are latest versions. + Value may only be `true`, as `false` is the default behavior." + }, + + "resourceName": { + "type": "string", + "desc": "Filter by the name of the decision definition resource. Exact match." + }, + + "resourceNameLike": { + "type": "string", + "desc": "Filter by names of those decision definition resources that the parameter is a substring of." + }, + + "decisionRequirementsDefinitionId": { + "type": "string", + "desc": "Filter by the id of the decision requirements definition this decision definition belongs to." + }, + + "decisionRequirementsDefinitionKey": { + "type": "string", + "desc": "Filter by the key of the decision requirements definition this decision definition belongs to." + }, + + "withoutDecisionRequirementsDefinition": { + "type": "boolean", + "desc": "Only include decision definitions which does not belongs to any decision requirements definition. + Value may only be `true`, as `false` is the default behavior." + }, + + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "${listTypeDescription} A decision definition must have one of the given tenant ids." + }, + + "withoutTenantId": { + "type": "boolean", + "desc": "Only include decision definitions which belong to no tenant. + Value can effectively only be `true`, as `false` is the default behavior." + }, + + "includeDecisionDefinitionsWithoutTenantId": { + "type": "boolean", + "desc": "Include decision definitions which belong to no tenant. + Can be used in combination with `tenantIdIn`. + Value may only be `true`, as `false` is the default behavior." + }, + + "versionTag": { + "type": "string", + "desc": "Filter by the version tag." + }, + + "versionTagLike": { + "type": "string", + "desc": "Filter by the version tags of those decision definition resources that the parameter is a substring of." + } +}> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/decision-requirements-definition.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/decision-requirements-definition.ftl new file mode 100644 index 0000000000000000000000000000000000000000..957f7e775880bac0612863bcbeafefa57b5a78f7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/decision-requirements-definition.ftl @@ -0,0 +1,89 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-query/index.html --> + +<#assign sortByValues = [ + '"id"', + '"key"', + '"name"', + '"version"', + '"deploymentId"', + '"category"', + '"tenantId"' +]> + +<#assign params = { + "decisionRequirementsDefinitionId": { + "type": "string", + "desc": "Filter by decision requirements definition id." + }, + "decisionRequirementsDefinitionIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by decision requirements definition ids." + }, + "name": { + "type": "string", + "desc": "Filter by decision requirements definition name." + }, + "nameLike": { + "type": "string", + "desc": "Filter by decision requirements definition names that the parameter is a substring of." + }, + "deploymentId": { + "type": "string", + "desc": "Filter by the id of the deployment a decision requirement definition belongs to." + }, + "key": { + "type": "string", + "desc": "Filter by decision requirements definition key, i.e., the id in the DMN 1.3 XML. Exact + match." + }, + "keyLike": { + "type": "string", + "desc": "Filter by decision requirements definition keys that the parameter is a substring of." + }, + "category": { + "type": "string", + "desc": "Filter by decision requirements definition category. Exact match." + }, + "categoryLike": { + "type": "string", + "desc": "Filter by decision requirements definition categories that the parameter is a substring + of." + }, + "version": { + "type": "integer", + "format": "int32", + "desc": "Filter by decision requirements definition version." + }, + "latestVersion": { + "type": "boolean", + "desc": "Only include those decision requirements definitions that are latest versions. Value may + only be `true`, as `false` is the default behavior." + }, + "resourceName": { + "type": "string", + "desc": "Filter by the name of the decision requirements definition resource. Exact match." + }, + "resourceNameLike": { + "type": "string", + "desc": "Filter by names of those decision requirements definition resources that the parameter is + a substring of." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a comma-separated list of tenant ids. A decision requirements definition must + have one of the given tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include decision requirements definitions which belong to no tenant. Value may only + be `true`, as `false` is the default behavior." + }, + "includeDecisionRequirementsDefinitionsWithoutTenantId": { + "type": "boolean", + "desc": "Include decision requirements definitions which belong to no tenant. Can be used in + combination with `tenantIdIn`. Value may only be `true`, as `false` is the + default behavior." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/deployment-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/deployment-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..354428d8dbc85bcd1893b748b3464c060c89cec8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/deployment-query-params.ftl @@ -0,0 +1,73 @@ +<@lib.parameter + name = "id" + location = "query" + type = "string" + desc = "Filter by deployment id"/> + +<@lib.parameter + name = "name" + location = "query" + type = "string" + desc = "Filter by the deployment name. Exact match."/> + +<@lib.parameter + name = "nameLike" + location = "query" + type = "string" + desc = "Filter by the deployment name that the parameter is a substring of. The parameter can include the + wildcard `%` to express like-strategy such as: starts with (`%`name), ends with (name`%`) or contains + (`%`name`%`)." /> + +<@lib.parameter + name = "source" + location = "query" + type = "string" + desc = "Filter by the deployment source."/> + +<@lib.parameter + name = "withoutSource" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "Filter by the deployment source whereby source is equal to `null`."/> + +<@lib.parameter + name = "tenantIdIn" + location = "query" + type = "string" + desc = "Filter by a comma-separated list of tenant ids. A deployment must have one of the given tenant ids."/> + +<@lib.parameter + name = "withoutTenantId" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "Only include deployments which belong to no tenant. Value may only be `true`, as `false` is the default + behavior."/> + +<@lib.parameter + name = "includeDeploymentsWithoutTenantId" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "Include deployments which belong to no tenant. Can be used in combination with `tenantIdIn`. Value may + only be `true`, as `false` is the default behavior."/> + +<@lib.parameter + name = "after" + location = "query" + type = "string" + format = "date-time" + desc = "Restricts to all deployments after the given date. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`."/> + +<@lib.parameter + name = "before" + location = "query" + type = "string" + format = "date-time" + last = last + desc = "Restricts to all deployments before the given date. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`."/> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/deserialize-values-parameter.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/deserialize-values-parameter.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0893917735574426106e80a1894bc8b61e98dc06 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/deserialize-values-parameter.ftl @@ -0,0 +1,25 @@ +<#-- This parameter is shared between POST and Get Variable Instances List --> +<@lib.parameter + name = "deserializeValues" + type = "boolean" + location = "query" + desc = "Determines whether serializable variable values (typically variables that + store custom Java objects) should be deserialized on server side (default + `true`). + + If set to `true`, a serializable variable will be deserialized on server side + and transformed to JSON using + [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property + introspection feature. Note that this requires the Java classes of the + variable value to be on the REST API's classpath. + + If set to `false`, a serializable variable will be returned in its serialized + format. For example, a variable that is serialized as XML will be returned as + a JSON string containing XML. + + **Note:** While `true` is the default value for reasons of backward + compatibility, we recommend setting this parameter to `false` when developing + web applications that are independent of the Java process applications + deployed to the engine." + last = last +/> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/event-subscription-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/event-subscription-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d2b24803adb7f3a317bbb5904bd1163a23d2d9a5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/event-subscription-query-params.ftl @@ -0,0 +1,60 @@ + <@lib.parameter + name = "eventSubscriptionId" + location = "query" + type = "string" + desc = "Only select subscription with the given id." /> + + <@lib.parameter + name = "eventName" + location = "query" + type = "string" + desc = "Only select subscriptions for events with the given name." /> + + <@lib.parameter + name = "eventType" + location = "query" + type = "string" + enumValues = [ "message", "signal", "compensate", "conditional" ] + desc = "Only select subscriptions for events with the given type. + Valid values: `message`, `signal`, `compensate` and `conditional`." /> + + <@lib.parameter + name = "executionId" + location = "query" + type = "string" + desc = "Only select subscriptions that belong to an execution with the given id." /> + + <@lib.parameter + name = "processInstanceId" + location = "query" + type = "string" + desc = "Only select subscriptions that belong to a process instance with the given id." /> + + <@lib.parameter + name = "activityId" + location = "query" + type = "string" + desc = "Only select subscriptions that belong to an activity with the given id." /> + + <@lib.parameter + name = "tenantIdIn" + location = "query" + type = "string" + desc = "Filter by a comma-separated list of tenant ids. + Only select subscriptions that belong to one of the given tenant ids." /> + + <@lib.parameter + name = "withoutTenantId" + location = "query" + type = "boolean" + desc = "Only select subscriptions which have no tenant id. + Value may only be `true`, as `false` is the default behavior." /> + + <@lib.parameter + name = "includeEventSubscriptionsWithoutTenantId" + location = "query" + type = "boolean" + last = last + desc = "Select event subscriptions which have no tenant id. + Can be used in combination with tenantIdIn parameter. + Value may only be `true`, as `false` is the default behavior." /> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/execution-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/execution-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3f6c4e22e9c7fdb721a47406f0dcf46cd519abfe --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/execution-query-params.ftl @@ -0,0 +1,151 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/get-query/index.html --> + +<#assign sortByValues = [ + '"instanceId"', + '"definitionKey"', + '"definitionId"', + '"tenantId"' +]> + +<#if requestMethod == "GET"> + <#assign listType = "comma-separated"> + <#assign variablesDesc = "Only include executions that have variables with certain values. + Variable filtering expressions are comma-separated and are structured as + follows: + + A valid parameter value has the form `key_operator_value`. + `key` is the variable name, `operator` is the comparison operator to be used + and `value` the variable value. + **Note:** Values are always treated as `String` objects on server side. + + Valid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - + greater than; + `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or + equal to; + `like`. + `key` and `value` may not contain underscore or comma characters."> + + <#assign processVariablesDesc = "Only include executions that belong to a process instance with variables with certain + values. + Variable filtering expressions are comma-separated and are structured as + follows: + + A valid parameter value has the form `key_operator_value`. + `key` is the variable name, `operator` is the comparison operator to be used + and `value` the variable value. + **Note:** Values are always treated as `String` objects on server side. + + Valid operator values are: `eq` - equal to; `neq` - not equal to. + `key` and `value` may not contain underscore or comma characters."> + +<#elseif requestMethod == "POST"> + <#assign listType = ""> + <#assign variablesDesc = "An array to only include executions that have variables with certain values. + + The array consists of objects with the three properties `name`, `operator` + and `value`. + `name (String)` is the variable name, `operator (String)` is the comparison + operator to be used and `value` the variable value. + `value` may be `String`, `Number` or `Boolean`. + + Valid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - + greater than; + `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or + equal to; + `like`."> + <#assign processVariablesDesc = "An array to only include executions that belong to a process instance with variables + with certain values. + + The array consists of objects with the three properties `name`, `operator` + and `value`. + `name (String)` is the variable name, `operator (String)` is the comparison + operator to be used and `value` the variable value. + `value` may be `String`, `Number` or `Boolean`. + + Valid operator values are: `eq` - equal to; `neq` - not equal to."> + + +<#assign params = { + "businessKey": { + "type": "string", + "desc": "Filter by the business key of the process instances the executions belong to." + }, + "processDefinitionId": { + "type": "string", + "desc": "Filter by the process definition the executions run on." + }, + "processDefinitionKey": { + "type": "string", + "desc": "Filter by the key of the process definition the executions run on." + }, + "processInstanceId": { + "type": "string", + "desc": "Filter by the id of the process instance the execution belongs to." + }, + "activityId": { + "type": "string", + "desc": "Filter by the id of the activity the execution currently executes." + }, + "signalEventSubscriptionName": { + "type": "string", + "desc": "Select only those executions that expect a signal of the given name." + }, + "messageEventSubscriptionName": { + "type": "string", + "desc": "Select only those executions that expect a message of the given name." + }, + "active": { + "type": "boolean", + "desc": "Only include active executions. Value may only be `true`, as `false` is the default + behavior." + }, + "suspended": { + "type": "boolean", + "desc": "Only include suspended executions. Value may only be `true`, as `false` is the default + behavior." + }, + "incidentId": { + "type": "string", + "desc": "Filter by the incident id." + }, + "incidentType": { + "type": "string", + "desc": "Filter by the incident type. See the [User Guide](/manual/develop/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + "incidentMessage": { + "type": "string", + "desc": "Filter by the incident message. Exact match." + }, + "incidentMessageLike": { + "type": "string", + "desc": "Filter by the incident message that the parameter is a substring of." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a ${listType} list of tenant ids. An execution must have one of the given + tenant ids." + }, + "variables": { + "type": "array", + "dto": "VariableQueryParameterDto", + "desc": "${variablesDesc}" + }, + "processVariables": { + "type": "array", + "dto": "VariableQueryParameterDto", + "desc": "${processVariablesDesc}" + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "desc": "Match all variable names provided in `variables` and `processVariables` case- + insensitively. If set to `true` **variableName** and **variablename** are + treated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "desc": "Match all variable values provided in `variables` and `processVariables` case- + insensitively. If set to `true` **variableValue** and **variablevalue** are + treated as equal." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/external-task-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/external-task-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f2629782e764d4fd3c02784ad2589b134d4075f3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/external-task-query-params.ftl @@ -0,0 +1,207 @@ + <@lib.parameter + name = "externalTaskId" + location = "query" + type = "string" + desc = "Filter by an external task's id." /> + + <@lib.parameter + name = "externalTaskIdIn" + location = "query" + type = "string" + desc = "Filter by the comma-separated list of external task ids." /> + + <@lib.parameter + name = "topicName" + location = "query" + type = "string" + desc = "Filter by an external task topic." /> + + <@lib.parameter + name = "workerId" + location = "query" + type = "string" + desc = "Filter by the id of the worker that the task was most recently locked by." /> + + <@lib.parameter + name = "locked" + location = "query" + type = "boolean" + desc = "Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired). + Value may only be `true`, as `false` matches any external task." /> + + <@lib.parameter + name = "notLocked" + location = "query" + type = "boolean" + desc = "Only include external tasks that are currently not locked (i.e., they have no lock or it has expired). + Value may only be `true`, as `false` matches any external task." /> + + <@lib.parameter + name = "withRetriesLeft" + location = "query" + type = "boolean" + desc = "Only include external tasks that have a positive (> 0) number of retries (or `null`). Value may only be + `true`, as `false` matches any external task." /> + + <@lib.parameter + name = "noRetriesLeft" + location = "query" + type = "boolean" + desc = "Only include external tasks that have 0 retries. Value may only be `true`, as `false` matches any + external task." /> + + <@lib.parameter + name = "lockExpirationAfter" + location = "query" + type = "string" + format = "date-time" + desc = "Restrict to external tasks that have a lock that expires after a given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." /> + + <@lib.parameter + name = "lockExpirationBefore" + location = "query" + type = "string" + format = "date-time" + desc = "Restrict to external tasks that have a lock that expires before a given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." /> + + <@lib.parameter + name = "activityId" + location = "query" + type = "string" + desc = "Filter by the id of the activity that an external task is created for." /> + + <@lib.parameter + name = "activityIdIn" + location = "query" + type = "string" + desc = "Filter by the comma-separated list of ids of the activities that an external task is created for." /> + + <@lib.parameter + name = "executionId" + location = "query" + type = "string" + desc = "Filter by the id of the execution that an external task belongs to." /> + + <@lib.parameter + name = "processInstanceId" + location = "query" + type = "string" + desc = "Filter by the id of the process instance that an external task belongs to." /> + + <@lib.parameter + name = "processInstanceIdIn" + location = "query" + type = "string" + desc = "Filter by a comma-separated list of process instance ids that an external task may belong to." /> + + <@lib.parameter + name = "processDefinitionId" + location = "query" + type = "string" + desc = "Filter by the id of the process definition that an external task belongs to." /> + + <@lib.parameter + name = "tenantIdIn" + location = "query" + type = "string" + desc = "Filter by a comma-separated list of tenant ids. + An external task must have one of the given tenant ids." /> + + <@lib.parameter + name = "active" + location = "query" + type = "boolean" + desc = "Only include active tasks. Value may only be `true`, as `false` matches any external task." /> + + <@lib.parameter + name = "suspended" + location = "query" + type = "boolean" + desc = "Only include suspended tasks. Value may only be `true`, as `false` matches any external task." /> + + <@lib.parameter + name = "priorityHigherThanOrEquals" + location = "query" + type = "integer" + format = "int64" + desc = "Only include jobs with a priority higher than or equal to the given value. + Value must be a valid `long` value." /> + + <@lib.parameter + name = "priorityLowerThanOrEquals" + location = "query" + type = "integer" + format = "int64" + desc = "Only include jobs with a priority lower than or equal to the given value. + Value must be a valid `long` value." /> + + <@lib.parameter + name = "processDefinitionKey" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to a process definition with the given key." /> + + <@lib.parameter + name = "processDefinitionKeyIn" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to a process definition with one of the given keys. The + keys need to be in a comma-separated list." /> + + <@lib.parameter + name = "processDefinitionName" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to a process definition with the given name." /> + + <@lib.parameter + name = "processDefinitionNameLike" + location = "query" + type = "string" + desc = "Restrict to tasks that have a process definition name that has the parameter value as + a substring." /> + + <@lib.parameter + name = "variableNamesIgnoreCase" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Match all variable names in this query case-insensitively. If set + `variableName` and `variablename` are treated as equal." /> + + <@lib.parameter + name = "variableValuesIgnoreCase" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Match all variable values in this query case-insensitively. If set + `variableValue` and `variablevalue` are treated as equal." /> + + <@lib.parameter + name = "processVariables" + location = "query" + type = "string" + last = last + desc = "Only include tasks that belong to process instances that have variables with certain + values. Variable filtering expressions are comma-separated and are structured as + follows: + + A valid parameter value has the form `key_operator_value`. `key` is the variable name, + `operator` is the comparison operator to be used and `value` the variable value. + + **Note**: Values are always treated as String objects on server side. + + Valid `operator` values are: + `eq` - equal to; + `neq` - not equal to; + `gt` - greater than; + `gteq` - greater than or equal to; + `lt` - lower than; + `lteq` - lower than or equal to; + `like`; + `notLike`. + `key` and `value` may not contain underscore or comma characters." /> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/filter-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/filter-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..75f00e3231e1e7a68c86a09875dc0c1d2c7e00b5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/filter-query-params.ftl @@ -0,0 +1,32 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query/index.html --> + +<#assign sortByValues = [ + '"filterId"', + '"resourceType"', + '"name"', + '"owner"' +]> + + +<#assign params = { + "filterId": { + "type": "string", + "desc": "Filter by the id of the filter." + }, + "resourceType": { + "type": "string", + "desc": "Filter by the resource type of the filter, e.g., `Task`." + }, + "name": { + "type": "string", + "desc": "Filter by the name of the filter." + }, + "nameLike": { + "type": "string", + "desc": "Filter by the name that the parameter is a substring of." + }, + "owner": { + "type": "string", + "desc": "Filter by the user id of the owner of the filter." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/group-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/group-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a36bcb879a510ce23baed2f10d1f048e497242d4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/group-query-params.ftl @@ -0,0 +1,43 @@ +<#assign sortByValues = [ + '"id"', + '"name"', + '"type"' +]> + +<#if requestMethod == "GET"> + <#assign listTypeDescription = "comma seperated list of"> +<#elseif requestMethod == "POST"> + <#assign listTypeDescription = "JSON string array of"> + + +<#assign params = { + "id": { + "type": "string", + "desc": "Filter by the id of the group." + }, + "idIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a ${listTypeDescription} group ids." + }, + "name": { + "type": "string", + "desc": "Filter by the name of the group." + }, + "nameLike": { + "type": "string", + "desc": "Filter by the name that the parameter is a substring of." + }, + "type": { + "type": "string", + "desc": "Filter by the type of the group." + }, + "member": { + "type": "string", + "desc": "Only retrieve groups where the given user id is a member of." + }, + "memberOfTenant": { + "type": "string", + "desc": "Only retrieve groups which are members of the given tenant." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-batch-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-batch-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..cc3f89517ddd341ea84d3118dcd7aee5650922e9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-batch-params.ftl @@ -0,0 +1,40 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/batch/get-query/index.html --> + +<#assign sortByValues = [ + '"batchId"', + '"startTime"', + '"endTime"', + '"tenantId"' +]> + + +<#assign params = { + "batchId": { + "type": "string", + "desc": "Filter by batch id." + }, + "type": { + "type": "string", + "desc": "Filter by batch type. See the + [User Guide](${docsUrl}/user-guide/process-engine/batch/#creating-a-batch) + for more information about batch types." + }, + "completed": { + "type": "boolean", + "desc": " + Filter completed or not completed batches. If the value is + `true`, only completed batches, i.e., end time is set, are + returned. Otherwise, if the value is `false`, only running + batches, i.e., end time is null, are returned." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a comma-separated list of tenant ids. A batch matches if it has one of the given + tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include batches which belong to no tenant. Value can effectively only be `true`, as `false` is the default behavior." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-decision-instance-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-decision-instance-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9b3ed3dd0e5ab89c66320e68112fc308de3cb843 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-decision-instance-query-params.ftl @@ -0,0 +1,130 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query/index.html --> + +<#assign sortByValues = [ + '"evaluationTime"', + '"tenantId"' +]> + +<#assign params = { + "decisionInstanceId": { + "type": "string", + "desc": "Filter by decision instance id." + }, + "decisionInstanceIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by decision instance ids. Must be a comma-separated list of decision instance ids." + }, + "decisionDefinitionId": { + "type": "string", + "desc": "Filter by the decision definition the instances belongs to." + }, + "decisionDefinitionIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by the decision definitions the instances belongs to. Must be a + comma-separated list of decision definition ids." + }, + "decisionDefinitionKey": { + "type": "string", + "desc": "Filter by the key of the decision definition the instances belongs to." + }, + "decisionDefinitionKeyIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by the keys of the decision definition the instances belongs to. Must be a comma- + separated list of decision definition keys." + }, + "decisionDefinitionName": { + "type": "string", + "desc": "Filter by the name of the decision definition the instances belongs to." + }, + "decisionDefinitionNameLike": { + "type": "string", + "desc": "Filter by the name of the decision definition the instances belongs to, that the parameter + is a substring of." + }, + "processDefinitionId": { + "type": "string", + "desc": "Filter by the process definition the instances belongs to." + }, + "processDefinitionKey": { + "type": "string", + "desc": "Filter by the key of the process definition the instances belongs to." + }, + "processInstanceId": { + "type": "string", + "desc": "Filter by the process instance the instances belongs to." + }, + "caseDefinitionId": { + "type": "string", + "desc": "Filter by the case definition the instances belongs to." + }, + "caseDefinitionKey": { + "type": "string", + "desc": "Filter by the key of the case definition the instances belongs to." + }, + "caseInstanceId": { + "type": "string", + "desc": "Filter by the case instance the instances belongs to." + }, + "activityIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by the activity ids the instances belongs to. + Must be a comma-separated list of acitvity ids." + }, + "activityInstanceIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by the activity instance ids the instances belongs to. + Must be a comma-separated list of acitvity instance ids." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a comma-separated list of tenant ids. A historic decision instance must have one + of the given tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include historic decision instances that belong to no tenant. Value may only be + `true`, as `false` is the default behavior." + }, + "evaluatedBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that were evaluated before the given date. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format `yyyy-MM- + dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "evaluatedAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that were evaluated after the given date. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format `yyyy-MM- + dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "userId": { + "type": "string", + "desc": "Restrict to instances that were evaluated by the given user." + }, + "rootDecisionInstanceId": { + "type": "string", + "desc": "Restrict to instances that have a given root decision instance id. + This also includes the decision instance with the given id." + }, + "rootDecisionInstancesOnly": { + "type": "boolean", + "desc": "Restrict to instances those are the root decision instance of an evaluation. + Value may only be `true`, as `false` is the default behavior." + }, + "decisionRequirementsDefinitionId": { + "type": "string", + "desc": "Filter by the decision requirements definition the instances belongs to." + }, + "decisionRequirementsDefinitionKey": { + "type": "string", + "desc": "Filter by the key of the decision requirements definition the instances belongs to." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-decision-instance-single-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-decision-instance-single-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..54f4d592a54ebd9486ca9964d0b523a4f9740185 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-decision-instance-single-query-params.ftl @@ -0,0 +1,23 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query/index.html --> + +<#assign params = { + "includeInputs": { + "type": "boolean", + "desc": "Include input values in the result. + Value may only be `true`, as `false` is the default behavior." + }, + "includeOutputs": { + "type": "boolean", + "desc": "Include output values in the result. + Value may only be `true`, as `false` is the default behavior." + }, + "disableBinaryFetching": { + "type": "boolean", + "desc": "Disables fetching of byte array input and output values. + Value may only be `true`, as `false` is the default behavior." + }, + "disableCustomObjectDeserialization": { + "type": "boolean", + "desc": "Disables deserialization of input and output values that are custom objects. + Value may only be `true`, as `false` is the default behavior." +}}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-external-task-log-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-external-task-log-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8b6a06c0fe5d4f6b509e125704c804e4d09b1a90 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-external-task-log-query-params.ftl @@ -0,0 +1,107 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/get-external-task-log-query/index.html --> + +<#assign sortByValues = [ + '"timestamp"', + '"externalTaskId"', + '"topicName"', + '"workerId"', + '"retries"', + '"priority"', + '"activityId"', + '"activityInstanceId"', + '"executionId"', + '"processInstanceId"', + '"processDefinitionId"', + '"processDefinitionKey"', + '"tenantId"' +]> + +<#assign params = { + "logId": { + "type": "string", + "desc": "Filter by historic external task log id." + }, + "externalTaskId": { + "type": "string", + "desc": "Filter by external task id." + }, + "topicName": { + "type": "string", + "desc": "Filter by an external task topic." + }, + "workerId": { + "type": "string", + "desc": "Filter by the id of the worker that the task was most recently locked by." + }, + "errorMessage": { + "type": "string", + "desc": "Filter by external task exception message." + }, + "activityIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic external task logs which belong to one of the passed activity ids." + }, + "activityInstanceIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic external task logs which belong to one of the passed activity + instance ids." + }, + "executionIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic external task logs which belong to one of the passed execution ids." + }, + "processInstanceId": { + "type": "string", + "desc": "Filter by process instance id." + }, + "processDefinitionId": { + "type": "string", + "desc": "Filter by process definition id." + }, + "processDefinitionKey": { + "type": "string", + "desc": "Filter by process definition key." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic external task log entries which belong to one of the passed and + comma-separated tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include historic external task log entries that belong to no tenant. Value may only + be `true`, as `false` is the default behavior." + }, + "priorityLowerThanOrEquals": { + "type": "integer", + "format": "int64", + "desc": "Only include logs for which the associated external task had a priority lower than or + equal to the given value. Value must be a valid `long` value." + }, + "priorityHigherThanOrEquals": { + "type": "integer", + "format": "int64", + "desc": "Only include logs for which the associated external task had a priority higher than or + equal to the given value. Value must be a valid `long` value." + }, + "creationLog": { + "type": "boolean", + "desc": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + "failureLog": { + "type": "boolean", + "desc": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + "successLog": { + "type": "boolean", + "desc": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + "deletionLog": { + "type": "boolean", + "desc": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-incident-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-incident-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a0a55b9b9b0105cf169fb133ec264adb97b913ab --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-incident-query-params.ftl @@ -0,0 +1,141 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query/index.html --> + +<#assign sortByValues = [ + '"incidentId"', + '"incidentMessage"', + '"createTime"', + '"endTime"', + '"incidentType"', + '"executionId"', + '"activityId"', + '"processInstanceId"', + '"processDefinitionId"', + '"processDefinitionKey"', + '"causeIncidentId"', + '"rootCauseIncidentId"', + '"configuration"', + '"historyConfiguration"', + '"tenantId"', + '"incidentState"' +]> + +<#assign dateDefault = "By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`."> + +<#assign params = { + "incidentId": { + "type": "string", + "desc": "Restricts to incidents that have the given id." + }, + "incidentType": { + "type": "string", + "desc": "Restricts to incidents that belong to the given incident type. See the [User + Guide](/manual/develop/user-guide/process-engine/incidents/#incident-types) + for a list of incident types." + }, + "incidentMessage": { + "type": "string", + "desc": "Restricts to incidents that have the given incident message." + }, + "incidentMessageLike": { + "type": "string", + "desc": "Restricts to incidents that incidents message is a substring of the given value. + The string can include the wildcard character '%' to express + like-strategy: starts with (string%), ends with (%string) or contains + (%string%). +" + }, + "processDefinitionId": { + "type": "string", + "desc": "Restricts to incidents that belong to a process definition with the given id." + }, + "processDefinitionKey": { + "type": "string", + "desc": "Restricts to incidents that have the given processDefinitionKey." + }, + "processDefinitionKeyIn": { + "type": "array", + "itemType": "string", + "desc": "Restricts to incidents that have one of the given process definition keys." + }, + "processInstanceId": { + "type": "string", + "desc": "Restricts to incidents that belong to a process instance with the given id." + }, + "executionId": { + "type": "string", + "desc": "Restricts to incidents that belong to an execution with the given id." + }, + "createTimeBefore": { + "type": "string", + "format": "date-time", + "desc": "Restricts to incidents that have a createTime date before the given date. ${dateDefault}" + }, + "createTimeAfter": { + "type": "string", + "format": "date-time", + "desc": "Restricts to incidents that have a createTime date after the given date. ${dateDefault}" + }, + "endTimeBefore": { + "type": "string", + "format": "date-time", + "desc": "Restricts to incidents that have an endTimeBefore date before the given date. ${dateDefault}" + }, + "endTimeAfter": { + "type": "string", + "format": "date-time", + "desc": "Restricts to incidents that have an endTimeAfter date after the given date. ${dateDefault}" + }, + "activityId": { + "type": "string", + "desc": "Restricts to incidents that belong to an activity with the given id." + }, + "failedActivityId": { + "type": "string", + "desc": "Restricts to incidents that were created due to the failure of an activity with the given + id." + }, + "causeIncidentId": { + "type": "string", + "desc": "Restricts to incidents that have the given incident id as cause incident." + }, + "rootCauseIncidentId": { + "type": "string", + "desc": "Restricts to incidents that have the given incident id as root cause incident." + }, + "configuration": { + "type": "string", + "desc": "Restricts to incidents that have the given parameter set as configuration." + }, + "historyConfiguration": { + "type": "string", + "desc": "Restricts to incidents that have the given parameter set as history configuration." + }, + "open": { + "type": "boolean", + "desc": "Restricts to incidents that are open." + }, + "resolved": { + "type": "boolean", + "desc": "Restricts to incidents that are resolved." + }, + "deleted": { + "type": "boolean", + "desc": "Restricts to incidents that are deleted." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Restricts to incidents that have one of the given comma-separated tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include historic incidents that belong to no tenant. Value may only be + `true`, as `false` is the default behavior." + }, + "jobDefinitionIdIn": { + "type": "array", + "itemType": "string", + "desc": "Restricts to incidents that have one of the given comma-separated job definition ids." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-variable-instance-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-variable-instance-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d5a42a86d63895eec262d4f373ae4db90bdae73d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/historic-variable-instance-query-params.ftl @@ -0,0 +1,115 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/variable-instance/get-variable-instance-query/index.html --> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/variable-instance/post-variable-instance-query/index.html --> + +<#assign sortByValues = [ + '"instanceId"','"variableName"','"tenantId"' +]> + +<#if requestMethod == "GET"> + <#assign variableValueDescription = "Is treated as a `String` object on server side."> + <#assign paramListType = "and comma-separated"> +<#elseif requestMethod == "POST"> + <#assign variableValueDescription = "May be `String`, `Number` or `Boolean`."> + <#assign paramListType = ""> + + +<#assign params = { + "variableName": { + "type": "string", + "desc": "Filter by variable name." + }, + "variableNameLike": { + "type": "string", + "desc": "Restrict to variables with a name like the parameter." + }, + "variableValue": { + "type": "object", + "desc": "Filter by variable value. ${variableValueDescription}" + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "desc": "Match the variable name provided in `variableName` and `variableNameLike` case- + insensitively. If set to `true` **variableName** and **variablename** are + treated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "desc": "Match the variable value provided in `variableValue` case-insensitively. If set to `true` + **variableValue** and **variablevalue** are treated as equal." + }, + "variableTypeIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic variable instances which belong to one of the passed and comma- + separated variable types. A list of all supported variable types can be found + [here](${docsUrl}/user-guide/process-engine/variables/#supported-variable-values). + **Note:** All non-primitive variables are associated with the type + 'serializable'." + }, + "includeDeleted": { + "type": "boolean", + "desc": "Include variables that has already been deleted during the execution." + }, + "processInstanceId": { + "type": "string", + "desc": "Filter by the process instance the variable belongs to." + }, + "processInstanceIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic variable instances which belong to one of the passed ${paramListType} process instance ids." + }, + "processDefinitionId": { + "type": "string", + "desc": "Filter by the process definition the variable belongs to." + }, + "processDefinitionKey": { + "type": "string", + "desc": "Filter by a key of the process definition the variable belongs to." + }, + "executionIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic variable instances which belong to one of the passed and ${paramListType} execution ids." + }, + "caseInstanceId": { + "type": "string", + "desc": "Filter by the case instance the variable belongs to." + }, + "caseExecutionIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic variable instances which belong to one of the passed and ${paramListType} case execution ids." + }, + "caseActivityIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic variable instances which belong to one of the passed and ${paramListType} case activity ids." + }, + "taskIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic variable instances which belong to one of the passed and ${paramListType} task ids." + }, + "activityInstanceIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic variable instances which belong to one of the passed and ${paramListType} activity instance ids." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic variable instances which belong to one of the passed and comma- + separated tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include historic variable instances that belong to no tenant. Value may only be + `true`, as `false` is the default behavior." + }, + "variableNameIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic variable instances which belong to one of the passed ${paramListType} variable names." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-activity-instance.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-activity-instance.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c2f5c5ade3860149ce1e24d607f5d0f18ed77613 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-activity-instance.ftl @@ -0,0 +1,108 @@ +<#assign sortByValues = [ + '"activityInstanceId"', + '"instanceId"', + '"executionId"', + '"activityId"', + '"activityName"', + '"activityType"', + '"startTime"', + '"endTime"', + '"duration"', + '"definitionId"', + '"occurrence"', + '"tenantId"' +]> + +<#if requestMethod == "GET"> + <#assign listTypeDescription = "Filter by a comma-separated list of ids"> +<#elseif requestMethod == "POST"> + <#assign listTypeDescription = "Must be a JSON array of Strings"> + + +<#assign params = { + "activityInstanceId": { + "type": "string", + "desc": "Filter by activity instance id." + }, + "processInstanceId": { + "type": "string", + "desc": "Filter by process instance id." + }, + "processDefinitionId": { + "type": "string", + "desc": "Filter by process definition id." + }, + "executionId": { + "type": "string", + "desc": "Filter by the id of the execution that executed the activity instance." + }, + "activityId": { + "type": "string", + "desc": "Filter by the activity id (according to BPMN 2.0 XML)." + }, + "activityName": { + "type": "string", + "desc": "Filter by the activity name (according to BPMN 2.0 XML)." + }, + "activityType": { + "type": "string", + "desc": "Filter by activity type." + }, + "taskAssignee": { + "type": "string", + "desc": "Only include activity instances that are user tasks and assigned to a given user." + }, + "finished": { + "type": "boolean", + "desc": "Only include finished activity instances. + Value may only be `true`, as `false` behaves the same as when the property is not set." + }, + "unfinished": { + "type": "boolean", + "desc": "Only include unfinished activity instances. + Value may only be `true`, as `false` behaves the same as when the property is not set." + }, + "canceled": { + "type": "boolean", + "desc": "Only include canceled activity instances. + Value may only be `true`, as `false` behaves the same as when the property is not set." + }, + "completeScope": { + "type": "boolean", + "desc": "Only include activity instances which completed a scope. + Value may only be `true`, as `false` behaves the same as when the property is not set." + }, + "startedBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that were started before the given date. By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "startedAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that were started after the given date. By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that were finished before the given date. By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that were finished after the given date. By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "${listTypeDescription}. An activity instance must have one of the given tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include historic activity instances that belong to no tenant. Value may only be `true`, as `false` is the default behavior." + } +}> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-cleanable-decision-definition-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-cleanable-decision-definition-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1b9d8d2e12fd814a5e9bf1243e538622c4d123ec --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-cleanable-decision-definition-query-params.ftl @@ -0,0 +1,36 @@ +<#assign sortByValues = [ + 'finished' +]> + +<#assign params = { + "decisionDefinitionIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by decision definition ids. Must be a comma-separated list of decision definition ids." + }, + + "decisionDefinitionKeyIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by decision definition keys. Must be a comma-separated list of decision definition keys." + }, + + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a comma-separated list of tenant ids. A decision definition must have one of the given tenant + ids." + }, + + "withoutTenantId": { + "type": "boolean", + "desc": "Only include decision definitions which belong to no tenant. Value may only be `true`, as `false` + is the default behavior." + }, + + "compact": { + "type": "boolean", + "desc": "Only include decision instances which have more than zero finished instances. Value may only be `true`, + as `false` is the default behavior." + } +}> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-detail-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-detail-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..cd48cfeab77fc348dc42ea55411f1c6b2dd41ed8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-detail-query-params.ftl @@ -0,0 +1,112 @@ +<#assign sortByValues = [ + '"processInstanceId"', + '"variableName"', + '"variableType"', + '"variableRevision"', + '"formPropertyId"', + '"time"', + '"occurrence"', + '"tenantId"' +]> + +<#assign dateFormatDescription = "Default [format](${docsUrl}/reference/rest/overview/date-format/) + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200."/> +<#if requestMethod == "GET"> + <#assign listType = "comma-separated"> +<#elseif requestMethod == "POST"> + <#assign listType = ""> + + +<#assign params = { + "processInstanceId": { + "type": "string", + "desc": "Filter by process instance id." + }, + "processInstanceIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic details which belong to one of the passed ${listType} process instance ids." + }, + "executionId": { + "type": "string", + "desc": "Filter by execution id." + }, + "taskId": { + "type": "string", + "desc": "Filter by task id." + }, + "activityInstanceId": { + "type": "string", + "desc": "Filter by activity instance id." + }, + "caseInstanceId": { + "type": "string", + "desc": "Filter by case instance id." + }, + "caseExecutionId": { + "type": "string", + "desc": "Filter by case execution id." + }, + "variableInstanceId": { + "type": "string", + "desc": "Filter by variable instance id." + }, + "variableTypeIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic details where the variable updates belong to one of the passed ${listType} + list of variable types. A list of all supported variable types can be found + [here](${docsUrl}/user-guide/process-engine/variables/#supported-variable-values). + **Note:** All non-primitive variables are associated with the type `serializable`." + }, + "variableNameLike": { + "type": "string", + "desc": "Filter by variable name like. Example usage: `variableNameLike(%camunda%)`. The query will match the names of variables in a case-insensitive way." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a ${listType} list of tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include historic details that belong to no tenant. Value may only be + `true`, as `false` is the default behavior." + }, + "userOperationId": { + "type": "string", + "desc": "Filter by a user operation id." + }, + "formFields": { + "type": "boolean", + "desc": "Only include `HistoricFormFields`. Value may only be `true`, as `false` is the default behavior." + }, + "variableUpdates": { + "type": "boolean", + "desc": "Only include `HistoricVariableUpdates`. Value may only be `true`, as `false` is the default behavior." + }, + "excludeTaskDetails": { + "type": "boolean", + "desc": "Excludes all task-related `HistoricDetails`, so only items which have no task id set will be selected. + When this parameter is used together with `taskId`, this call is ignored and task details are not excluded. + Value may only be `true`, as `false` is the default behavior." + }, + "initial": { + "type": "boolean", + "desc": "Restrict to historic variable updates that contain only initial variable values. + Value may only be `true`, as `false` is the default behavior." + }, + "occurredBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to historic details that occured before the given date (including the date). + ${dateFormatDescription}" + }, + "occurredAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to historic details that occured after the given date (including the date). + ${dateFormatDescription}" + } +} +/> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-identity-link.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-identity-link.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f795326a1c692f4054af7f1208f572a33047efde --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-identity-link.ftl @@ -0,0 +1,69 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/identity-links/get-identity-link-query/index.html --> + +<#assign sortByValues = [ + '"time"', + '"type"', + '"userId"', + '"groupId"', + '"taskId"', + '"processDefinitionId"', + '"processDefinitionKey"', + '"operationType"', + '"assignerId"', + '"tenantId"' +]> + +<#assign params = { + "type": { + "type": "string", + "desc": "Restricts to identity links that have the given type (candidate/assignee/owner)." + }, + "userId": { + "type": "string", + "desc": "Restricts to identity links that have the given user id." + }, + "groupId": { + "type": "string", + "desc": "Restricts to identity links that have the given group id." + }, + "dateBefore": { + "type": "string", + "format": "date-time", + "desc": "Restricts to identity links that have the time before the given time." + }, + "dateAfter": { + "type": "string", + "format": "date-time", + "desc": "Restricts to identity links that have the time after the given time." + }, + "taskId": { + "type": "string", + "desc": "Restricts to identity links that have the given task id." + }, + "processDefinitionId": { + "type": "string", + "desc": "Restricts to identity links that have the given process definition id." + }, + "processDefinitionKey": { + "type": "string", + "desc": "Restricts to identity links that have the given process definition key." + }, + "operationType": { + "type": "string", + "desc": "Restricts to identity links that have the given operationType (add/delete)." + }, + "assignerId": { + "type": "string", + "desc": "Restricts to identity links that have the given assigner id." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a comma-separated list of tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include historic identity links that belong to no tenant. Value may only be + `true`, as `false` is the default behavior." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-job-log-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-job-log-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a05b34fbba3b025c1627877b2623aea27bb47ad3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-job-log-params.ftl @@ -0,0 +1,122 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/job-log/get-job-log-query/index.html --> + +<#assign sortByValues = [ + '"timestamp"', + '"jobId"', + '"jobDefinitionId"', + '"jobDueDate"', + '"jobRetries"', + '"jobPriority"', + '"activityId"', + '"executionId"', + '"processInstanceId"', + '"processDefinitionId"', + '"processDefinitionKey"', + '"deploymentId"', + '"hostname"', + '"occurrence"', + '"tenantId"' +]> + +<#assign params = { + "logId": { + "type": "string", + "desc": "Filter by historic job log id." + }, + "jobId": { + "type": "string", + "desc": "Filter by job id." + }, + "jobExceptionMessage": { + "type": "string", + "desc": "Filter by job exception message." + }, + "jobDefinitionId": { + "type": "string", + "desc": "Filter by job definition id." + }, + "jobDefinitionType": { + "type": "string", + "desc": "Filter by job definition type. See the + [User Guide](${docsUrl}/user-guide/process-engine/the-job-executor/#job-creation) + for more information about job definition types." + }, + "jobDefinitionConfiguration": { + "type": "string", + "desc": "Filter by job definition configuration." + }, + "activityIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic job logs which belong to one of the passed activity ids." + }, + "failedActivityIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic job logs which belong to failures of one of the passed activity ids." + }, + "executionIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic job logs which belong to one of the passed execution ids." + }, + "processInstanceId": { + "type": "string", + "desc": "Filter by process instance id." + }, + "processDefinitionId": { + "type": "string", + "desc": "Filter by process definition id." + }, + "processDefinitionKey": { + "type": "string", + "desc": "Filter by process definition key." + }, + "deploymentId": { + "type": "string", + "desc": "Filter by deployment id." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include historic job log entries which belong to one of the passed and comma- + separated tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include historic job log entries that belong to no tenant. Value may only be + `true`, as `false` is the default behavior." + }, + "hostname": { + "type": "string", + "desc": "Filter by hostname." + }, + "jobPriorityLowerThanOrEquals": { + "type": "integer", + "format": "int64", + "desc": "Only include logs for which the associated job had a priority lower than or equal to the + given value. Value must be a valid `long` value." + }, + "jobPriorityHigherThanOrEquals": { + "type": "integer", + "format": "int64", + "desc": "Only include logs for which the associated job had a priority higher than or equal to the + given value. Value must be a valid `long` value." + }, + "creationLog": { + "type": "boolean", + "desc": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + "failureLog": { + "type": "boolean", + "desc": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + "successLog": { + "type": "boolean", + "desc": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + "deletionLog": { + "type": "boolean", + "desc": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-process-definition-activity-statistics.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-process-definition-activity-statistics.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0b43d5f1a4cef32d181bfa7462b4395ece1c47f8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-process-definition-activity-statistics.ftl @@ -0,0 +1,57 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/process-definition/get-historic-activity-statistics-query/index.html --> + +<#assign sortByValues = [ + '"activityId"' +]> + +<#assign defaultDateFormat = "By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, + e.g., `2013-01-23T14:42:45.000+0200`." > + +<#assign params = { + "canceled": { + "type": "boolean", + "desc": "Whether to include the number of canceled activity instances in the result or not. Valid + values are `true` or `false`. Default: `false`." + }, + "finished": { + "type": "boolean", + "desc": "Whether to include the number of finished activity instances in the result or not. Valid + values are `true` or `false`. Default: `false`." + }, + "completeScope": { + "type": "boolean", + "desc": "Whether to include the number of activity instances which completed a scope in the result + or not. Valid values are `true` or `false`. Default: `false`." + }, + "incidents": { + "type": "boolean", + "desc": "Whether to include the number of incidents. Valid values are `true` or `false`. Default: `false`." + }, + "startedBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to process instances that were started before the given date. ${defaultDateFormat}" + }, + "startedAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to process instances that were started after the given date. ${defaultDateFormat}" + }, + "finishedBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to process instances that were finished before the given date. ${defaultDateFormat}" + }, + "finishedAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to process instances that were finished after the given date. ${defaultDateFormat}" + }, + "processInstanceIdIn": { + "type": "array", + "itemType": "string", + "desc": "Restrict to process instances with the given IDs. The IDs must be provided as a comma- + separated list." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-process-definition-process-instance-report.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-process-definition-process-instance-report.ftl new file mode 100644 index 0000000000000000000000000000000000000000..af17f933f75113d5dfc68bbe92059f08f553c94e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-process-definition-process-instance-report.ftl @@ -0,0 +1,34 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/process-definition/get-cleanable-process-instance-report-query/index.html --> + +<#assign sortByValues = [ + '"finished"' +]> + +<#assign params = { + "processDefinitionIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by process definition ids. Must be a comma-separated list of process definition ids." + }, + "processDefinitionKeyIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by process definition keys. Must be a comma-separated list of process definition keys." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a comma-separated list of tenant ids. A process definition must have one of the given + tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include process definitions which belong to no tenant. Value may only be `true`, as + `false` is the default behavior." + }, + "compact": { + "type": "boolean", + "desc": "Only include process instances which have more than zero finished instances. Value may + only be `true`, as `false` is the default behavior." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-process-instance.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-process-instance.ftl new file mode 100644 index 0000000000000000000000000000000000000000..aeea2140b0265a924b02af712973865ea269e62f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-process-instance.ftl @@ -0,0 +1,330 @@ +<#assign sortByValues = [ + '"instanceId"', + '"definitionId"', + '"definitionKey"', + '"definitionName"', + '"definitionVersion"', + '"businessKey"', + '"startTime"', + '"endTime"', + '"duration"', + '"tenantId"' +]> + +<#if requestMethod == "GET"> + + <#assign listTypeDescription = "Filter by a comma-separated list of `Strings`" /> + + <#assign variableDescription>Only include process instances that have/had variables with certain values. + Variable filtering expressions are comma-separated and are structured as follows: + A valid parameter value has the form `key_operator_value`. `key` is the variable name, `operator` is the comparison operator to be used and `value` the variable value. + + **Note:** Values are always treated as String objects on server side. + + Valid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`. + + Key and value may not contain underscore or comma characters. + + +<#elseif requestMethod == "POST"> + + <#assign listTypeDescription = "Must be a JSON array of `Strings`"> + + <#assign variableDescription>A JSON array to only include process instances that have/had variables with certain values. + The array consists of objects with the three properties `name`, `operator` and `value`. `name` (`String`) is the variable name, + `operator` (`String`) is the comparison operator to be used and `value` the variable value. + + Value may be `String`, `Number` or `Boolean`. + + Valid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`. + + + +<#assign params = { + "processInstanceId": { + "type": "string", + "desc": "Filter by process instance id." + }, + + "processInstanceIds": { + "type": "array", + "itemType": "string", + "desc": "Filter by process instance ids. ${listTypeDescription}." + }, + + "processInstanceIdNotIn": { + "type": "array", + "itemType": "string", + "desc": "Exclude instances by process instance ids. ${listTypeDescription}." + }, + + "processDefinitionId": { + "type": "string", + "desc": "Filter by the process definition the instances run on." + }, + + "processDefinitionKey": { + "type": "string", + "desc": "Filter by the key of the process definition the instances run on." + }, + + "processDefinitionKeyIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a list of process definition keys. A process instance must have one of the given process definition keys. ${listTypeDescription}." + }, + "processDefinitionName": { + "type": "string", + "desc": "Filter by the name of the process definition the instances run on." + }, + + "processDefinitionNameLike": { + "type": "string", + "desc": "Filter by process definition names that the parameter is a substring of." + }, + + "processDefinitionKeyNotIn": { + "type": "array", + "itemType": "string", + "desc": "Exclude instances that belong to a set of process definitions. ${listTypeDescription}." + }, + "processInstanceBusinessKey": { + "type": "string", + "desc": "Filter by process instance business key." + }, + "processInstanceBusinessKeyIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a list of business keys. A process instance must have one of the given business keys. ${listTypeDescription}" + }, + + "processInstanceBusinessKeyLike": { + "type": "string", + "desc": "Filter by process instance business key that the parameter is a substring of." + }, + + "rootProcessInstances": { + "type": "boolean", + "desc": "Restrict the query to all process instances that are top level process instances." + }, + + "rootProcessInstanceId": { + "type": "string", + "desc": "Filter by root process instance id." + }, + + "finished": { + "type": "boolean", + "desc": "Only include finished process instances. This flag includes all process instances + that are completed or terminated. Value may only be `true`, as `false` is the default behavior." + }, + + "unfinished": { + "type": "boolean", + "desc": "Only include unfinished process instances. Value may only be `true`, as `false` is the default behavior." + }, + + "withJobsRetrying": { + "type": "boolean", + "desc": "Only include process instances which are associated with jobs that have encountered exceptions and still + have retries left. Value may only be `true`, as `false` is the default behavior." + }, + + "withIncidents": { + "type": "boolean", + "desc": "Only include process instances which have an incident. Value may only be `true`, as `false` is the default behavior." + }, + + "withRootIncidents": { + "type": "boolean", + "desc": "Only include process instances which have a root incident. Value may only be `true`, as `false` is the default behavior." + }, + + "incidentIdIn": { + "type": "array", + "itemType": "string", + "desc": "Restrict to instances that have an incident with one of the given ids. ${listTypeDescription}" + }, + + "incidentType": { + "type": "string", + "desc": "Filter by the incident type. See the [User Guide](${docsUrl}/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + "incidentStatus": { + "type": "string", + "enumValues": ["open", "resolved"], + "desc": "Only include process instances which have an incident in status either open or resolved. To get all process instances, use the query parameter withIncidents." + }, + "incidentMessage": { + "type": "string", + "desc": "Filter by the incident message. Exact match." + }, + + "incidentMessageLike": { + "type": "string", + "desc": "Filter by the incident message that the parameter is a substring of." + }, + + "startedBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that were started before the given date. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "startedAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that were started after the given date. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that were finished before the given date. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that were finished after the given date. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "executedActivityAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that executed an activity after the given date (inclusive). + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "executedActivityBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that executed an activity before the given date (inclusive). + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "executedJobAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that executed an job after the given date (inclusive). + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "executedJobBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to instances that executed an job before the given date (inclusive). + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "startedBy": { + "type": "string", + "desc": "Only include process instances that were started by the given user." + }, + + "superProcessInstanceId": { + "type": "string", + "desc": "Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id." + }, + + "subProcessInstanceId": { + "type": "string", + "desc": "Restrict query to one process instance that has a sub process instance with the given id." + }, + + "superCaseInstanceId": { + "type": "string", + "desc": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + + "subCaseInstanceId": { + "type": "string", + "desc": "Restrict query to one process instance that has a sub case instance with the given id." + }, + + "caseInstanceId": { + "type": "string", + "desc": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a list of tenant ids. A process instance must have one of the given tenant ids. ${listTypeDescription}" + }, + + "withoutTenantId": { + "type": "boolean", + "desc": "Only include historic process instances which belong to no tenant. Value may only be `true`, as `false` is the default behavior." + }, + + "activityIdIn": { + "type": "array", + "itemType": "string", + "desc": "Restrict to instances with an active activity with one of the given ids. In contrast to the `activeActivityIdIn` filter, it can query for async and incident activities. ${listTypeDescription}" + }, + + "executedActivityIdIn": { + "type": "array", + "itemType": "string", + "desc": "Restrict to instances that executed an activity with one of given ids. ${listTypeDescription}" + }, + + "activeActivityIdIn": { + "type": "array", + "itemType": "string", + "desc": "Restrict to instances that have an active activity with one of given ids. ${listTypeDescription}" + }, + + "active": { + "type": "boolean", + "desc": "Restrict to instances that are active." + }, + + "suspended": { + "type": "boolean", + "desc": "Restrict to instances that are suspended." + }, + + "completed": { + "type": "boolean", + "desc": "Restrict to instances that are completed." + }, + + "externallyTerminated": { + "type": "boolean", + "desc": "Restrict to instances that are externallyTerminated." + }, + + "internallyTerminated": { + "type": "boolean", + "desc": "Restrict to instances that are internallyTerminated." + }, + + "variables": { + "type": "array", + "dto": "VariableQueryParameterDto", + "desc": "${variableDescription}" + }, + + "variableNamesIgnoreCase": { + "type": "boolean", + "desc": "Match all variable names provided in variables case-insensitively. If set to `true` variableName and variablename are treated as equal." + }, + + "variableValuesIgnoreCase": { + "type": "boolean", + "desc": "Match all variable values provided in variables case-insensitively. If set to `true` variableValue and variablevalue are treated as equal." + }, + + "orQueries": { + "type": "array", + "dto": "HistoricProcessInstanceQueryDto", + "desc": "A JSON array of nested historic process instance queries with OR semantics. + + A process instance matches a nested query if it fulfills at least one of the query's predicates. + + With multiple nested queries, a process instance must fulfill at least one predicate of each query + ([Conjunctive Normal Form](https://en.wikipedia.org/wiki/Conjunctive_normal_form)). + + All process instance query properties can be used except for: `sorting` + + See the [User Guide](${docsUrl}/user-guide/process-engine/process-engine-api/#or-queries) for more information about OR queries." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-task-instance-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-task-instance-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..25688602531c711bdae4c2b62c1ff8a5ceaf633c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/history-task-instance-query-params.ftl @@ -0,0 +1,356 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/task/get-task-query/index.html --> + +<#assign sortByValues = [ + '"taskId"', + '"activityInstanceId"', + '"processDefinitionId"', + '"processInstanceId"', + '"executionId"', + '"duration"', + '"endTime"', + '"startTime"', + '"taskName"', + '"taskDescription"', + '"assignee"', + '"owner"', + '"dueDate"', + '"followUpDate"', + '"deleteReason"', + '"taskDefinitionKey"', + '"priority"', + '"caseDefinitionId"', + '"caseInstanceId"', + '"caseExecutionId"', + '"tenantId"' +]> +<#assign dateFormatDescription = "By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, + e.g., `2013-01-23T14:42:45.000+0200`." +/> + +<#if requestMethod == "GET"> + <#assign listType = "comma-separated"> +<#elseif requestMethod == "POST"> + <#assign listType = ""> + + +<#assign params = { + "taskId": { + "type": "string", + "desc": "Filter by task id." + }, + "taskParentTaskId": { + "type": "string", + "desc": "Filter by parent task id." + }, + "processInstanceId": { + "type": "string", + "desc": "Filter by process instance id." + }, + "rootProcessInstanceId": { + "type": "string", + "desc": "Filter by root process instance id." + }, + "processInstanceBusinessKey": { + "type": "string", + "desc": "Filter by process instance business key." + }, + "processInstanceBusinessKeyIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by process instances with one of the give business keys. + The keys need to be in a comma-separated list." + }, + "processInstanceBusinessKeyLike": { + "type": "string", + "desc": "Filter by process instance business key that has the parameter value as a substring." + }, + "executionId": { + "type": "string", + "desc": "Filter by the id of the execution that executed the task." + }, + "processDefinitionId": { + "type": "string", + "desc": "Filter by process definition id." + }, + "processDefinitionKey": { + "type": "string", + "desc": "Restrict to tasks that belong to a process definition with the given key." + }, + "processDefinitionName": { + "type": "string", + "desc": "Restrict to tasks that belong to a process definition with the given name." + }, + "caseInstanceId": { + "type": "string", + "desc": "Filter by case instance id." + }, + "caseExecutionId": { + "type": "string", + "desc": "Filter by the id of the case execution that executed the task." + }, + "caseDefinitionId": { + "type": "string", + "desc": "Filter by case definition id." + }, + "caseDefinitionKey": { + "type": "string", + "desc": "Restrict to tasks that belong to a case definition with the given key." + }, + "caseDefinitionName": { + "type": "string", + "desc": "Restrict to tasks that belong to a case definition with the given name." + }, + "activityInstanceIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include tasks which belong to one of the passed ${listType} activity instance ids." + }, + "taskName": { + "type": "string", + "desc": "Restrict to tasks that have the given name." + }, + "taskNameLike": { + "type": "string", + "desc": "Restrict to tasks that have a name with the given parameter value as substring." + }, + "taskDescription": { + "type": "string", + "desc": "Restrict to tasks that have the given description." + }, + "taskDescriptionLike": { + "type": "string", + "desc": "Restrict to tasks that have a description that has the parameter value as a substring." + }, + "taskDefinitionKey": { + "type": "string", + "desc": "Restrict to tasks that have the given key." + }, + "taskDefinitionKeyIn": { + "type": "array", + "itemType": "string", + "desc": "Restrict to tasks that have one of the passed ${listType} task definition keys." + }, + "taskDeleteReason": { + "type": "string", + "desc": "Restrict to tasks that have the given delete reason." + }, + "taskDeleteReasonLike": { + "type": "string", + "desc": "Restrict to tasks that have a delete reason that has the parameter value as a substring." + }, + "taskAssignee": { + "type": "string", + "desc": "Restrict to tasks that the given user is assigned to." + }, + "taskAssigneeLike": { + "type": "string", + "desc": "Restrict to tasks that are assigned to users with the parameter value as a substring." + }, + "taskOwner": { + "type": "string", + "desc": "Restrict to tasks that the given user owns." + }, + "taskOwnerLike": { + "type": "string", + "desc": "Restrict to tasks that are owned by users with the parameter value as a substring." + }, + "taskPriority": { + "type": "integer", + "format": "int32", + "desc": "Restrict to tasks that have the given priority." + }, + "assigned": { + "type": "boolean", + "desc": "If set to `true`, restricts the query to all tasks that are assigned." + }, + "unassigned": { + "type": "boolean", + "desc": "If set to `true`, restricts the query to all tasks that are unassigned." + }, + "finished": { + "type": "boolean", + "desc": "Only include finished tasks. Value may only be `true`, as `false` is the default behavior." + }, + "unfinished": { + "type": "boolean", + "desc": "Only include unfinished tasks. Value may only be `true`, as `false` is the default + behavior." + }, + "processFinished": { + "type": "boolean", + "desc": "Only include tasks of finished processes. Value may only be `true`, as `false` is the + default behavior." + }, + "processUnfinished": { + "type": "boolean", + "desc": "Only include tasks of unfinished processes. Value may only be `true`, as `false` is the + default behavior." + }, + "taskDueDate": { + "type": "string", + "format": "date-time", + "desc": "Restrict to tasks that are due on the given date. ${dateFormatDescription}" + }, + "taskDueDateBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to tasks that are due before the given date. ${dateFormatDescription}" + }, + "taskDueDateAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to tasks that are due after the given date. ${dateFormatDescription}" + }, + "withoutTaskDueDate": { + "type": "boolean", + "desc": "Only include tasks which have no due date. Value may only be `true`, as `false` is the + default behavior." + }, + "taskFollowUpDate": { + "type": "string", + "format": "date-time", + "desc": "Restrict to tasks that have a followUp date on the given date. ${dateFormatDescription}" + }, + "taskFollowUpDateBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to tasks that have a followUp date before the given date. ${dateFormatDescription}" + }, + "taskFollowUpDateAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to tasks that have a followUp date after the given date. ${dateFormatDescription}" + }, + "startedBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to tasks that were started before the given date. ${dateFormatDescription}" + }, + "startedAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to tasks that were started after the given date. ${dateFormatDescription}" + }, + "finishedBefore": { + "type": "string", + "format": "date-time", + "desc": "Restrict to tasks that were finished before the given date. ${dateFormatDescription}" + }, + "finishedAfter": { + "type": "string", + "format": "date-time", + "desc": "Restrict to tasks that were finished after the given date. ${dateFormatDescription}" + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a ${listType} list of tenant ids. A task instance must have one of the given + tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include historic task instances that belong to no tenant. Value may only be + `true`, as `false` is the default behavior." + }, + "taskVariables": { + "type": "array", + "dto": "VariableQueryParameterDto", + "desc": "Only include tasks that have variables with certain values. Variable filtering expressions are + comma-separated and are structured as follows: + + A valid parameter value has the form `key_operator_value`. + `key` is the variable name, `operator` is the comparison operator to be used + and `value` the variable value. + **Note:** Values are always treated as `String` objects on server side. + + + Valid operator values are: + * `eq` - equal to; + * `neq` - not equal to; + * `gt` - greater than; + * `gteq` - greater than or equal to; + * `lt` - lower than; + * `lteq` - lower than or equal to; + * `like`. + + `key` and `value` may not contain underscore or comma characters." + }, + "processVariables": { + "type": "array", + "dto": "VariableQueryParameterDto", + "desc": "Only include tasks that belong to process instances that have variables with certain + values. Variable filtering expressions are comma-separated and are structured as + follows: + + A valid parameter value has the form `key_operator_value`. + `key` is the variable name, `operator` is the comparison operator to be used + and `value` the variable value. + **Note:** Values are always treated as `String` objects on server side. + + + Valid operator values are: + * `eq` - equal to; + * `neq` - not equal to; + * `gt` - greater than; + * `gteq` - greater than or equal to; + * `lt` - lower than; + * `lteq` - lower than or equal to; + * `like`; + * `notLike`. + + `key` and `value` may not contain underscore or comma characters." + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "desc": "Match the variable name provided in `taskVariables` and `processVariables` case- + insensitively. If set to `true` **variableName** and **variablename** are + treated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "desc": "Match the variable value provided in `taskVariables` and `processVariables` case- + insensitively. If set to `true` **variableValue** and **variablevalue** are + treated as equal." + }, + "taskInvolvedUser": { + "type": "string", + "desc": "Restrict to tasks with a historic identity link to the given user." + }, + "taskInvolvedGroup": { + "type": "string", + "desc": "Restrict to tasks with a historic identity link to the given group." + }, + "taskHadCandidateUser": { + "type": "string", + "desc": "Restrict to tasks with a historic identity link to the given candidate user." + }, + "taskHadCandidateGroup": { + "type": "string", + "desc": "Restrict to tasks with a historic identity link to the given candidate group." + }, + "withCandidateGroups": { + "type": "boolean", + "desc": "Only include tasks which have a candidate group. Value may only be `true`, + as `false` is the default behavior." + }, + "withoutCandidateGroups": { + "type": "boolean", + "desc": "Only include tasks which have no candidate group. Value may only be `true`, + as `false` is the default behavior." + }, + "orQueries": { + "type": "array", + "dto": "HistoricTaskInstanceQueryDto", + "desc": "A JSON array of nested historic task instance queries with OR semantics. + + A task instance matches a nested query if it fulfills at least one of the query's predicates. + + With multiple nested queries, a task instance must fulfill at least one predicate of each query + ([Conjunctive Normal Form](https://en.wikipedia.org/wiki/Conjunctive_normal_form)). + + All task instance query properties can be used except for: `sorting`, `withCandidateGroups`, ` withoutCandidateGroups`. + + See the [User Guide](${docsUrl}/user-guide/process-engine/process-engine-api/#or-queries) for more information about OR queries." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/incident-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/incident-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..71000f113820c97a10ce52dcfcd803480b5ed93b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/incident-query-params.ftl @@ -0,0 +1,113 @@ + <@lib.parameter + name = "incidentId" + location = "query" + type = "string" + desc = "Restricts to incidents that have the given id." /> + + <@lib.parameter + name = "incidentType" + location = "query" + type = "string" + desc = "Restricts to incidents that belong to the given incident type. See the + [User Guide](${docsUrl}/user-guide/process-engine/incidents/#incident-types) for a list of incident + types." /> + + <@lib.parameter + name = "incidentMessage" + location = "query" + type = "string" + desc = "Restricts to incidents that have the given incident message." /> + + <@lib.parameter + name = "incidentMessageLike" + location = "query" + type = "string" + desc = "Restricts to incidents that incidents message is a substring of the given value. The string can include + the wildcard character '%' to express like-strategy: starts with (`string%`), ends with (`%string`) or + contains (`%string%`)." /> + + <@lib.parameter + name = "processDefinitionId" + location = "query" + type = "string" + desc = "Restricts to incidents that belong to a process definition with the given id." /> + + <@lib.parameter + name = "processDefinitionKeyIn" + location = "query" + type = "string" + desc = "Restricts to incidents that belong to a process definition with the given keys. Must be a + comma-separated list." /> + + <@lib.parameter + name = "processInstanceId" + location = "query" + type = "string" + desc = "Restricts to incidents that belong to a process instance with the given id." /> + + <@lib.parameter + name = "executionId" + location = "query" + type = "string" + desc = "Restricts to incidents that belong to an execution with the given id." /> + + <@lib.parameter + name = "incidentTimestampBefore" + location = "query" + type = "string" + format = "date-time" + desc = "Restricts to incidents that have an incidentTimestamp date before the given date. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date + must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." /> + + <@lib.parameter + name = "incidentTimestampAfter" + location = "query" + type = "string" + format = "date-time" + desc = "Restricts to incidents that have an incidentTimestamp date after the given date. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date + must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." /> + + <@lib.parameter + name = "activityId" + location = "query" + type = "string" + desc = "Restricts to incidents that belong to an activity with the given id." /> + + <@lib.parameter + name = "failedActivityId" + location = "query" + type = "string" + desc = "Restricts to incidents that were created due to the failure of an activity with the given id." /> + + <@lib.parameter + name = "causeIncidentId" + location = "query" + type = "string" + desc = "Restricts to incidents that have the given incident id as cause incident." /> + + <@lib.parameter + name = "rootCauseIncidentId" + location = "query" + type = "string" + desc = "Restricts to incidents that have the given incident id as root cause incident." /> + + <@lib.parameter + name = "configuration" + location = "query" + type = "string" + desc = "Restricts to incidents that have the given parameter set as configuration." /> + + <@lib.parameter + name = "tenantIdIn" + location = "query" + type = "string" + desc = "Restricts to incidents that have one of the given comma-separated tenant ids." /> + + <@lib.parameter + name = "jobDefinitionIdIn" + location = "query" + type = "string" + last = last + desc = "Restricts to incidents that have one of the given comma-separated job definition ids." /> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/job-definition-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/job-definition-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..abf63ebcfd0cd3e0a78f105d445eb7ef7e91895d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/job-definition-query-params.ftl @@ -0,0 +1,79 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/get-query/index.html --> + +<#assign sortByValues = [ + '"jobDefinitionId"', + '"activityId"', + '"processDefinitionId"', + '"processDefinitionKey"', + '"jobType"', + '"jobConfiguration"', + '"tenantId"' +]> + +<#if requestMethod == "GET"> + <#assign listSeparator = " and comma-separated"> +<#elseif requestMethod == "POST"> + <#assign listSeparator = ""> + + +<#assign params = { + "jobDefinitionId": { + "type": "string", + "desc": "Filter by job definition id." + }, + "activityIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include job definitions which belong to one of the passed${listSeparator} activity ids." + }, + "processDefinitionId": { + "type": "string", + "desc": "Only include job definitions which exist for the given process definition id." + }, + "processDefinitionKey": { + "type": "string", + "desc": "Only include job definitions which exist for the given process definition key." + }, + "jobType": { + "type": "string", + "desc": "Only include job definitions which exist for the given job type. See the + [User Guide](${docsUrl}/user-guide/process-engine/the-job-executor/#job-creation) + for more information about job types." + }, + "jobConfiguration": { + "type": "string", + "desc": "Only include job definitions which exist for the given job configuration. For example: for + timer jobs it is the timer configuration." + }, + "active": { + "type": "boolean", + "desc": "Only include active job definitions. Value may only be `true`, as `false` is the default + behavior." + }, + "suspended": { + "type": "boolean", + "desc": "Only include suspended job definitions. Value may only be `true`, as `false` is the + default behavior." + }, + "withOverridingJobPriority": { + "type": "boolean", + "desc": "Only include job definitions that have an overriding job priority defined. The only + effective value is `true`. If set to `false`, this filter is not applied." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include job definitions which belong to one of the passed${listSeparator} tenant + ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include job definitions which belong to no tenant. Value may only be `true`, as + `false` is the default behavior." + }, + "includeJobDefinitionsWithoutTenantId": { + "type": "boolean", + "desc": "Include job definitions which belong to no tenant. Can be used in combination with + `tenantIdIn`. Value may only be `true`, as `false` is the default behavior." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/job-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/job-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1b0aefc9c3452c7ff438502a1a8ca8c18d449180 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/job-query-params.ftl @@ -0,0 +1,174 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/get-query/index.html --> + +<#assign sortByValues = [ + '"jobId"', + '"executionId"', + '"processInstanceId"', + '"processDefinitionId"', + '"processDefinitionKey"', + '"jobPriority"', + '"jobRetries"', + '"jobDueDate"', + '"tenantId"' +]> + +<#if requestMethod == "GET"> + <#assign listType = "comma-separated"> + <#assign dueDateDesc = "Due date expressions are comma-separated and are structured as follows: + + A valid condition value has the form `operator_value`. + `operator` is the comparison operator to be used and `value` the date value + as string. + + Valid operator values are: `gt` - greater than; `lt` - lower than. + `value` may not contain underscore or comma characters."> + <#assign createTimesDesc = " + Create time expressions are comma-separated and are structured as + follows: + + A valid condition value has the form `operator_value`. + `operator` is the comparison operator to be used and `value` the date value + as string. + + Valid operator values are: `gt` - greater than; `lt` - lower than. + `value` may not contain underscore or comma characters."> + +<#elseif requestMethod == "POST"> + <#assign listType = ""> + <#assign dueDateDesc = ""> + <#assign createTimesDesc = ""> + + +<#assign params = { + "jobId": { + "type": "string", + "desc": "Filter by job id." + }, + "jobIds": { + "type": "array", + "itemType": "string", + "desc": "Filter by a ${listType} list of job ids." + }, + "jobDefinitionId": { + "type": "string", + "desc": "Only select jobs which exist for the given job definition." + }, + "processInstanceId": { + "type": "string", + "desc": "Only select jobs which exist for the given process instance." + }, + "processInstanceIds": { + "type": "array", + "itemType": "string", + "desc": "Only select jobs which exist for the given ${listType} list of process instance ids." + }, + "executionId": { + "type": "string", + "desc": "Only select jobs which exist for the given execution." + }, + "processDefinitionId": { + "type": "string", + "desc": "Filter by the id of the process definition the jobs run on." + }, + "processDefinitionKey": { + "type": "string", + "desc": "Filter by the key of the process definition the jobs run on." + }, + "activityId": { + "type": "string", + "desc": "Only select jobs which exist for an activity with the given id." + }, + "withRetriesLeft": { + "type": "boolean", + "desc": "Only select jobs which have retries left. Value may only be `true`, as `false` is the + default behavior." + }, + "executable": { + "type": "boolean", + "desc": "Only select jobs which are executable, i.e., retries > 0 and due date is `null` or due + date is in the past. Value may only be `true`, as `false` is the default + behavior." + }, + "timers": { + "type": "boolean", + "desc": "Only select jobs that are timers. Cannot be used together with `messages`. Value may only + be `true`, as `false` is the default behavior." + }, + "messages": { + "type": "boolean", + "desc": "Only select jobs that are messages. Cannot be used together with `timers`. Value may only + be `true`, as `false` is the default behavior." + }, + "dueDates": { + "type": "array", + "dto": "JobConditionQueryParameterDto", + "desc": "Only select jobs where the due date is lower or higher than the given date. + ${dueDateDesc}" + }, + "createTimes": { + "type": "array", + "dto": "JobConditionQueryParameterDto", + "desc": "Only select jobs created before or after the given date. + ${createTimesDesc}" + }, + "withException": { + "type": "boolean", + "desc": "Only select jobs that failed due to an exception. Value may only be `true`, as `false` is + the default behavior." + }, + "exceptionMessage": { + "type": "string", + "desc": "Only select jobs that failed due to an exception with the given message." + }, + "failedActivityId": { + "type": "string", + "desc": "Only select jobs that failed due to an exception at an activity with the given id." + }, + "noRetriesLeft": { + "type": "boolean", + "desc": "Only select jobs which have no retries left. Value may only be `true`, as `false` is the + default behavior." + }, + "active": { + "type": "boolean", + "desc": "Only include active jobs. Value may only be `true`, as `false` is the default behavior." + }, + "suspended": { + "type": "boolean", + "desc": "Only include suspended jobs. Value may only be `true`, as `false` is the default behavior." + }, + "priorityLowerThanOrEquals": { + "type": "integer", + "format": "int64", + "desc": "Only include jobs with a priority lower than or equal to the given value. Value must be a + valid `long` value." + }, + "priorityHigherThanOrEquals": { + "type": "integer", + "format": "int64", + "desc": "Only include jobs with a priority higher than or equal to the given value. Value must be a + valid `long` value." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include jobs which belong to one of the passed ${listType} tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "desc": "Only include jobs which belong to no tenant. Value may only be `true`, as `false` is the + default behavior." + }, + "includeJobsWithoutTenantId": { + "type": "boolean", + "desc": "Include jobs which belong to no tenant. Can be used in combination with `tenantIdIn`. + Value may only be `true`, as `false` is the default behavior." + }, + "acquired": { + "type": "boolean", + "desc": "Only select jobs which are acquired, i.e., lock expiration date is not null, lock expiration + date is in future. Value may only be `true`, as `false` is the default + behavior. This does not take account if the job is suspended. This filter can be used with the + suspension filter." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/pagination-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/pagination-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..de132835253c067fcc9377c9f9b33b3bacdaa38e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/pagination-params.ftl @@ -0,0 +1,13 @@ + <@lib.parameter + name = "firstResult" + location = "query" + type = "integer" + desc = "Pagination of results. Specifies the index of the first result to return."/> + + <@lib.parameter + name = "maxResults" + location = "query" + type = "integer" + last = last + desc = "Pagination of results. Specifies the maximum number of results to return. + Will return less results if there are no more results left."/> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/process-definition-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/process-definition-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..baed3da9394870f0099bbc32f5bce4382bc21eb1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/process-definition-query-params.ftl @@ -0,0 +1,183 @@ + <@lib.parameter name = "processDefinitionId" + location = "query" + type = "string" + desc = "Filter by process definition id."/> + + <@lib.parameter name = "processDefinitionIdIn" + location = "query" + type = "string" + desc = "Filter by a comma-separated list of process definition ids."/> + + <@lib.parameter name = "name" + location = "query" + type = "string" + desc = "Filter by process definition name."/> + + <@lib.parameter name = "nameLike" + location = "query" + type = "string" + desc = "Filter by process definition names that the parameter is a substring of."/> + + <@lib.parameter name = "deploymentId" + location = "query" + type = "string" + desc = "Filter by the deployment the id belongs to."/> + + <@lib.parameter name = "deployedAfter" + location = "query" + type = "string" + format="date-time" + desc = "Filter by the deploy time of the deployment the process definition belongs to. + Only selects process definitions that have been deployed after (exclusive) a specific time. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the + format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., + `2013-01-23T14:42:45.546+0200`."/> + + <@lib.parameter name = "deployedAt" + location = "query" + type = "string" + format="date-time" + desc = "Filter by the deploy time of the deployment the process definition belongs to. + Only selects process definitions that have been deployed at a specific time (exact match). + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the + format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., + `2013-01-23T14:42:45.546+0200`."/> + + <@lib.parameter name = "key" + location = "query" + type = "string" + desc = "Filter by process definition key, i.e., the id in the BPMN 2.0 XML. Exact match."/> + + <@lib.parameter name = "keysIn" + location = "query" + type = "string" + desc = "Filter by a comma-separated list of process definition keys."/> + + <@lib.parameter name = "keyLike" + location = "query" + type = "string" + desc = "Filter by process definition keys that the parameter is a substring of."/> + + <@lib.parameter name = "category" + location = "query" + type = "string" + desc = "Filter by process definition category. Exact match."/> + + <@lib.parameter name = "categoryLike" + location = "query" + type = "string" + desc = "Filter by process definition categories that the parameter is a substring of."/> + + <@lib.parameter name = "version" + location = "query" + type = "integer" + format="int32" + desc = "Filter by process definition version."/> + + <@lib.parameter name = "latestVersion" + location = "query" + type = "boolean" + desc = "Only include those process definitions that are latest versions. + Value may only be `true`, as `false` is the default behavior."/> + + <@lib.parameter name = "resourceName" + location = "query" + type = "string" + desc = "Filter by the name of the process definition resource. Exact match."/> + + <@lib.parameter name = "resourceNameLike" + location = "query" + type = "string" + desc = "Filter by names of those process definition resources that the parameter is a substring of."/> + + <@lib.parameter name = "startableBy" + location = "query" + type = "string" + desc = "Filter by a user name who is allowed to start the process."/> + + <@lib.parameter name = "active" + location = "query" + type = "boolean" + desc = "Only include active process definitions. + Value may only be `true`, as `false` is the default behavior."/> + + <@lib.parameter name = "suspended" + location = "query" + type = "boolean" + desc = "Only include suspended process definitions. + Value may only be `true`, as `false` is the default behavior."/> + + <@lib.parameter name = "incidentId" + location = "query" + type = "string" + desc = "Filter by the incident id."/> + + <@lib.parameter name = "incidentType" + location = "query" + type = "string" + desc = "Filter by the incident type. + See the [User Guide](${docsUrl}/user-guide/process-engine/incidents/#incident-types) + for a list of incident types."/> + + <@lib.parameter name = "incidentMessage" + location = "query" + type = "string" + desc = "Filter by the incident message. Exact match."/> + + <@lib.parameter name = "incidentMessageLike" + location = "query" + type = "string" + desc = "Filter by the incident message that the parameter is a substring of."/> + + <@lib.parameter name = "tenantIdIn" + location = "query" + type = "string" + desc = "Filter by a comma-separated list of tenant ids. + A process definition must have one of the given tenant ids."/> + + <@lib.parameter name = "withoutTenantId" + location = "query" + type = "boolean" + desc = "Only include process definitions which belong to no tenant. + Value may only be true, as false is the default behavior." /> + + <@lib.parameter name = "includeProcessDefinitionsWithoutTenantId" + location = "query" + type = "boolean" + desc = "Include process definitions which belong to no tenant. Can be used in combination with `tenantIdIn`. + Value may only be `true`, as `false` is the default behavior."/> + + <@lib.parameter name = "versionTag" + location = "query" + type = "string" + desc = "Filter by the version tag."/> + + <@lib.parameter name = "versionTagLike" + location = "query" + type = "string" + desc = "Filter by the version tag that the parameter is a substring of."/> + + <@lib.parameter name = "withoutVersionTag" + location = "query" + type = "boolean" + desc = "Only include process definitions without a `versionTag`."/> + + <@lib.parameter name = "startableInTasklist" + location = "query" + type = "boolean" + desc = "Filter by process definitions which are startable in Tasklist.."/> + + <@lib.parameter name = "notStartableInTasklist" + location = "query" + type = "boolean" + desc = "Filter by process definitions which are not startable in Tasklist."/> + + <@lib.parameter name = "startablePermissionCheck" + location = "query" + type = "boolean" + last = last + desc = "Filter by process definitions which the user is allowed to start in Tasklist. + If the user doesn't have these permissions the result will be empty list. + The permissions are: + * `CREATE` permission for all Process instances + * `CREATE_INSTANCE` and `READ` permission on Process definition level"/> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/process-instance-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/process-instance-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a68be9f01aa968a2a9f25ea7839c00a60beeb64d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/process-instance-query-params.ftl @@ -0,0 +1,189 @@ + <@lib.parameter name = "processInstanceIds" + location = "query" + type = "string" + desc = "Filter by a comma-separated list of process instance ids."/> + + <@lib.parameter name = "businessKey" + location = "query" + type = "string" + desc = "Filter by process instance business key."/> + + <@lib.parameter name = "businessKeyLike" + location = "query" + type = "string" + desc = "Filter by process instance business key that the parameter is a substring of."/> + + <@lib.parameter + name = "caseInstanceId" + location = "query" + type = "string" + desc = "Filter by case instance id."/> + + <@lib.parameter name = "processDefinitionId" + location = "query" + type = "string" + desc = "Filter by the deployment the id belongs to."/> + + <@lib.parameter name = "processDefinitionKey" + location = "query" + type = "string" + desc = "Filter by the key of the process definition the instances run on."/> + + <@lib.parameter name = "processDefinitionKeyIn" + location = "query" + type = "string" + desc = "Filter by a comma-separated list of process definition keys. + A process instance must have one of the given process definition keys."/> + + <@lib.parameter name = "processDefinitionKeyNotIn" + location = "query" + type = "string" + desc = "Exclude instances by a comma-separated list of process definition keys. + A process instance must not have one of the given process definition keys."/> + + <@lib.parameter name = "deploymentId" + location = "query" + type = "string" + desc = "Filter by the deployment the id belongs to."/> + + <@lib.parameter name = "superProcessInstance" + location = "query" + type = "string" + desc = "Restrict query to all process instances that are sub process instances of the given process instance. + Takes a process instance id."/> + + <@lib.parameter name = "subProcessInstance" + location = "query" + type = "string" + desc = "Restrict query to all process instances that have the given process instance as a sub process instance. + Takes a process instance id."/> + + <@lib.parameter name = "superCaseInstance" + location = "query" + type = "string" + desc = "Restrict query to all process instances that are sub process instances of the given case instance. + Takes a case instance id."/> + + <@lib.parameter name = "subCaseInstance" + location = "query" + type = "string" + desc = "Restrict query to all process instances that have the given case instance as a sub case instance. + Takes a case instance id."/> + + <@lib.parameter name = "active" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "Only include active process instances. Value may only be true, + as false is the default behavior."/> + + <@lib.parameter name = "suspended" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "Only include suspended process instances. Value may only be true, + as false is the default behavior."/> + + <@lib.parameter name = "withIncident" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "Filter by presence of incidents. Selects only process instances that have an incident."/> + + <@lib.parameter name = "incidentId" + location = "query" + type = "string" + desc = "Filter by the incident id."/> + + <@lib.parameter name = "incidentType" + location = "query" + type = "string" + desc = "Filter by the incident type. + See the [User Guide](${docsUrl}/user-guide/process-engine/incidents/#incident-types) + for a list of incident types."/> + + <@lib.parameter name = "incidentMessage" + location = "query" + type = "string" + desc = "Filter by the incident message. Exact match."/> + + <@lib.parameter name = "incidentMessageLike" + location = "query" + type = "string" + desc = "Filter by the incident message that the parameter is a substring of."/> + + <@lib.parameter name = "tenantIdIn" + location = "query" + type = "string" + desc = "Filter by a comma-separated list of tenant ids. A process instance must have one of the given tenant ids."/> + + <@lib.parameter name = "withoutTenantId" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "Only include process instances which belong to no tenant."/> + + <@lib.parameter name = "processDefinitionWithoutTenantId" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "Only include process instances which process definition has no tenant id."/> + + <@lib.parameter name = "activityIdIn" + location = "query" + type = "string" + desc = "Filter by a comma-separated list of activity ids. + A process instance must currently wait in a leaf activity with one of the given activity ids."/> + + <@lib.parameter name = "rootProcessInstances" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "Restrict the query to all process instances that are top level process instances."/> + + <@lib.parameter name = "rootProcessInstanceId" + location = "query" + type = "string" + desc = "Filter by root process instance id."/> + + <@lib.parameter name = "leafProcessInstances" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "Restrict the query to all process instances that are leaf instances. (i.e. don't have any sub instances)."/> + + <@lib.parameter name = "variables" + location = "query" + type = "string" + desc = "Only include process instances that have variables with certain values. + Variable filtering expressions are comma-separated and are structured as follows: + + A valid parameter value has the form `key_operator_value`. `key` is the variable name, + `operator` is the comparison operator to be used and `value` the variable value. + + **Note**: Values are always treated as String objects on server side. + + Valid `operator` values are: + `eq` - equal to; + `neq` - not equal to; + `gt` - greater than; + `gteq` - greater than or equal to; + `lt` - lower than; + `lteq` - lower than or equal to; + `like`. + `key` and `value` may not contain underscore or comma characters."/> + + <@lib.parameter name = "variableNamesIgnoreCase" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "Match all variable names in this query case-insensitively. + If set to true variableName and variablename are treated as equal."/> + + <@lib.parameter name = "variableValuesIgnoreCase" + location = "query" + type = "boolean" + defaultValue = 'false' + last = last + desc = "Match all variable values in this query case-insensitively. + If set to true variableValue and variablevalue are treated as equal."/> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/sort-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/sort-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..59b73a5b787563fe734d4778fc94c8c47c198841 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/sort-params.ftl @@ -0,0 +1,16 @@ + <@lib.parameter + name = "sortBy" + location = "query" + type = "string" + enumValues = sortByValues + desc = "Sort the results lexicographically by a given criterion. + Must be used in conjunction with the sortOrder parameter."/> + + <@lib.parameter + name = "sortOrder" + location = "query" + type = "string" + enumValues = ['"asc"', '"desc"'] + last = last + desc = "Sort the results in a given order. Values may be asc for ascending order or desc for descending order. + Must be used in conjunction with the sortBy parameter."/> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/sort-props.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/sort-props.ftl new file mode 100644 index 0000000000000000000000000000000000000000..515af59436daf7a0606e259356ea625c1d78ae48 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/sort-props.ftl @@ -0,0 +1,39 @@ +<@lib.dto> + +<#-- The sorting properties are defined in commons and are never "extended", + but have to be explicitly `#include`-ed in a `Dto.ftl`. There are two + reasons for this implementation: + + 1. `sortBy` values must be dynamically defined. Changing the current + `dto` macro requires a lot of work, but brings little value. + 2. Different `Query` endpoints have different `sort` properties. Not all + properties (e.g. `parameters`) should be present everywhere. --> + + <@lib.property + name = "sortBy" + type = "string" + enumValues = sortByValues + desc = "Sort the results lexicographically by a given criterion. + Must be used in conjunction with the sortOrder parameter." /> + + <@lib.property + name = "sortOrder" + type = "string" + enumValues = ['"asc"', '"desc"'] + last = last + desc = "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for + descending order. Must be used in conjunction with the sortBy parameter." /> + + <#if sortParamsDto?has_content> + , <#-- add a comma (,) if the `last` flag is set --> + + + <@lib.property + name = "parameters" + type = "ref" + dto = "${sortParamsDto}" + last = last /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/statistics-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/statistics-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..02599382eeeb716900c78b1f61fa8ab0108c22ff --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/statistics-query-params.ftl @@ -0,0 +1,27 @@ + + <@lib.parameter + name = "failedJobs" + location = "query" + type = "boolean" + desc = "Whether to include the number of failed jobs in the result or not. Valid values are `true` or `false`."/> + + <@lib.parameter + name = "incidents" + location = "query" + type = "boolean" + desc = "Valid values for this property are `true` or `false`. + If this property has been set to `true` the result will include the corresponding number of incidents + for each occurred incident type. + If it is set to `false`, the incidents will not be included in the result. + Cannot be used in combination with `incidentsForType`."/> + + <@lib.parameter + name = "incidentsForType" + location = "query" + type = "string" + last = last + desc = "If this property has been set with any incident type (i.e., a string value) the result + will only include the number of incidents for the assigned incident type. + Cannot be used in combination with `incidents`. + See the [User Guide](${docsUrl}/user-guide/process-engine/incidents/#incident-types) + for a list of incident types."/> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/statistics-result-props.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/statistics-result-props.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7b95d8b6b9aeae0593868def84b75e26772fb0f8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/statistics-result-props.ftl @@ -0,0 +1,34 @@ + <@lib.property + name = "id" + type = "string" + desc = "The id of the ${instanceType} the results are aggregated for."/> + + <@lib.property + name = "instances" + type = "integer" + format = "int32" + nullable = false + desc = "The total number of running process instances of this ${instanceType}."/> + + <@lib.property + name = "failedJobs" + type = "integer" + format = "int32" + nullable = false + desc = "The total number of failed jobs for the running instances. + **Note**: Will be `0` (not `null`), if failed jobs were excluded."/> + + <@lib.property + name = "incidents" + type = "array" + dto = "IncidentStatisticsResultDto" + desc = "Each item in the resulting array is an object which contains `incidentType` and `incidentCount`. + **Note**: Will be an empty array, if `incidents` or `incidentsForType` were excluded. + Furthermore, the array will be also empty if no incidents were found."/> + + <@lib.property + name = "@class" + type = "string" + desc = "The fully qualified class name of the data transfer object class. + The class name might change in future releases." + last = last /> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/task-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/task-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0acb5d10d03344c4df051a4bb263d18405daae01 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/task-query-params.ftl @@ -0,0 +1,697 @@ + <@lib.parameter name = "taskId" + location = "query" + type = "string" + desc = "Restrict to task with the given id." /> + + <@lib.parameter name = "taskIdIn" + location = "query" + type = "string" + desc = "Restrict to tasks with any of the given ids." /> + + <@lib.parameter name = "processInstanceId" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to process instances with the given id." /> + + <@lib.parameter name = "processInstanceIdIn" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to process instances with the given ids." /> + + <@lib.parameter name = "processInstanceBusinessKey" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to process instances with the given business key." /> + + <@lib.parameter name = "processInstanceBusinessKeyExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to process instances with the given business key which + is described by an expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.parameter name = "processInstanceBusinessKeyIn" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to process instances with one of the give business keys. + The keys need to be in a comma-separated list." /> + + <@lib.parameter name = "processInstanceBusinessKeyLike" + location = "query" + type = "string" + desc = "Restrict to tasks that have a process instance business key that has the parameter + value as a substring." /> + + <@lib.parameter name = "processInstanceBusinessKeyLikeExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that have a process instance business key that has the parameter + value as a substring and is described by an expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.parameter name = "processDefinitionId" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to a process definition with the given id." /> + + <@lib.parameter name = "processDefinitionKey" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to a process definition with the given key." /> + + <@lib.parameter name = "processDefinitionKeyIn" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to a process definition with one of the given keys. The + keys need to be in a comma-separated list." /> + + <@lib.parameter name = "processDefinitionName" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to a process definition with the given name." /> + + <@lib.parameter name = "processDefinitionNameLike" + location = "query" + type = "string" + desc = "Restrict to tasks that have a process definition name that has the parameter value as + a substring." /> + + <@lib.parameter name = "executionId" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to an execution with the given id." /> + + <@lib.parameter name = "caseInstanceId" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to case instances with the given id." /> + + <@lib.parameter name = "caseInstanceBusinessKey" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to case instances with the given business key." /> + + <@lib.parameter name = "caseInstanceBusinessKeyLike" + location = "query" + type = "string" + desc = "Restrict to tasks that have a case instance business key that has the parameter value + as a substring." /> + + <@lib.parameter name = "caseDefinitionId" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to a case definition with the given id." /> + + <@lib.parameter name = "caseDefinitionKey" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to a case definition with the given key." /> + + <@lib.parameter name = "caseDefinitionName" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to a case definition with the given name." /> + + <@lib.parameter name = "caseDefinitionNameLike" + location = "query" + type = "string" + desc = "Restrict to tasks that have a case definition name that has the parameter value as a + substring." /> + + <@lib.parameter name = "caseExecutionId" + location = "query" + type = "string" + desc = "Restrict to tasks that belong to a case execution with the given id." /> + + <@lib.parameter name = "activityInstanceIdIn" + location = "query" + type = "string" + desc = "Only include tasks which belong to one of the passed and comma-separated activity + instance ids." /> + + <@lib.parameter name = "tenantIdIn" + location = "query" + type = "string" + desc = "Only include tasks which belong to one of the passed and comma-separated + tenant ids." /> + + <@lib.parameter name = "withoutTenantId" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Only include tasks which belong to no tenant. Value may only be `true`, + as `false` is the default behavior." /> + + <@lib.parameter name = "assignee" + location = "query" + type = "string" + desc = "Restrict to tasks that the given user is assigned to." /> + + <@lib.parameter name = "assigneeExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that the user described by the given expression is assigned to. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.parameter name = "assigneeLike" + location = "query" + type = "string" + desc = "Restrict to tasks that have an assignee that has the parameter + value as a substring." /> + + <@lib.parameter name = "assigneeLikeExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that have an assignee that has the parameter value described by the + given expression as a substring. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.parameter name = "assigneeIn" + location = "query" + type = "string" + desc = "Only include tasks which are assigned to one of the passed and + comma-separated user ids." /> + + <@lib.parameter name = "assigneeNotIn" + location = "query" + type = "string" + desc = "Only include tasks which are not assigned to one of the passed and + comma-separated user ids." /> + + <@lib.parameter name = "owner" + location = "query" + type = "string" + desc = "Restrict to tasks that the given user owns." /> + + <@lib.parameter name = "ownerExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that the user described by the given expression owns. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.parameter name = "candidateGroup" + location = "query" + type = "string" + desc = "Only include tasks that are offered to the given group." /> + + <@lib.parameter name = "candidateGroupLike" + location = "query" + type = "string" + desc = "Only include tasks that are offered to groups that have the parameter value as a substring." /> + + <@lib.parameter name = "candidateGroupExpression" + location = "query" + type = "string" + desc = "Only include tasks that are offered to the group described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.parameter name = "candidateUser" + location = "query" + type = "string" + desc = "Only include tasks that are offered to the given user or to one of his groups." /> + + <@lib.parameter name = "candidateUserExpression" + location = "query" + type = "string" + desc = "Only include tasks that are offered to the user described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.parameter name = "includeAssignedTasks" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Also include tasks that are assigned to users in candidate queries. Default is to only + include tasks that are not assigned to any user if you query by candidate user or + group(s)." /> + + <@lib.parameter name = "involvedUser" + location = "query" + type = "string" + desc = "Only include tasks that the given user is involved in. A user is involved in a task if + an identity link exists between task and user (e.g., the user is the assignee)." /> + + <@lib.parameter name = "involvedUserExpression" + location = "query" + type = "string" + desc = "Only include tasks that the user described by the given expression is involved in. + A user is involved in a task if an identity link exists between task and user + (e.g., the user is the assignee). See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.parameter name = "assigned" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "If set to `true`, restricts the query to all tasks that are assigned." /> + + <@lib.parameter name = "unassigned" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "If set to `true`, restricts the query to all tasks that are unassigned." /> + + <@lib.parameter name = "taskDefinitionKey" + location = "query" + type = "string" + desc = "Restrict to tasks that have the given key." /> + + <@lib.parameter name = "taskDefinitionKeyIn" + location = "query" + type = "string" + desc = "Restrict to tasks that have one of the given keys. The keys need to be in a + comma-separated list." /> + + <@lib.parameter name = "taskDefinitionKeyNotIn" + location = "query" + type = "string" + desc = "Exclude instances by a list of task definition keys. The keys need to be in a + comma-separated list." /> + + <@lib.parameter name = "taskDefinitionKeyLike" + location = "query" + type = "string" + desc = "Restrict to tasks that have a key that has the parameter value as a substring." /> + + <@lib.parameter name = "name" + location = "query" + type = "string" + desc = "Restrict to tasks that have the given name." /> + + <@lib.parameter name = "nameNotEqual" + location = "query" + type = "string" + desc = "Restrict to tasks that do not have the given name." /> + + <@lib.parameter name = "nameLike" + location = "query" + type = "string" + desc = "Restrict to tasks that have a name with the given parameter value as substring." /> + + <@lib.parameter name = "nameNotLike" + location = "query" + type = "string" + desc = "Restrict to tasks that do not have a name with the given parameter + value as substring." /> + + <@lib.parameter name = "description" + location = "query" + type = "string" + desc = "Restrict to tasks that have the given description." /> + + <@lib.parameter name = "descriptionLike" + location = "query" + type = "string" + desc = "Restrict to tasks that have a description that has the parameter + value as a substring." /> + + <@lib.parameter name = "priority" + location = "query" + type = "integer" + desc = "Restrict to tasks that have the given priority." /> + + <@lib.parameter name = "maxPriority" + location = "query" + type = "integer" + desc = "Restrict to tasks that have a lower or equal priority." /> + + <@lib.parameter name = "minPriority" + location = "query" + type = "integer" + desc = "Restrict to tasks that have a higher or equal priority." /> + + <@lib.parameter name = "dueDate" + location = "query" + type = "string" + desc = "Restrict to tasks that are due on the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the + format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., + `2013-01-23T14:42:45.546+0200`." /> + + <@lib.parameter name = "dueDateExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that are due on the date described by the given expression. See the + [User Guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.parameter name = "dueAfter" + location = "query" + type = "string" + desc = "Restrict to tasks that are due after the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have + the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., + `2013-01-23T14:42:45.435+0200`." /> + + <@lib.parameter name = "dueAfterExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that are due after the date described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.parameter name = "dueBefore" + location = "query" + type = "string" + desc = "Restrict to tasks that are due before the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have + the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., + `2013-01-23T14:42:45.243+0200`." /> + + <@lib.parameter name = "dueBeforeExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that are due before the date described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.parameter name = "withoutDueDate" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Only include tasks which have no due date. Value may only be `true`, + as `false` is the default behavior." /> + + <@lib.parameter name = "followUpDate" + location = "query" + type = "string" + desc = "Restrict to tasks that have a followUp date on the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date + must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., + `2013-01-23T14:42:45.342+0200`." /> + + <@lib.parameter name = "followUpDateExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that have a followUp date on the date described by the given + expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.parameter name = "followUpAfter" + location = "query" + type = "string" + desc = "Restrict to tasks that have a followUp date after the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the + date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., + `2013-01-23T14:42:45.542+0200`." /> + + <@lib.parameter name = "followUpAfterExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that have a followUp date after the date described by the given + expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.parameter name = "followUpBefore" + location = "query" + type = "string" + desc = "Restrict to tasks that have a followUp date before the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the + date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., + `2013-01-23T14:42:45.234+0200`." /> + + <@lib.parameter name = "followUpBeforeExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that have a followUp date before the date described by the given + expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.parameter name = "followUpBeforeOrNotExistent" + location = "query" + type = "string" + desc = "Restrict to tasks that have no followUp date or a followUp date before the given date. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the + format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.432+0200`. The + typical use case is to query all `active` tasks for a user for a given date." /> + + <@lib.parameter name = "followUpBeforeOrNotExistentExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that have no followUp date or a followUp date before the date + described by the given expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.parameter name = "createdOn" + location = "query" + type = "string" + desc = "Restrict to tasks that were created on the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have + the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.324+0200`." /> + + <@lib.parameter name = "createdOnExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that were created on the date described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.parameter name = "createdAfter" + location = "query" + type = "string" + desc = "Restrict to tasks that were created after the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the + format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.342+0200`." /> + + <@lib.parameter name = "createdAfterExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that were created after the date described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.parameter name = "createdBefore" + location = "query" + type = "string" + desc = "Restrict to tasks that were created before the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the + format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." /> + + <@lib.parameter name = "createdBeforeExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that were created before the date described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.parameter name = "updatedAfter" + location = "query" + type = "string" + desc = "Restrict to tasks that were updated after the given date. Every action that fires + a [task update event](${docsUrl}/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must + have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." /> + + <@lib.parameter name = "updatedAfterExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that were updated after the date described by the given expression. Every action that fires + a [task update event](${docsUrl}/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.parameter name = "delegationState" + location = "query" + type = "string" + enumValues = ['"PENDING"', '"RESOLVED"'] + desc = "Restrict to tasks that are in the given delegation state. Valid values are + `PENDING` and `RESOLVED`." /> + + <@lib.parameter name = "candidateGroups" + location = "query" + type = "string" + desc = "Restrict to tasks that are offered to any of the given candidate groups. Takes a + comma-separated list of group names, so for example `developers,support,sales`." /> + + <@lib.parameter name = "candidateGroupsExpression" + location = "query" + type = "string" + desc = "Restrict to tasks that are offered to any of the candidate groups described by the + given expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to + `java.util.List` of Strings." /> + + <@lib.parameter name = "withCandidateGroups" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Only include tasks which have a candidate group. Value may only be `true`, + as `false` is the default behavior." /> + + <@lib.parameter name = "withoutCandidateGroups" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Only include tasks which have no candidate group. Value may only be `true`, + as `false` is the default behavior." /> + + <@lib.parameter name = "withCandidateUsers" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Only include tasks which have a candidate user. Value may only be `true`, + as `false` is the default behavior." /> + + <@lib.parameter name = "withoutCandidateUsers" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Only include tasks which have no candidate users. Value may only be `true`, + as `false` is the default behavior." /> + + <@lib.parameter name = "active" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Only include active tasks. Value may only be `true`, as `false` + is the default behavior." /> + + <@lib.parameter name = "suspended" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Only include suspended tasks. Value may only be `true`, as + `false` is the default behavior." /> + + <@lib.parameter name = "taskVariables" + location = "query" + type = "string" + desc = "Only include tasks that have variables with certain values. Variable filtering + expressions are comma-separated and are structured as follows: + + A valid parameter value has the form `key_operator_value`. `key` is the variable name, + `operator` is the comparison operator to be used and `value` the variable value. + + **Note**: Values are always treated as String objects on server side. + + Valid `operator` values are: + `eq` - equal to; + `neq` - not equal to; + `gt` - greater than; + `gteq` - greater than or equal to; + `lt` - lower than; + `lteq` - lower than or equal to; + `like`. + `key` and `value` may not contain underscore or comma characters." /> + + <@lib.parameter name = "processVariables" + location = "query" + type = "string" + desc = "Only include tasks that belong to process instances that have variables with certain + values. Variable filtering expressions are comma-separated and are structured as + follows: + + A valid parameter value has the form `key_operator_value`. `key` is the variable name, + `operator` is the comparison operator to be used and `value` the variable value. + + **Note**: Values are always treated as String objects on server side. + + Valid `operator` values are: + `eq` - equal to; + `neq` - not equal to; + `gt` - greater than; + `gteq` - greater than or equal to; + `lt` - lower than; + `lteq` - lower than or equal to; + `like`; + `notLike`. + `key` and `value` may not contain underscore or comma characters." /> + + <@lib.parameter name = "caseInstanceVariables" + location = "query" + type = "string" + desc = "Only include tasks that belong to case instances that have variables with certain + values. Variable filtering expressions are comma-separated and are structured as + follows: + + A valid parameter value has the form `key_operator_value`. `key` is the variable name, + `operator` is the comparison operator to be used and `value` the variable value. + + **Note**: Values are always treated as String objects on server side. + + Valid `operator` values are: + `eq` - equal to; + `neq` - not equal to; + `gt` - greater than; + `gteq` - greater than or equal to; + `lt` - lower than; + `lteq` - lower than or equal to; + `like`. + `key` and `value` may not contain underscore or comma characters." /> + + <@lib.parameter name = "variableNamesIgnoreCase" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Match all variable names in this query case-insensitively. If set + `variableName` and `variablename` are treated as equal." /> + + <@lib.parameter name = "variableValuesIgnoreCase" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Match all variable values in this query case-insensitively. If set + `variableValue` and `variablevalue` are treated as equal." /> + + <@lib.parameter name = "parentTaskId" + location = "query" + type = "string" + desc = "Restrict query to all tasks that are sub tasks of the given task. Takes a task id." /> + + <@lib.parameter name = "withCommentAttachmentInfo" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Check if task has attachments and/or comments. Value may only be `true`, as + `false` is the default behavior. + Adding the filter will do additional attachment and comments queries to the database, + it might slow down the query in case of tables having high volume of data. + This param is not considered for count queries" /> + + <@lib.parameter name = "withTaskVariablesInReturn" + location = "query" + type = "boolean" + defaultValue = "false" + desc = "Indicates if all the variables visible from task should be retrieved. A variable is visible from the task + if it is a local task variable or declared in a parent scope of the task. Value may only be `true`, as + `false` is the default behavior." /> + + <@lib.parameter name = "withTaskLocalVariablesInReturn" + location = "query" + type = "boolean" + defaultValue = "false" + last = last + desc = "Indicates if all the local variables visible from task should be retrieved. Value may only be `true`, as + `false` is the default behavior." /> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/tenant-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/tenant-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6dc25cdd4151390fee31cc8d6b4c36c61cdf1c81 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/tenant-query-params.ftl @@ -0,0 +1,33 @@ +<#assign sortByValues = [ + '"id"', + '"name"' +]> + +<#assign params = { + "id": { + "type": "string", + "desc": "Filter by the id of the tenant." + }, + "name": { + "type": "string", + "desc": "Filter by the name of the tenant." + }, + "nameLike": { + "type": "string", + "desc": "Filter by the name that the parameter is a substring of." + }, + "userMember": { + "type": "string", + "desc": "Select only tenants where the given user is a member of." + }, + "groupMember": { + "type": "string", + "desc": "Select only tenants where the given group is a member of." + }, + "includingGroupsOfUser": { + "type": "boolean", + "desc": "Select only tenants where the user or one of his groups is a member of. + Can only be used in combination with the `userMember` parameter. Value may only be `true`, + as `false` is the default behavior." + } +}> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/user-operation-log-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/user-operation-log-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..449bf8351cff205eee672bb5bee25d2e35023854 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/user-operation-log-query-params.ftl @@ -0,0 +1,117 @@ +<#assign sortByValues = [ + '"timestamp"' +]> +<#assign dateFormatDescription = "By [default](${docsUrl}/reference/rest/overview/date-format/), the + timestamp must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, + e.g., 2013-01-23T14:42:45.000+0200."/> +<#if requestMethod == "GET"> + <#assign listType = "comma-separated "> +<#elseif requestMethod == "POST"> + <#assign listType = ""> + + +<#assign params = { + "deploymentId": { + "type": "string", + "desc": "Filter by deployment id." + }, + "processDefinitionId": { + "type": "string", + "desc": "Filter by process definition id." + }, + "processDefinitionKey": { + "type": "string", + "desc": "Filter by process definition key." + }, + "processInstanceId": { + "type": "string", + "desc": "Filter by process instance id." + }, + "executionId": { + "type": "string", + "desc": "Filter by execution id." + }, + "caseDefinitionId": { + "type": "string", + "desc": "Filter by case definition id." + }, + "caseInstanceId": { + "type": "string", + "desc": "Filter by case instance id." + }, + "caseExecutionId": { + "type": "string", + "desc": "Filter by case execution id." + }, + "taskId": { + "type": "string", + "desc": "Only include operations on this task." + }, + "externalTaskId": { + "type": "string", + "desc": "Only include operations on this external task." + }, + "batchId": { + "type": "string", + "desc": "Only include operations on this batch." + }, + "jobId": { + "type": "string", + "desc": "Filter by job id." + }, + "jobDefinitionId": { + "type": "string", + "desc": "Filter by job definition id." + }, + "userId": { + "type": "string", + "desc": "Only include operations of this user." + }, + "operationId": { + "type": "string", + "desc": "Filter by the id of the operation. This allows fetching of multiple entries which are part + of a composite operation." + }, + "operationType": { + "type": "string", + "desc": "Filter by the type of the operation like `Claim` or `Delegate`. See the + [Javadoc](${docsUrl}/reference/javadoc/?org/camunda/bpm/engine/history/UserOperationLogEntry.html) + for a list of available operation types." + }, + "entityType": { + "type": "string", + "desc": "Filter by the type of the entity that was affected by this operation, possible values are + `Task`, `Attachment` or `IdentityLink`." + }, + "entityTypeIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a ${listType}list of types of the entities that was affected by this operation, + possible values are `Task`, `Attachment` or `IdentityLink`." + }, + "category": { + "type": "string", + "desc": "Filter by the category that this operation is associated with, possible values are + `TaskWorker`, `Admin` or `Operator`." + }, + "categoryIn": { + "type": "array", + "itemType": "string", + "desc": "Filter by a ${listType}list of categories that this operation is associated with, possible values are + `TaskWorker`, `Admin` or `Operator`." + }, + "property": { + "type": "string", + "desc": "Only include operations that changed this property, e.g., `owner` or `assignee`." + }, + "afterTimestamp": { + "type": "string", + "format": "date-time", + "desc": "Restrict to entries that were created after the given timestamp. ${dateFormatDescription}" + }, + "beforeTimestamp": { + "type": "string", + "format": "date-time", + "desc": "Restrict to entries that were created before the given timestamp. ${dateFormatDescription}" + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/user-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/user-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ab2e3413724e5775c87f33572937cff6138dc825 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/user-query-params.ftl @@ -0,0 +1,66 @@ +<@lib.parameter + name = "id" + location = "query" + type = "string" + desc = "Filter by user id"/> + +<@lib.parameter + name = "idIn" + location = "query" + type = "string" + desc = "Filter by a comma-separated list of user ids." /> + +<@lib.parameter + name = "firstName" + location = "query" + type = "string" + desc = "Filter by the first name of the user. Exact match."/> + +<@lib.parameter + name = "firstNameLike" + location = "query" + type = "string" + desc = "Filter by the first name that the parameter is a substring of."/> + +<@lib.parameter + name = "lastName" + location = "query" + type = "string" + desc = "Filter by the last name of the user. Exact match."/> + +<@lib.parameter + name = "lastNameLike" + location = "query" + type = "string" + desc = "Filter by the last name that the parameter is a substring of."/> + +<@lib.parameter + name = "email" + location = "query" + type = "string" + desc = "Filter by the email of the user. Exact match."/> + +<@lib.parameter + name = "emailLike" + location = "query" + type = "string" + desc = "Filter by the email that the parameter is a substring of."/> + +<@lib.parameter + name = "memberOfGroup" + location = "query" + type = "string" + desc = "Filter for users which are members of the given group."/> + +<@lib.parameter + name = "memberOfTenant" + location = "query" + type = "string" + desc = "Filter for users which are members of the given tenant."/> + +<@lib.parameter + name = "potentialStarter" + location = "query" + type = "string" + last = last + desc = "Only select Users that are potential starter for the given process definition."/> \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/variable-instance-query-params.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/variable-instance-query-params.ftl new file mode 100644 index 0000000000000000000000000000000000000000..37e2ccf42782648cf467a2963e3c39f26e78304a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/commons/variable-instance-query-params.ftl @@ -0,0 +1,116 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/variable-instance/get-query/index.html --> + +<#assign sortByValues = [ + '"variableName"', + '"variableType"', + '"activityInstanceId"', + '"tenantId"' +]> + +<#if requestMethod == "GET"> + <#assign variableValuesDesc = "Only include variable instances that have the certain values. + Value filtering expressions are comma-separated and are structured as + follows: + + A valid parameter value has the form `key_operator_value`. + `key` is the variable name, `operator` is the comparison operator to be used + and `value` the variable value. + + **Note:** Values are always treated as `String` objects on server side. + + Valid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - + greater than; + `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or + equal to; + `like`. + `key` and `value` may not contain underscore or comma characters."> + <#assign itemSeperator = "and comma-separated"> +<#elseif requestMethod == "POST"> + <#assign variableValuesDesc = "An array to only include variable instances that have the certain values. + The array consists of objects with the three properties `name`, `operator` and `value`. `name (String)` is the + variable name, `operator (String)` is the comparison operator to be used and `value` the variable value. + `value` may be `String`, `Number` or `Boolean`. + + Valid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater + than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`"> + <#assign itemSeperator = ""> + + +<#assign params = { + "variableName": { + "type": "string", + "desc": "Filter by variable instance name." + }, + "variableNameLike": { + "type": "string", + "desc": "Filter by the variable instance name. The parameter can include the wildcard `%` to + express like-strategy such as: starts with (`%`name), ends with (name`%`) or + contains (`%`name`%`)." + }, + "processInstanceIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include variable instances which belong to one of the passed ${itemSeperator} + process instance ids." + }, + "executionIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include variable instances which belong to one of the passed ${itemSeperator} + execution ids." + }, + "caseInstanceIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include variable instances which belong to one of the passed ${itemSeperator} case instance ids." + }, + "caseExecutionIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include variable instances which belong to one of the passed ${itemSeperator} case execution ids." + }, + "taskIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include variable instances which belong to one of the passed ${itemSeperator} task + ids." + }, + "batchIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include variable instances which belong to one of the passed ${itemSeperator} + batch ids." + }, + "activityInstanceIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include variable instances which belong to one of the passed ${itemSeperator} + activity instance ids." + }, + "tenantIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include variable instances which belong to one of the passed ${itemSeperator} + tenant ids." + }, + "variableValues": { + "type": "array", + "dto": "VariableQueryParameterDto", + "desc": "${variableValuesDesc}" + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "desc": "Match all variable names provided in `variableValues` case-insensitively. If set to `true` + **variableName** and **variablename** are treated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "desc": "Match all variable values provided in `variableValues` case-insensitively. If set to + `true` **variableValue** and **variablevalue** are treated as equal." + }, + "variableScopeIdIn": { + "type": "array", + "itemType": "string", + "desc": "Only include variable instances which belong to one of passed scope ids." + } +}> diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/utils.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/utils.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c52ea957fd0da78c9e9a5251962ae8461803c976 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/lib/utils.ftl @@ -0,0 +1,430 @@ +<#-- Generates a Query Parameter JSON object --> +<#macro parameter name location type desc + enumValues=[] + defaultValue="" <#-- it will work for boolean, integer, string --> + format="" + required=false + last=false > + { + "name": "${name}", + "in": "${location}", + "schema": { + + <#if enumValues?size != 0> + "enum": [ + ${enumValues?join(", ")} + ], + + + <#if defaultValue?has_content> + "default": ${defaultValue}, + + + <#if type == "array"> + "type": "string" + <#else> + "type": "${type}" + + + <#if format?has_content>, + "format": "${format}" + + }, + + <#if required> + "required": true, + + + "description": "${removeIndentation(desc)}" + } + + <#if !last> , <#-- if not a last parameter add a comma--> + + +<#macro parameters + object + skip = [] + last = false> + <#local result> + <#list object as key, value> + <#if !skip?seq_contains(key)> + <@lib.parameter + name = key + location = "query" + type = value["type"] + format = value["format"] + defaultValue = value["defaultValue"] + enumValues = value["enumValues"] + last = true + desc = value["desc"] />, + + + + <#if last> + ${result?keep_before_last(",")} + <#else> + ${result} + + + +<#-- Generates a DTO Property JSON object --> +<#macro property name type + desc="" + enumValues=[] + defaultValue="" <#-- it will work for boolean, integer, string --> + nullable=true + minimum="" + deprecated=false + additionalProperties=false + itemType="string" + dto="" + format="" + addProperty="" + last=false > + "${name}": { + + <#if type == "ref"> + "$ref": "#/components/schemas/${dto}" + <#else> + "type": "${type}", + + <#if format?has_content> + "format": "${format}", + + + <#if type == "boolean" | type == "string" | type == "array" | format?has_content | dto?has_content > + <#if nullable> + "nullable": true, + + + + <#if enumValues?size != 0> + "enum": [ + ${enumValues?join(", ")} + ], + + + <#if defaultValue?has_content> + "default": ${defaultValue}, + + + <#if minimum?has_content> + "minimum": ${minimum}, + + + <#if deprecated> + "deprecated": true, + + + <#if type == "array"> + "items": { + <#if dto=""> + "type": "${itemType}" + <#else> + "$ref": "#/components/schemas/${dto}" + + }, + + + <#if additionalProperties> + "additionalProperties": { + <#if dto=""> + "type": "${itemType}" + <#else> + "$ref": "#/components/schemas/${dto}" + + }, + + + <#if addProperty?has_content> + ${addProperty}, + + + "description": "${removeIndentation(desc)}" + + } + + <#if !last> , <#-- if not a last property add a comma--> + + +<#macro properties + object + skip = [] + last = false> + <#local result> + <#list object as key, value> + <#if !skip?seq_contains(key)> + <@lib.property name = key + type = value["type"] + enumValues = value["enumValues"] + format = value["format"] + dto = value["dto"] + itemType = value["itemType"] + defaultValue = value["defaultValue"] + last = true + desc = value["desc"]/>, + + + + <#if last> + ${result?keep_before_last(",")} + <#else> + ${result} + + + +<#-- Generates a DTO JSON object --> +<#macro dto + type="object" + title="" + desc="" + required=[] + extends="" > + { + + <#if extends?has_content> + "allOf": [ + { + + + <#if title?has_content> + "title": "${title}", + + + <#if type?has_content> + "type": "${type}", + + + <#if required?size != 0> + "required": [ + ${required?join(", ")} + ], + + + <#if desc?has_content> + "description": "${removeIndentation(desc)}", + + + "properties": { + <#nested> + } + + <#if extends?has_content> + }, + { + "$ref": "#/components/schemas/${extends}" + } + ] + + + } + + +<#-- Generates a Request Body JSON object --> +<#macro requestBody mediaType + dto="" + flatType="" + requestDesc="" + examples=[] > + "requestBody" : { + + <#if requestDesc?has_content > + "description": "${removeIndentation(requestDesc)}", + + + "content" : { + "${mediaType}" : { + + "schema" : { + <#if dto?has_content > + "$ref" : "#/components/schemas/${dto}" + <#elseif flatType?has_content > + "type": "${flatType}" + + } + + <#if examples?size != 0>, + + "examples": { + ${examples?join(", ")} + } + + } + } + }, + + +<#-- Generates an HTTP Response JSON object + * `dto` needs to be defined if `mediaType` is, the default, "application/json" --> +<#macro response code desc + flatType="" + dto="" + contentDesc="" + array=false + additionalProperties=false + mediaType="application/json" + binary = false + examples=[] + last=false > + "${code}": { + <#if code != "204"> + "content": { + <@lib.responseContentMediaType + flatType = flatType + dto = dto + array = array + additionalProperties = additionalProperties + mediaType = mediaType + contentDesc = contentDesc + binary = binary + examples = examples /> + }, + + "description": "${removeIndentation(desc)}" + } + + <#if !last> , <#-- if not a last response, add a comma--> + + +<#-- Generates an HTTP multi type Response JSON object --> +<#macro multiTypeResponse + code + desc + types=[] + last=false > + "${code}": { + <#if code != "204"> + "content": { + <#list types as type > + <@lib.responseContentMediaType + flatType = type["flatType"] + dto = type["dto"] + array = type["array"] + additionalProperties = type["additionalProperties"] + mediaType = type["mediaType"] + contentDesc = type["contentDesc"] + binary = type["binary"] + examples = type["examples"] /><#sep>, + + }, + + "description": "${removeIndentation(desc)}" + } + + <#if !last> , <#-- if not a last response, add a comma--> + + +<#-- Generates a content media type JSON object for HTTP response --> +<#macro responseContentMediaType + flatType="" + dto="" + array=false + additionalProperties=false + mediaType="application/json" + contentDesc="" + binary = false + examples=[] > + <#if mediaType == "application/xhtml+xml" | (mediaType == "application/json" & !array & flatType == "string") | binary> + "${mediaType}": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `${mediaType}` Responses, a byte stream is returned." + } + <#else> + "${mediaType}": { + "schema": { + + <#if mediaType == "text/plain" && contentDesc?has_content> + "type" : "string", + "description" : "${contentDesc}" + + + <#if array> + "type" : "array", + "items" : { + + + <#if additionalProperties> + <#if !array> + "type" : "object", + + "additionalProperties": { + + + <#if dto?has_content> + "$ref": "#/components/schemas/${dto}" + + + <#if flatType?has_content> + "type": "${flatType}" + + + <#if additionalProperties> + } + + + <#if array> + } + + } + + + <#if examples?size != 0>, + "examples": { + ${examples?join(", ")} + } + + + } + + +<#-- Generates a Server JSON object --> +<#macro server + url + variables + desc + last = false > + { + "url": "${url}", + "description": "${removeIndentation(desc)}", + "variables": { + <#list variables as name, default> + ${name}: { + "default": "${default}" + }<#sep>, + + } + } + <#if !last> , <#-- if not the last entry, add a comma --> + + +<#-- Generates an Operation Information JSON object --> +<#macro endpointInfo + id + tag + desc + deprecated = false + summary = "" > + + <#if deprecated> + "deprecated": true, + + + "operationId": "${id}", + "tags": [ + "${tag}" + ], + + + <#if summary?has_content> + "summary": "${summary}", + + + "description": "${removeIndentation(desc)}", + + +<#-- Removes source formatting indentations from descriptions --> +<#function removeIndentation text> + <#return text?replace('\n( ){2,}', '\n', 'r') > + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/main.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/main.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ab182ddb22129eacd4a5916d7bdc8e35b349f970 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/main.ftl @@ -0,0 +1,121 @@ +<#import "/lib/utils.ftl" as lib> + +<#assign docsUrl = "https://docs.camunda.org/manual/${docsVersion}"> +{ + "openapi": "3.0.2", + "info": { + "title": "Camunda Platform REST API", + "description": "OpenApi Spec for Camunda Platform REST API.", + "version": "${cambpmVersion}", + "license": { + "name": "Apache License 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "externalDocs": { + "description": "Find out more about Camunda Rest API", + "url": "${docsUrl}/reference/rest/overview/" + }, + "servers": [ + + <@lib.server + url = "http://{host}:{port}/{contextPath}" + variables = {"host": "localhost", "port": "8080", "contextPath": "engine-rest"} + desc = "The API server for the default process engine" /> + + <@lib.server + url = "http://{host}:{port}/{contextPath}/engine/{engineName}" + variables = {"host": "localhost", "port": "8080", "contextPath": "engine-rest", "engineName": "default"} + desc = "The API server for a named process engine"/> + + <@lib.server + url = "{url}" + variables = {"url": ""} + desc = "The API server with a custom url" + last = true /> + + ], + "tags": [ + {"name": "Authorization"}, + {"name": "Batch"}, + {"name": "Condition"}, + {"name": "Decision Definition"}, + {"name": "Decision Requirements Definition"}, + {"name": "Deployment"}, + {"name": "Engine"}, + {"name": "Event Subscription"}, + {"name": "Execution"}, + {"name": "External Task"}, + {"name": "Filter"}, + {"name": "Group"}, + {"name": "Historic Activity Instance"}, + {"name": "Historic Batch"}, + {"name": "Historic Decision Definition"}, + {"name": "Historic Decision Instance"}, + {"name": "Historic Decision Requirements Definition"}, + {"name": "Historic Detail"}, + {"name": "Historic External Task Log"}, + {"name": "Historic Identity Link Log"}, + {"name": "Historic Incident"}, + {"name": "Historic Job Log"}, + {"name": "Historic Process Definition"}, + {"name": "Historic Process Instance"}, + {"name": "Historic Task Instance"}, + {"name": "Historic User Operation Log"}, + {"name": "Historic Variable Instance"}, + {"name": "History Cleanup"}, + {"name": "Identity"}, + {"name": "Incident"}, + {"name": "Job"}, + {"name": "Job Definition"}, + {"name": "Message"}, + {"name": "Metrics"}, + {"name": "Migration"}, + {"name": "Modification"}, + {"name": "Process Definition"}, + {"name": "Process Instance"}, + {"name": "Signal"}, + {"name": "Schema Log"}, + {"name": "Task"}, + {"name": "Task Attachment"}, + {"name": "Task Comment"}, + {"name": "Task Identity Link"}, + {"name": "Task Local Variable"}, + {"name": "Task Variable"}, + {"name": "Telemetry"}, + {"name": "Tenant"}, + {"name": "User"}, + {"name": "Variable Instance"}, + {"name": "Version"} + ], + "paths": { + + <#list endpoints as path, methods> + "${path}": { + <#list methods as method> + <#import "/paths${path}/${method}.ftl" as endpoint> + "${method}": + <@endpoint.endpoint_macro docsUrl=docsUrl/><#sep>, + + }<#sep>, + + + }, + "security": [ {"basicAuth": []} ], + "components": { + "securitySchemes": { + "basicAuth": { + "type": "http", + "scheme": "basic" + } + }, + "schemas": { + + <#list models as name, package> + <#import "/models/${package}/${name}.ftl" as schema> + "${name}": <@schema.dto_macro docsUrl=docsUrl/><#sep>, + + + } + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/AnnotationDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/AnnotationDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..be4f3dde237a51c6c374d3a46f60fa32d7713add --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/AnnotationDto.ftl @@ -0,0 +1,11 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "annotation" + type = "string" + desc = "The annotation value to put." + last=true /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/AnyValue.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/AnyValue.ftl new file mode 100644 index 0000000000000000000000000000000000000000..dd5b70ede45812890abaf12103c55aa1a19a9d11 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/AnyValue.ftl @@ -0,0 +1,10 @@ +<#macro dto_macro docsUrl=""> +<#-- Note: This type can be any type. This type is required for ConditionQueryParameterDto, as it that Dto allows for +string, boolean and number variable values. The java client generator generates AnyValue as Object. Ideally, we could create a +type that is restricted to string, number and boolean, however, I could not get the client generator to generate +compilable java code when doing so. For more info see https://swagger.io/docs/specification/data-models/data-types/#any +--> + { + "description": "Can be any value - string, number, boolean, array or object.\n **Note**: Not every endpoint supports every type." + } + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/AtomLink.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/AtomLink.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8d465a22bac470a97cff8b91976630c972ef74c9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/AtomLink.ftl @@ -0,0 +1,21 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "rel" + type = "string" + desc = "The relation of the link to the object that belongs to." /> + + <@lib.property + name = "href" + type = "string" + desc = "The url of the link." /> + + <@lib.property + name = "method" + type = "string" + last = true + desc = "The http method." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/AuthorizationExceptionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/AuthorizationExceptionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f3912dbd5b04ffaa5cf0abe388ec7304c4ac68cf --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/AuthorizationExceptionDto.ftl @@ -0,0 +1,17 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "ExceptionDto" > + + <@lib.property + name = "userId" + type = "string" + desc = "The id of the user that does not have expected permissions" /> + + <@lib.property + name = "missingAuthorizations" + type = "array" + dto = "MissingAuthorizationDto" + last = true /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/CamundaFormRef.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/CamundaFormRef.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5cace8726b6ede757d9e65097e13d3a7a357302b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/CamundaFormRef.ftl @@ -0,0 +1,22 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "key" + type = "string" + desc = "The key of the Camunda Form." /> + + <@lib.property + name = "binding" + type = "string" + desc = "The binding of the Camunda Form. Can be `latest`, `deployment` or `version`." /> + + <@lib.property + name = "version" + type = "integer" + format = "int32" + last = true + desc = "The specific version of a Camunda Form. This property is only set if `binding` is `version`." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ConditionQueryParameterDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ConditionQueryParameterDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c0468ad93581b35b49491c24857b0a0feee01101 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ConditionQueryParameterDto.ftl @@ -0,0 +1,19 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + <#-- Note: If you are here from Job endpoints, see JobConditionQueryParameterDto which has a reduced set of operators --> + <@lib.property + name = "operator" + type = "string" + enumValues = ['"eq"', '"neq"', '"gt"', '"gteq"', '"lt"', '"lteq"', '"like"', '"notLike"'] + desc = "Comparison operator to be used. `notLike` is not supported by all endpoints."/> + + <@lib.property + name = "value" + type = "ref" + dto = "AnyValue" + last = true + desc = "The variable value, could be of type boolean, string or number"/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/CountResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/CountResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6d732989fdcba821f206c8ca7b059a521eaab719 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/CountResultDto.ftl @@ -0,0 +1,13 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "count" + type = "integer" + format = "int64" + nullable = false + last = true + desc = "The number of matching instances."/> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/CreateIncidentDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/CreateIncidentDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..68234b01fbb222d9814dbe55061d553cf7786140 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/CreateIncidentDto.ftl @@ -0,0 +1,26 @@ +<#macro dto_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/post-create-incident/index.html --> +<@lib.dto desc = ""> + + <@lib.property + name = "incidentType" + type = "string" + desc = "A type of the new incident." + /> + + <@lib.property + name = "configuration" + type = "string" + desc = "A configuration for the new incident." + /> + + <@lib.property + name = "message" + type = "string" + desc = "A message for the new incident." + last = true + /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/EvaluationConditionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/EvaluationConditionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8f8cc5ad6deac97a33ff21dcaa71107b7b10c07c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/EvaluationConditionDto.ftl @@ -0,0 +1,37 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + desc = "A map of variables which are used for evaluation of the conditions and are injected into the process instances which have been triggered. + Each key is a variable name and each value a JSON variable value object with the following properties."/> + + <@lib.property + name = "businessKey" + type = "string" + desc = "Used for the process instances that have been triggered after the evaluation."/> + + <@lib.property + name = "tenantId" + type = "string" + desc = "Used to evaluate a condition for a tenant with the given id. + Will only evaluate conditions of process definitions which belong to the tenant."/> + + <@lib.property + name = "withoutTenantId" + type = "boolean" + desc = "A Boolean value that indicates whether the conditions should only be evaluated of process definitions which belong to no tenant or not. + Value may only be true, as false is the default behavior."/> + + <@lib.property + name = "processDefinitionId" + type = "string" + last = true + desc = "Used to evaluate conditions of the process definition with the given id."/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ExceptionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ExceptionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a0fd4dd7120e87332fd3e50eefa508125bad28fa --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ExceptionDto.ftl @@ -0,0 +1,24 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + title="ExceptionDto"> + + <@lib.property + name = "type" + type = "string" + desc = "An exception class indicating the occurred error." /> + + <@lib.property + name = "message" + type = "string" + desc = "A detailed message of the error." /> + + <@lib.property + name = "code" + type = "number" + last = true + desc = "The code allows your client application to identify the error in an automated fashion. + You can look up the meaning of all built-in codes and learn how to add custom codes + in the [User Guide](${docsUrl}/user-guide/process-engine/error-handling/#exception-codes)." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/FormDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/FormDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..db97d6d764825e0834f466485b68355f021f5cfb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/FormDto.ftl @@ -0,0 +1,28 @@ +<#macro dto_macro docsUrl=""> +{ + "title": "FormDto", + "type": "object", + "properties": { + + <@lib.property + name = "key" + type = "string" + desc = "The form key." /> + + <@lib.property + name = "camundaFormRef" + type = "ref" + dto = "CamundaFormRef" + desc = "A reference to a specific version of a Camunda Form." /> + + <@lib.property + name = "contextPath" + type = "string" + last = true + desc = "The context path of the process application. If the task (or the process definition) does not + belong to a process application deployment or a process definition at all, this + property is not set." /> + + } +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/HistoryTimeToLiveDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/HistoryTimeToLiveDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ae785d32d7589d479263b22918f7180e9ce3102f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/HistoryTimeToLiveDto.ftl @@ -0,0 +1,15 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "historyTimeToLive" + type = "integer" + format = "int32" + minimum = 0 + last = true + desc = "New value for historyTimeToLive field of the definition. + Can be `null` if `enforceHistoryTimeToLive` is configured to `false`. + Cannot be negative."/> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/JobConditionQueryParameterDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/JobConditionQueryParameterDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9093bcbe676cc9d92284d05e5c7668dfa9d90d33 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/JobConditionQueryParameterDto.ftl @@ -0,0 +1,19 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + <#-- Note: this is an extra Dto for the POST Job endpoints as it allows fewer comparison operators than the ConditionQueryParameterDto --> + <@lib.property + name = "operator" + type = "string" + enumValues = ['"gt"', '"lt"'] + desc = "Comparison operator to be used."/> + + <@lib.property + name = "value" + type = "string" + format = "date-time" + last = true + desc = "Date value to compare with."/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/LinkableDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/LinkableDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..58927a4e87f399b4a3284798ac467a5383766b6a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/LinkableDto.ftl @@ -0,0 +1,12 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "links" + type = "array" + dto = "AtomLink" + last = true + desc = "The links associated to this resource, with `method`, `href` and `rel`." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/MissingAuthorizationDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/MissingAuthorizationDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..25fc63ef763066755dd7b046b7d7536be3046bf8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/MissingAuthorizationDto.ftl @@ -0,0 +1,21 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "permissionName" + type = "string" + desc = "The permission name that the user is missing." /> + + <@lib.property + name = "resourceName" + type = "string" + desc = "The name of the resource that the user is missing permission for." /> + + <@lib.property + name = "resourceId" + type = "string" + last = true + desc = "The id of the resource that the user is missing permission for." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ModificationDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ModificationDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1b662c794c4b2ef203b4902ef16491c7bd6d7b63 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ModificationDto.ftl @@ -0,0 +1,63 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/modification/post-modification-sync/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto desc = ""> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition for the modification" + /> + + <@lib.property + name = "skipCustomListeners" + type = "boolean" + desc = "Skip execution listener invocation for activities that are started or ended as part + of this request." + /> + + <@lib.property + name = "skipIoMappings" + type = "boolean" + desc = "Skip execution of [input/output variable mappings](${docsUrl}/user-guide/process-engine/variables/#input-output-variable-mapping) for + activities that are started or ended as part of this request." + /> + + <@lib.property + name = "processInstanceIds" + type = "array" + itemType = "string" + desc = "A list of process instance ids to modify." + /> + + + <@lib.property + name = "processInstanceQuery" + type = "ref" + dto = "ProcessInstanceQueryDto" + desc = "A process instance query." + /> + + <@lib.property + name = "historicProcessInstanceQuery" + type = "ref" + dto = "HistoricProcessInstanceQueryDto" + desc = "A historic process instance query. It is advised to include the `unfinished` filter in the + historic process instance query as finished instances cause failures for the modification." + /> + + <@lib.property + name = "instructions" + type = "array" + dto = "MultipleProcessInstanceModificationInstructionDto" + desc = "An array of modification instructions. The instructions are executed in the order they are in. " + /> + + <@lib.property + name = "annotation" + type = "string" + last = true + desc = "An arbitrary text annotation set by a user for auditing reasons." + /> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/MultiFormDeploymentDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/MultiFormDeploymentDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4e3f8e26eb3791ad0f63b357337cd47a574e5f5d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/MultiFormDeploymentDto.ftl @@ -0,0 +1,55 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "tenant-id" + type = "string" + desc = "The tenant id for the deployment to be created." /> + + <@lib.property + name = "deployment-source" + type = "string" + desc = "The source for the deployment to be created." /> + + <@lib.property + name = "deploy-changed-only" + type = "boolean" + defaultValue = 'false' + desc = "A flag indicating whether the process engine should perform duplicate checking on a per-resource basis. + If set to true, only those resources that have actually changed are deployed. + Checks are made against resources included previous deployments of the same name and source and only against the latest versions of those resources. + If set to true, the option enable-duplicate-filtering is overridden and set to true." /> + + <@lib.property + name = "enable-duplicate-filtering" + type = "boolean" + defaultValue = 'false' + desc = "A flag indicating whether the process engine should perform duplicate checking for the deployment or not. + This allows you to check if a deployment with the same name and the same resouces already exists and + if true, not create a new deployment but instead return the existing deployment. The default value is false." /> + + <@lib.property + name = "deployment-name" + type = "string" + desc = "The name for the deployment to be created."/> + + <@lib.property + name = "deployment-activation-time" + type = "string" + format = "date-time" + desc = "Sets the date on which the process definitions contained in this deployment will be activated. This means that all process + definitions will be deployed as usual, but they will be suspended from the start until the given activation date. + By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`."/> + + <@lib.property + name = "data" + type = "string" + format = "binary" + last = true + desc = "The binary data to create the deployment resource. + It is possible to have more than one form part with different form part names for the binary data to create a deployment."/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/MultiFormVariableBinaryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/MultiFormVariableBinaryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4521f890fe4b51e38de888e81a073e057f8a1685 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/MultiFormVariableBinaryDto.ftl @@ -0,0 +1,37 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "data" + type = "string" + format = "binary" + desc = "The binary data to be set. + For File variables, this multipart can contain the filename, binary value and MIME type of the file variable to be set + Only the filename is mandatory." /> + + <@lib.property + name = "valueType" + type = "string" + enumValues = ['"Bytes"', '"File"'] + last = true + desc = "The name of the variable type. Either Bytes for a byte array variable or File for a file variable." /> + + <#-- TODO deprecated properties, the problem is that the property id must be unique and here "data" property is repeating + , + "type": { + "type": "string", + "deprecated": true, + "description": "Deprecated: This only works if the REST API is aware of the involved Java classes. + The canonical java type name of the process variable to be set. Example: foo.bar.Customer. + If this part is provided, data must be a JSON object which can be converted into an instance of the provided class. + The content type of the data part must be application/json in that case (see above)." + }, + "data": { + "type": "string", + "deprecated": true, + "description": "**Deprecated**: This only works if the REST API is aware of the involved Java classes. + A JSON representation of a serialized Java Object. Form part type (see below) must be provided." + } --> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ParseExceptionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ParseExceptionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..23616c3d65ec6b519bba93f3057db6c2d692c59e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ParseExceptionDto.ftl @@ -0,0 +1,14 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "ExceptionDto" > + + <@lib.property + name = "details" + type = "object" + additionalProperties = true + dto = "ResourceReportDto" + last = true + desc = "A JSON Object containing list of errors and warnings occurred during deployment." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/PatchVariablesDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/PatchVariablesDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7a6a50b620e382d2bdd8e16c701be4cbbf5d6edf --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/PatchVariablesDto.ftl @@ -0,0 +1,19 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "modifications" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + desc = "A JSON object containing variable key-value pairs." /> + + <@lib.property + name = "deletions" + type = "array" + itemType = "string" + last = true + desc = "An array of String keys of variables to be deleted."/> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ProblemDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ProblemDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c1ba4c06e14c54c76dd412332093169b5934e38c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ProblemDto.ftl @@ -0,0 +1,36 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "message" + type = "string" + desc = "The message of the problem."/> + + <@lib.property + name = "line" + type = "integer" + format = "int32" + desc = "The line where the problem occurred."/> + + + <@lib.property + name = "column" + type = "integer" + format = "int32" + desc = "The column where the problem occurred."/> + + <@lib.property + name = "mainElementId" + type = "string" + desc = "The main element id where the problem occurred."/> + + + <@lib.property + name = "elementIds" + type = "array" + itemType = "string" + last = true + desc = "A list of element id affected by the problem."/> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ProcessEngineDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ProcessEngineDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e3685281d7fef3a311febcda34e246421c8510bf --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ProcessEngineDto.ftl @@ -0,0 +1,11 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the process engine." + last=true /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ResourceOptionsDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ResourceOptionsDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..09df84daf1a6f518ad0ad1b1d5163a72b6a1dfae --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ResourceOptionsDto.ftl @@ -0,0 +1,5 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "LinkableDto" > + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ResourceReportDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ResourceReportDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c5a892acbc52350cf48d7b4f5d66a8874be4df26 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/ResourceReportDto.ftl @@ -0,0 +1,18 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "errors" + type = "array" + dto = "ProblemDto" + desc = "A list of errors occurred during parsing."/> + + <@lib.property + name = "warnings" + type = "array" + dto = "ProblemDto" + last = true + desc = "A list of warnings occurred during parsing."/> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/SchemaLogEntryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/SchemaLogEntryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0fd04ab44b0304882b4eb8998e9014e73c4b8d45 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/SchemaLogEntryDto.ftl @@ -0,0 +1,23 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the schema log entry." /> + + <@lib.property + name = "timestamp" + type = "string" + format = "date-time" + desc = "The date and time of the schema update." /> + + <@lib.property + name = "version" + type = "string" + last = true + desc = "The version of the schema." /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/SchemaLogQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/SchemaLogQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..fc167be8636210aa4dfae9e4cfa25facc24bfc8e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/SchemaLogQueryDto.ftl @@ -0,0 +1,24 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "version" + type = "string" + desc = "The version of the schema."/> + + "sorting": { + "type": "array", + "nullable": true, + "description": "A JSON array of criteria to sort the result by. Each element of the array is + a JSON object that specifies one ordering. The position in the array + identifies the rank of an ordering, i.e., whether it is primary, secondary, + etc. ", + "items": + <#assign last = true > + <#assign sortByValues = ['"timestamp"']> + <#include "/lib/commons/sort-props.ftl" > + } + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/SignalDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/SignalDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..353b1e151647f1b9e2568b788a55498efcaf0d8d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/SignalDto.ftl @@ -0,0 +1,47 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "name" + type = "string" + nullable = false + desc = "The name of the signal to deliver. + + **Note**: This property is mandatory." /> + + <@lib.property + name = "executionId" + type = "string" + desc = "Optionally specifies a single execution which is notified by the signal. + + **Note**: If no execution id is defined the signal is broadcasted to all subscribed + handlers. "/> + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + desc = "A JSON object containing variable key-value pairs. Each key is a variable name and + each value a JSON variable value object."/> + + <@lib.property + name = "tenantId" + type = "string" + desc = "Specifies a tenant to deliver the signal. The signal can only be received on + executions or process definitions which belongs to the given tenant. + + **Note**: Cannot be used in combination with executionId."/> + + <@lib.property + name = "withoutTenantId" + type = "boolean" + last = true + desc = "If true the signal can only be received on executions or process definitions which + belongs to no tenant. Value may not be false as this is the default behavior. + + **Note**: Cannot be used in combination with `executionId`."/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/SuspensionStateDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/SuspensionStateDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6144957a9f6505e5d4aeb426180f3c29edfde482 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/SuspensionStateDto.ftl @@ -0,0 +1,18 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <#-- NOTE: When adding any changes, if necessary, to: + * ProcessDefinitionSuspensionStateDto or JobSuspensionStateDto or create a new file + * ... --> + <@lib.property + name = "suspended" + type = "boolean" + desc = "A Boolean value which indicates whether to activate or suspend a given instance + (e.g. process instance, job, job definition, or batch). When the value is set to true, + the given instance will be suspended and when the value is set to false, + the given instance will be activated." + last = true /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/TaskCountByCandidateGroupResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/TaskCountByCandidateGroupResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..aa83278c4a3e1053792668f4e229c7b81bcbae90 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/TaskCountByCandidateGroupResultDto.ftl @@ -0,0 +1,17 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "groupName" + type = "string" + desc = "The name of the candidate group. If there are tasks without a group name, the value will be `null`"/> + + <@lib.property + name = "taskCount" + type = "integer" + format = "int32" + last = true + desc = "The number of tasks which have the group name as candidate group."/> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/VariableQueryParameterDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/VariableQueryParameterDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2f463837d7490ecb895911d0c8dfe1556d61f506 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/VariableQueryParameterDto.ftl @@ -0,0 +1,13 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto extends="ConditionQueryParameterDto"> + + <@lib.property + name = "name" + type = "string" + desc = "Variable name" + last = true + /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/VariableValueDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/VariableValueDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c11f2d2d9d8013412084a965ccc741e7ea280d66 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/VariableValueDto.ftl @@ -0,0 +1,45 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "value" + type = "ref" + dto = "AnyValue" + desc = "The variable's value. Value differs depending on the variable's type and on the deserializeValues parameter. + For variables of type `File` the value has to be submitted as Base64 encoded string."/> + + <@lib.property + name = "type" + type = "string" + desc = "The value type of the variable."/> + + <@lib.property + name = "valueInfo" + type = "object" + last = true + addProperty = "\"additionalProperties\": true" + desc = "A JSON object containing additional, value-type-dependent properties. + For serialized variables of type Object, the following properties can be provided: + + * `objectTypeName`: A string representation of the object's type name. + * `serializationDataFormat`: The serialization format used to store the variable. + + For serialized variables of type File, the following properties can be provided: + + * `filename`: The name of the file. This is not the variable name but the name that will be used when downloading the file again. + * `mimetype`: The MIME type of the file that is being uploaded. + * `encoding`: The encoding of the file that is being uploaded. + + The following property can be provided for all value types: + + * `transient`: Indicates whether the variable should be transient or + not. See [documentation](${docsUrl}/user-guide/process-engine/variables#transient-variables) for more informations. + (Not applicable for `decision-definition`, ` /process-instance/variables-async`, and `/migration/executeAsync` endpoints)" + /> + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/VersionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/VersionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..aa3f1e059df6fb148d716f9ecb9490579e311c38 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/VersionDto.ftl @@ -0,0 +1,11 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "version" + type = "string" + last = true + desc = "The version of the Rest API." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/authorization/AuthorizationCheckResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/authorization/AuthorizationCheckResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c50a55ed28fdc979e976d6157d9c122a2096d441 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/authorization/AuthorizationCheckResultDto.ftl @@ -0,0 +1,30 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "permissionName" + type = "string" + desc = "Name of the permission which was checked." + /> + + <@lib.property + name = "resourceName" + type = "string" + desc = "The name of the resource for which the permission check was performed." + /> + + <@lib.property + name = "resourceId" + type = "string" + desc = "The id of the resource for which the permission check was performed." + /> + + <@lib.property + name = "authorized" + type = "boolean" + desc = "Returns true or false depending on whether the user is authorized or not." + last = true + /> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/authorization/AuthorizationCreateDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/authorization/AuthorizationCreateDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..95afe7d7e56d787e761e9e6b166fc2a17e6dc329 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/authorization/AuthorizationCreateDto.ftl @@ -0,0 +1,51 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "type" + type = "integer" + format = "int32" + desc = "The type of the authorization (0=global, 1=grant, 2=revoke). See the + [User Guide](${docsUrl}/user-guide/process-engine/authorization-service.md#authorization-type) + for more information about authorization types." + /> + + <@lib.property + name = "permissions" + type = "array" + itemType = "string" + desc = "An array of Strings holding the permissions provided by this authorization." + /> + + <@lib.property + name = "userId" + type = "string" + desc = "The id of the user this authorization has been created for. The value `*` + represents a global authorization ranging over all users." + /> + + <@lib.property + name = "groupId" + type = "string" + desc = "The id of the group this authorization has been created for." + /> + + <@lib.property + name = "resourceType" + type = "integer" + format = "int32" + desc = "An integer representing the resource type. See the + [User Guide](${docsUrl}/user-guide/process-engine/authorization-service/#resources) + for a list of integer representations of resource types." + /> + + <@lib.property + name = "resourceId" + type = "string" + desc = "The resource Id. The value `*` represents an authorization ranging over all + instances of a resource." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/authorization/AuthorizationDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/authorization/AuthorizationDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a448e9ec1275ba9bb92b4fdff7b23aaa4e6f21dd --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/authorization/AuthorizationDto.ftl @@ -0,0 +1,79 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <#-- NOTE: Any changes made to this Dto should be mirrored to the + AuthorizationUpdateDto (if the new/adjusted property can be updated) --> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the authorization." + /> + + <@lib.property + name = "type" + type = "integer" + format = "int32" + desc = "The type of the authorization (0=global, 1=grant, 2=revoke). See the + [User Guide](${docsUrl}/user-guide/process-engine/authorization-service.md#authorization-type) + for more information about authorization types." + /> + + <@lib.property + name = "permissions" + type = "array" + itemType = "string" + desc = "An array of Strings holding the permissions provided by this authorization." + /> + + <@lib.property + name = "userId" + type = "string" + desc = "The id of the user this authorization has been created for. The value `*` + represents a global authorization ranging over all users." + /> + + <@lib.property + name = "groupId" + type = "string" + desc = "The id of the group this authorization has been created for." + /> + + <@lib.property + name = "resourceType" + type = "integer" + format = "int32" + desc = "An integer representing the resource type. See the + [User Guide](${docsUrl}/user-guide/process-engine/authorization-service/#resources) + for a list of integer representations of resource types." + /> + + <@lib.property + name = "resourceId" + type = "string" + desc = "The resource Id. The value `*` represents an authorization ranging over all + instances of a resource." + /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The removal time indicates the date a historic instance + authorization is cleaned up. A removal time can only be assigned to a historic + instance authorization. Can be `null` when not related to a historic instance + resource or when the removal time strategy is end and the root process instance + is not finished. Default format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + desc = "The process instance id of the root process instance the historic + instance authorization is related to. Can be `null` if not related to a historic instance + resource." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/authorization/AuthorizationUpdateDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/authorization/AuthorizationUpdateDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a1dd28537307097f68c8104e457e3e6cfa86bf82 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/authorization/AuthorizationUpdateDto.ftl @@ -0,0 +1,42 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "permissions" + type = "array" + itemType = "string" + desc = "An array of Strings holding the permissions provided by this authorization." + /> + + <@lib.property + name = "userId" + type = "string" + desc = "The id of the user this authorization has been created for. The value `*` + represents a global authorization ranging over all users." + /> + + <@lib.property + name = "groupId" + type = "string" + desc = "The id of the group this authorization has been created for." + /> + + <@lib.property + name = "resourceType" + type = "integer" + format = "int32" + desc = "An integer representing the resource type. See the + [User Guide](${docsUrl}/user-guide/process-engine/authorization-service/#resources) + for a list of integer representations of resource types." + /> + + <@lib.property + name = "resourceId" + type = "string" + last = true + desc = "The resource Id. The value `*` represents an authorization ranging over all + instances of a resource." + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/batch/BatchDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/batch/BatchDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2eff4f76ec486112e2f9e333fff635ca94057a2e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/batch/BatchDto.ftl @@ -0,0 +1,90 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the batch." /> + + <@lib.property + name = "type" + type = "string" + desc = "The type of the batch. + See the [User Guide](${docsUrl}/user-guide/process-engine/batch/#creating-a-batch) + for more information about batch types." /> + + <@lib.property + name = "totalJobs" + type = "integer" + format = "int32" + desc = "The total jobs of a batch is the number of batch execution jobs required to complete the batch." /> + + <@lib.property + name = "jobsCreated" + type = "integer" + format = "int32" + desc = "The number of batch execution jobs already created by the seed job." /> + + <@lib.property + name = "batchJobsPerSeed" + type = "integer" + format = "int32" + desc = "The number of batch execution jobs created per seed job invocation. + The batch seed job is invoked until it has created all batch execution jobs required by the batch + (see `totalJobs` property)." /> + + <@lib.property + name = "invocationsPerBatchJob" + type = "integer" + format = "int32" + desc = "Every batch execution job invokes the command executed by the batch `invocationsPerBatchJob` times. + E.g., for a process instance migration batch this specifies the number of process instances which are migrated per batch execution job." /> + + <@lib.property + name = "seedJobDefinitionId" + type = "string" + desc = "The job definition id for the seed jobs of this batch." /> + + <@lib.property + name = "monitorJobDefinitionId" + type = "string" + desc = "The job definition id for the monitor jobs of this batch." /> + + <@lib.property + name = "batchJobDefinitionId" + type = "string" + desc = "The job definition id for the batch execution jobs of this batch." /> + + <@lib.property + name = "suspended" + type = "boolean" + desc = "Indicates whether this batch is suspended or not." /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The tenant id of the batch." /> + + <@lib.property + name = "createUserId" + type = "string" + desc = "The id of the user that created the batch." /> + + <@lib.property + name = "startTime" + type = "string" + format = "date-time" + desc = "The time the batch was started. Default format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. For further information, + please see the [documentation] (${docsUrl}/reference/rest/overview/date-format/)" /> + + <@lib.property + name = "executionStartTime" + type = "string" + format = "date-time" + last = true + desc = "The time the batch execution was started, i.e., at least one batch job has been executed. Default + format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. For further information, please see the [documentation] + (${docsUrl}/reference/rest/overview/date-format/)" /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/batch/BatchStatisticsDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/batch/BatchStatisticsDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3f61127fdacb5bf16cc832a68a52e77f61d83867 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/batch/BatchStatisticsDto.ftl @@ -0,0 +1,25 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto extends = "BatchDto"> + + <@lib.property + name = "remainingJobs" + type = "integer" + format = "int32" + desc = "The number of remaining batch execution jobs. This does include failed batch execution jobs and + batch execution jobs which still have to be created by the seed job." /> + + <@lib.property + name = "completedJobs" + type = "integer" + format = "int32" + desc = "The number of completed batch execution jobs. This does include aborted/deleted batch execution jobs." /> + + <@lib.property + name = "failedJobs" + type = "integer" + format = "int32" + last = true + desc = "The number of failed batch execution jobs. This does not include aborted or deleted batch execution jobs." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/dmn/DecisionRequirementsDefinitionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/dmn/DecisionRequirementsDefinitionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..65095713d0518f9b7083e50702cdb380ed054878 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/dmn/DecisionRequirementsDefinitionDto.ftl @@ -0,0 +1,57 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the decision requirements definition." + /> + + <@lib.property + name = "key" + type = "string" + desc = "The key of the decision requirements definition." + /> + + <@lib.property + name = "category" + type = "string" + desc = "The category of the decision requirements definition." + /> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the decision requirements definition." + /> + + <@lib.property + name = "version" + type = "integer" + format = "int32" + desc = "The version of the decision requirements definition that the engine assigned to + it." + /> + + <@lib.property + name = "resource" + type = "string" + desc = "The file name of the decision requirements definition." + /> + + <@lib.property + name = "deploymentId" + type = "string" + desc = "The deployment id of the decision requirements definition." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The tenant id of the decision requirements definition." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/dmn/DecisionRequirementsDefinitionXmlDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/dmn/DecisionRequirementsDefinitionXmlDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e0effab57b88c86fa004bf75a2bb503f63a432e0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/dmn/DecisionRequirementsDefinitionXmlDto.ftl @@ -0,0 +1,21 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-xml/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the decision requirements definition." + /> + + <@lib.property + name = "dmnXml" + type = "string" + desc = "An escaped XML string containing the XML that this decision requirements definition + was deployed with. Carriage returns, line feeds and quotation marks + are escaped." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/dmn/EvaluateDecisionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/dmn/EvaluateDecisionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a4e6981db97e271aba5303f99a7e3c13c7e7e55e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/dmn/EvaluateDecisionDto.ftl @@ -0,0 +1,12 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + last = true + dto = "VariableValueDto" /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/filter/CreateFilterDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/filter/CreateFilterDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..793c935117dc0b7c126d1454444d844c698d40d3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/filter/CreateFilterDto.ftl @@ -0,0 +1,38 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query/index.html --> +<#macro dto_macro docsUrl=""> + +<@lib.dto > + + <@lib.property + name = "resourceType" + type = "string" + desc = "The resource type of the filter." + /> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the filter." + /> + + <@lib.property + name = "owner" + type = "string" + desc = "The user id of the owner of the filter." + /> + + <@lib.property + name = "query" + type = "object" + desc = "The query of the filter as a JSON object." + /> + + <@lib.property + name = "properties" + type = "object" + desc = "The properties of a filter as a JSON object." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/filter/FilterDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/filter/FilterDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d62232a272514d7c4de744ad1e932a4f988bfa6a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/filter/FilterDto.ftl @@ -0,0 +1,53 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query/index.html --> +<#macro dto_macro docsUrl=""> + +<@lib.dto > + <@lib.property + name = "id" + type = "string" + desc = "The id of the filter." + /> + + <@lib.property + name = "resourceType" + type = "string" + desc = "The resource type of the filter." + /> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the filter." + /> + + <@lib.property + name = "owner" + type = "string" + desc = "The user id of the owner of the filter." + /> + + <@lib.property + name = "query" + type = "object" + desc = "The query of the filter as a JSON object." + /> + + <@lib.property + name = "properties" + type = "object" + desc = "The properties of a filter as a JSON object." + /> + + <@lib.property + name = "itemCount" + type = "integer" + format = "int64" + desc = " + The number of items matched by the filter itself. Note: Only exists + if the query parameter + `itemCount` was set to `true`" + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/AbstractSetRemovalTimeDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/AbstractSetRemovalTimeDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5192684958a2913672534329d62e35dfa11db0af --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/AbstractSetRemovalTimeDto.ftl @@ -0,0 +1,27 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "absoluteRemovalTime" + type = "string" + format = "date-time" + desc = "The date for which the instances shall be removed. Value may not be `null`. + + **Note:** Cannot be set in conjunction with `clearedRemovalTime` or `calculatedRemovalTime`."/> + + <@lib.property + name = "clearedRemovalTime" + type = "boolean" + desc = "Sets the removal time to `null`. Value may only be `true`, as `false` is the default behavior. + + **Note:** Cannot be set in conjunction with `absoluteRemovalTime` or `calculatedRemovalTime`."/> + + <@lib.property + name = "calculatedRemovalTime" + type = "boolean" + last = true + desc = "The removal time is calculated based on the engine's configuration settings. Value may only be `true`, as `false` is the default behavior. + + **Note:** Cannot be set in conjunction with `absoluteRemovalTime` or `clearedRemovalTime`."/> + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/CleanableHistoricDecisionInstanceReportResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/CleanableHistoricDecisionInstanceReportResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d91e086b10fd0bbfb29123f38be26a3b3fecd28e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/CleanableHistoricDecisionInstanceReportResultDto.ftl @@ -0,0 +1,60 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/decision-definition/get-cleanable-decision-instance-report/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "decisionDefinitionId" + type = "string" + desc = "The id of the decision definition." + /> + + <@lib.property + name = "decisionDefinitionKey" + type = "string" + desc = "The key of the decision definition." + /> + + <@lib.property + name = "decisionDefinitionName" + type = "string" + desc = "The name of the decision definition." + /> + + <@lib.property + name = "decisionDefinitionVersion" + type = "integer" + format = "int32" + desc = "The version of the decision definition." + /> + + <@lib.property + name = "historyTimeToLive" + type = "integer" + format = "int32" + desc = "The history time to live of the decision definition." + /> + + <@lib.property + name = "finishedDecisionInstanceCount" + type = "integer" + format = "int64" + desc = "The count of the finished historic decision instances." + /> + + <@lib.property + name = "cleanableDecisionInstanceCount" + type = "integer" + format = "int64" + desc = "The count of the cleanable historic decision instances, referring to history time + to live." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The tenant id of the decision definition." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/CleanableHistoricProcessInstanceReportResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/CleanableHistoricProcessInstanceReportResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..57ed19e8a7f1c6a162f009bf5c6124652496081d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/CleanableHistoricProcessInstanceReportResultDto.ftl @@ -0,0 +1,60 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/process-definition/get-cleanable-process-instance-report-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition." + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition." + /> + + <@lib.property + name = "processDefinitionName" + type = "string" + desc = "The name of the process definition." + /> + + <@lib.property + name = "processDefinitionVersion" + type = "integer" + format = "int32" + desc = "The version of the process definition." + /> + + <@lib.property + name = "historyTimeToLive" + type = "integer" + format = "int32" + desc = "The history time to live of the process definition." + /> + + <@lib.property + name = "finishedProcessInstanceCount" + type = "integer" + format = "int64" + desc = "The count of the finished historic process instances." + /> + + <@lib.property + name = "cleanableProcessInstanceCount" + type = "integer" + format = "int64" + desc = "The count of the cleanable historic process instances, referring to history time to + live." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The tenant id of the process definition." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/DeleteHistoricDecisionInstancesDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/DeleteHistoricDecisionInstancesDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..dda0c995fae72d50049c3c2c6dfb6b2f94dcd270 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/DeleteHistoricDecisionInstancesDto.ftl @@ -0,0 +1,31 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/decision-instance/post-delete/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "historicDecisionInstanceIds" + type = "array" + itemType = "string" + desc = "A list of historic decision instance ids to delete." + /> + + + <@lib.property + name = "historicDecisionInstanceQuery" + type = "ref" + dto = "HistoricDecisionInstanceQueryDto" + desc = "A historic decision instance query like the request body described by + [POST /history/decision-instance](${docsUrl}/reference/rest/history/decision-instance/get-decision-instance-query/#query-parameters)." + /> + + + <@lib.property + name = "deleteReason" + type = "string" + desc = "A string with delete reason." + last = true + /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/DeleteHistoricProcessInstancesDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/DeleteHistoricProcessInstancesDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..712feb8c7a7dee8172d340659d20b6c18393cad6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/DeleteHistoricProcessInstancesDto.ftl @@ -0,0 +1,29 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "historicProcessInstanceIds" + type = "array" + itemType = "string" + desc = "A list historic process instance ids to delete."/> + + <@lib.property + name = "historicProcessInstanceQuery" + type = "ref" + dto = "HistoricProcessInstanceQueryDto" + desc = "A historic process instance query like the request body described by + [POST /history/process-instance](${docsUrl}/reference/rest/history/process-instance/post-process-instance-query/)."/> + + <@lib.property + name = "deleteReason" + type = "string" + desc = "A string with delete reason."/> + + <@lib.property + name = "failIfNotExists" + type = "boolean" + last = true + desc = "If set to `false`, the request will still be successful if one ore more of the process ids are not found."/> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/DurationReportResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/DurationReportResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..75292ee67ef744398024ca2634d16c7cd99e532d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/DurationReportResultDto.ftl @@ -0,0 +1,41 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <#-- NOTE: Please consider adjusting the `HistoricTaskInstanceReportResultDto.ftl` file, + if the properties are valid there as well. The DTO was created separately as it is + included in a `oneOf` relation for the Historic Task Instance endpoints --> + + <@lib.property + name = "period" + type = "integer" + format = "int32" + desc = "Specifies a timespan within a year. + **Note:** The period must be interpreted in conjunction with the returned `periodUnit`."/> + + <@lib.property + name = "periodUnit" + type = "string" + enumValues = ["MONTH", "QUARTER"] + desc = "The unit of the given period. Possible values are `MONTH` and `QUARTER`."/> + + <@lib.property + name = "minimum" + type = "integer" + format = "int64" + desc = "The smallest duration in milliseconds of all completed process instances which were started in the given period."/> + + <@lib.property + name = "maximum" + type = "integer" + format = "int64" + desc = "The greatest duration in milliseconds of all completed process instances which were started in the given period."/> + + <@lib.property + name = "average" + type = "integer" + format = "int64" + last = true + desc = "The average duration in milliseconds of all completed process instances which were started in the given period."/> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricActivityInstanceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricActivityInstanceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f4c0b4c16e8aaadd7f4645752af17e014c8d8599 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricActivityInstanceDto.ftl @@ -0,0 +1,118 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the activity instance."/> + + <@lib.property + name = "parentActivityInstanceId" + type = "string" + desc = "The id of the parent activity instance, for example a sub process instance."/> + + <@lib.property + name = "activityId" + type = "string" + desc = "The id of the activity that this object is an instance of."/> + + <@lib.property + name = "activityName" + type = "string" + desc = "The name of the activity that this object is an instance of."/> + + <@lib.property + name = "activityType" + type = "string" + desc = "The type of the activity that this object is an instance of."/> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition that this activity instance belongs to."/> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition that this activity instance belongs to."/> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance that this activity instance belongs to."/> + + <@lib.property + name = "executionId" + type = "string" + desc = "The id of the execution that executed this activity instance."/> + + <@lib.property + name = "taskId" + type = "string" + desc = "The id of the task that is associated to this activity instance. Is only set if the activity is a user task."/> + + <@lib.property + name = "assignee" + type = "string" + desc = "The assignee of the task that is associated to this activity instance. Is only set if the activity is a user task."/> + + <@lib.property + name = "calledProcessInstanceId" + type = "string" + desc = "The id of the called process instance. Is only set if the activity is a call activity and the called instance a process instance."/> + + <@lib.property + name = "calledCaseInstanceId" + type = "string" + desc = "The id of the called case instance. Is only set if the activity is a call activity and the called instance a case instance."/> + + <@lib.property + name = "startTime" + type = "string" + format = "date-time" + desc = "The time the instance was started. By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`."/> + + <@lib.property + name = "endTime" + type = "string" + format = "date-time" + desc = "The time the instance ended. By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`."/> + + <@lib.property + name = "durationInMillis" + type = "integer" + format = "int64" + desc = "The time the instance took to finish (in milliseconds)."/> + + <@lib.property + name = "canceled" + type = "boolean" + desc = "If `true`, this activity instance is canceled."/> + + <@lib.property + name = "completeScope" + type = "boolean" + desc = "If `true`, this activity instance did complete a BPMN 2.0 scope."/> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The tenant id of the activity instance."/> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the activity instance should be removed by the History Cleanup job. By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`."/> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + last = true + desc = "The process instance id of the root process instance that initiated the process containing this activity instance."/> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricActivityInstanceQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricActivityInstanceQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2910a81fa3b39b1b68837c554d7824221b50f5c9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricActivityInstanceQueryDto.ftl @@ -0,0 +1,22 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc = "A historic activity instance query which defines a group of historic activity instances" > + + <#assign requestMethod="POST"/> + <#include "/lib/commons/history-activity-instance.ftl" > + + <@lib.properties params /> + + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": + + <#assign last = true > + <#include "/lib/commons/sort-props.ftl" > + + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricActivityStatisticsDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricActivityStatisticsDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6463e3196e2d2d0a5ba0ed3d1b6ef1e07395981f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricActivityStatisticsDto.ftl @@ -0,0 +1,69 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/process-definition/get-historic-activity-statistics-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the activity the results are aggregated for." + /> + + <@lib.property + name = "instances" + type = "integer" + format = "int64" + desc = "The total number of all running instances of the activity." + /> + + <@lib.property + name = "canceled" + type = "integer" + format = "int64" + desc = "The total number of all canceled instances of the activity. **Note:** Will be `0` + (not `null`), if canceled activity instances were excluded." + /> + + <@lib.property + name = "finished" + type = "integer" + format = "int64" + desc = "The total number of all finished instances of the activity. **Note:** Will be `0` + (not `null`), if finished activity instances were excluded." + /> + + <@lib.property + name = "completeScope" + type = "integer" + format = "int64" + desc = "The total number of all instances which completed a scope of the activity. + **Note:** Will be `0` (not `null`), if activity instances which + completed a scope were excluded." + /> + + <@lib.property + name = "openIncidents" + type = "integer" + format = "int64" + desc = "The total number of open incidents for the activity. **Note:** Will be `0` (not + `null`), if `incidents` is set to `false`." + /> + + <@lib.property + name = "resolvedIncidents" + type = "integer" + format = "int64" + desc = "The total number of resolved incidents for the activity. **Note:** Will be `0` (not + `null`), if `incidents` is set to `false`." + /> + + <@lib.property + name = "deletedIncidents" + type = "integer" + format = "int64" + desc = "The total number of deleted incidents for the activity. **Note:** Will be `0` (not + `null`), if `incidents` is set to `false`." + last = true + /> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionInputInstanceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionInputInstanceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c1b1af7defe402839ade05fefcdecf1813fdca0c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionInputInstanceDto.ftl @@ -0,0 +1,90 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the decision input value." + /> + + <@lib.property + name = "decisionInstanceId" + type = "string" + desc = "The id of the decision instance the input value belongs to." + /> + + <@lib.property + name = "clauseId" + type = "string" + desc = "The id of the clause the input value belongs to." + /> + + <@lib.property + name = "clauseName" + type = "string" + desc = "The name of the clause the input value belongs to." + /> + + <@lib.property + name = "errorMessage" + type = "string" + desc = "An error message in case a Java Serialized Object could not be de-serialized." + /> + + <@lib.property + name = "type" + type = "string" + desc = "The value type of the variable." + /> + + <@lib.property + name = "createTime" + type = "string" + format = "date-time" + desc = "The time the variable was inserted. + [Default format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the entry should be removed by the History Cleanup job. + [Default format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + desc = "The process instance id of the root process instance that initiated the process + containing this entry." + /> + + <@lib.property + name = "value" + type = "object" + desc = "The variable's value. Value differs depending on the variable's type + and on the `disableCustomObjectDeserialization` parameter." + /> + + <@lib.property + name = "valueInfo" + type = "object" + addProperty = "\"additionalProperties\": true" + desc = "A JSON object containing additional, value-type-dependent + properties. + + For variables of type `Object`, the following properties are + returned: + + * `objectTypeName`: A string representation of the object's type + name. + + * `serializationDataFormat`: The serialization format used to store + the variable." + last = true + /> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionInstanceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionInstanceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..81728a857dfb42d36dc422a560bee8b2604cd438 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionInstanceDto.ftl @@ -0,0 +1,161 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the decision instance." + /> + + <@lib.property + name = "decisionDefinitionId" + type = "string" + desc = "The id of the decision definition that this decision instance belongs to." + /> + + <@lib.property + name = "decisionDefinitionKey" + type = "string" + desc = "The key of the decision definition that this decision instance belongs to." + /> + + <@lib.property + name = "decisionDefinitionName" + type = "string" + desc = "The name of the decision definition that this decision instance belongs to." + /> + + <@lib.property + name = "evaluationTime" + type = "string" + format = "date-time" + desc = "The time the instance was evaluated. + [Default format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the instance should be removed by the History Cleanup job. + [Default format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition that this decision instance belongs to." + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition that this decision instance belongs to." + /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance that this decision instance belongs to." + /> + + <@lib.property + name = "caseDefinitionId" + type = "string" + desc = "The id of the case definition that this decision instance belongs to." + /> + + <@lib.property + name = "caseDefinitionKey" + type = "string" + desc = "The key of the case definition that this decision instance belongs to." + /> + + <@lib.property + name = "caseInstanceId" + type = "string" + desc = "The id of the case instance that this decision instance belongs to." + /> + + <@lib.property + name = "activityId" + type = "string" + desc = "The id of the activity that this decision instance belongs to." + /> + + <@lib.property + name = "activityInstanceId" + type = "string" + desc = "The id of the activity instance that this decision instance belongs to." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The tenant id of the historic decision instance." + /> + + <@lib.property + name = "userId" + type = "string" + desc = "The id of the authenticated user that has evaluated this decision instance without + a process or case instance." + /> + + <@lib.property + name = "inputs" + type = "array" + dto = "HistoricDecisionInputInstanceDto" + desc = "The list of decision input values. **Only exists** if `includeInputs` + was set to `true` in the query." + /> + + <@lib.property + name = "outputs" + type = "array" + dto = "HistoricDecisionOutputInstanceDto" + desc = "The list of decision output values. **Only exists** if `includeOutputs` + was set to `true` in the query." + /> + + <@lib.property + name = "collectResultValue" + type = "number" + format = "double" + desc = "The result of the collect aggregation of the decision result if used. `null` if no + aggregation was used." + /> + + <@lib.property + name = "rootDecisionInstanceId" + type = "string" + desc = "The decision instance id of the evaluated root decision. Can be `null` if this + instance is the root decision instance of the evaluation." + /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + desc = "The process instance id of the root process instance that initiated the evaluation + of this decision. Can be `null` if this decision instance is not + evaluated as part of a BPMN process." + /> + + <@lib.property + name = "decisionRequirementsDefinitionId" + type = "string" + desc = "The id of the decision requirements definition that this decision instance belongs + to." + /> + + <@lib.property + name = "decisionRequirementsDefinitionKey" + type = "string" + desc = "The key of the decision requirements definition that this decision instance belongs + to." + last = true + /> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionInstanceQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionInstanceQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f9dedab2f13fc694cb23e38da469a6e6e41523e4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionInstanceQueryDto.ftl @@ -0,0 +1,12 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc = "A historic decision instance query which defines a list of historic decision instances" > + + <#assign last = false > + <#include "/lib/commons/historic-decision-instance-query-params.ftl" > + <@lib.properties params /> + <#include "/lib/commons/historic-decision-instance-single-query-params.ftl" > + <@lib.properties object=params last=true /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionInstanceStatisticsDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionInstanceStatisticsDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8179654a89150640aa9ab533fbe14b33b064caf4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionInstanceStatisticsDto.ftl @@ -0,0 +1,20 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/decision-requirements-definition/get-statistics/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "decisionDefinitionKey" + type = "string" + desc = "A key of decision definition." + /> + + <@lib.property + name = "evaluations" + type = "integer" + format = "int32" + desc = "A number of evaluation for decision definition." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionOutputInstanceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionOutputInstanceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..456ff31d8fc86e5d5491fb523abc688f446c9e43 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDecisionOutputInstanceDto.ftl @@ -0,0 +1,109 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the decision output value." + /> + + <@lib.property + name = "decisionInstanceId" + type = "string" + desc = "The id of the decision instance the output value belongs to." + /> + + <@lib.property + name = "clauseId" + type = "string" + desc = "The id of the clause the output value belongs to." + /> + + <@lib.property + name = "clauseName" + type = "string" + desc = "The name of the clause the output value belongs to." + /> + + <@lib.property + name = "ruleId" + type = "string" + desc = "The id of the rule the output value belongs to." + /> + + <@lib.property + name = "ruleOrder" + type = "integer" + format = "int32" + desc = "The order of the rule the output value belongs to." + /> + + <@lib.property + name = "errorMessage" + type = "string" + desc = "An error message in case a Java Serialized Object could not be de-serialized." + /> + + <@lib.property + name = "variableName" + type = "string" + desc = "The name of the output variable." + /> + + <@lib.property + name = "type" + type = "string" + desc = "The value type of the variable." + /> + + <@lib.property + name = "createTime" + type = "string" + format = "date-time" + desc = "The time the variable was inserted. + [Default format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the entry should be removed by the History Cleanup job. + [Default format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + desc = "The process instance id of the root process instance that initiated the process + containing this entry." + /> + + <@lib.property + name = "value" + type = "object" + desc = "The variable's value. Value differs depending on the variable's type + and on the `disableCustomObjectDeserialization` parameter." + /> + + <@lib.property + name = "valueInfo" + type = "object" + addProperty = "\"additionalProperties\": true" + desc = "A JSON object containing additional, value-type-dependent + properties. + + For variables of type `Object`, the following properties are + returned: + + * `objectTypeName`: A string representation of the object's type + name. + + * `serializationDataFormat`: The serialization format used to store + the variable." + last = true + /> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDetailDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDetailDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e3842afe638aca3c7bc76525dcc76064173d86e1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDetailDto.ftl @@ -0,0 +1,216 @@ +<#macro dto_macro docsUrl=""> + <@lib.dto > + <#assign + dateFormatDescription = "Default [format](${docsUrl}/reference/rest/overview/date-format/) + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + <#assign + noteHistoricFormFiled = "**Note:** This property is only set for a `HistoricVariableUpdate` historic details. + In these cases, the value of the `type` property is `formField`." + /> + <#assign + noteHistoricVariableUpdate = "**Note:** This property is only set for a `HistoricVariableUpdate` historic details. + In these cases, the value of the `type` property is `variableUpdate`." + /> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the historic detail." + /> + + <@lib.property + name = "type" + type = "string" + desc = "The type of the historic detail. Either `formField` for a submitted form field + value or `variableUpdate` for variable updates." + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition that this historic detail belongs to." + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition that this historic detail belongs to." + /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance the historic detail belongs to." + /> + + <@lib.property + name = "activityInstanceId" + type = "string" + desc = "The id of the activity instance the historic detail belongs to." + /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The id of the execution the historic detail belongs to." + /> + + <@lib.property + name = "caseDefinitionKey" + type = "string" + desc = "The key of the case definition that this historic detail belongs to." + /> + + <@lib.property + name = "caseDefinitionId" + type = "string" + desc = "The id of the case definition that this historic detail belongs to." + /> + + <@lib.property + name = "caseInstanceId" + type = "string" + desc = "The id of the case instance the historic detail belongs to." + /> + + <@lib.property + name = "caseExecutionId" + type = "string" + desc = "The id of the case execution the historic detail belongs to." + /> + + <@lib.property + name = "taskId" + type = "string" + desc = "The id of the task the historic detail belongs to." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The id of the tenant that this historic detail belongs to." + /> + + <@lib.property + name = "userOperationId" + type = "string" + desc = "The id of user operation which links historic detail with + [user operation log](${docsUrl}/reference/rest/history/user-operation-log/) + entries." + /> + + <@lib.property + name = "time" + type = "string" + format = "date-time" + desc = "The time when this historic detail occurred. ${dateFormatDescription}" + /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the historic detail should be removed by the History Cleanup job. + ${dateFormatDescription}" + /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + desc = "The process instance id of the root process instance that initiated the process + containing this historic detail." + /> + + <@lib.property + name = "fieldId" + type = "string" + desc = "The id of the form field. + + ${noteHistoricFormFiled}" + /> + + <@lib.property + name = "fieldValue" + type = "object" + desc = "The submitted form field value. The value differs depending on the form field's type + and on the `deserializeValue` parameter. + + ${noteHistoricFormFiled}" + /> + + <@lib.property + name = "variableName" + type = "string" + desc = "The name of the variable which has been updated. + + ${noteHistoricVariableUpdate}" + /> + + <@lib.property + name = "variableInstanceId" + type = "string" + desc = "The id of the associated variable instance. + + ${noteHistoricVariableUpdate}" + /> + + <@lib.property + name = "variableType" + type = "string" + desc = "The value type of the variable. + + ${noteHistoricVariableUpdate}" + /> + + <@lib.property + name = "value" + type = "object" + desc = "The variable's value. Value differs depending on the variable's type + and on the deserializeValues parameter. + + ${noteHistoricVariableUpdate}" + /> + + <@lib.property + name = "valueInfo" + type = "object" + addProperty = "\"additionalProperties\": true" + desc = "A JSON object containing additional, value-type-dependent properties. + For variables of type `Object`, the following properties are returned: + + * `objectTypeName`: A string representation of the object's type name. + * `serializationDataFormat`: The serialization format used to store the variable. + + ${noteHistoricVariableUpdate}" + /> + + <@lib.property + name = "initial" + type = "boolean" + desc = "Returns `true` for variable updates that contains the initial values of the variables. + + ${noteHistoricVariableUpdate}" + /> + + <@lib.property + name = "revision" + type = "integer" + format = "int32" + desc = "The revision of the historic variable update. + + ${noteHistoricVariableUpdate}" + /> + + <@lib.property + name = "errorMessage" + type = "string" + last = true + desc = "An error message in case a Java Serialized Object + could not be de-serialized. + + ${noteHistoricVariableUpdate}" + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDetailQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDetailQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2bb38a8f1ed27bd54a978f9533df2f6afc7c69e6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricDetailQueryDto.ftl @@ -0,0 +1,21 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc = "A historic detail query which defines a group of historic details." > + + <#assign requestMethod="POST"/> + <#include "/lib/commons/history-detail-query-params.ftl" > + <@lib.properties params /> + "sorting": { + "type": "array", + "nullable": true, + "description": "A JSON array of criteria to sort the result by. Each element of the array is + a JSON object that specifies one ordering. The position in the array + identifies the rank of an ordering, i.e., whether it is primary, secondary, + etc. Does not have an effect for the `count` endpoint.", + "items": + <#assign last = true> + <#include "/lib/commons/sort-props.ftl"> + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricExternalTaskLogDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricExternalTaskLogDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..64872bec767a3b0384b09ceb0e319ce85b274f8f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricExternalTaskLogDto.ftl @@ -0,0 +1,143 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/get-external-task-log-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the log entry." + /> + + <@lib.property + name = "externalTaskId" + type = "string" + desc = "The id of the external task." + /> + + <@lib.property + name = "timestamp" + type = "string" + format = "date-time" + desc = "The time when the log entry has been written." + /> + + <@lib.property + name = "topicName" + type = "string" + desc = "The topic name of the associated external task." + /> + + <@lib.property + name = "workerId" + type = "string" + desc = "The id of the worker that posessed the most recent lock." + /> + + <@lib.property + name = "retries" + type = "integer" + format = "int32" + desc = "The number of retries the associated external task has left." + /> + + <@lib.property + name = "priority" + type = "integer" + format = "int64" + desc = "The execution priority the external task had when the log entry was created." + /> + + <@lib.property + name = "errorMessage" + type = "string" + desc = "The message of the error that occurred by executing the associated external task." + /> + + <@lib.property + name = "activityId" + type = "string" + desc = "The id of the activity on which the associated external task was created." + /> + + <@lib.property + name = "activityInstanceId" + type = "string" + desc = "The id of the activity instance on which the associated external task was created." + /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The execution id on which the associated external task was created." + /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance on which the associated external task was created." + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition which the associated external task belongs to." + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition which the associated external task belongs to." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The id of the tenant that this historic external task log entry belongs to." + /> + + <@lib.property + name = "creationLog" + type = "boolean" + desc = "A flag indicating whether this log represents the creation of the associated + external task." + /> + + <@lib.property + name = "failureLog" + type = "boolean" + desc = "A flag indicating whether this log represents the failed execution of the + associated external task." + /> + + <@lib.property + name = "successLog" + type = "boolean" + desc = "A flag indicating whether this log represents the successful execution of the + associated external task." + /> + + <@lib.property + name = "deletionLog" + type = "boolean" + desc = "A flag indicating whether this log represents the deletion of the associated + external task." + /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which this log should be removed by the History Cleanup job. Default + format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. For further information, please see the [documentation](${docsUrl}/reference/rest/overview/date-format/)" + /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + desc = "The process instance id of the root process instance that initiated the process + containing this log." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricExternalTaskLogQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricExternalTaskLogQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8665d84bfb4244141f6613aed5cbe6d8c4ffd7f6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricExternalTaskLogQueryDto.ftl @@ -0,0 +1,20 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/post-external-task-log-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto desc = "A Historic External Task Log instance query which defines a list of Historic External Task Log instances"> + + <#include "/lib/commons/historic-external-task-log-query-params.ftl"> + <@lib.properties params/> + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is + an object that specifies one ordering. The position in the array + identifies the rank of an ordering, i.e., whether it is primary, secondary, + etc. Sorting has no effect for `count` endpoints.", + "items": + <#assign last = true> + <#include "/lib/commons/sort-props.ftl"> + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricIdentityLinkLogDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricIdentityLinkLogDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..aac3301758ae2c517df3603a192cc6ef49c36b05 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricIdentityLinkLogDto.ftl @@ -0,0 +1,90 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/identity-links/get-identity-link-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "id" + type = "string" + desc = "Id of the Historic identity link entry." + /> + + <@lib.property + name = "time" + type = "string" + format = "date-time" + desc = "The time when the identity link is logged. + [Default format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "type" + type = "string" + desc = "The type of identity link (candidate/assignee/owner)." + /> + + <@lib.property + name = "userId" + type = "string" + desc = "The id of the user/assignee." + /> + + <@lib.property + name = "groupId" + type = "string" + desc = "The id of the group." + /> + + <@lib.property + name = "taskId" + type = "string" + desc = "The id of the task." + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition." + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition." + /> + + <@lib.property + name = "operationType" + type = "string" + desc = "Type of operation (add/delete)." + /> + + <@lib.property + name = "assignerId" + type = "string" + desc = "The id of the assigner." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The id of the tenant." + /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the identity link should be removed by the History Cleanup job. + [Default format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + desc = "The process instance id of the root process instance that initiated the process + containing this identity link." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricIncidentDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricIncidentDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1f4d167a6a5bbd464abf034f6485929fd7074081 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricIncidentDto.ftl @@ -0,0 +1,156 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the incident." + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition this incident is associated with." + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition this incident is associated with." + /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The key of the process definition this incident is associated with." + /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The id of the execution this incident is associated with." + /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + desc = "The process instance id of the root process instance that initiated the process + containing this incident." + /> + + <@lib.property + name = "createTime" + type = "string" + format = "date-time" + desc = "The time this incident happened. + [Default format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "endTime" + type = "string" + format = "date-time" + desc = "The time this incident has been deleted or resolved. + [Default format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the incident should be removed by the History Cleanup job. + [Default format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "incidentType" + type = "string" + desc = "The type of incident, for example: `failedJobs` will be returned in case of an + incident which identified a failed job during the execution of a + process instance. See the [User Guide](/manual/develop/user- + guide/process-engine/incidents/#incident-types) for a list of + incident types." + /> + + <@lib.property + name = "activityId" + type = "string" + desc = "The id of the activity this incident is associated with." + /> + + <@lib.property + name = "failedActivityId" + type = "string" + desc = "The id of the activity on which the last exception occurred." + /> + + <@lib.property + name = "causeIncidentId" + type = "string" + desc = "The id of the associated cause incident which has been triggered." + /> + + <@lib.property + name = "rootCauseIncidentId" + type = "string" + desc = "The id of the associated root cause incident which has been triggered." + /> + + <@lib.property + name = "configuration" + type = "string" + desc = "The payload of this incident." + /> + + <@lib.property + name = "historyConfiguration" + type = "string" + desc = "The payload of this incident at the time when it occurred." + /> + + <@lib.property + name = "incidentMessage" + type = "string" + desc = "The message of this incident." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The id of the tenant this incident is associated with." + /> + + <@lib.property + name = "jobDefinitionId" + type = "string" + desc = "The job definition id the incident is associated with." + /> + + <@lib.property + name = "open" + type = "boolean" + desc = "If true, this incident is open." + /> + + <@lib.property + name = "deleted" + type = "boolean" + desc = "If true, this incident has been deleted." + /> + + <@lib.property + name = "resolved" + type = "boolean" + desc = "If true, this incident has been resolved." + /> + + <@lib.property + name = "annotation" + type = "string" + desc = "The annotation set to the incident." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricJobLogDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricJobLogDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..b84ca285f2cf808fea3459351abd0c8802c29c15 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricJobLogDto.ftl @@ -0,0 +1,182 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/job-log/get-job-log-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the log entry." + /> + + <@lib.property + name = "timestamp" + type = "string" + format = "date-time" + desc = "The time when the log entry has been written." + /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the log entry should be removed by the History Cleanup job. + Default format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. For further info see the + [docs](${docsUrl}/reference/rest/overview/date-format/)" + /> + + <@lib.property + name = "jobId" + type = "string" + desc = "The id of the associated job." + /> + + <@lib.property + name = "jobDueDate" + type = "string" + format = "date-time" + desc = "The date on which the associated job is supposed to be processed." + /> + + <@lib.property + name = "jobRetries" + type = "integer" + format = "int32" + desc = "The number of retries the associated job has left." + /> + + <@lib.property + name = "jobPriority" + type = "integer" + format = "int64" + desc = "The execution priority the job had when the log entry was created." + /> + + <@lib.property + name = "jobExceptionMessage" + type = "string" + desc = "The message of the exception that occurred by executing the associated job." + /> + + <@lib.property + name = "failedActivityId" + type = "string" + desc = "The id of the activity on which the last exception occurred by executing the + associated job." + /> + + <@lib.property + name = "jobDefinitionId" + type = "string" + desc = "The id of the job definition on which the associated job was created." + /> + + <@lib.property + name = "jobDefinitionType" + type = "string" + desc = "The job definition type of the associated job. See the + [User Guide](${docsUrl}/user-guide/process-engine/the-job-executor/#job-creation) + for more information about job definition types." + /> + + <@lib.property + name = "jobDefinitionConfiguration" + type = "string" + desc = "The job definition configuration type of the associated job." + /> + + <@lib.property + name = "activityId" + type = "string" + desc = "The id of the activity on which the associated job was created." + /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The execution id on which the associated job was created." + /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance on which the associated job was created." + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition which the associated job belongs to." + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition which the associated job belongs to." + /> + + <@lib.property + name = "deploymentId" + type = "string" + desc = "The id of the deployment which the associated job belongs to." + /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + desc = "The process instance id of the root process instance that initiated the process + which the associated job belongs to." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The id of the tenant that this historic job log entry belongs to." + /> + + <@lib.property + name = "hostname" + type = "string" + desc = " + The name of the host of the Process Engine where the + job of this historic job log entry was executed." + /> + + <@lib.property + name = "batchId" + type = "string" + desc = "The ID of the batch associated with this job. `null` if no batch is associated with this job. The + following jobs are associated with batches: + * Seed Jobs + * Monitor Jobs + * Batch Execution Jobs" + /> + + <@lib.property + name = "creationLog" + type = "boolean" + desc = "A flag indicating whether this log represents the creation of the associated job." + /> + + <@lib.property + name = "failureLog" + type = "boolean" + desc = "A flag indicating whether this log represents the failed execution of the + associated job." + /> + + <@lib.property + name = "successLog" + type = "boolean" + desc = "A flag indicating whether this log represents the successful execution of the + associated job." + /> + + <@lib.property + name = "deletionLog" + type = "boolean" + desc = "A flag indicating whether this log represents the deletion of the associated job." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricJobLogQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricJobLogQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..56c604086a4da76ccb98ee9aa844e3540a865a44 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricJobLogQueryDto.ftl @@ -0,0 +1,20 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/job-log/post-job-log-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto desc = "A Historic Job Log instance query which defines a list of Historic Job Log instances"> + + <#include "/lib/commons/history-job-log-params.ftl"> + <@lib.properties params/> + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is + an object that specifies one ordering. The position in the array + identifies the rank of an ordering, i.e., whether it is primary, secondary, + etc. Sorting has no effect for `count` endpoints", + "items": + <#assign last = true> + <#include "/lib/commons/sort-props.ftl"> + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricProcessInstanceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricProcessInstanceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3ff9134d65f8c8274b68d2659a1f1c508e6f0940 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricProcessInstanceDto.ftl @@ -0,0 +1,123 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + <#assign dateFormatDescription = "Default [format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`."/> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the process instance."/> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + desc = "The process instance id of the root process instance that initiated the process."/> + + <@lib.property + name = "superProcessInstanceId" + type = "string" + desc = "The id of the parent process instance, if it exists."/> + + <@lib.property + name = "superCaseInstanceId" + type = "string" + desc = "The id of the parent case instance, if it exists."/> + + <@lib.property + name = "caseInstanceId" + type = "string" + desc = "The id of the parent case instance, if it exists."/> + + <@lib.property + name = "processDefinitionName" + type = "string" + desc = "The name of the process definition that this process instance belongs to."/> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition that this process instance belongs to."/> + + <@lib.property + name = "processDefinitionVersion" + type = "integer" + format = "int32" + desc = "The version of the process definition that this process instance belongs to."/> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition that this process instance belongs to."/> + + <@lib.property + name = "businessKey" + type = "string" + desc = "The business key of the process instance."/> + + <@lib.property + name = "startTime" + type = "string" + format = "date-time" + desc = "The time the instance was started. ${dateFormatDescription}"/> + + <@lib.property + name = "endTime" + type = "string" + format = "date-time" + desc = "The time the instance ended. ${dateFormatDescription}"/> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the instance should be removed by the History Cleanup job. ${dateFormatDescription}"/> + + <@lib.property + name = "durationInMillis" + type = "integer" + format = "int64" + desc = "The time the instance took to finish (in milliseconds)."/> + + <@lib.property + name = "startUserId" + type = "string" + desc = "The id of the user who started the process instance."/> + + <@lib.property + name = "startActivityId" + type = "string" + desc = "The id of the initial activity that was executed (e.g., a start event)."/> + + <@lib.property + name = "deleteReason" + type = "string" + desc = "The provided delete reason in case the process instance was canceled during execution."/> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The tenant id of the process instance."/> + + <@lib.property + name = "state" + type = "string" + enumValues = ["ACTIVE", "SUSPENDED", "COMPLETED", "EXTERNALLY_TERMINATED", "INTERNALLY_TERMINATED"] + desc = "Last state of the process instance, possible values are: + + `ACTIVE` - running process instance + + `SUSPENDED` - suspended process instances + + `COMPLETED` - completed through normal end event + + `EXTERNALLY_TERMINATED` - terminated externally, for instance through REST API + + `INTERNALLY_TERMINATED` - terminated internally, for instance by terminating boundary event"/> + + <@lib.property + name = "restartedProcessInstanceId" + type = "string" + desc = "The id of the original process instance which was restarted." + last = true /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricProcessInstanceQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricProcessInstanceQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a8dfef98653e878145d444eb75e5f95f949f0570 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricProcessInstanceQueryDto.ftl @@ -0,0 +1,21 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc = "A historic process instance query which defines a group of historic process instances" > + + <#assign requestMethod="POST"/> + <#include "/lib/commons/history-process-instance.ftl" > + <@lib.properties params /> + + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": + + <#assign last = true > + <#include "/lib/commons/sort-props.ftl" > + + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricTaskInstanceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricTaskInstanceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..cb1778b5a7b9db2000fa9909f78399fa72c5f734 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricTaskInstanceDto.ftl @@ -0,0 +1,180 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/task/get-task-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + <#assign dateFormatDescription = "Default [format](${docsUrl}/reference/rest/overview/date-format/) + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "id" + type = "string" + desc = "The task id." + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition the task belongs to." + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition the task belongs to." + /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance the task belongs to." + /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The id of the execution the task belongs to." + /> + + <@lib.property + name = "caseDefinitionKey" + type = "string" + desc = "The key of the case definition the task belongs to." + /> + + <@lib.property + name = "caseDefinitionId" + type = "string" + desc = "The id of the case definition the task belongs to." + /> + + <@lib.property + name = "caseInstanceId" + type = "string" + desc = "The id of the case instance the task belongs to." + /> + + <@lib.property + name = "caseExecutionId" + type = "string" + desc = "The id of the case execution the task belongs to." + /> + + <@lib.property + name = "activityInstanceId" + type = "string" + desc = "The id of the activity that this object is an instance of." + /> + + <@lib.property + name = "name" + type = "string" + desc = "The task name." + /> + + <@lib.property + name = "description" + type = "string" + desc = "The task's description." + /> + + <@lib.property + name = "deleteReason" + type = "string" + desc = "The task's delete reason." + /> + + <@lib.property + name = "owner" + type = "string" + desc = "The owner's id." + /> + + <@lib.property + name = "assignee" + type = "string" + desc = "The assignee's id." + /> + + <@lib.property + name = "startTime" + type = "string" + format = "date-time" + desc = "The time the task was started. ${dateFormatDescription}" + /> + + <@lib.property + name = "endTime" + type = "string" + format = "date-time" + desc = "The time the task ended. ${dateFormatDescription}" + /> + + <@lib.property + name = "duration" + type = "integer" + format = "int64" + desc = "The time the task took to finish (in milliseconds)." + /> + + <@lib.property + name = "taskDefinitionKey" + type = "string" + desc = "The task's key." + /> + + <@lib.property + name = "priority" + type = "integer" + format = "int32" + desc = "The task's priority." + /> + + <@lib.property + name = "due" + type = "string" + format = "date-time" + desc = "The task's due date. ${dateFormatDescription}" + /> + + <@lib.property + name = "parentTaskId" + type = "string" + desc = "The id of the parent task, if this task is a subtask." + /> + + <@lib.property + name = "followUp" + type = "string" + format = "date-time" + desc = "The follow-up date for the task. ${dateFormatDescription}" + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The tenant id of the task instance." + /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the task should be removed by the History Cleanup job. ${dateFormatDescription}" + /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + desc = "The process instance id of the root process instance that initiated the process + containing this task." + /> + + <@lib.property + name = "taskState" + type = "string" + desc = "The task's state." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricTaskInstanceQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricTaskInstanceQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..fb22a9630c587e79f968f44c85067358a7384e19 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricTaskInstanceQueryDto.ftl @@ -0,0 +1,21 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/task/post-task-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto desc = "A Historic Task instance query which defines a list of Historic Task instances"> + + <#assign requestMethod="POST"> + <#include "/lib/commons/history-task-instance-query-params.ftl"> + <@lib.properties params/> + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is + an object that specifies one ordering. The position in the array + identifies the rank of an ordering, i.e., whether it is primary, secondary, + etc. Sorting has no effect for `count` endpoints", + "items": + <#assign last = true> + <#include "/lib/commons/sort-props.ftl"> + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricTaskInstanceReportResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricTaskInstanceReportResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e15519219959f751b00fc341d4d8f839b00a7c9c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricTaskInstanceReportResultDto.ftl @@ -0,0 +1,106 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto > + <#assign noteCountReport = "**Note:** This property is only set for a historic task report object. + In these cases, the value of the `reportType` query parameter is `count`." /> + <#assign noteDurationReport = "**Note:** This property is only set for a duration report object. + In these cases, the value of the `reportType` query parameter is `duration`." /> + + <@lib.property + name = "taskName" + type = "string" + desc = "The name of the task. It is only available when the `groupBy` parameter is set to `taskName`. + Else the value is `null`. + + ${noteCountReport}" + /> + + <@lib.property + name = "count" + type = "integer" + format = "int64" + desc = "The number of tasks which have the given definition. + + ${noteCountReport}" + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition. + + ${noteCountReport}" + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition. + + ${noteCountReport}" + /> + + <@lib.property + name = "processDefinitionName" + type = "string" + desc = "The name of the process definition. + + ${noteCountReport}" + /> + + <@lib.property + name = "period" + type = "integer" + format = "int32" + desc = "Specifies a span of time within a year. + **Note:** The period must be interpreted in conjunction with the returned `periodUnit`. + + ${noteDurationReport}" + /> + + <@lib.property + name = "periodUnit" + type = "string" + enumValues = ["MONTH", "QUARTER"] + desc = "The unit of the given period. Possible values are `MONTH` and `QUARTER`. + + ${noteDurationReport}" + /> + + <@lib.property + name = "minimum" + type = "integer" + format = "int64" + desc = "The smallest duration in milliseconds of all completed process instances which + were started in the given period. + + ${noteDurationReport}" + /> + + <@lib.property + name = "maximum" + type = "integer" + format = "int64" + desc = "The greatest duration in milliseconds of all completed process instances which were + started in the given period. + + ${noteDurationReport}" + /> + + <@lib.property + name = "average" + type = "integer" + format = "int64" + desc = "The average duration in milliseconds of all completed process instances which were + started in the given period. + + ${noteDurationReport}" + /> + + <@lib.property + name = "tenantId" + type = "string" + last = true + desc = "The id of the tenant." /> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricVariableInstanceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricVariableInstanceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d20b0e38e6b33616c74a66a714856c988e075541 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricVariableInstanceDto.ftl @@ -0,0 +1,120 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/variable-instance/get-variable-instance-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto extends="VariableValueDto"> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the variable instance." + /> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the variable instance." + /> + + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition the variable instance belongs to." + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition the variable instance belongs to." + /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The process instance id the variable instance belongs to." + /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The execution id the variable instance belongs to." + /> + + <@lib.property + name = "activityInstanceId" + type = "string" + desc = "The id of the activity instance in which the variable is valid." + /> + + <@lib.property + name = "caseDefinitionKey" + type = "string" + desc = "The key of the case definition the variable instance belongs to." + /> + + <@lib.property + name = "caseDefinitionId" + type = "string" + desc = "The id of the case definition the variable instance belongs to." + /> + + <@lib.property + name = "caseInstanceId" + type = "string" + desc = "The case instance id the variable instance belongs to." + /> + + <@lib.property + name = "caseExecutionId" + type = "string" + desc = "The case execution id the variable instance belongs to." + /> + + <@lib.property + name = "taskId" + type = "string" + desc = "The id of the task the variable instance belongs to." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The id of the tenant that this variable instance belongs to." + /> + + <@lib.property + name = "errorMessage" + type = "string" + desc = "An error message in case a Java Serialized Object could not be de-serialized." + /> + + <@lib.property + name = "state" + type = "string" + desc = "The current state of the variable. Can be 'CREATED' or 'DELETED'." + /> + + <@lib.property + name = "createTime" + type = "string" + format = "date-time" + desc = "The time the variable was inserted. [Default format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the variable should be removed by the History Cleanup job. + [Default format](${docsUrl}/reference/rest/overview/date-format/) `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + desc = "The process instance id of the root process instance that initiated the process + containing this variable." + last = true + /> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricVariableInstanceQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricVariableInstanceQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..bd8b1e752ef7817820300e485efa407f55bede48 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricVariableInstanceQueryDto.ftl @@ -0,0 +1,21 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/variable-instance/post-variable-instance-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto desc = "A Historic Variable Instance instance query which defines a list of Historic Variable Instance instances"> + + <#assign requestMethod="POST"> + <#include "/lib/commons/historic-variable-instance-query-params.ftl"> + <@lib.properties params/> + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is + an object that specifies one ordering. The position in the array + identifies the rank of an ordering, i.e., whether it is primary, secondary, + etc. Sorting has no effect for `count` endpoints", + "items": + <#assign last = true> + <#include "/lib/commons/sort-props.ftl"> + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoryCleanupConfigurationDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoryCleanupConfigurationDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..423d01676d5a81542cad6adc3dc2e42b961a307d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoryCleanupConfigurationDto.ftl @@ -0,0 +1,35 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/history-cleanup/get-cleanup-configuration/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + <#assign dateFormatDescription="By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, + e.g., `2013-01-23T14:42:45.000+0200`." + /> + <@lib.property + name = "batchWindowStartTime" + type = "string" + format = "date-time" + desc = "Start time of the current or next batch window. ${dateFormatDescription}" + /> + + <@lib.property + name = "batchWindowEndTime" + type = "string" + format = "date-time" + desc = "End time of the current or next batch window. ${dateFormatDescription}" + /> + + <@lib.property + name = "enabled" + type = "boolean" + desc = "Indicates whether the engine node participates in history cleanup or + not. The default is `true`. Participation can be disabled via + [Process Engine Configuration](${docsUrl}/reference/deployment-descriptors/tags/process-engine/#history-cleanup-enabled). + + For more details, see + [Cleanup Execution Participation per Node](${docsUrl}/user-guide/process-engine/history/#cleanup-execution-participation-per-node)." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/SetRemovalTimeToHistoricDecisionInstancesDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/SetRemovalTimeToHistoricDecisionInstancesDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..266a2aa879b72d600fda5fa0e3f386b977ccea81 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/SetRemovalTimeToHistoricDecisionInstancesDto.ftl @@ -0,0 +1,29 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/decision-instance/post-decision-instance-set-removal-time/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto extends = "AbstractSetRemovalTimeDto"> + + <@lib.property + name = "hierarchical" + type = "boolean" + desc = "Sets the removal time to all historic decision instances in the hierarchy. + Value may only be `true`, as `false` is the default behavior." + /> + + <@lib.property + name = "historicDecisionInstanceQuery" + type = "ref" + dto = "HistoricDecisionInstanceQueryDto" + desc = "Query for the historic decision instances to set the removal time for." + /> + + <@lib.property + name = "historicDecisionInstanceIds" + type = "array" + itemType = "string" + desc = "The ids of the historic decision instances to set the removal time for." + last = true + /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/SetRemovalTimeToHistoricProcessInstancesDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/SetRemovalTimeToHistoricProcessInstancesDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6c35353eab1e1c341a3a5d26e85685ea696177c6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/SetRemovalTimeToHistoricProcessInstancesDto.ftl @@ -0,0 +1,43 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto extends = "AbstractSetRemovalTimeDto"> + + <@lib.property + name = "historicProcessInstanceIds" + type = "array" + itemType = "string" + desc = "The id of the process instance."/> + + <@lib.property + name = "historicProcessInstanceQuery" + type = "ref" + dto = "HistoricProcessInstanceQueryDto" + desc = "Query for the historic process instances to set the removal time for."/> + + <@lib.property + name = "hierarchical" + type = "boolean" + desc = "Sets the removal time to all historic process instances in the hierarchy. + Value may only be `true`, as `false` is the default behavior."/> + + <@lib.property + name = "updateInChunks" + type = "boolean" + desc = "Handles removal time updates in chunks, taking into account the defined size in + `removalTimeUpdateChunkSize` in the process engine configuration. The size of the + chunks can also be overridden per call with the `updateChunkSize` parameter. + Enabling this option can lead to multiple executions of the resulting jobs, preventing + the database transaction from timing out by limiting the number of rows to update. + Value may only be `true`, as `false` is the default behavior."/> + + <@lib.property + name = "updateChunkSize" + type = "integer" + format = "int32" + last = true + desc = "Defines the size of the chunks in which removal time updates are processed. + The value must be a positive integer between `1` and `500`. This only has an + effect if `updateInChunks` is set to `true`. If undefined, the operation uses the + `removalTimeUpdateChunkSize` defined in the process engine configuration."/> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/UserOperationLogEntryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/UserOperationLogEntryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4bcab010d790456d9c28e2b866922cac83705eec --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/UserOperationLogEntryDto.ftl @@ -0,0 +1,179 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "id" + type = "string" + desc = "The unique identifier of this log entry." + /> + + <@lib.property + name = "userId" + type = "string" + desc = "The user who performed this operation." + /> + + <@lib.property + name = "timestamp" + type = "string" + format = "date-time" + desc = "Timestamp of this operation." + /> + + <@lib.property + name = "operationId" + type = "string" + desc = "The unique identifier of this operation. A composite operation that changes + multiple properties has a common `operationId`." + /> + + <@lib.property + name = "operationType" + type = "string" + desc = "The type of this operation, e.g., `Assign`, `Claim` and so on." + /> + + <@lib.property + name = "entityType" + type = "string" + desc = "The type of the entity on which this operation was executed, e.g., `Task` or + `Attachment`." + /> + + <@lib.property + name = "category" + type = "string" + desc = "The name of the category this operation was associated with, e.g., `TaskWorker` or + `Admin`." + /> + + <@lib.property + name = "annotation" + type = "string" + desc = "An arbitrary annotation set by a user for auditing reasons." + /> + + <@lib.property + name = "property" + type = "string" + desc = "The property changed by this operation." + /> + + <@lib.property + name = "orgValue" + type = "string" + desc = "The original value of the changed property." + /> + + <@lib.property + name = "newValue" + type = "string" + desc = "The new value of the changed property." + /> + + <@lib.property + name = "deploymentId" + type = "string" + desc = "If not `null`, the operation is restricted to entities in relation to this + deployment." + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "If not `null`, the operation is restricted to entities in relation to this process + definition." + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "If not `null`, the operation is restricted to entities in relation to process + definitions with this key." + /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "If not `null`, the operation is restricted to entities in relation to this process + instance." + /> + + <@lib.property + name = "executionId" + type = "string" + desc = "If not `null`, the operation is restricted to entities in relation to this + execution." + /> + + <@lib.property + name = "caseDefinitionId" + type = "string" + desc = "If not `null`, the operation is restricted to entities in relation to this case + definition." + /> + + <@lib.property + name = "caseInstanceId" + type = "string" + desc = "If not `null`, the operation is restricted to entities in relation to this case + instance." + /> + + <@lib.property + name = "caseExecutionId" + type = "string" + desc = "If not `null`, the operation is restricted to entities in relation to this case + execution." + /> + + <@lib.property + name = "taskId" + type = "string" + desc = "If not `null`, the operation is restricted to entities in relation to this task." + /> + + <@lib.property + name = "externalTaskId" + type = "string" + desc = "If not `null`, the operation is restricted to entities in relation to this external task." + /> + + <@lib.property + name = "batchId" + type = "string" + desc = "If not `null`, the operation is restricted to entities in relation to this batch." + /> + + <@lib.property + name = "jobId" + type = "string" + desc = "If not `null`, the operation is restricted to entities in relation to this job." + /> + + <@lib.property + name = "jobDefinitionId" + type = "string" + desc = "If not `null`, the operation is restricted to entities in relation to this job + definition." + /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the entry should be removed by the History Cleanup job. + [Default format](${docsUrl}/reference/rest/overview/date-format/) + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." + /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + desc = "The process instance id of the root process instance that initiated the process + containing this entry." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/batch/CleanableHistoricBatchReportResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/batch/CleanableHistoricBatchReportResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..722ac761d1c72ef52345cc76422e83b94639787f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/batch/CleanableHistoricBatchReportResultDto.ftl @@ -0,0 +1,35 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/batch/get-cleanable-batch-report/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "batchType" + type = "string" + desc = "The type of the batch operation." + /> + + <@lib.property + name = "historyTimeToLive" + type = "integer" + format = "int32" + desc = "The history time to live of the batch operation." + /> + + <@lib.property + name = "finishedBatchesCount" + type = "integer" + format = "int64" + desc = "The count of the finished batch operations." + /> + + <@lib.property + name = "cleanableBatchesCount" + type = "integer" + format = "int64" + desc = "The count of the cleanable historic batch operations, referring to history time to + live." + last = true + /> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/batch/HistoricBatchDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/batch/HistoricBatchDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a67280b20ad4bdead971782f5162cec1a3d8912f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/batch/HistoricBatchDto.ftl @@ -0,0 +1,117 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/batch/get-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the batch." + /> + + <@lib.property + name = "type" + type = "string" + desc = "The type of the batch. See the + [User Guide](${docsUrl}/user-guide/process-engine/batch/#creating-a-batch) + for more information about batch types." + /> + + <@lib.property + name = "totalJobs" + type = "integer" + format = "int32" + desc = " + The total jobs of a batch is the number of batch execution + jobs required to complete the batch. + " + /> + + <@lib.property + name = "batchJobsPerSeed" + type = "integer" + format = "int32" + desc = " + The number of batch execution jobs created per seed job invocation. + The batch seed job is invoked until it has created all batch + execution jobs required by the batch (see `totalJobs` property). + " + /> + + <@lib.property + name = "invocationsPerBatchJob" + type = "integer" + format = "int32" + desc = " + Every batch execution job invokes the command executed by the batch + `invocationsPerBatchJob` times. E.g., for a process instance + migration batch this specifies the number of process instances + which are migrated per batch execution job. + " + /> + + <@lib.property + name = "seedJobDefinitionId" + type = "string" + desc = "The job definition id for the seed jobs of this batch." + /> + + <@lib.property + name = "monitorJobDefinitionId" + type = "string" + desc = "The job definition id for the monitor jobs of this batch." + /> + + <@lib.property + name = "batchJobDefinitionId" + type = "string" + desc = "The job definition id for the batch execution jobs of this batch." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The tenant id of the batch." + /> + + <@lib.property + name = "createUserId" + type = "string" + desc = "The batch creator's user id." + /> + + <@lib.property + name = "startTime" + type = "string" + format = "date-time" + desc = "The time the batch was started. Default format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. + For further information, please see the [documentation](${docsUrl}/reference/rest/overview/date-format/)" + /> + + <@lib.property + name = "executionStartTime" + type = "string" + format = "date-time" + desc = "The time the batch execution was started, i.e., at least one batch job has been executed. Default format + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. For further information, please see the [documentation] + (${docsUrl}/reference/rest/overview/date-format/)" /> + + <@lib.property + name = "endTime" + type = "string" + format = "date-time" + desc = "The time the batch ended. Default format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. + For further information, please see the [documentation](${docsUrl}/reference/rest/overview/date-format/)" + /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the historic batch should be removed by the History Cleanup + job. Default format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. + For further information, please see the [documentation](${docsUrl}/reference/rest/overview/date-format/)" + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/batch/HistoricBatchQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/batch/HistoricBatchQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..52446e66a08d8ea014cef796529ff17b47dc9dba --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/batch/HistoricBatchQueryDto.ftl @@ -0,0 +1,21 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc = "Query for the historic batches to set the removal time for." > + + <#include "/lib/commons/historic-batch-params.ftl" > + + <@lib.properties params/> + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is + an object that specifies one ordering. The position in the array + identifies the rank of an ordering, i.e., whether it is primary, secondary, + etc. Has no effect for the `/count` endpoint", + "items": + <#assign last = true> + <#include "/lib/commons/sort-props.ftl"> + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/batch/removaltime/SetRemovalTimeToHistoricBatchesDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/batch/removaltime/SetRemovalTimeToHistoricBatchesDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2060ae4ef98de9e2ea57410300eb4d9d7b8545d1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/history/batch/removaltime/SetRemovalTimeToHistoricBatchesDto.ftl @@ -0,0 +1,22 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/batch/post-batch-set-removal-time/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto extends="AbstractSetRemovalTimeDto"> + + <@lib.property + name = "historicBatchQuery" + type = "object" + dto = "HistoricBatchQueryDto" + desc = "Query for the historic batches to set the removal time for." + /> + + + <@lib.property + name = "historicBatchIds" + type = "array" + itemType = "string" + desc = "The ids of the historic batches to set the removal time for." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/BasicUserCredentialsDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/BasicUserCredentialsDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d7ea9ac3db4a5af52ed4627e5a8c404a92bb5238 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/BasicUserCredentialsDto.ftl @@ -0,0 +1,20 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + <#-- In the java code this inherits from UserCredentialsDto, but that brings the unnecessary + attribute authenticatedUserPassword --> + + <@lib.property + name = "username" + type = "string" + desc = "The username of a user." + /> + + <@lib.property + name = "password" + type = "string" + desc = "A password of a user." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/CheckPasswordPolicyResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/CheckPasswordPolicyResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ed7995e55979b8edd45ad0e306249746c4840089 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/CheckPasswordPolicyResultDto.ftl @@ -0,0 +1,13 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto extends="PasswordPolicyDto"> + + <@lib.property + name = "valid" + type = "boolean" + desc = "`true` if the password is compliant with the policy, otherwise `false`." + last = true + /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/CheckPasswordPolicyRuleDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/CheckPasswordPolicyRuleDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f2dc1c3b530bdbdbe48b1859d73643f821a4228b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/CheckPasswordPolicyRuleDto.ftl @@ -0,0 +1,13 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto extends = "PasswordPolicyRuleDto"> + + <@lib.property + name = "valid" + type = "boolean" + desc = "`true` if the password is compliant with this rule, otherwise `false`." + last = true + /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/GroupDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/GroupDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..761dcffbfb489779688dd026bfc689bd3d8c516b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/GroupDto.ftl @@ -0,0 +1,21 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the group." /> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the group." /> + + <@lib.property + name = "type" + type = "string" + last = true + desc = "The type of the group." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/GroupQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/GroupQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..b00dd04db29c8d607c58513e281e5cbc6d6338bc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/GroupQueryDto.ftl @@ -0,0 +1,20 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc = "A group instance query which defines a list of group instances" > + + <#assign requestMethod="POST"/> + <#include "/lib/commons/group-query-params.ftl" > + <@lib.properties params /> + + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": + <#assign last = true > + <#include "/lib/commons/sort-props.ftl" > + + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/PasswordPolicyDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/PasswordPolicyDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e0e92bfbbad09a45e56b73b6674cf93ef2cfa23e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/PasswordPolicyDto.ftl @@ -0,0 +1,13 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "rules" + type = "array" + dto = "PasswordPolicyRuleDto" + desc = "An array of password policy rules. Each element of the array is representing one rule of the policy." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/PasswordPolicyRequestDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/PasswordPolicyRequestDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..eeca91b376271a9c69755ac9b0e3f247081aea9b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/PasswordPolicyRequestDto.ftl @@ -0,0 +1,21 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "password" + type = "string" + desc = "The candidate password to be check against the password policy." + /> + + <@lib.property + name = "profile" + type = "ref" + dto = "UserProfileDto" + last = true + desc = "A JSON object containing variable key-value pairs. The object can contain the following properties: + id (String), firstName (String), lastName (String) and email (String)." + /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/PasswordPolicyRuleDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/PasswordPolicyRuleDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..b2138426550dbc72ed162edd61cf8e23f4c0e31b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/PasswordPolicyRuleDto.ftl @@ -0,0 +1,19 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto desc = "Describes a rule of a password policy."> + + <@lib.property + name = "placeholder" + type = "string" + desc = "A placeholder string that contains the name of a password policy rule." + /> + + <@lib.property + name = "parameter" + type = "object" + last = true + addProperty = "\"additionalProperties\": { \"type\": \"string\"}" + desc = "A map that describes the characteristics of a password policy rule, such as the minimum number of digits." + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/TenantDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/TenantDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f58ab5fa32f86ee7fb723ba61262ce291821f7b0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/TenantDto.ftl @@ -0,0 +1,18 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the tenant." + /> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the tenant." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/UserCredentialsDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/UserCredentialsDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..289e8e14c836730b21b54f7930887b33f1a29f02 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/UserCredentialsDto.ftl @@ -0,0 +1,17 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "password" + type = "string" + desc = "The users new password." /> + + <@lib.property + name = "authenticatedUserPassword" + type = "string" + last = true + desc = "The password of the authenticated user who changes the password of the user + (i.e., the user with passed id as path parameter)." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/UserDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/UserDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d9cd4d811adfd421f937bd3f1c4ecca36e7523ff --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/UserDto.ftl @@ -0,0 +1,22 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "profile" + type = "ref" + dto = "UserProfileDto" + desc = "A JSON object containing variable key-value pairs. + The object contains the following properties: + id (String), firstName (String), lastName (String) and email (String). "/> + + <@lib.property + name = "credentials" + type = "ref" + dto = "UserCredentialsDto" + last = true + desc = "A JSON object containing variable key-value pairs. + The object contains the following property: password (String). "/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/UserProfileDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/UserProfileDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..72ddced23ac7a09937916d3aecee3f48246d4a47 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/identity/UserProfileDto.ftl @@ -0,0 +1,26 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the user." /> + + <@lib.property + name = "firstName" + type = "string" + desc = "The first name of the user." /> + + <@lib.property + name = "lastName" + type = "string" + desc = "The first name of the user." /> + + <@lib.property + name = "email" + type = "string" + last = true + desc = "The email of the user." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/message/CorrelationMessageDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/message/CorrelationMessageDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..721b60c2f16676f2afab715ba561a93949786e46 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/message/CorrelationMessageDto.ftl @@ -0,0 +1,112 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "messageName" + type = "string" + desc = "The name of the message to deliver."/> + + <@lib.property + name = "businessKey" + type = "string" + desc = "Used for correlation of process instances that wait for incoming messages. + Will only correlate to executions that belong to a process instance with the provided business key."/> + + <@lib.property + name = "tenantId" + type = "string" + desc = "Used to correlate the message for a tenant with the given id. + Will only correlate to executions and process definitions which belong to the tenant. + Must not be supplied in conjunction with a `withoutTenantId`."/> + + <@lib.property + name = "withoutTenantId" + type = "boolean" + defaultValue = 'false' + desc = "A Boolean value that indicates whether the message should only be correlated to executions + and process definitions which belong to no tenant or not. Value may only be `true`, as `false` + is the default behavior. + Must not be supplied in conjunction with a `tenantId`."/> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "Used to correlate the message to the process instance with the given id."/> + + <@lib.property + name = "correlationKeys" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + desc = "Used for correlation of process instances that wait for incoming messages. + Has to be a JSON object containing key-value pairs that are matched against process instance variables + during correlation. Each key is a variable name and each value a JSON variable value object with the + following properties."/> + + <@lib.property + name = "localCorrelationKeys" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + desc = "Local variables used for correlation of executions (process instances) that wait for incoming messages. + Has to be a JSON object containing key-value pairs that are matched against local variables during correlation. + Each key is a variable name and each value a JSON variable value object with the following properties."/> + + <@lib.property + name = "processVariables" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + desc = "A map of variables that is injected into the triggered execution or process instance after the message + has been delivered. Each key is a variable name and each value a JSON variable value object with + the following properties."/> + + <@lib.property + name = "processVariablesLocal" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + desc = "A map of local variables that is injected into the execution waiting on the message. + Each key is a variable name and each value a JSON variable value object + with the following properties."/> + + <@lib.property + name = "processVariablesToTriggeredScope" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + desc = "A map of variables that is injected into the new scope triggered by message correlation. + Each key is a variable name and each value a JSON variable value object + with the following properties."/> + + <@lib.property + name = "all" + type = "boolean" + defaultValue = 'false' + desc = "A Boolean value that indicates whether the message should be correlated to exactly one entity or multiple entities. + If the value is set to `false`, the message will be correlated to exactly one entity (execution or process definition). + If the value is set to `true`, the message will be correlated to multiple executions and a process definition that + can be instantiated by this message in one go."/> + + <@lib.property + name = "resultEnabled" + type = "boolean" + defaultValue = 'false' + desc = "A Boolean value that indicates whether the result of the correlation should be returned or not. + If this property is set to `true`, there will be returned a list of message correlation result objects. Depending on the + all property, there will be either one ore more returned results in the list. + + The default value is `false`, which means no result will be returned."/> + + <@lib.property + name = "variablesInResultEnabled" + type = "boolean" + defaultValue = 'false' + last = true + desc = "A Boolean value that indicates whether the result of the correlation should contain process variables or not. + The parameter resultEnabled should be set to `true` in order to use this it. + + The default value is `false`, which means the variables will not be returned."/> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/message/MessageCorrelationResultWithVariableDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/message/MessageCorrelationResultWithVariableDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5dfabaa2d63201ec9588b324e7923cc8fe0d42ac --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/message/MessageCorrelationResultWithVariableDto.ftl @@ -0,0 +1,40 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc="The `processInstance` property only has a value if the resultType is set to `ProcessDefinition`. + The processInstance with the properties as described in the + [get single instance](${docsUrl}/reference/rest/process-instance/get/) method. + + The `execution` property only has a value if the resultType is set to `Execution`. + The execution with the properties as described in the + [get single execution](${docsUrl}/reference/rest/execution/get/) method."> + + <@lib.property + name = "resultType" + type = "string" + enumValues = [ '"Execution"', '"ProcessDefinition"' ] + desc = "Indicates if the message was correlated to a message start event or an + intermediate message catching event. In the first case, the resultType is + `ProcessDefinition` and otherwise `Execution`."/> + + <@lib.property + name = "processInstance" + type = "ref" + dto = "ProcessInstanceDto"/> + + <@lib.property + name = "execution" + type = "ref" + dto = "ExecutionDto"/> + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + last = true + desc = "This property is returned if the `variablesInResultEnabled` is set to `true`. + Contains a list of the process variables. "/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/metrics/MetricsIntervalResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/metrics/MetricsIntervalResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..321e3b045e200d93b6dfe070bdf2349951321ebf --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/metrics/MetricsIntervalResultDto.ftl @@ -0,0 +1,29 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "timestamp" + type = "string" + format = "date-time" + desc = "The interval timestamp."/> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the metric."/> + + <@lib.property + name = "reporter" + type = "string" + desc = "The reporter of the metric. `null` if the metrics are aggregated by reporter."/> + + <@lib.property + name = "value" + type = "integer" + format = "int64" + last = true + desc = "The value of the metric aggregated by the interval."/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/metrics/MetricsResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/metrics/MetricsResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6f09325a4058603c6138ec6548d8e25c29be9d4c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/metrics/MetricsResultDto.ftl @@ -0,0 +1,13 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "result" + type = "integer" + format = "int64" + last = true + desc = "The current sum (count) for the selected metric."/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationExecutionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationExecutionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..989e9e62965d28b8c8bbf4da00318befe8de0aee --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationExecutionDto.ftl @@ -0,0 +1,49 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/migration/execute-migration/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "migrationPlan" + type = "ref" + dto = "MigrationPlanDto" + desc = "The migration plan to execute. A JSON object corresponding to + the migration plan interface in the engine as explained below." + /> + + + <@lib.property + name = "processInstanceIds" + type = "array" + itemType = "string" + desc = "A list of process instance ids to migrate." + /> + + + <@lib.property + name = "processInstanceQuery" + type = "ref" + dto = "ProcessInstanceQueryDto" + desc = "A process instance query like the request body described by + [POST /process-instance](${docsUrl}/reference/rest/process-instance/post-query/#request-body)." + /> + + + <@lib.property + name = "skipCustomListeners" + type = "boolean" + desc = "A boolean value to control whether execution listeners should be invoked during + migration." + /> + + + <@lib.property + name = "skipIoMappings" + type = "boolean" + desc = "A boolean value to control whether input/output mappings should be executed during + migration." + last = true + /> + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationInstructionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationInstructionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..214aa469b926ce1be58edfe5f3a03a563d947c3f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationInstructionDto.ftl @@ -0,0 +1,27 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/migration/generate-migration/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "sourceActivityIds" + type = "array" + itemType = "string" + desc = "The activity ids from the source process definition being mapped." + /> + + <@lib.property + name = "targetActivityIds" + type = "array" + itemType = "string" + desc = "The activity ids from the target process definition being mapped." + /> + + <@lib.property + name = "updateEventTrigger" + type = "boolean" + desc = "Configuration flag whether event triggers defined are going to be updated during migration." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationInstructionValidationReportDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationInstructionValidationReportDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9a7c9c7733fbaac5bfba0eda46139597d78c6b44 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationInstructionValidationReportDto.ftl @@ -0,0 +1,21 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/migration/validate-migration-plan/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "instruction" + type = "ref" + dto = "MigrationInstructionDto" + desc = "A migration instruction JSON object." + /> + + <@lib.property + name = "failures" + type = "array" + itemType = "string" + desc = "A list of instruction validation report messages." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationPlanDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationPlanDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..44b591ba692d73e47a8f3e5e67f691fd77c89667 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationPlanDto.ftl @@ -0,0 +1,36 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/migration/generate-migration/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "sourceProcessDefinitionId" + type = "string" + desc = "The id of the source process definition for the migration." + /> + + <@lib.property + name = "targetProcessDefinitionId" + type = "string" + desc = "The id of the target process definition for the migration." + /> + + <@lib.property + name = "instructions" + type = "array" + dto = "MigrationInstructionDto" + desc = "A list of migration instructions which map equal activities. Each + migration instruction is a JSON object with the following properties:" + /> + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + desc = "A map of variables which will be set into the process instances' scope. + Each key is a variable name and each value a JSON variable value object." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationPlanGenerationDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationPlanGenerationDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3c4dfd5b2d6a6a3373b63d9f0c27ece9aff257f9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationPlanGenerationDto.ftl @@ -0,0 +1,37 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/migration/generate-migration/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "sourceProcessDefinitionId" + type = "string" + desc = "The id of the source process definition for the migration." + /> + + + <@lib.property + name = "targetProcessDefinitionId" + type = "string" + desc = "The id of the target process definition for the migration." + /> + + + <@lib.property + name = "updateEventTriggers" + type = "boolean" + desc = "A boolean flag indicating whether instructions between events should be configured + to update the event triggers." + /> + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + desc = "A map of variables which will be set into the process instances' scope. + Each key is a variable name and each value a JSON variable value object." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationPlanReportDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationPlanReportDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..24eca808be6004335d523eebc01a21dfec73289a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationPlanReportDto.ftl @@ -0,0 +1,25 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/migration/validate-migration-plan/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "instructionReports" + type = "array" + dto = "MigrationInstructionValidationReportDto" + desc = "The list of instruction validation reports. If no validation + errors are detected it is an empty list." + /> + + <@lib.property + name = "variableReports" + type = "object" + additionalProperties = true + dto = "MigrationVariableValidationReportDto" + desc = "A map of variable reports. + Each key is a variable name and each value a JSON object consisting of the variable's type, value, + value info object and a list of failures." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationVariableValidationReportDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationVariableValidationReportDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d9caf2ddb410c613312d07747178d5d5b2ac52e2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/migration/MigrationVariableValidationReportDto.ftl @@ -0,0 +1,13 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto extends="VariableValueDto"> + + <@lib.property + name = "failures" + type = "array" + itemType = "string" + desc = "A list of variable validation report messages." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ActivityStatisticsResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ActivityStatisticsResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..80c3d800252aa1c559d519b64dbd8acbb466bec6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ActivityStatisticsResultDto.ftl @@ -0,0 +1,9 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <#assign last = true > + <#assign instanceType = "activity" > + <#include "/lib/commons/statistics-result-props.ftl" > + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/CalledProcessDefinitionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/CalledProcessDefinitionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..56713381c951298220875683627e471f202afee3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/CalledProcessDefinitionDto.ftl @@ -0,0 +1,20 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/process-definition/get-static-called-process-definitions/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto extends = "ProcessDefinitionDto"> + + <@lib.property + name = "calledFromActivityIds" + type = "array" + itemType = "string" + desc = "Ids of the CallActivities which call this process." + /> + + <@lib.property + name = "callingProcessDefinitionId" + type = "string" + desc = "The id of the calling process definition" + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/CaseDefinitionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/CaseDefinitionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2f2986322fd8ef4902565fea8295ceb37cae181b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/CaseDefinitionDto.ftl @@ -0,0 +1,55 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the case definition" /> + + <@lib.property + name = "key" + type = "string" + desc = "The key of the case definition, i.e., the id of the CMMN 2.0 XML case definition." /> + + <@lib.property + name = "category" + type = "string" + desc = "The category of the case definition." /> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the case definition." /> + + <@lib.property + name = "version" + type = "integer" + format = "int32" + desc = "The version of the case definition that the engine assigned to it." /> + + <@lib.property + name = "resource" + type = "string" + desc = "The file name of the case definition." /> + + <@lib.property + name = "deploymentId" + type = "string" + desc = "The deployment id of the case definition." /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The tenant id of the case definition." /> + + <@lib.property + name = "historyTimeToLive" + type = "integer" + format = "int32" + minimum = 0 + last = true + desc = "History time to live value of the case definition. + Is used within [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup)." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DecisionDefinitionDiagramDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DecisionDefinitionDiagramDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7dc806e69431aa480e753937efc55742d1ba2cdc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DecisionDefinitionDiagramDto.ftl @@ -0,0 +1,18 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the decision definition." /> + + <@lib.property + name = "dmnXml" + type = "string" + last = true + desc = "An escaped XML string containing the XML that this decision definition was deployed with. + Carriage returns, line feeds and quotation marks are escaped." /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DecisionDefinitionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DecisionDefinitionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2f60c12b695d1e1fe6f1b1d189faab1205476367 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DecisionDefinitionDto.ftl @@ -0,0 +1,70 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the decision definition" /> + + <@lib.property + name = "key" + type = "string" + desc = "The key of the decision definition, i.e., the id of the DMN 1.0 XML decision definition." /> + + <@lib.property + name = "category" + type = "string" + desc = "The category of the decision definition." /> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the decision definition." /> + + <@lib.property + name = "version" + type = "integer" + format = "int32" + desc = "The version of the decision definition that the engine assigned to it." /> + + <@lib.property + name = "resource" + type = "string" + desc = "The file name of the decision definition." /> + + <@lib.property + name = "deploymentId" + type = "string" + desc = "The deployment id of the decision definition." /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The tenant id of the decision definition." /> + + <@lib.property + name = "decisionRequirementsDefinitionId" + type = "string" + desc = "The id of the decision requirements definition this decision definition belongs to." /> + + <@lib.property + name = "decisionRequirementsDefinitionKey" + type = "string" + desc = "The key of the decision requirements definition this decision definition belongs to." /> + + <@lib.property + name = "historyTimeToLive" + type = "integer" + format = "int32" + minimum = 0 + desc = "History time to live value of the decision definition. + Is used within [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup)." /> + + <@lib.property + name = "versionTag" + type = "string" + last = true + desc = "The version tag of the decision definition." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DecisionRequirementsDefinitionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DecisionRequirementsDefinitionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..95958865b541b6f5e18f17ef9f19c7216b275c28 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DecisionRequirementsDefinitionDto.ftl @@ -0,0 +1,47 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the decision requirements definition" /> + + <@lib.property + name = "key" + type = "string" + desc = "The key of the decision requirements definition, i.e., the id of the DMN 1.0 XML decision definition." /> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the decision requirements definition." /> + + <@lib.property + name = "category" + type = "string" + desc = "The category of the decision requirements definition." /> + + <@lib.property + name = "version" + type = "integer" + format = "int32" + desc = "The version of the decision requirements definition that the engine assigned to it." /> + + <@lib.property + name = "resource" + type = "string" + desc = "The file name of the decision requirements definition." /> + + <@lib.property + name = "deploymentId" + type = "string" + desc = "The deployment id of the decision requirements definition." /> + + <@lib.property + name = "tenantId" + type = "string" + last = true + desc = "The tenant id of the decisionrequirements definition." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DeploymentDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DeploymentDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..795df1d7edf477c63edb485b6d68f99fd80ef7b8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DeploymentDto.ftl @@ -0,0 +1,33 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "LinkableDto" > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the deployment." /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The tenant id of the deployment." /> + + <@lib.property + name = "deploymentTime" + type = "string" + format = "date-time" + desc = "The time when the deployment was created." /> + + <@lib.property + name = "source" + type = "string" + desc = "The source of the deployment." /> + + <@lib.property + name = "name" + type = "string" + last = true + desc = "The name of the deployment." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DeploymentResourceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DeploymentResourceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d3028c0a2243ee5ba71b589124e95af8f9529661 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DeploymentResourceDto.ftl @@ -0,0 +1,25 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + title = "DeploymentResourceDto" + desc = "A JSON object corresponding to the `Resource` interface in the engine. + Its properties are as follows:" > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the deployment resource." /> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the deployment resource" /> + + <@lib.property + name = "deploymentId" + type = "string" + last = true + desc = "The id of the deployment." /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DeploymentWithDefinitionsDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DeploymentWithDefinitionsDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8d17d7235ffde3b3db36654ba67e2fe04d2f8da3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/DeploymentWithDefinitionsDto.ftl @@ -0,0 +1,43 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "DeploymentDto" > + + <@lib.property + name = "deployedProcessDefinitions" + type = "object" + additionalProperties = true + dto = "ProcessDefinitionDto" + desc = "A JSON Object containing a property for each of the process definitions, + which are successfully deployed with that deployment. + The key is the process definition id, the value is a JSON Object corresponding to the process definition." /> + + <@lib.property + name = "deployedDecisionDefinitions" + type = "object" + additionalProperties = true + dto = "DecisionDefinitionDto" + desc = "A JSON Object containing a property for each of the decision definitions, + which are successfully deployed with that deployment. + The key is the decision definition id, the value is a JSON Object corresponding to the decision definition." /> + + <@lib.property + name = "deployedDecisionRequirementsDefinitions" + type = "object" + additionalProperties = true + dto = "DecisionRequirementsDefinitionDto" + desc = "A JSON Object containing a property for each of the decision requirements definitions, + which are successfully deployed with that deployment. + The key is the decision requirements definition id, the value is a JSON Object corresponding to the decision requirements definition." /> + + <@lib.property + name = "deployedCaseDefinitions" + type = "object" + additionalProperties = true + dto = "CaseDefinitionDto" + last = true + desc = "A JSON Object containing a property for each of the case definitions, + which are successfully deployed with that deployment. + The key is the case definition id, the value is a JSON Object corresponding to the case definition." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/IncidentStatisticsResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/IncidentStatisticsResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3269a7133756e03e543153c3442b02486cac65ba --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/IncidentStatisticsResultDto.ftl @@ -0,0 +1,18 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "incidentType" + type = "string" + desc = "The type of the incident the number of incidents is aggregated for. + See the [User Guide](${docsUrl}/user-guide/process-engine/incidents/#incident-types) for a list of incident types."/> + + <@lib.property + name = "incidentCount" + type = "integer" + format = "int32" + last = true + desc = "The total number of incidents for the corresponding incident type."/> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ProcessDefinitionDiagramDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ProcessDefinitionDiagramDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c1ec042a3ce3853ca7a0a3dc70ea9015f440f105 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ProcessDefinitionDiagramDto.ftl @@ -0,0 +1,17 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the process definition." /> + + <@lib.property + name = "bpmn20Xml" + type = "string" + last = true + desc = "An escaped XML string containing the XML that this definition was deployed with. + Carriage returns, line feeds and quotation marks are escaped." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ProcessDefinitionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ProcessDefinitionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..12b887dc815d5750818841a703526265ef488b09 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ProcessDefinitionDto.ftl @@ -0,0 +1,80 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the process definition" /> + + <@lib.property + name = "key" + type = "string" + desc = "The key of the process definition, i.e., the id of the BPMN 2.0 XML process definition." /> + + <@lib.property + name = "category" + type = "string" + desc = "The category of the process definition." /> + + <@lib.property + name = "description" + type = "string" + desc = "The description of the process definition." /> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the process definition." /> + + <@lib.property + name = "version" + type = "integer" + format = "int32" + desc = "The version of the process definition that the engine assigned to it." /> + + <@lib.property + name = "resource" + type = "string" + desc = "The file name of the process definition." /> + + <@lib.property + name = "deploymentId" + type = "string" + desc = "The deployment id of the process definition." /> + + <@lib.property + name = "diagram" + type = "string" + desc = "The file name of the process definition diagram, if it exists." /> + + <@lib.property + name = "suspended" + type = "boolean" + desc = "A flag indicating whether the definition is suspended or not." /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The tenant id of the process definition." /> + + <@lib.property + name = "versionTag" + type = "string" + desc = "The version tag of the process definition." /> + + <@lib.property + name = "historyTimeToLive" + type = "integer" + format = "int32" + minimum = 0 + desc = "History time to live value of the process definition. + Is used within [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup)." /> + + <@lib.property + name = "startableInTasklist" + type = "boolean" + last = true + desc = "A flag indicating whether the process definition is startable in Tasklist or not." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ProcessDefinitionStatisticsResultDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ProcessDefinitionStatisticsResultDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f214f9c562e87174c89023c72eebd448250d4f58 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ProcessDefinitionStatisticsResultDto.ftl @@ -0,0 +1,16 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <#assign last = false > + <#assign instanceType = "process definition" > + <#include "/lib/commons/statistics-result-props.ftl" > + + <@lib.property + name = "definition" + type = "ref" + dto = "ProcessDefinitionDto" + last = true + desc = "The process definition."/> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ProcessDefinitionSuspensionStateDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ProcessDefinitionSuspensionStateDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c70c43cbd48c33405942f2293a5eb8aba2bd8283 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/ProcessDefinitionSuspensionStateDto.ftl @@ -0,0 +1,41 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "suspended" + type = "boolean" + desc = "A `Boolean` value which indicates whether to activate or suspend all process definitions with the given key. + When the value is set to `true`, all process definitions with the given key will be suspended and + when the value is set to `false`, all process definitions with the given key will be activated." /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definitions to activate or suspend." /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definitions to activate or suspend." /> + + <@lib.property + name = "includeProcessInstances" + type = "boolean" + desc = "A `Boolean` value which indicates whether to activate or suspend also all process instances of + the process definitions with the given key. + When the value is set to `true`, all process instances of the process definitions with the given key + will be activated or suspended and when the value is set to `false`, the suspension state of + all process instances of the process definitions with the given key will not be updated." /> + + <@lib.property + name = "executionDate" + type = "string" + format = "date-time" + last = true + desc = "The date on which all process definitions with the given key will be activated or suspended. + If `null`, the suspension state of all process definitions with the given key is updated immediately. + By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/RedeploymentDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/RedeploymentDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..56422eef4a9feaf4cafae7671dd270bdd0146178 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/repository/RedeploymentDto.ftl @@ -0,0 +1,26 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + title = "RedeploymentDto" + desc = "A JSON object with the following properties:" > + + <@lib.property + name = "resourceIds" + type = "array" + itemType = "string" + desc = "A list of deployment resource ids to re-deploy." /> + + <@lib.property + name = "resourceNames" + type = "array" + itemType = "string" + desc = "A list of deployment resource names to re-deploy." /> + + <@lib.property + name = "source" + type = "string" + last = true + desc = "Sets the source of the deployment." /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ActivityInstanceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ActivityInstanceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7cb14ac5bc49e9f844ea695879414fc1ad7e11be --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ActivityInstanceDto.ftl @@ -0,0 +1,81 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc = "A JSON object corresponding to the Activity Instance tree of the given process instance." > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the activity instance."/> + + <@lib.property + name = "parentActivityInstanceId" + type = "string" + desc = "The id of the parent activity instance, for example a sub process instance."/> + + <@lib.property + name = "activityId" + type = "string" + desc = "The id of the activity."/> + + <@lib.property + name = "activityName" + type = "string" + desc = "The name of the activity"/> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the activity. This property is deprecated. Please use 'activityName'."/> + + <@lib.property + name = "activityType" + type = "string" + desc = "The type of activity (corresponds to the XML element name in the BPMN 2.0, e.g., 'userTask')"/> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance this activity instance is part of."/> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition."/> + + <@lib.property + name = "childActivityInstances" + type = "array" + dto = "ActivityInstanceDto" + desc = "A list of child activity instances."/> + + <@lib.property + name = "childTransitionInstances" + type = "array" + dto="TransitionInstanceDto" + desc = "A list of child transition instances. + A transition instance represents an execution waiting in an asynchronous continuation."/> + + <@lib.property + name = "executionIds" + type = "array" + itemType = "string" + desc = "A list of execution ids."/> + + <@lib.property + name = "incidentIds" + type = "array" + itemType = "string" + desc = "A list of incident ids."/> + + <@lib.property + name = "incidents" + type = "array" + dto="ActivityInstanceIncidentDto" + last = true + desc = "A list of JSON objects containing incident specific properties: + * `id`: the id of the incident + * `activityId`: the activity id in which the incident occurred"/> + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ActivityInstanceIncidentDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ActivityInstanceIncidentDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6a78c54d40dea3514ea5e529a01140ccc47cd81c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ActivityInstanceIncidentDto.ftl @@ -0,0 +1,18 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc = "An activity instance, incident pair." > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the incident."/> + + <@lib.property + name="activityId" + type = "string" + last = true + desc = "The activity id in which the incident happened."/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/EventSubscriptionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/EventSubscriptionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0db5b641888c222612b56f4ed749eb7eca28c18c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/EventSubscriptionDto.ftl @@ -0,0 +1,48 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the event subscription." /> + + <@lib.property + name = "eventType" + type = "string" + desc = "The type of the event subscription." /> + + <@lib.property + name = "eventName" + type = "string" + desc = "The name of the event this subscription belongs to as defined in the process model." /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The execution that is subscribed on the referenced event." /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The process instance this subscription belongs to." /> + + <@lib.property + name = "activityId" + type = "string" + desc = "The identifier of the activity that this event subscription belongs to. + This could for example be the id of a receive task." /> + + <@lib.property + name = "createdDate" + type = "string" + format = "date-time" + desc = "The time this event subscription was created." /> + + <@lib.property + name = "tenantId" + type = "string" + last = true + desc = "The id of the tenant this event subscription belongs to. + Can be `null` if the subscription belongs to no single tenant." /> + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/EventSubscriptionQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/EventSubscriptionQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8173cace2974949b2dca53cfbf126c1c18d3b63b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/EventSubscriptionQueryDto.ftl @@ -0,0 +1,69 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto desc = "A event subscription query which retrieves a list of event subscriptions"> + + <@lib.property + name = "eventSubscriptionId" + type = "string" + desc = "The id of the event subscription." /> + + <@lib.property + name = "eventName" + type = "string" + desc = "The name of the event this subscription belongs to as defined in the process model." /> + + <@lib.property + name = "eventType" + type = "string" + enumValues = [ "message", "signal", "compensate", "conditional" ] + desc = "The type of the event subscription." /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The execution that is subscribed on the referenced event." /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The process instance this subscription belongs to." /> + + <@lib.property + name = "activityId" + type = "string" + desc = "The identifier of the activity that this event subscription belongs to. + This could for example be the id of a receive task." /> + + <@lib.property + name = "tenantIdIn" + type = "array" + itemType = "string" + desc = "Filter by a comma-separated list of tenant ids. + Only select subscriptions that belong to one of the given tenant ids." /> + + <@lib.property + name = "withoutTenantId" + type = "boolean" + desc = "Only select subscriptions which have no tenant id. + Value may only be `true`, as `false` is the default behavior." /> + + <@lib.property + name = "includeEventSubscriptionsWithoutTenantId" + type = "boolean" + desc = "Select event subscriptions which have no tenant id. + Can be used in combination with tenantIdIn parameter. + Value may only be `true`, as `false` is the default behavior." /> + + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": + + <#assign last = true > + <#assign sortByValues = ['"created"', '"tenantId"']> + <#include "/lib/commons/sort-props.ftl" > + + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ExecutionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ExecutionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e2a3bcdabdf1bf43955458439c7dddcee30ac3e7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ExecutionDto.ftl @@ -0,0 +1,27 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the Execution."/> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the root of the execution tree representing the process instance."/> + + <@lib.property + name = "ended" + type = "boolean" + desc = "Indicates if the execution is ended."/> + + <@lib.property + name = "tenantId" + type = "string" + last = true + desc = "The id of the tenant this execution belongs to. Can be `null` + if the execution belongs to no single tenant."/> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ExecutionQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ExecutionQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2cbc5481f262dd1d52f3c531bc39d2c752c3b812 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ExecutionQueryDto.ftl @@ -0,0 +1,21 @@ +<#macro dto_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/post-query/index.html --> +<@lib.dto desc = "A Execution instance query which defines a list of Execution instances"> + +<#assign requestMethod="POST"> + <#include "/lib/commons/execution-query-params.ftl"> + <@lib.properties params/> + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is + an object that specifies one ordering. The position in the array + identifies the rank of an ordering, i.e., whether it is primary, secondary, + etc. Has no effect for the `/count` endpoint", + "items": + <#assign last = true> + <#include "/lib/commons/sort-props.ftl"> + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ExecutionTriggerDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ExecutionTriggerDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5180f93cadb987bd3c28fa34097cf7d6bf8857aa --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ExecutionTriggerDto.ftl @@ -0,0 +1,17 @@ +<#macro dto_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/post-signal/index.html --> +<@lib.dto desc = ""> + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + desc = "A JSON object containing variable key-value pairs. Each key is a variable name and + each value a JSON variable value object." + last = true + /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/IncidentDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/IncidentDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..dee17a7aee3c48b413a033248b57f2eb7e38333f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/IncidentDto.ftl @@ -0,0 +1,84 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + <@lib.property + name = "id" + type = "string" + desc = "The id of the incident." /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition this incident is associated with." /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance this incident is associated with." /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The id of the execution this incident is associated with." /> + + <@lib.property + name = "incidentTimestamp" + type = "string" + format = "date-time" + desc = "The time this incident happened. By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." /> + + <@lib.property + name = "incidentType" + type = "string" + desc = "The type of incident, for example: `failedJobs` will be returned in case of an incident which identified + a failed job during the execution of a process instance. See the + [User Guide](${docsUrl}/user-guide/process-engine/incidents/#incident-types) for a list of incident types." /> + + <@lib.property + name = "activityId" + type = "string" + desc = "The id of the activity this incident is associated with." /> + + <@lib.property + name = "failedActivityId" + type = "string" + desc = "The id of the activity on which the last exception occurred." /> + + <@lib.property + name = "causeIncidentId" + type = "string" + desc = "The id of the associated cause incident which has been triggered." /> + + <@lib.property + name = "rootCauseIncidentId" + type = "string" + desc = "The id of the associated root cause incident which has been triggered." /> + + <@lib.property + name = "configuration" + type = "string" + desc = "The payload of this incident." /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The id of the tenant this incident is associated with." /> + + <@lib.property + name = "incidentMessage" + type = "string" + desc = "The message of this incident." /> + + <@lib.property + name = "jobDefinitionId" + type = "string" + desc = "The job definition id the incident is associated with." /> + + <@lib.property + name = "annotation" + type = "string" + last = true + desc = "The annotation set to the incident." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2707a20fdd7ddacf8fc6688644db5d55fb4c1824 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionDto.ftl @@ -0,0 +1,75 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/get-query/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the job definition." + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition this job definition is associated with." + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition this job definition is associated with." + /> + + <@lib.property + name = "activityId" + type = "string" + desc = "The id of the activity this job definition is associated with." + /> + + <@lib.property + name = "jobType" + type = "string" + desc = "The type of the job which is running for this job definition. See the + [User Guide](${docsUrl}/user-guide/process-engine/the-job-executor/#job-creation) + for more information about job types." + /> + + <@lib.property + name = "jobConfiguration" + type = "string" + desc = "The configuration of a job definition provides details about the jobs which will be + created. For example: for timer jobs it is the timer configuration." + /> + + <@lib.property + name = "overridingJobPriority" + type = "integer" + format = "int64" + desc = "The execution priority defined for jobs that are created based on this definition. + May be `null` when the priority has not been overridden on the job + definition level." + /> + + <@lib.property + name = "suspended" + type = "boolean" + desc = "Indicates whether this job definition is suspended or not." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The id of the tenant this job definition is associated with." + /> + + <@lib.property + name = "deploymentId" + type = "string" + desc = "The id of the deployment this job definition is related to. In a deployment-aware + setup, this leads to all jobs of the same definition being executed + on the same node." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionPriorityDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionPriorityDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..eb4f94ac30e3cbe083c779f9440daa8314e97901 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionPriorityDto.ftl @@ -0,0 +1,27 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/put-set-job-priority/index.html --> +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "priority" + type = "integer" + format = "int64" + desc = "The new execution priority number for jobs of the given definition. The + definition's priority can be reset by using the value `null`. In + that case, the job definition's priority no longer applies but a new + job's priority is determined as specified in the process model." + /> + + + <@lib.property + name = "includeJobs" + type = "boolean" + desc = "A boolean value indicating whether existing jobs of the given definition should + receive the priority as well. Default value is `false`. Can only be + `true` when the __priority__ parameter is not `null`." + last = true + /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..76dbd021b34359809bdb8558d068197f7f851d7b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionQueryDto.ftl @@ -0,0 +1,21 @@ +<#macro dto_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/post-query/index.html --> +<@lib.dto desc = "A Job definition query which defines a list of Job definitions"> + + <#assign requestMethod="POST"> + <#include "/lib/commons/job-definition-query-params.ftl"> + <@lib.properties params/> + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is + an object that specifies one ordering. The position in the array + identifies the rank of an ordering, i.e., whether it is primary, secondary, + etc. Sorting has no effect for `count` endpoints.", + "items": + <#assign last = true> + <#include "/lib/commons/sort-props.ftl"> + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionSuspensionStateDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionSuspensionStateDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7816b21d77609288379954e44db66b25cc55a0e3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionSuspensionStateDto.ftl @@ -0,0 +1,32 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/put-activate-suspend-by-id/index.html --> +<#macro dto_macro docsUrl=""> + +<#-- This DTO is also used in JobDefinitionsSuspensionStateDto that caters updating multiple definitions at once and + provides additional parameters for that which don't make sense here. Please also consider this other DTO when + making changes here --> +<@lib.dto extends="SuspensionStateDto"> + + <@lib.property + name = "includeJobs" + type = "boolean" + desc = "A `Boolean` value which indicates whether to activate or suspend also all jobs of + the referenced job definitions. When the value is set to `true`, all jobs + of the provided job definitions will be activated or suspended and + when the value is set to `false`, the suspension state of all jobs + of the provided job definitions will not be updated." + /> + + + <@lib.property + name = "executionDate" + type = "string" + desc = "The date on which the referenced job definitions will be activated or suspended. If null, + the suspension state of the given job definitions is updated + immediately. By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format `yyyy-MM- + dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + last = true + /> + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionsSuspensionStateDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionsSuspensionStateDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c5bb9aa6be881875fc0d92529aa3c3c021eda55f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDefinitionsSuspensionStateDto.ftl @@ -0,0 +1,50 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/put-activate-suspend-by-id/index.html --> +<#macro dto_macro docsUrl=""> + +<#assign noteProcessDefinitionKey = "Note that this parameter will only be considered + in combination with `processDefinitionKey`." > + +<#-- This DTO provides additional parameters that only make sense in the context of updating multiple + definitions at once. Please also consider the parent DTO when making changes here --> +<@lib.dto extends="JobDefinitionSuspensionStateDto" + desc = "Defines by which selection criterion to activate or suspend job definitions. + The selection criteria are mutually exclusive and can only be one of: + * `processDefinitionId` + * `processDefinitionKey`"> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The process definition id of the job definitions to activate or suspend." + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The process definition key of the job definitions to activate or suspend." + /> + + + <@lib.property + name = "processDefinitionTenantId" + type = "string" + desc = "Only activate or suspend job definitions of a process definition which belongs to a + tenant with the given id. + + ${noteProcessDefinitionKey}" + /> + + + <@lib.property + name = "processDefinitionWithoutTenantId" + type = "boolean" + desc = "Only activate or suspend job definitions of a process definition which belongs to + no tenant. Value may only be `true`, as `false` is the default + behavior. + + ${noteProcessDefinitionKey}" + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f1f58c534201d7b6cb970edfb0cfb0d2154efaae --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDto.ftl @@ -0,0 +1,107 @@ +<#macro dto_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/get/index.html --> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the job." + /> + + <@lib.property + name = "jobDefinitionId" + type = "string" + desc = "The id of the associated job definition." + /> + + <@lib.property + name = "dueDate" + type = "string" + format = "date-time" + desc = "The date on which this job is supposed to be processed." + /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance which execution created the job." + /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The specific execution id on which the job was created." + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition which this job belongs to." + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition which this job belongs to." + /> + + <@lib.property + name = "retries" + type = "integer" + format = "int32" + desc = "The number of retries this job has left." + /> + + <@lib.property + name = "exceptionMessage" + type = "string" + desc = "The message of the exception that occurred, the last time the job was executed. Is + null when no exception occurred." + /> + + <@lib.property + name = "failedActivityId" + type = "string" + desc = "The id of the activity on which the last exception occurred, the last time the job + was executed. Is null when no exception occurred." + /> + + <@lib.property + name = "suspended" + type = "boolean" + desc = "A flag indicating whether the job is suspended or not." + /> + + <@lib.property + name = "priority" + type = "integer" + format = "int64" + desc = "The job's priority for execution." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The id of the tenant which this job belongs to." + /> + + <@lib.property + name = "createTime" + type = "string" + format = "date-time" + desc = "The date on which this job has been created." + /> + + <@lib.property + name = "batchId" + type = "string" + desc = "The ID of the batch associated with this job. `null` if no batch is associated with this job. The + following jobs are associated with batches: + * Seed Jobs + * Monitor Jobs + * Batch Execution Jobs" + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDuedateDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDuedateDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8cffa78bae405cfa02b0a5ea7c2707409cb99ece --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobDuedateDto.ftl @@ -0,0 +1,26 @@ +<#macro dto_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/put-set-job-duedate/index.html --> +<@lib.dto desc = ""> + + <@lib.property + name = "duedate" + type = "string" + format = "date-time" + desc = "The date to set when the job has the next execution." + /> + + + <@lib.property + name = "cascade" + type = "boolean" + desc = "A boolean value to indicate if modifications to the due date should cascade to + subsequent jobs. (e.g. Modify the due date of a timer by +15 + minutes. This flag indicates if a +15 minutes should be applied to all + subsequent timers.) This flag only affects timer jobs and only works if due date + is not null. Default: `false`" + last = true + /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d26974e714880808e664366f927e05190cbefcbc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobQueryDto.ftl @@ -0,0 +1,21 @@ +<#macro dto_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/post-query/index.html --> +<@lib.dto desc = "A Job instance query which defines a list of Job instances"> + + <#assign requestMethod="POST"> + <#include "/lib/commons/job-query-params.ftl"> + <@lib.properties params/> + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is + an object that specifies one ordering. The position in the array + identifies the rank of an ordering, i.e., whether it is primary, secondary, + etc. Does not have an effect for the `count` endpoint.", + "items": + <#assign last = true> + <#include "/lib/commons/sort-props.ftl"> + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobRetriesDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobRetriesDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..55488344b4489670e88288920d4790f59028fb43 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobRetriesDto.ftl @@ -0,0 +1,15 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "RetriesDto" > + + <@lib.property + name = "dueDate" + type = "string" + format = "date-time" + last = true + desc = "The due date to set for the job. A due date indicates when this job is ready for execution. + Jobs with due dates in the past will be scheduled for execution." /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobSuspensionStateDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobSuspensionStateDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1ef63503798d40de13ba686460a234cbf5d509f9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/JobSuspensionStateDto.ftl @@ -0,0 +1,56 @@ +<#macro dto_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/put-activate-suspend-by-proc-def-key/index.html --> +<#-- Note: This dto describes functionality which is described in 4 different doc pages under put-activate-suspend-by-* +If you come here from PUT /job/{id}/suspended please note that this enpoint uses SuspensionStateDto because it only uses +the suspended attribute. Should you need to extend it, it is probably a good idea to create an additional file. --> + +<@lib.dto extends="SuspensionStateDto" + desc = "Defines by which selection criterion to activate or suspend jobs. + This selection criterion are mutually exclusive and can only be on of: + * `jobDefinitionId` + * `processDefinitionId` + * `processInstanceId` + * `processDefinitionKey`"> + + <@lib.property + name = "jobDefinitionId" + type = "string" + desc = "The job definition id of the jobs to activate or suspend." + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The process definition id of the jobs to activate or suspend." + /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The process instance id of the jobs to activate or suspend." + /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The process definition key of the jobs to activate or suspend." + /> + + <@lib.property + name = "processDefinitionTenantId" + type = "string" + desc = "Only activate or suspend jobs of a process definition which belongs to a tenant + with the given id. Works only when selecting with `processDefinitionKey`." + /> + + <@lib.property + name = "processDefinitionWithoutTenantId" + type = "boolean" + desc = "Only activate or suspend jobs of a process definition which belongs to no tenant. + Value may only be `true`, as `false` is the default behavior. Works only when selecting with `processDefinitionKey`." + last = true + /> + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/PriorityDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/PriorityDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..498d895122ea12def5d679e34a71b7cce69533e1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/PriorityDto.ftl @@ -0,0 +1,13 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "priority" + type = "integer" + format = "int64" + last = true + desc = "The priority of the resource." /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..87ad6a62b303c2acffda0a38c7ba0b15155a09fb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceDto.ftl @@ -0,0 +1,48 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "LinkableDto" > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the process instance." /> + + <@lib.property + name = "definitionId" + type = "string" + desc = "The id of the process definition that this process instance belongs to." /> + + <@lib.property + name = "definitionKey" + type = "string" + desc = "The key of the process definition that this process instance belongs to." /> + + <@lib.property + name = "businessKey" + type = "string" + desc = "The business key of the process instance." /> + + <@lib.property + name = "caseInstanceId" + type = "string" + desc = "The id of the case instance associated with the process instance." /> + + <@lib.property + name = "ended" + type = "boolean" + deprecated = true + desc = "A flag indicating whether the process instance has ended or not. Deprecated: will always be false!" /> + + <@lib.property + name = "suspended" + type = "boolean" + desc = "A flag indicating whether the process instance is suspended or not." /> + + <@lib.property + name = "tenantId" + type = "string" + last = true + desc = "The tenant id of the process instance." /> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..88912ebbef44d6a3fbf9cb28b6a80ebc1f131e74 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceQueryDto.ftl @@ -0,0 +1,199 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc = "A process instance query which defines a group of process instances" > + + <@lib.property + name = "deploymentId" + type = "string" + desc = "Filter by the deployment the id belongs to."/> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "Filter by the process definition the instances run on."/> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "Filter by the key of the process definition the instances run on."/> + + <@lib.property + name = "processDefinitionKeyIn" + type = "array" + itemType = "string" + desc = "Filter by a list of process definition keys. + A process instance must have one of the given process definition keys. Must be a JSON array of Strings." /> + + <@lib.property + name = "processDefinitionKeyNotIn" + type = "array" + itemType = "string" + desc = "Exclude instances by a list of process definition keys. + A process instance must not have one of the given process definition keys. Must be a JSON array of Strings." /> + + <@lib.property + name = "businessKey" + type = "string" + desc = "Filter by process instance business key." /> + + <@lib.property + name = "businessKeyLike" + type = "string" + desc = "Filter by process instance business key that the parameter is a substring of." /> + + <@lib.property + name = "caseInstanceId" + type = "string" + desc = "Filter by case instance id." /> + + <@lib.property + name = "superProcessInstance" + type = "string" + desc = "Restrict query to all process instances that are sub process instances of the given process instance. + Takes a process instance id." /> + + <@lib.property + name = "subProcessInstance" + type = "string" + desc = "Restrict query to all process instances that have the given process instance as a sub process instance. + Takes a process instance id." /> + + <@lib.property + name = "superCaseInstance" + type = "string" + desc = "Restrict query to all process instances that are sub process instances of the given case instance. + Takes a case instance id." /> + + <@lib.property + name = "subCaseInstance" + type = "string" + desc = "Restrict query to all process instances that have the given case instance as a sub case instance. + Takes a case instance id." /> + + <@lib.property + name = "active" + type = "boolean" + desc = "Only include active process instances. Value may only be true, as false is the default behavior." /> + + <@lib.property + name = "suspended" + type = "boolean" + desc = "Only include suspended process instances. Value may only be true, as false is the default behavior." /> + + <@lib.property + name = "processInstanceIds" + type = "array" + itemType = "string" + desc = "Filter by a list of process instance ids. Must be a JSON array of Strings." /> + + <@lib.property + name = "withIncident" + type = "boolean" + desc = "Filter by presence of incidents. Selects only process instances that have an incident." /> + + <@lib.property + name = "incidentId" + type = "string" + desc = "Filter by the incident id." /> + + <@lib.property + name = "incidentType" + type = "string" + desc = "Filter by the incident type. See the User Guide for a list of incident types." /> + + <@lib.property + name = "incidentMessage" + type = "string" + desc = "Filter by the incident message. Exact match." /> + + <@lib.property + name = "incidentMessageLike" + type = "string" + desc = "Filter by the incident message that the parameter is a substring of." /> + + <@lib.property + name = "tenantIdIn" + type = "array" + itemType = "string" + desc = "Filter by a list of tenant ids. A process instance must have one of the given tenant ids. + Must be a JSON array of Strings." /> + + <@lib.property + name = "withoutTenantId" + type = "boolean" + desc = "Only include process instances which belong to no tenant. + Value may only be true, as false is the default behavior." /> + + <@lib.property + name = "processDefinitionWithoutTenantId" + type = "boolean" + desc = "Only include process instances which process definition has no tenant id." /> + + <@lib.property + name = "activityIdIn" + type = "array" + itemType = "string" + desc = "Filter by a list of activity ids. + A process instance must currently wait in a leaf activity with one of the given activity ids." /> + + <@lib.property + name = "rootProcessInstances" + type = "boolean" + desc = "Restrict the query to all process instances that are top level process instances." /> + + <@lib.property + name = "leafProcessInstances" + type = "boolean" + desc = "Restrict the query to all process instances that are leaf instances. (i.e. don't have any sub instances)" /> + + <@lib.property + name = "variables" + type = "array" + dto = "VariableQueryParameterDto" + desc = "A JSON array to only include process instances that have variables with certain values. + The array consists of objects with the three properties `name`, `operator` and `value`. + `name` (String) is the variable name, + `operator` (String) is the comparison operator to be used and `value` the variable value. + The `value` may be String, Number or Boolean. + + Valid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; + `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`." /> + + <@lib.property + name = "variableNamesIgnoreCase" + type = "boolean" + desc = "Match all variable names in this query case-insensitively. + If set to true variableName and variablename are treated as equal." /> + + <@lib.property + name = "variableValuesIgnoreCase" + type = "boolean" + desc = "Match all variable values in this query case-insensitively. + If set to true variableValue and variablevalue are treated as equal." /> + + <@lib.property + name = "orQueries" + type = "array" + dto = "ProcessInstanceQueryDto" + desc = "A JSON array of nested process instance queries with OR semantics. + A process instance matches a nested query if it fulfills at least one of the query's predicates. + With multiple nested queries, a process instance must fulfill at least one predicate of each query (Conjunctive Normal Form). + All process instance query properties can be used except for: `sorting` + See the [User guide](${docsUrl}/user-guide/process-engine/process-engine-api/#or-queries) for more information about OR queries." /> + + + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": + + <#assign last = true > + <#assign sortByValues = ['"instanceId"', '"definitionId"', '"definitionKey"', '"businessKey"', '"tenantId"']> + <#include "/lib/commons/sort-props.ftl" > + + } + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceSuspensionStateAsyncDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceSuspensionStateAsyncDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ed862134fab1a9b81d7f2cc51487ec730b9501fe --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceSuspensionStateAsyncDto.ftl @@ -0,0 +1,23 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto extends = "SuspensionStateDto"> + + <@lib.property + name = "processInstanceIds" + type = "array" + itemType = "string" + desc = "A list of process instance ids which defines a group of process instances + which will be activated or suspended by the operation." /> + + <@lib.property + name = "processInstanceQuery" + type = "ref" + dto = "ProcessInstanceQueryDto" /> + + <@lib.property + name = "historicProcessInstanceQuery" + type = "ref" + last = true + dto = "HistoricProcessInstanceQueryDto" /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceSuspensionStateDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceSuspensionStateDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e0695e607a95394bad03950bb7cae7232c138f7c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceSuspensionStateDto.ftl @@ -0,0 +1,54 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto extends = "SuspensionStateDto"> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The process definition id of the process instances to activate or suspend. + + **Note**: This parameter can be used only with combination of `suspended`." /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The process definition key of the process instances to activate or suspend. + + **Note**: This parameter can be used only with combination of `suspended`, `processDefinitionTenantId`, and `processDefinitionWithoutTenantId`." /> + + <@lib.property + name = "processDefinitionTenantId" + type = "string" + desc = "Only activate or suspend process instances of a process definition which belongs to a tenant with the given id. + + **Note**: This parameter can be used only with combination of `suspended`, `processDefinitionKey`, and `processDefinitionWithoutTenantId`." /> + + <@lib.property + name = "processDefinitionWithoutTenantId" + type = "boolean" + desc = "Only activate or suspend process instances of a process definition which belongs to no tenant. + Value may only be true, as false is the default behavior. + + **Note**: This parameter can be used only with combination of `suspended`, `processDefinitionKey`, and `processDefinitionTenantId`." /> + + <@lib.property + name = "processInstanceIds" + type = "array" + itemType = "string" + desc = "A list of process instance ids which defines a group of process instances + which will be activated or suspended by the operation. + + **Note**: This parameter can be used only with combination of `suspended`, `processInstanceQuery`, and `historicProcessInstanceQuery`." /> + + <@lib.property + name = "processInstanceQuery" + type = "ref" + dto = "ProcessInstanceQueryDto" /> + + <@lib.property + name = "historicProcessInstanceQuery" + type = "ref" + last = true + dto = "HistoricProcessInstanceQueryDto" /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceWithVariablesDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceWithVariablesDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..216203b3398b7fd2831b796448dbf8a3fa25b62c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceWithVariablesDto.ftl @@ -0,0 +1,14 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "ProcessInstanceDto" > + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + last = true + desc = "The id of the process instance." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/RestartProcessInstanceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/RestartProcessInstanceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8a35859b6058f357c1f437887124df385598d43c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/RestartProcessInstanceDto.ftl @@ -0,0 +1,48 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "processInstanceIds" + type = "array" + itemType = "string" + desc = "A list of process instance ids to restart." /> + + <@lib.property + name = "historicProcessInstanceQuery" + type = "ref" + dto = "HistoricProcessInstanceQueryDto" + desc = "A historic process instance query." /> + + <@lib.property + name = "skipCustomListeners" + type = "boolean" + desc = "Skip execution listener invocation for activities that are started as part of this request." /> + + <@lib.property + name = "skipIoMappings" + type = "boolean" + desc = "Skip execution of + [input/output variable mappings](${docsUrl}/user-guide/process-engine/variables/#input-output-variable-mapping) + for activities that are started as part of this request." /> + + + <@lib.property + name = "initialVariables" + type = "boolean" + desc = "Set the initial set of variables during restart. By default, the last set of variables is used." /> + + <@lib.property + name = "withoutBusinessKey" + type = "boolean" + desc = "Do not take over the business key of the historic process instance." /> + + <@lib.property + name = "instructions" + type = "array" + dto = "RestartProcessInstanceModificationInstructionDto" + last = true + desc = "**Optional**. A JSON array of instructions that specify which activities to start the process instance at. + If this property is omitted, the process instance starts at its default blank start event." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/RetriesDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/RetriesDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8ed16528bf4cadf2acd0fd2a77e749f38b2df9a3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/RetriesDto.ftl @@ -0,0 +1,16 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "retries" + type = "integer" + format = "int32" + last = true + desc = "The number of retries to set for the resource. Must be >= 0. If this is 0, an incident is created + and the task, or job, cannot be fetched, or acquired anymore unless the retries are increased again. + Can not be null." /> + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/SetJobRetriesByProcessDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/SetJobRetriesByProcessDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..10679ac691d8b8c9eee2c134154d1ed2ccfad2ce --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/SetJobRetriesByProcessDto.ftl @@ -0,0 +1,23 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "SetJobRetriesDto"> + + <@lib.property + name = "processInstances" + type = "array" + itemType = "string" + desc = "A list of process instance ids to fetch jobs, for which retries will be set." /> + + <@lib.property + name = "processInstanceQuery" + type = "ref" + dto = "ProcessInstanceQueryDto" /> + + <@lib.property + name = "historicProcessInstanceQuery" + type = "ref" + last = true + dto = "HistoricProcessInstanceQueryDto" /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/SetJobRetriesDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/SetJobRetriesDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..41f518f9055e4c5efed9cdefa390c37fd4505b2f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/SetJobRetriesDto.ftl @@ -0,0 +1,28 @@ +<#macro dto_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/post-set-job-retries/index.html --> +<@lib.dto + extends = "JobRetriesDto" + desc = "Defines the number of retries for a selection of jobs. + Please note that if both jobIds and jobQuery are provided, + then retries will be set on the union of these sets."> + + <@lib.property + name = "jobIds" + type = "array" + itemType = "string" + desc = "A list of job ids to set retries for." + /> + + <@lib.property + name = "jobQuery" + type = "ref" + dto = "JobQueryDto" + last = true + desc = "A job query like the request body for the + [Get Jobs (POST)](${docsUrl}/reference/rest/job/post-query/#request-body) + method." + /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/StartProcessInstanceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/StartProcessInstanceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a75852b31afb985e92f2f8a91c9a1cbbbd07ea82 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/StartProcessInstanceDto.ftl @@ -0,0 +1,55 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <#-- NOTE: Please consider adjusting the StartProcessInstanceFormsDto + if the properties are valid there as well. + The DTO is create separately as it does not contain all of these properties. --> + + <@lib.property + name = "businessKey" + type = "string" + desc = "The business key of the process instance." /> + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + dto = "VariableValueDto" /> + + <@lib.property + name = "caseInstanceId" + type = "string" + desc = "The case instance id the process instance is to be initialized with." /> + + <@lib.property + name = "startInstructions" + type = "array" + dto = "ProcessInstanceModificationInstructionDto" + desc = "**Optional**. A JSON array of instructions that specify which activities to start the process instance at. + If this property is omitted, the process instance starts at its default blank start event." /> + + <@lib.property + name = "skipCustomListeners" + type = "boolean" + desc = "Skip execution listener invocation for activities that are started or ended as part of this request. + **Note**: This option is currently only respected when start instructions are submitted + via the `startInstructions` property." /> + + <@lib.property + name = "skipIoMappings" + type = "boolean" + desc = "Skip execution of + [input/output variable mappings](${docsUrl}/user-guide/process-engine/variables/#input-output-variable-mapping) + for activities that are started or ended as part of this request. + **Note**: This option is currently only respected when start instructions are submitted + via the `startInstructions` property." /> + + <@lib.property + name = "withVariablesInReturn" + type = "boolean" + last = true + desc = "Indicates if the variables, which was used by the process instance during execution, should be returned. + Default value: `false`" /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/StartProcessInstanceFormDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/StartProcessInstanceFormDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c36b2775a605e1ce6c2b0da94e7abed5fb36a0f6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/StartProcessInstanceFormDto.ftl @@ -0,0 +1,18 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + dto = "VariableValueDto" /> + + <@lib.property + name = "businessKey" + type = "string" + last = true + desc = "The business key the process instance is to be initialized with. + The business key uniquely identifies the process instance in the context of the given process definition." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/TransitionInstanceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/TransitionInstanceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9e9fd6e547895165f1d8566b1c59aa5c61f09d19 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/TransitionInstanceDto.ftl @@ -0,0 +1,62 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc = "A JSON object corresponding to the Activity Instance tree of the given process instance." > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the transition instance."/> + + <@lib.property + name = "parentActivityInstanceId" + type = "string" + desc = "The id of the parent activity instance, for example a sub process instance."/> + + <@lib.property + name = "activityId" + type = "string" + desc = "The id of the activity that this instance enters (asyncBefore job) or leaves (asyncAfter job)"/> + + <@lib.property + name = "activityName" + type = "string" + desc = "The name of the activity that this instance enters (asyncBefore job) or leaves (asyncAfter job)"/> + + <@lib.property + name = "activityType" + type = "string" + desc = "The type of the activity that this instance enters (asyncBefore job) or leaves (asyncAfter job)"/> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance this instance is part of."/> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition."/> + + <@lib.property + name = "executionId" + type = "string" + desc = "The execution id."/> + + <@lib.property + name = "incidentIds" + type = "array" + itemType = "string" + desc = "A list of incident ids."/> + + <@lib.property + name = "incidents" + type = "array" + dto = "ActivityInstanceIncidentDto" + last = true + desc = "A list of JSON objects containing incident specific properties: + * `id`: the id of the incident + * `activityId`: the activity id in which the incident occurred"/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/TriggerVariableValueDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/TriggerVariableValueDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8b6e75ff6cdef715c17476f3edd0c3423e66dc3c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/TriggerVariableValueDto.ftl @@ -0,0 +1,14 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "VariableValueDto" > + + <@lib.property + name = "local" + type = "boolean" + last = true + desc = "Indicates whether the variable should be a local variable or not. + If set to true, the variable becomes a local variable of the execution + entering the target activity." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/VariableInstanceDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/VariableInstanceDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..af89c4802f47c7345e854d16cdd3cb2167f2f282 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/VariableInstanceDto.ftl @@ -0,0 +1,79 @@ +<#macro dto_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/variable-instance/get/index.html --> +<@lib.dto extends="VariableValueDto"> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the variable instance." + /> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the variable instance." + /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition that this variable instance belongs to." + /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance that this variable instance belongs to." + /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The id of the execution that this variable instance belongs to." + /> + + <@lib.property + name = "caseInstanceId" + type = "string" + desc = "The id of the case instance that this variable instance belongs to." + /> + + <@lib.property + name = "caseExecutionId" + type = "string" + desc = "The id of the case execution that this variable instance belongs to." + /> + + <@lib.property + name = "taskId" + type = "string" + desc = "The id of the task that this variable instance belongs to." + /> + + <@lib.property + name = "batchId" + type = "string" + desc = "The id of the batch that this variable instance belongs to.<" + /> + + <@lib.property + name = "activityInstanceId" + type = "string" + desc = "The id of the activity instance that this variable instance belongs to." + /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The id of the tenant that this variable instance belongs to." + /> + + <@lib.property + name = "errorMessage" + type = "string" + desc = "An error message in case a Java Serialized Object could not be de-serialized." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/VariableInstanceQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/VariableInstanceQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..12adb88147bc7dd18e4651852f44598e7ae138a0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/VariableInstanceQueryDto.ftl @@ -0,0 +1,22 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc = "A variable instance query which defines a list of variable instances" > + <#assign requestMethod="POST"/> + <#include "/lib/commons/variable-instance-query-params.ftl" > + <@lib.properties params /> + + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is an object that specifies one ordering. + The position in the array identifies the rank of an ordering, i.e., whether it is primary, secondary, etc. + Sorting has no effect for `count` endpoints", + "items": + + <#assign last = true > + <#include "/lib/commons/sort-props.ftl" > + + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/batch/CorrelationMessageAsyncDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/batch/CorrelationMessageAsyncDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d5018a119758e8a3e96c6509bbcce5717c4a7480 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/batch/CorrelationMessageAsyncDto.ftl @@ -0,0 +1,40 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "messageName" + type = "string" + desc = "The name of the message to correlate. Corresponds to the 'name' element of the message defined in BPMN 2.0 XML. Can be null to correlate by other criteria only." /> + + <@lib.property + name = "processInstanceIds" + type = "array" + itemType = "string" + desc = "A list of process instance ids that define a group of process instances + to which the operation will correlate a message. + + Please note that if `processInstanceIds`, `processInstanceQuery` and `historicProcessInstanceQuery` + are defined, the resulting operation will be performed on the union of these sets." /> + + <@lib.property + name = "processInstanceQuery" + type = "ref" + dto = "ProcessInstanceQueryDto" + desc = "A process instance query to select process instances the operation will correlate a message to." /> + + <@lib.property + name = "historicProcessInstanceQuery" + type = "ref" + dto = "HistoricProcessInstanceQueryDto" + desc= "A historic process instance query to select process instances the operation will correlate a message to." /> + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + last = true + dto = "VariableValueDto" + desc= "All variables the operation will set in the root scope of the process instances the message is correlated to." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/batch/DeleteProcessInstancesDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/batch/DeleteProcessInstancesDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ee428526c3176b2512bf52642a400f85609522b8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/batch/DeleteProcessInstancesDto.ftl @@ -0,0 +1,43 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "processInstanceIds" + type = "array" + itemType = "string" + desc = "A list process instance ids to delete." /> + + <@lib.property + name = "deleteReason" + type = "string" + desc = "A string with delete reason." /> + + <@lib.property + name = "skipCustomListeners" + type = "boolean" + desc = "Skip execution listener invocation for activities that are started or ended as part of this request." /> + + <@lib.property + name = "skipSubprocesses" + type = "boolean" + desc = "Skip deletion of the subprocesses related to deleted processes as part of this request." /> + + <@lib.property + name = "skipIoMappings" + type = "boolean" + desc = "Skip execution of [input/output variable mappings](${docsUrl}/user-guide/process-engine/variables/#input-output-variable-mapping) + for activities that are started or ended as part of this request." /> + + <@lib.property + name = "processInstanceQuery" + type = "ref" + dto = "ProcessInstanceQueryDto" /> + + <@lib.property + name = "historicProcessInstanceQuery" + type = "ref" + last = true + dto = "HistoricProcessInstanceQueryDto" /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/batch/SetVariablesAsyncDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/batch/SetVariablesAsyncDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ace3c600ed6148a2b5ffde41232b32537bd92f6c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/batch/SetVariablesAsyncDto.ftl @@ -0,0 +1,35 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "processInstanceIds" + type = "array" + itemType = "string" + desc = "A list of process instance ids that define a group of process instances + to which the operation will set variables. + + Please note that if `processInstanceIds`, `processInstanceQuery` and `historicProcessInstanceQuery` + are defined, the resulting operation will be performed on the union of these sets." /> + + <@lib.property + name = "processInstanceQuery" + type = "ref" + dto = "ProcessInstanceQueryDto" + desc = "A process instance query to select process instances the operation will set variables to." /> + + <@lib.property + name = "historicProcessInstanceQuery" + type = "ref" + dto = "HistoricProcessInstanceQueryDto" + desc= "A historic process instance query to select process instances the operation will set variables to." /> + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + last = true + dto = "VariableValueDto" + desc= "A variables the operation will set in the root scope of the process instances." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/CompleteExternalTaskDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/CompleteExternalTaskDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..cc22ee1c259523b55d636c376bf6e0f420bc0950 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/CompleteExternalTaskDto.ftl @@ -0,0 +1,21 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto extends = "HandleExternalTaskDto" > + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + desc = "A JSON object containing variable key-value pairs. Each key is a variable name and each value a JSON variable value object with the following properties:" /> + + <@lib.property + name = "localVariables" + type = "object" + additionalProperties = true + last = true + dto = "VariableValueDto" + desc = "A JSON object containing local variable key-value pairs. Local variables are set only in the scope of external task. Each key is a variable name and each value a JSON variable value object with the following properties:" /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExtendLockOnExternalTaskDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExtendLockOnExternalTaskDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2b36d9e910f051af35b898cfb5d36706c007e08a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExtendLockOnExternalTaskDto.ftl @@ -0,0 +1,14 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto extends = "HandleExternalTaskDto" > + + <@lib.property + name = "newDuration" + type = "integer" + format = "int64" + last = true + desc = "An amount of time (in milliseconds). This is the new lock duration starting from the + current moment." /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExternalTaskBpmnError.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExternalTaskBpmnError.ftl new file mode 100644 index 0000000000000000000000000000000000000000..64c60e8ccddd903cd8ef76403613acd0b21418a1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExternalTaskBpmnError.ftl @@ -0,0 +1,14 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "TaskBpmnErrorDto" > + + <@lib.property + name = "workerId" + type = "string" + last = true + desc = "The id of the worker that reports the failure. Must match the id of the worker who has most recently + locked the task." /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExternalTaskDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExternalTaskDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f43dce5e8c58742c328b7c7418ffee0f864edd38 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExternalTaskDto.ftl @@ -0,0 +1,104 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + title = "ExternalTaskDto" + desc = "An External Task object with the following properties" > + + <@lib.property + name = "activityId" + type = "string" + desc = "The id of the activity that this external task belongs to." /> + + <@lib.property + name = "activityInstanceId" + type = "string" + desc = "The id of the activity instance that the external task belongs to." /> + + <@lib.property + name = "errorMessage" + type = "string" + desc = "The full error message submitted with the latest reported failure executing this task; `null` if no + failure was reported previously or if no error message was submitted" /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The id of the execution that the external task belongs to." /> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the external task." /> + + <@lib.property + name = "lockExpirationTime" + type = "string" + format = "date-time" + desc = "The date that the task's most recent lock expires or has expired." /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition the external task is defined in." /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition the external task is defined in." /> + + <@lib.property + name = "processDefinitionVersionTag" + type = "string" + desc = "The version tag of the process definition the external task is defined in." /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance the external task belongs to." /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The id of the tenant the external task belongs to." /> + + <@lib.property + name = "retries" + type = "integer" + format = "int32" + desc = "The number of retries the task currently has left." /> + + <@lib.property + name = "suspended" + type = "boolean" + desc = "A flag indicating whether the external task is suspended or not." /> + + <@lib.property + name = "workerId" + type = "string" + desc = "The id of the worker that posesses or posessed the most recent lock." /> + + <@lib.property + name = "topicName" + type = "string" + desc = "The topic name of the external task." /> + + <@lib.property + name = "priority" + type = "integer" + format = "int64" + desc = "The priority of the external task." /> + + <@lib.property + name = "businessKey" + type = "string" + desc = "The business key of the process instance the external task belongs to." /> + + <@lib.property + name = "createTime" + type = "string" + format = "date-time" + desc = "The date that the task was created." + last = true /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExternalTaskFailureDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExternalTaskFailureDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7f02d5f49864ba4b687f2bbc0c571bd1a1dec755 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExternalTaskFailureDto.ftl @@ -0,0 +1,45 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto extends = "HandleExternalTaskDto" > + + <@lib.property + name = "errorMessage" + type = "string" + desc = "An message indicating the reason of the failure." /> + + <@lib.property + name = "errorDetails" + type = "string" + desc = "A detailed error description." /> + + <@lib.property + name = "retries" + type = "integer" + format = "int32" + desc = "A number of how often the task should be retried. Must be >= 0. If this is 0, an incident is created and + the task cannot be fetched anymore unless the retries are increased again. The incident's message is set + to the `errorMessage` parameter." /> + + <@lib.property + name = "retryTimeout" + type = "integer" + format = "int64" + desc = "A timeout in milliseconds before the external task becomes available again for fetching. Must be >= 0." /> + +<@lib.property + name = "variables" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + desc = "A JSON object containing variable key-value pairs. Each key is a variable name and each value a JSON variable value object with the following properties:" /> + + <@lib.property + name = "localVariables" + type = "object" + additionalProperties = true + last = true + dto = "VariableValueDto" + desc = "A JSON object containing local variable key-value pairs. Local variables are set only in the scope of external task. Each key is a variable name and each value a JSON variable value object with the following properties:" /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExternalTaskQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExternalTaskQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..af4e0cde71675f61bf3f3a6e89aa45d354af169a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/ExternalTaskQueryDto.ftl @@ -0,0 +1,206 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + title = "ExternalTaskQueryDto" + desc = "A JSON object with the following properties:" > + + <@lib.property + name = "externalTaskId" + type = "string" + desc = "Filter by an external task's id." /> + + <@lib.property + name = "externalTaskIdIn" + type = "array" + itemType = "string" + desc = "Filter by the comma-separated list of external task ids." /> + + <@lib.property + name = "topicName" + type = "string" + desc = "Filter by an external task topic." /> + + <@lib.property + name = "workerId" + type = "string" + desc = "Filter by the id of the worker that the task was most recently locked by." /> + + <@lib.property + name = "locked" + type = "boolean" + desc = "Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired). + Value may only be `true`, as `false` matches any external task." /> + + <@lib.property + name = "notLocked" + type = "boolean" + desc = "Only include external tasks that are currently not locked (i.e., they have no lock or it has expired). + Value may only be `true`, as `false` matches any external task." /> + + <@lib.property + name = "withRetriesLeft" + type = "boolean" + desc = "Only include external tasks that have a positive (> 0) number of retries (or `null`). Value may only be + `true`, as `false` matches any external task." /> + + <@lib.property + name = "noRetriesLeft" + type = "boolean" + desc = "Only include external tasks that have 0 retries. Value may only be `true`, as `false` matches any + external task." /> + + <@lib.property + name = "lockExpirationAfter" + type = "string" + format = "date-time" + desc = "Restrict to external tasks that have a lock that expires after a given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." /> + + <@lib.property + name = "lockExpirationBefore" + type = "string" + format = "date-time" + desc = "Restrict to external tasks that have a lock that expires before a given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." /> + + <@lib.property + name = "activityId" + type = "string" + desc = "Filter by the id of the activity that an external task is created for." /> + + <@lib.property + name = "activityIdIn" + type = "array" + itemType = "string" + desc = "Filter by the comma-separated list of ids of the activities that an external task is created for." /> + + <@lib.property + name = "executionId" + type = "string" + desc = "Filter by the id of the execution that an external task belongs to." /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "Filter by the id of the process instance that an external task belongs to." /> + + <@lib.property + name = "processInstanceIdIn" + type = "array" + itemType = "string" + desc = "Filter by a comma-separated list of process instance ids that an external task may belong to." /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "Filter by the id of the process definition that an external task belongs to." /> + + <@lib.property + name = "tenantIdIn" + type = "array" + itemType = "string" + desc = "Filter by a comma-separated list of tenant ids. + An external task must have one of the given tenant ids." /> + + <@lib.property + name = "active" + type = "boolean" + desc = "Only include active tasks. Value may only be `true`, as `false` matches any external task." /> + + <@lib.property + name = "suspended" + type = "boolean" + desc = "Only include suspended tasks. Value may only be `true`, as `false` matches any external task." /> + + <@lib.property + name = "priorityHigherThanOrEquals" + type = "integer" + format = "int64" + desc = "Only include jobs with a priority higher than or equal to the given value. + Value must be a valid `long` value." /> + + <@lib.property + name = "priorityLowerThanOrEquals" + type = "integer" + format = "int64" + desc = "Only include jobs with a priority lower than or equal to the given value. + Value must be a valid `long` value." /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "Restrict to tasks that belong to a process definition with the given key." /> + + <@lib.property + name = "processDefinitionKeyIn" + type = "array" + itemType = "string" + desc = "Restrict to tasks that belong to a process definition with one of the given keys. The + keys need to be in a comma-separated list." /> + + <@lib.property + name = "processDefinitionName" + type = "string" + desc = "Restrict to tasks that belong to a process definition with the given name." /> + + <@lib.property + name = "processDefinitionNameLike" + type = "string" + desc = "Restrict to tasks that have a process definition name that has the parameter value as + a substring." /> + + <@lib.property + name = "variableNamesIgnoreCase" + type = "boolean" + defaultValue = "false" + desc = "Match all variable names in this query case-insensitively. If set + `variableName` and `variablename` are treated as equal." /> + + <@lib.property + name = "variableValuesIgnoreCase" + type = "boolean" + defaultValue = "false" + desc = "Match all variable values in this query case-insensitively. If set + `variableValue` and `variablevalue` are treated as equal." /> + + <@lib.property + name = "processVariables" + type = "array" + dto = "VariableQueryParameterDto" + desc = "A JSON array to only include tasks that belong to a process instance with variables + with certain values. The array consists of JSON objects with three properties + `name`, `operator` and `value`. `name` is the variable name, `operator` is the + comparison operator to be used and `value` the variable value. `value` may be of + type `String`, `Number` or `Boolean`. + + Valid `operator` values are: + `eq` - equal to; + `neq` - not equal to; + `gt` - greater than; + `gteq` - greater than or equal to; + `lt` - lower than; + `lteq` - lower than or equal to; + `like`; + `notLike`. + `key` and `value` may not contain underscore or comma characters." /> + + "sorting": { + "type": "array", + "nullable": true, + "description": "A JSON array of criteria to sort the result by. Each element of the array is a JSON object that + specifies one ordering. The position in the array identifies the rank of an ordering, i.e., whether + it is primary, secondary, etc. The ordering objects have the following properties: + + **Note:** The `sorting` properties will not be applied to the External Task count query.", + "items": + + <#assign last = true> + <#assign sortByValues = [ '"id"', '"lockExpirationTime"', '"processInstanceId"', '"processDefinitionId"', + '"processDefinitionKey"', '"taskPriority"', '"createTime"', '"tenantId"' ] > + <#include "/lib/commons/sort-props.ftl" > + } + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/FetchExternalTaskTopicDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/FetchExternalTaskTopicDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7480264626bcc6b5d809d85b8c8566e154e64da3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/FetchExternalTaskTopicDto.ftl @@ -0,0 +1,108 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + required = [ "topicName", "lockDuration" ] > + + <@lib.property + name = "topicName" + type = "string" + nullable = false + desc = "**Mandatory.** The topic's name." /> + + <@lib.property + name = "lockDuration" + type = "integer" + format = "int64" + desc = "**Mandatory.** The duration to lock the external tasks for in milliseconds." /> + + <@lib.property + name = "variables" + type = "array" + itemType = "string" + desc = "A JSON array of `String` values that represent variable names. For each result task belonging to this + topic, the given variables are returned as well if they are accessible from the external task's + execution. If not provided - all variables will be fetched." /> + + <@lib.property + name = "localVariables" + type = "boolean" + defaultValue = 'false' + desc = "If `true` only local variables will be fetched." /> + + <@lib.property + name = "businessKey" + type = "string" + desc = "A `String` value which enables the filtering of tasks based on process instance business key." /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "Filter tasks based on process definition id." /> + + <@lib.property + name = "processDefinitionIdIn" + type = "array" + itemType = "string" + desc = "Filter tasks based on process definition ids." /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "Filter tasks based on process definition key." /> + + <@lib.property + name = "processDefinitionKeyIn" + type = "array" + itemType = "string" + desc = "Filter tasks based on process definition keys." /> + + <@lib.property + name = "processDefinitionVersionTag" + type = "string" + desc = "Filter tasks based on process definition version tag." /> + + <@lib.property + name = "withoutTenantId" + type = "boolean" + defaultValue = 'false' + desc = "Filter tasks without tenant id." /> + + <@lib.property + name = "tenantIdIn" + type = "array" + itemType = "string" + desc = "Filter tasks based on tenant ids." /> + + <@lib.property + name = "processVariables" + type = "object" + addProperty = "\"additionalProperties\": true" + desc = "A `JSON` object used for filtering tasks based on process instance variable values. A property name of + the object represents a process variable name, while the property value represents the process variable + value to filter tasks by." /> + + <@lib.property + name = "deserializeValues" + type = "boolean" + defaultValue = 'false' + desc = "Determines whether serializable variable values (typically variables that store custom Java objects) + should be deserialized on server side (default `false`). + + If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON + using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. Note + that this requires the Java classes of the variable value to be on the REST API's classpath. + + If set to `false`, a serializable variable will be returned in its serialized format. For example, a + variable that is serialized as XML will be returned as a JSON string containing XML." /> + + <@lib.property + name = "includeExtensionProperties" + type = "boolean" + defaultValue = 'false' + last = true + desc = "Determines whether custom extension properties defined in the BPMN activity of the external task (e.g. + via the Extensions tab in the Camunda modeler) should be included in the response. Default: false" /> + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/FetchExternalTasksDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/FetchExternalTasksDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..54612f563fccad44d47caa47a44e55730a6529dc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/FetchExternalTasksDto.ftl @@ -0,0 +1,54 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + title = "" + required = [ "workerId", "maxTasks" ] > + + <@lib.property + name = "workerId" + type = "string" + nullable = false + desc = "**Mandatory.** The id of the worker on which behalf tasks are fetched. The returned tasks are locked for + that worker and can only be completed when providing the same worker id." /> + + <@lib.property + name = "maxTasks" + type = "integer" + format = "int32" + desc = "**Mandatory.** The maximum number of tasks to return." /> + + <@lib.property + name = "usePriority" + type = "boolean" + desc = "A `boolean` value, which indicates whether the task should be fetched based on its priority + or arbitrarily." /> + + <@lib.property + name = "asyncResponseTimeout" + type = "integer" + format = "int64" + desc = "The [Long Polling](${docsUrl}/user-guide/process-engine/external-tasks/#long-polling-to-fetch-and-lock-external-tasks) + timeout in milliseconds. + + **Note:** The value cannot be set larger than 1.800.000 milliseconds (corresponds to 30 minutes)." /> + + <@lib.property + name = "topics" + type = "array" + dto = "FetchExternalTaskTopicDto" + desc = "A JSON array of topic objects for which external tasks should be fetched. The returned tasks may be + arbitrarily distributed among these topics. Each topic object has the following properties:" /> + + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": + + <#assign last = true > + <#assign sortByValues = [ '"createTime"' ] > + <#include "/lib/commons/sort-props.ftl" > + } + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/HandleExternalTaskDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/HandleExternalTaskDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ce4c5fe11a63f99fd035f89989a91686b99d2a13 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/HandleExternalTaskDto.ftl @@ -0,0 +1,14 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "workerId" + type = "string" + nullable = false + last = true + desc = "**Mandatory.** The ID of the worker who is performing the operation on the external task. + If the task is already locked, must match the id of the worker who has most recently + locked the task." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/LockExternalTaskDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/LockExternalTaskDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ee645e007ad4d9045aa25dc463e7c8b5add4884c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/LockExternalTaskDto.ftl @@ -0,0 +1,16 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto extends = "HandleExternalTaskDto" > + + <@lib.property + name = "lockDuration" + type = "integer" + format = "int64" + nullable = false + last = true + desc = "The duration to lock the external task for in milliseconds. + **Note:** Attempting to lock an already locked external task with the same `workerId` + will succeed and a new lock duration will be set, starting from the current moment." /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/LockedExternalTaskDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/LockedExternalTaskDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7988a3fd8ca8e7b327926b158b10b4d31da48a6a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/LockedExternalTaskDto.ftl @@ -0,0 +1,124 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + title = "LockedExternalTaskDto" > + + <@lib.property + name = "activityId" + type = "string" + desc = "The id of the activity that this external task belongs to." /> + + <@lib.property + name = "activityInstanceId" + type = "string" + desc = "The id of the activity instance that the external task belongs to." /> + + <@lib.property + name = "errorMessage" + type = "string" + desc = "The full error message submitted with the latest reported failure executing this task;`null` if no failure + was reported previously or if no error message was submitted" /> + + <@lib.property + name = "errorDetails" + type = "string" + desc = "The error details submitted with the latest reported failure executing this task.`null` if no failure was + reported previously or if no error details was submitted" /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The id of the execution that the external task belongs to." /> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the external task." /> + + <@lib.property + name = "lockExpirationTime" + type = "string" + format = "date-time" + desc = "The date that the task's most recent lock expires or has expired." /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition the external task is defined in." /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "The key of the process definition the external task is defined in." /> + + <@lib.property + name = "processDefinitionVersionTag" + type = "string" + desc = "The version tag of the process definition the external task is defined in." /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance the external task belongs to." /> + + <@lib.property + name = "tenantId" + type = "string" + desc = "The id of the tenant the external task belongs to." /> + + <@lib.property + name = "retries" + type = "integer" + format = "int32" + desc = "The number of retries the task currently has left." /> + + <@lib.property + name = "suspended" + type = "boolean" + desc = "Whether the process instance the external task belongs to is suspended." /> + + <@lib.property + name = "workerId" + type = "string" + desc = "The id of the worker that posesses or posessed the most recent lock." /> + + <@lib.property + name = "priority" + type = "integer" + format = "int64" + desc = "The priority of the external task." /> + + <@lib.property + name = "topicName" + type = "string" + desc = "The topic name of the external task." /> + + <@lib.property + name = "businessKey" + type = "string" + desc = "The business key of the process instance the external task belongs to." /> + + <@lib.property + name = "variables" + type = "object" + dto = "VariableValueDto" + additionalProperties = true + desc = "A JSON object containing a property for each of the requested variables. The key is the variable name, + the value is a JSON object of serialized variable values with the following properties:" /> + + <@lib.property + name = "extensionProperties" + type = "object" + additionalProperties = true + desc = "A JSON object containing a property for each extension property. The key is the property name, + the value is the property value" /> + + <@lib.property + name = "createTime" + type = "string" + format = "date-time" + desc = "The date that the task was created." + last = true /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/SetRetriesForExternalTasksDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/SetRetriesForExternalTasksDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7bf009aee60c59e0f2a02ccdc34a8c923d1756c1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/externaltask/SetRetriesForExternalTasksDto.ftl @@ -0,0 +1,45 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "retries" + type = "integer" + format = "int32" + desc = "The number of retries to set for the external task. Must be >= 0. If this is 0, an incident is created + and the task cannot be fetched anymore unless the retries are increased again. Can not be null." /> + + <@lib.property + name = "externalTaskIds" + type = "array" + itemType = "string" + desc = "The ids of the external tasks to set the number of retries for." /> + + <@lib.property + name = "processInstanceIds" + type = "array" + itemType = "string" + desc = "The ids of process instances containing the tasks to set the number of retries for." /> + + <@lib.property + name = "externalTaskQuery" + type = "ref" + dto = "ExternalTaskQueryDto" + desc = "Query for the external tasks to set the number of retries for." /> + + <@lib.property + name = "processInstanceQuery" + type = "ref" + dto = "ProcessInstanceQueryDto" + desc = "Query for the process instances containing the tasks to set the number of retries for." /> + + <@lib.property + name = "historicProcessInstanceQuery" + type = "ref" + dto = "HistoricProcessInstanceQueryDto" + last = true + desc = "Query for the historic process instances containing the tasks to set the number of retries for." /> + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/modification/MultipleProcessInstanceModificationInstructionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/modification/MultipleProcessInstanceModificationInstructionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..31f5af487ebfc725d2fa64862072f013acb91156 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/modification/MultipleProcessInstanceModificationInstructionDto.ftl @@ -0,0 +1,40 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + required = [ "type" ] > + + <#-- NOTE: This DTO is used for the Modification Endpoints. For other endpoints that require this DTO, check the other files. + The DTOs are duplicated because there are significant differences in the wording and properties.--> + + <@lib.property + name = "type" + type = "string" + nullable = false + enumValues = ['"cancel"', '"startBeforeActivity"', '"startAfterActivity"', '"startTransition"'] + desc = "**Mandatory**. One of the following values: `cancel`, `startBeforeActivity`, `startAfterActivity`, `startTransition`. + + * A cancel instruction requests cancellation of a single activity instance or all instances of one activity. + * A startBeforeActivity instruction requests to enter a given activity. + * A startAfterActivity instruction requests to execute the single outgoing sequence flow of a given activity. + * A startTransition instruction requests to execute a specific sequence flow." /> + + <@lib.property + name = "activityId" + type = "string" + desc = "Can be used with instructions of types `startTransition`. Specifies the sequence flow to start." /> + + <@lib.property + name = "transitionId" + type = "string" + desc = "Can be used with instructions of types `startTransition`. Specifies the sequence flow to start." /> + + + <@lib.property + name = "cancelCurrentActiveActivityInstances" + type = "boolean" + last = true + desc = "Can be used with instructions of type cancel. Prevents the deletion of new created activity instances." /> + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/modification/ProcessInstanceModificationDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/modification/ProcessInstanceModificationDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..300a90955ec8075f644bd8ee7fc620b834d5f585 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/modification/ProcessInstanceModificationDto.ftl @@ -0,0 +1,28 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "skipCustomListeners" + type = "boolean" + desc = "Skip execution listener invocation for activities that are started or ended as part of this request." /> + + <@lib.property + name = "skipIoMappings" + type = "boolean" + desc = "Skip execution of [input/output variable mappings](${docsUrl}/user-guide/process-engine/variables/#input-output-variable-mapping) + for activities that are started or ended as part of this request." /> + + <@lib.property + name = "instructions" + type = "array" + dto = "ProcessInstanceModificationInstructionDto" + desc = "JSON array of modification instructions. The instructions are executed in the order they are in." /> + + <@lib.property + name = "annotation" + type = "string" + last = true + desc = "An arbitrary text annotation set by a user for auditing reasons." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/modification/ProcessInstanceModificationInstructionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/modification/ProcessInstanceModificationInstructionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..71a2295f37e64c46f30b9421f457efb8bf082906 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/modification/ProcessInstanceModificationInstructionDto.ftl @@ -0,0 +1,72 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + required = [ "type" ] > + + <#-- NOTE: Please consider adjusting the RestartProcessInstanceModificationInstructionDto + if the properties are valid there as well. + The DTO was created separately as it does not contain + all of these properties and the description differs too much. + Also check the MultipleProcessInstanceModifcationInstructionDto if you need changes for the Modification endpoints. + --> + + <@lib.property + name = "type" + type = "string" + nullable = false + enumValues = ['"cancel"', '"startBeforeActivity"', '"startAfterActivity"', '"startTransition"'] + desc = "**Mandatory**. One of the following values: `cancel`, `startBeforeActivity`, `startAfterActivity`, `startTransition`. + + * A cancel instruction requests cancellation of a single activity instance or all instances of one activity. + * A startBeforeActivity instruction requests to enter a given activity. + * A startAfterActivity instruction requests to execute the single outgoing sequence flow of a given activity. + * A startTransition instruction requests to execute a specific sequence flow." /> + + <@lib.property + name = "variables" + type = "ref" + dto = "TriggerVariableValueDto" + desc = "Can be used with instructions of type `startBeforeActivity`, `startAfterActivity`, and `startTransition`. + A JSON object containing variable key-value pairs. Each key is a variable name and each value a JSON variable value object." /> + + <@lib.property + name = "activityId" + type = "string" + desc = "Can be used with instructions of types `startTransition`. Specifies the sequence flow to start." /> + + <@lib.property + name = "transitionId" + type = "string" + desc = "Can be used with instructions of types `startTransition`. Specifies the sequence flow to start." /> + + <@lib.property + name = "activityInstanceId" + type = "string" + desc = "Can be used with instructions of type `cancel`. Specifies the activity instance to cancel. + Valid values are the activity instance IDs supplied by the [Get Activity Instance request](${docsUrl}/reference/rest/process-instance/get-activity-instances/)." /> + + <@lib.property + name = "transitionInstanceId" + type = "string" + desc = "Can be used with instructions of type `cancel`. Specifies the transition instance to cancel. + Valid values are the transition instance IDs supplied by the [Get Activity Instance request](${docsUrl}/reference/rest/process-instance/get-activity-instances/)." /> + + <@lib.property + name = "ancestorActivityInstanceId" + type = "string" + desc = "Can be used with instructions of type `startBeforeActivity`, `startAfterActivity`, and `startTransition`. + Valid values are the activity instance IDs supplied by the Get Activity Instance request. + If there are multiple parent activity instances of the targeted activity, + this specifies the ancestor scope in which hierarchy the activity/transition is to be instantiated. + + Example: When there are two instances of a subprocess and an activity contained in the subprocess is to be started, + this parameter allows to specifiy under which subprocess instance the activity should be started." /> + + <@lib.property + name = "cancelCurrentActiveActivityInstances" + type = "boolean" + last = true + desc = "Can be used with instructions of type cancel. Prevents the deletion of new created activity instances." /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/modification/RestartProcessInstanceModificationInstructionDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/modification/RestartProcessInstanceModificationInstructionDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a47e6cd6ada099f0ea0fa43a8cd6e38cfad5a46d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/modification/RestartProcessInstanceModificationInstructionDto.ftl @@ -0,0 +1,30 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + required = [ "type" ] > + + <@lib.property + name = "type" + type = "string" + nullable = false + enumValues = ['"startBeforeActivity"', '"startAfterActivity"', '"startTransition"'] + desc = "**Mandatory**. One of the following values: `startBeforeActivity`, `startAfterActivity`, `startTransition`. + + * A `startBeforeActivity` instruction requests to enter a given activity. + * A `startAfterActivity` instruction requests to execute the single outgoing sequence flow of a given activity. + * A `startTransition` instruction requests to execute a specific sequence flow." /> + + <@lib.property + name = "activityId" + type = "string" + desc = "**Can be used with instructions of types** `startBeforeActivity` + and `startAfterActivity`. Specifies the sequence flow to start." /> + + <@lib.property + name = "transitionId" + type = "string" + last = true + desc = "**Can be used with instructions of types** `startTransition`. + Specifies the sequence flow to start." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/AttachmentDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/AttachmentDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6321b3d50780df45712184e8b6adacab050679d0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/AttachmentDto.ftl @@ -0,0 +1,58 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto extends = "LinkableDto" > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the task attachment." /> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the task attachment." /> + + <@lib.property + name = "description" + type = "string" + desc = "The description of the task attachment." /> + + <@lib.property + name = "taskId" + type = "string" + desc = "The id of the task to which the attachment belongs." /> + + <@lib.property + name = "type" + type = "string" + desc = "Indication of the type of content that this attachment refers to. + Can be MIME type or any other indication." /> + + <@lib.property + name = "url" + type = "string" + desc = "The url to the remote content of the task attachment." /> + + <@lib.property + name = "createTime" + type = "string" + format = "date-time" + desc = "The time the variable was inserted. + [Default format](${docsUrl}/reference/rest/overview/date-format/) + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the attachment should be removed by the History Cleanup job. + [Default format](${docsUrl}/reference/rest/overview/date-format/) + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + last = true + desc = "The process instance id of the root process instance that initiated the process containing the task." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/CommentDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/CommentDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..687b7f0d0a215476648bf9fc541556fb9c1430d1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/CommentDto.ftl @@ -0,0 +1,54 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "LinkableDto" > + + <@lib.property + name = "id" + type = "string" + desc = "The id of the task comment." /> + + <@lib.property + name = "userId" + type = "string" + desc = "The id of the user who created the comment." /> + + <@lib.property + name = "taskId" + type = "string" + desc = "The id of the task to which the comment belongs." /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance the comment is related to." /> + + <@lib.property + name = "time" + type = "string" + format = "date-time" + desc = "The time when the comment was created. + [Default format]($(docsUrl)/reference/rest/overview/date-format/) + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." /> + + <@lib.property + name = "message" + type = "string" + desc = "The content of the comment." /> + + <@lib.property + name = "removalTime" + type = "string" + format = "date-time" + desc = "The time after which the comment should be removed by the History Cleanup job. + [Default format]($(docsUrl)/reference/rest/overview/date-format/) + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." /> + + <@lib.property + name = "rootProcessInstanceId" + type = "string" + last = true + desc = "The process instance id of the root process instance that initiated the process + containing the task." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/CompleteTaskDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/CompleteTaskDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..127f87b4a6ed83dabf098e4a05c2eb1ff6d3730c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/CompleteTaskDto.ftl @@ -0,0 +1,24 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "variables" + type = "object" + dto = "VariableValueDto" + additionalProperties = true + desc = "A JSON object containing variable key-value pairs." /> + + <@lib.property + name = "withVariablesInReturn" + type = "boolean" + defaultValue = "false" + last = true + desc = "Indicates whether the response should contain the process variables or not. The + default is `false` with a response code of `204`. If set to `true` the response + contains the process variables and has a response code of `200`. If the task is not + associated with a process instance (e.g. if it's part of a case instance) no + variables will be returned." /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/IdentityLinkDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/IdentityLinkDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..34451f2489ca6959f9a2d187278a0dd3502c0a1e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/IdentityLinkDto.ftl @@ -0,0 +1,28 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto required = ["type"] > + + <@lib.property + name = "userId" + type = "string" + desc = "The id of the user participating in this link. Either `userId` or `groupId` is set." /> + + <@lib.property + name = "groupId" + type = "string" + desc = "The id of the group participating in this link. Either `groupId` or `userId` is set." /> + + <@lib.property + name = "type" + type = "string" + last = true + desc = "The type of the identity link. The value of the this property can be user-defined. The Process Engine + provides three pre-defined Identity Link `type`s: + + * `candidate` + * `assignee` - reserved for the task assignee + * `owner` - reserved for the task owner + + **Note**: When adding or removing an Identity Link, the `type` property must be defined." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/IdentityServiceGroupDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/IdentityServiceGroupDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a6a27948592441fe6064f3437214f2da26c93213 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/IdentityServiceGroupDto.ftl @@ -0,0 +1,18 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the group." + /> + + <@lib.property + name = "name" + type = "string" + last = true + desc = "The name of the group." + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/IdentityServiceGroupInfoDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/IdentityServiceGroupInfoDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4f067dbff13168f749cec2143e9a238143a593fe --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/IdentityServiceGroupInfoDto.ftl @@ -0,0 +1,20 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "groups" + type = "array" + dto = "IdentityServiceGroupDto" + desc = "An array of group objects." + /> + + <@lib.property + name = "groupUsers" + type = "array" + dto = "IdentityServiceUserDto" + last = true + desc = "An array that contains all users that are member in one of the groups." + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/IdentityServiceUserDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/IdentityServiceUserDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..b53d0371da197e4c34b122df396c2500508f453b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/IdentityServiceUserDto.ftl @@ -0,0 +1,30 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The id of the user." + /> + + <@lib.property + name = "firstName" + type = "string" + desc = "The firstname of the user." + /> + + <@lib.property + name = "lastName" + type = "string" + desc = "The lastname of the user." + /> + + <@lib.property + name = "displayName" + type = "string" + desc = "The displayName is generated from the id or firstName and lastName if available." + last = true + /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/MultiFormAttachmentDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/MultiFormAttachmentDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f3cf02ef061f7c0fb7929ee6ec3f88ad6f1cb74a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/MultiFormAttachmentDto.ftl @@ -0,0 +1,32 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "attachment-name" + type = "string" + desc = "The name of the attachment." /> + + <@lib.property + name = "attachment-description" + type = "string" + desc = "The description of the attachment." /> + + <@lib.property + name = "attachment-type" + type = "string" + desc = "The type of the attachment." /> + + <@lib.property + name = "url" + type = "string" + desc = "The url to the remote content of the attachment." /> + + <@lib.property + name = "content" + type = "string" + format = "binary" + last = true + desc = "The content of the attachment." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/SortTaskQueryParametersDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/SortTaskQueryParametersDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4c0791a2d1facabe4502964ced577fc8f4ad6320 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/SortTaskQueryParametersDto.ftl @@ -0,0 +1,19 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc = 'Mandatory when `sortBy` is one of the following values: `processVariable`, `executionVariable`, + `taskVariable`, `caseExecutionVariable` or `caseInstanceVariable`. Must be a JSON object with the properties + `variable` and `type` where `variable` is a variable name and `type` is the name of a variable value type.' > + + <@lib.property + name = "variable" + type = "string" + desc = "The name of the variable to sort by." /> + + <@lib.property + name = "type" + type = "string" + last = true + desc = "The name of the type of the variable value." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskBpmnErrorDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskBpmnErrorDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7bdd5256a29b133166a46f54cbad9e3e6c9658a1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskBpmnErrorDto.ftl @@ -0,0 +1,25 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "errorCode" + type = "string" + desc = "An error code that indicates the predefined error. It is used to identify the BPMN + error handler." /> + + <@lib.property + name = "errorMessage" + type = "string" + desc = "An error message that describes the error." /> + + <@lib.property + name = "variables" + type = "object" + dto = "VariableValueDto" + additionalProperties = true + last = true + desc = "A JSON object containing variable key-value pairs." /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f177a98a9d130f9cbd03440bff8d7c7412685cc4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskDto.ftl @@ -0,0 +1,141 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "id" + type = "string" + desc = "The task id." /> + + <@lib.property + name = "name" + type = "string" + desc = "The task name." /> + + <@lib.property + name = "assignee" + type = "string" + desc = "The assignee's id." /> + + <@lib.property + name = "owner" + type = "string" + desc = "The owner's id." /> + + <@lib.property + name = "created" + type = "string" + format = "date-time" + desc = "The date the task was created on. + [Default format](${docsUrl}/reference/rest/overview/date-format/) + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." /> + + <@lib.property + name = "lastUpdated" + type = "string" + format = "date-time" + desc = "The date the task was last updated. Every action that fires a [task update event](${docsUrl}/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) will update this property. + [Default format](${docsUrl}/reference/rest/overview/date-format/) + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." /> + + <@lib.property + name = "due" + type = "string" + format = "date-time" + desc = "The task's due date. + [Default format](${docsUrl}/reference/rest/overview/date-format/) + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." /> + + <@lib.property + name = "followUp" + type = "string" + format = "date-time" + desc = "The follow-up date for the task. + [Default format](${docsUrl}/reference/rest/overview/date-format/) + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`." /> + + <@lib.property + name = "delegationState" + type = "string" + enumValues=['"PENDING"', '"RESOLVED"'] + desc = "The task's delegation state. Possible values are `PENDING` and `RESOLVED`." /> + + <@lib.property + name = "description" + type = "string" + desc = "The task's description." /> + + <@lib.property + name = "executionId" + type = "string" + desc = "The id of the execution the task belongs to." /> + + <@lib.property + name = "parentTaskId" + type = "string" + desc = "The id the parent task, if this task is a subtask." /> + + <@lib.property + name = "priority" + type = "integer" + format = "int32" + desc = "The task's priority." /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "The id of the process definition the task belongs to." /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "The id of the process instance the task belongs to." /> + + <@lib.property + name = "caseExecutionId" + type = "string" + desc = "The id of the case execution the task belongs to." /> + + <@lib.property + name = "caseDefinitionId" + type = "string" + desc = "The id of the case definition the task belongs to." /> + + <@lib.property + name = "caseInstanceId" + type = "string" + desc = "The id of the case instance the task belongs to." /> + + <@lib.property + name = "taskDefinitionKey" + type = "string" + desc = "The task's key." /> + + <@lib.property + name = "suspended" + type = "boolean" + desc = "Whether the task belongs to a process instance that is suspended." /> + + <@lib.property + name = "formKey" + type = "string" + desc = "If not `null`, the form key for the task." /> + + <@lib.property + name = "camundaFormRef" + type = "ref" + dto = "CamundaFormRef" + desc = "A reference to a specific version of a Camunda Form."/> + + <@lib.property + name = "tenantId" + type = "string" + desc = "If not `null`, the tenant id of the task." /> + + <@lib.property + name = "taskState" + type = "string" + desc = "The task's state." + last = true /> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskEscalationDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskEscalationDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5c4ea3e6786a6aff6c66c7d72f0ebda079dfc64a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskEscalationDto.ftl @@ -0,0 +1,20 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "escalationCode" + type = "string" + desc = "An escalation code that indicates the predefined escalation. It is used to identify + the BPMN escalation handler." /> + + <@lib.property + name = "variables" + type = "object" + dto = "VariableValueDto" + additionalProperties = true + last = true + desc = "A JSON object containing variable key-value pairs." /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskQueryDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskQueryDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9ea7ea984b80580bb78c86748713fb4967453993 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskQueryDto.ftl @@ -0,0 +1,714 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + desc = "A Task query which defines a group of Tasks." > + + <@lib.property + name = "taskId" + type = "string" + desc = "Restrict to task with the given id." /> + + <@lib.property + name = "taskIdIn" + type = "array" + itemType = "string" + desc = "Restrict to tasks with any of the given ids." /> + + <@lib.property + name = "processInstanceId" + type = "string" + desc = "Restrict to tasks that belong to process instances with the given id." /> + + <@lib.property + name = "processInstanceIdIn" + type = "array" + itemType = "string" + desc = "Restrict to tasks that belong to process instances with the given ids." /> + + <@lib.property + name = "processInstanceBusinessKey" + type = "string" + desc = "Restrict to tasks that belong to process instances with the given business key." /> + + <@lib.property + name = "processInstanceBusinessKeyExpression" + type = "string" + desc = "Restrict to tasks that belong to process instances with the given business key which + is described by an expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.property + name = "processInstanceBusinessKeyIn" + type = "array" + itemType = "string" + desc = "Restrict to tasks that belong to process instances with one of the give business keys. + The keys need to be in a comma-separated list." /> + + <@lib.property + name = "processInstanceBusinessKeyLike" + type = "string" + desc = "Restrict to tasks that have a process instance business key that has the parameter + value as a substring." /> + + <@lib.property + name = "processInstanceBusinessKeyLikeExpression" + type = "string" + desc = "Restrict to tasks that have a process instance business key that has the parameter + value as a substring and is described by an expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.property + name = "processDefinitionId" + type = "string" + desc = "Restrict to tasks that belong to a process definition with the given id." /> + + <@lib.property + name = "processDefinitionKey" + type = "string" + desc = "Restrict to tasks that belong to a process definition with the given key." /> + + <@lib.property + name = "processDefinitionKeyIn" + type = "array" + itemType = "string" + desc = "Restrict to tasks that belong to a process definition with one of the given keys. The + keys need to be in a comma-separated list." /> + + <@lib.property + name = "processDefinitionName" + type = "string" + desc = "Restrict to tasks that belong to a process definition with the given name." /> + + <@lib.property + name = "processDefinitionNameLike" + type = "string" + desc = "Restrict to tasks that have a process definition name that has the parameter value as + a substring." /> + + <@lib.property + name = "executionId" + type = "string" + desc = "Restrict to tasks that belong to an execution with the given id." /> + + <@lib.property + name = "caseInstanceId" + type = "string" + desc = "Restrict to tasks that belong to case instances with the given id." /> + + <@lib.property + name = "caseInstanceBusinessKey" + type = "string" + desc = "Restrict to tasks that belong to case instances with the given business key." /> + + <@lib.property + name = "caseInstanceBusinessKeyLike" + type = "string" + desc = "Restrict to tasks that have a case instance business key that has the parameter value + as a substring." /> + + <@lib.property + name = "caseDefinitionId" + type = "string" + desc = "Restrict to tasks that belong to a case definition with the given id." /> + + <@lib.property + name = "caseDefinitionKey" + type = "string" + desc = "Restrict to tasks that belong to a case definition with the given key." /> + + <@lib.property + name = "caseDefinitionName" + type = "string" + desc = "Restrict to tasks that belong to a case definition with the given name." /> + + <@lib.property + name = "caseDefinitionNameLike" + type = "string" + desc = "Restrict to tasks that have a case definition name that has the parameter value as a + substring." /> + + <@lib.property + name = "caseExecutionId" + type = "string" + desc = "Restrict to tasks that belong to a case execution with the given id." /> + + <@lib.property + name = "activityInstanceIdIn" + type = "array" + itemType = "string" + desc = "Only include tasks which belong to one of the passed and comma-separated activity + instance ids." /> + + <@lib.property + name = "tenantIdIn" + type = "array" + itemType = "string" + desc = "Only include tasks which belong to one of the passed and comma-separated + tenant ids." /> + + <@lib.property + name = "withoutTenantId" + type = "boolean" + defaultValue = "false" + desc = "Only include tasks which belong to no tenant. Value may only be `true`, + as `false` is the default behavior." /> + + <@lib.property + name = "assignee" + type = "string" + desc = "Restrict to tasks that the given user is assigned to." /> + + <@lib.property + name = "assigneeExpression" + type = "string" + desc = "Restrict to tasks that the user described by the given expression is assigned to. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.property + name = "assigneeLike" + type = "string" + desc = "Restrict to tasks that have an assignee that has the parameter + value as a substring." /> + + <@lib.property + name = "assigneeLikeExpression" + type = "string" + desc = "Restrict to tasks that have an assignee that has the parameter value described by the + given expression as a substring. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.property + name = "assigneeIn" + type = "array" + itemType = "string" + desc = "Only include tasks which are assigned to one of the passed and comma-separated user ids." /> + + <@lib.property + name = "assigneeNotIn" + type = "array" + itemType = "string" + desc = "Only include tasks which are not assigned to one of the passed and comma-separated user ids." /> + + <@lib.property + name = "owner" + type = "string" + desc = "Restrict to tasks that the given user owns." /> + + <@lib.property + name = "ownerExpression" + type = "string" + desc = "Restrict to tasks that the user described by the given expression owns. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.property + name = "candidateGroup" + type = "string" + desc = "Only include tasks that are offered to the given group." /> + + <@lib.property + name = "candidateGroupLike" + type = "string" + desc = "Only include tasks that are offered to groups that have the parameter value as a substring." /> + + <@lib.property + name = "candidateGroupExpression" + type = "string" + desc = "Only include tasks that are offered to the group described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.property + name = "candidateUser" + type = "string" + desc = "Only include tasks that are offered to the given user or to one of his groups." /> + + <@lib.property + name = "candidateUserExpression" + type = "string" + desc = "Only include tasks that are offered to the user described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.property + name = "includeAssignedTasks" + type = "boolean" + defaultValue = "false" + desc = "Also include tasks that are assigned to users in candidate queries. Default is to only + include tasks that are not assigned to any user if you query by candidate user or + group(s)." /> + + <@lib.property + name = "involvedUser" + type = "string" + desc = "Only include tasks that the given user is involved in. A user is involved in a task if + an identity link exists between task and user (e.g., the user is the assignee)." /> + + <@lib.property + name = "involvedUserExpression" + type = "string" + desc = "Only include tasks that the user described by the given expression is involved in. + A user is involved in a task if an identity link exists between task and user + (e.g., the user is the assignee). See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions." /> + + <@lib.property + name = "assigned" + type = "boolean" + defaultValue = "false" + desc = "If set to `true`, restricts the query to all tasks that are assigned." /> + + <@lib.property + name = "unassigned" + type = "boolean" + defaultValue = "false" + desc = "If set to `true`, restricts the query to all tasks that are unassigned." /> + + <@lib.property + name = "taskDefinitionKey" + type = "string" + desc = "Restrict to tasks that have the given key." /> + + <@lib.property + name = "taskDefinitionKeyIn" + type = "array" + itemType = "string" + desc = "Restrict to tasks that have one of the given keys. The keys need to be in a comma-separated list." /> + + <@lib.property + name = "taskDefinitionKeyNotIn" + type = "array" + itemType = "string" + desc = "Exclude instances by a list of task definition keys. The keys need to be in a comma-separated list." /> + + <@lib.property + name = "taskDefinitionKeyLike" + type = "string" + desc = "Restrict to tasks that have a key that has the parameter value as a substring." /> + + <@lib.property + name = "name" + type = "string" + desc = "Restrict to tasks that have the given name." /> + + <@lib.property + name = "nameNotEqual" + type = "string" + desc = "Restrict to tasks that do not have the given name." /> + + <@lib.property + name = "nameLike" + type = "string" + desc = "Restrict to tasks that have a name with the given parameter value as substring." /> + + <@lib.property + name = "nameNotLike" + type = "string" + desc = "Restrict to tasks that do not have a name with the given parameter + value as substring." /> + + <@lib.property + name = "description" + type = "string" + desc = "Restrict to tasks that have the given description." /> + + <@lib.property + name = "descriptionLike" + type = "string" + desc = "Restrict to tasks that have a description that has the parameter + value as a substring." /> + + <@lib.property + name = "priority" + type = "integer" + format = "int32" + desc = "Restrict to tasks that have the given priority." /> + + <@lib.property + name = "maxPriority" + type = "integer" + format = "int32" + desc = "Restrict to tasks that have a lower or equal priority." /> + + <@lib.property + name = "minPriority" + type = "integer" + format = "int32" + desc = "Restrict to tasks that have a higher or equal priority." /> + + <@lib.property + name = "dueDate" + type = "string" + format = "date-time" + desc = "Restrict to tasks that are due on the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format + `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.546+0200`." /> + + <@lib.property + name = "dueDateExpression" + type = "string" + desc = "Restrict to tasks that are due on the date described by the given expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.property + name = "dueAfter" + type = "string" + format = "date-time" + desc = "Restrict to tasks that are due after the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have + the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.435+0200`." /> + + <@lib.property + name = "dueAfterExpression" + type = "string" + desc = "Restrict to tasks that are due after the date described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.property + name = "dueBefore" + type = "string" + format = "date-time" + desc = "Restrict to tasks that are due before the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have + the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.243+0200`." /> + + <@lib.property + name = "dueBeforeExpression" + type = "string" + desc = "Restrict to tasks that are due before the date described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.property + name = "withoutDueDate" + type = "boolean" + defaultValue = "false" + desc = "Only include tasks which have no due date. Value may only be `true`, + as `false` is the default behavior." /> + + <@lib.property + name = "followUpDate" + type = "string" + format = "date-time" + desc = "Restrict to tasks that have a followUp date on the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date + must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.342+0200`." /> + + <@lib.property + name = "followUpDateExpression" + type = "string" + desc = "Restrict to tasks that have a followUp date on the date described by the given + expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.property + name = "followUpAfter" + type = "string" + format = "date-time" + desc = "Restrict to tasks that have a followUp date after the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have + the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.542+0200`." /> + + <@lib.property + name = "followUpAfterExpression" + type = "string" + desc = "Restrict to tasks that have a followUp date after the date described by the given + expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.property + name = "followUpBefore" + type = "string" + desc = "Restrict to tasks that have a followUp date before the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have + the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.234+0200`." /> + + <@lib.property + name = "followUpBeforeExpression" + type = "string" + desc = "Restrict to tasks that have a followUp date before the date described by the given + expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.property + name = "followUpBeforeOrNotExistent" + type = "string" + format = "date-time" + desc = "Restrict to tasks that have no followUp date or a followUp date before the given date. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have + the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.432+0200`. The typical use case + is to query all `active` tasks for a user for a given date." /> + + <@lib.property + name = "followUpBeforeOrNotExistentExpression" + type = "string" + desc = "Restrict to tasks that have no followUp date or a followUp date before the date + described by the given expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.property + name = "createdOn" + type = "string" + format = "date-time" + desc = "Restrict to tasks that were created on the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must have + the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.324+0200`." /> + + <@lib.property + name = "createdOnExpression" + type = "string" + desc = "Restrict to tasks that were created on the date described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.property + name = "createdAfter" + type = "string" + format = "date-time" + desc = "Restrict to tasks that were created after the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must + have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.342+0200`." /> + + <@lib.property + name = "createdAfterExpression" + type = "string" + desc = "Restrict to tasks that were created after the date described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.property + name = "createdBefore" + type = "string" + format = "date-time" + desc = "Restrict to tasks that were created before the given date. By + [default](${docsUrl}/reference/rest/overview/date-format/), the date must + have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." /> + + <@lib.property + name = "createdBeforeExpression" + type = "string" + desc = "Restrict to tasks that were created before the date described by the given expression. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.property + name = "updatedAfter" + type = "string" + format = "date-time" + desc = "Restrict to tasks that were updated after the given date. Every action that fires + a [task update event](${docsUrl}/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must + have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." /> + + <@lib.property + name = "updatedAfterExpression" + type = "string" + desc = "Restrict to tasks that were updated after the date described by the given expression. Every action that fires + a [task update event](${docsUrl}/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task. + See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to a + `java.util.Date` or `org.joda.time.DateTime` object." /> + + <@lib.property + name = "delegationState" + type = "string" + enumValues = ['"PENDING"', '"RESOLVED"'] + desc = "Restrict to tasks that are in the given delegation state. Valid values are + `PENDING` and `RESOLVED`." /> + + <@lib.property + name = "candidateGroups" + type = "array" + itemType = "string" + desc = "Restrict to tasks that are offered to any of the given candidate groups. Takes a + comma-separated list of group names, so for example + `developers,support,sales`." /> + + <@lib.property + name = "candidateGroupsExpression" + type = "string" + desc = "Restrict to tasks that are offered to any of the candidate groups described by the + given expression. See the + [user guide](${docsUrl}/user-guide/process-engine/expression-language/#internal-context-functions) + for more information on available functions. The expression must evaluate to + `java.util.List` of Strings." /> + + <@lib.property + name = "withCandidateGroups" + type = "boolean" + defaultValue = "false" + desc = "Only include tasks which have a candidate group. Value may only be `true`, + as `false` is the default behavior." /> + + <@lib.property + name = "withoutCandidateGroups" + type = "boolean" + defaultValue = "false" + desc = "Only include tasks which have no candidate group. Value may only be `true`, + as `false` is the default behavior." /> + + <@lib.property + name = "withCandidateUsers" + type = "boolean" + defaultValue = "false" + desc = "Only include tasks which have a candidate user. Value may only be `true`, + as `false` is the default behavior." /> + + <@lib.property + name = "withoutCandidateUsers" + type = "boolean" + defaultValue = "false" + desc = "Only include tasks which have no candidate users. Value may only be `true`, + as `false` is the default behavior." /> + + <@lib.property + name = "active" + type = "boolean" + defaultValue = "false" + desc = "Only include active tasks. Value may only be `true`, as `false` + is the default behavior." /> + + <@lib.property + name = "suspended" + type = "boolean" + defaultValue = "false" + desc = "Only include suspended tasks. Value may only be `true`, as + `false` is the default behavior." /> + + <@lib.property + name = "taskVariables" + type = "array" + dto = "VariableQueryParameterDto" + desc = "A JSON array to only include tasks that have variables with certain values. The + array consists of JSON objects with three properties `name`, `operator` and `value`. + `name` is the variable name, `operator` is the comparison operator to be used and + `value` the variable value. `value` may be of type `String`, `Number` or `Boolean`. + + Valid `operator` values are: + `eq` - equal to; + `neq` - not equal to; + `gt` - greater than; + `gteq` - greater than or equal to; + `lt` - lower than; + `lteq` - lower than or equal to; + `like`. + `key` and `value` may not contain underscore or comma characters." /> + + <@lib.property + name = "processVariables" + type = "array" + dto = "VariableQueryParameterDto" + desc = "A JSON array to only include tasks that belong to a process instance with variables + with certain values. The array consists of JSON objects with three properties + `name`, `operator` and `value`. `name` is the variable name, `operator` is the + comparison operator to be used and `value` the variable value. `value` may be of + type `String`, `Number` or `Boolean`. + + Valid `operator` values are: + `eq` - equal to; + `neq` - not equal to; + `gt` - greater than; + `gteq` - greater than or equal to; + `lt` - lower than; + `lteq` - lower than or equal to; + `like`; + `notLike`. + `key` and `value` may not contain underscore or comma characters." /> + + <@lib.property + name = "caseInstanceVariables" + type = "array" + dto = "VariableQueryParameterDto" + desc = "A JSON array to only include tasks that belong to a case instance with variables + with certain values. The array consists of JSON objects with three properties + `name`, `operator` and `value`. `name` is the variable name, `operator` is the + comparison operator to be used and `value` the variable value. `value` may be of + type `String`, `Number` or `Boolean`. + + Valid `operator` values are: + `eq` - equal to; + `neq` - not equal to; + `gt` - greater than; + `gteq` - greater than or equal to; + `lt` - lower than; + `lteq` - lower than or equal to; + `like`. + `key` and `value` may not contain underscore or comma characters." /> + + <@lib.property + name = "variableNamesIgnoreCase" + type = "boolean" + defaultValue = "false" + desc = "Match all variable names in this query case-insensitively. If set + `variableName` and `variablename` are treated as equal." /> + + <@lib.property + name = "variableValuesIgnoreCase" + type = "boolean" + defaultValue = "false" + desc = "Match all variable values in this query case-insensitively. If set + `variableValue` and `variablevalue` are treated as equal." /> + + <@lib.property + name = "parentTaskId" + type = "string" + desc = "Restrict query to all tasks that are sub tasks of the given task. Takes a task id." /> + + <@lib.property + name = "orQueries" + type = "array" + dto = "TaskQueryDto" + desc = "A JSON array of nested task queries with OR semantics. A task matches a nested query if it fulfills + *at least one* of the query's predicates. With multiple nested queries, a task must fulfill at least one predicate of *each* query ([Conjunctive Normal Form](https://en.wikipedia.org/wiki/Conjunctive_normal_form)). + + All task query properties can be used except for: `sorting`, `withCandidateGroups`, + `withoutCandidateGroups`, `withCandidateUsers`, `withoutCandidateUsers` + + See the [User guide](${docsUrl}/user-guide/process-engine/process-engine-api/#or-queries) + for more information about OR queries." /> + + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": + + <#assign last = true > + <#assign sortByValues = [ '"instanceId"', '"caseInstanceId"', '"dueDate"', '"executionId"', '"caseExecutionId"', + '"assignee"', '"created"', '"lastUpdated"', '"followUpDate"', '"description"', '"id"', '"name"', '"nameCaseInsensitive"', + '"priority"', '"processVariable"', '"executionVariable"', '"taskVariable"', + '"caseExecutionVariable"', '"caseInstanceVariable"' ] > + <#assign sortParamsDto = "SortTaskQueryParametersDto" > + <#include "/lib/commons/sort-props.ftl" > + } + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskWithAttachmentAndCommentDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskWithAttachmentAndCommentDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9e8ecf8b8d585505970220a7ed95cb21775582b0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskWithAttachmentAndCommentDto.ftl @@ -0,0 +1,17 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "TaskWithVariablesDto" > + + <@lib.property + name = "attachment" + type = "boolean" + desc = "Specifies if an attachment exists for the task." /> + + <@lib.property + name = "comment" + type = "boolean" + last = true + desc = "Specifies if an comment exists for the task." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskWithVariablesDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskWithVariablesDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..cc845a9627a25f2b2566f9909a0a10383c585be1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/TaskWithVariablesDto.ftl @@ -0,0 +1,14 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto + extends = "TaskDto" > + + <@lib.property + name = "variables" + type = "object" + additionalProperties = true + dto = "VariableValueDto" + last = true + desc = "Holds the appropriate variables for the task." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/UserIdDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/UserIdDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..585bd2fcc4c12e9bdd5b33683c5a3793f17d179e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/runtime/task/UserIdDto.ftl @@ -0,0 +1,11 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "userId" + type = "string" + last = true + desc = "The id of the user that the current action refers to." /> + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/AbstractVendorVersionInformationDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/AbstractVendorVersionInformationDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..90d78cfd5164db829c2c49f1fb1990db638310bd --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/AbstractVendorVersionInformationDto.ftl @@ -0,0 +1,17 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "vendor" + type = "string" + desc = "Information about the vendor."/> + + <@lib.property + name = "version" + type = "string" + last = true + desc = "Information about the version."/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryConfigurationDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryConfigurationDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7ed0aec9dec5737b348f0152f9d9f364543fa88c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryConfigurationDto.ftl @@ -0,0 +1,12 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "enableTelemetry" + type = "boolean" + last = true + desc = "Specifies if the telemetry data should be sent or not."/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryCountDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryCountDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ef39f09e0cad9fccef6264e34c4a242745aa4b5a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryCountDto.ftl @@ -0,0 +1,13 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "count" + type = "integer" + format = "int64" + last = true + desc = "An integer value representing the count for this metric."/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryDataDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryDataDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..467a70835a63d35a75ed8efa60444c9339285da8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryDataDto.ftl @@ -0,0 +1,22 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "installation" + type = "string" + desc = "An id which is unique for each installation of Camunda. It is stored once per database so all + engines connected to the same database will have the same installation ID. + The ID is used to identify a single installation of Camunda Platform."/> + + <@lib.property + name = "product" + type = "ref" + additionalProperties = false + dto = "TelemetryProductDto" + desc = "Information about the product collection telemetry data." + last = true + /> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryInternalsDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryInternalsDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8cf35d2b72f85f24602224b99afdd7941352655a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryInternalsDto.ftl @@ -0,0 +1,70 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "database" + type = "ref" + additionalProperties = false + dto = "AbstractVendorVersionInformationDto" + desc = "Vendor and version of the connected database."/> + + <@lib.property + name = "application-server" + type = "ref" + additionalProperties = false + dto = "AbstractVendorVersionInformationDto" + desc = "Vendor and version of the application server."/> + + <@lib.property + name = "license-key" + type = "ref" + additionalProperties = false + dto = "TelemetryLicenseKeyDto" + desc = "Information about the Camunda license key."/> + + <@lib.property + name = "camunda-integration" + type = "array" + itemType = "string" + desc = "List of Camunda integrations used (e.g., Camunda Spring Boot Starter, Camunda Run, WildFly/JBoss subsystem, Camunda EJB)."/> + + <@lib.property + name = "commands" + type = "object" + additionalProperties = true + dto = "TelemetryCountDto" + desc = "The count of executed commands after the last retrieved data."/> + + <@lib.property + name = "metrics" + type = "object" + additionalProperties = true + dto = "TelemetryCountDto" + desc = "The collected metrics are the number of root process instance executions started, the number of activity instances started or also known as flow node instances, and the number of executed decision instances and elements."/> + + <@lib.property + name = "webapps" + type = "array" + itemType = "string" + desc = "The webapps enabled in this installation of Camunda."/> + + <@lib.property + name = "jdk" + type = "ref" + additionalProperties = false + dto = "AbstractVendorVersionInformationDto" + desc = "Vendor and version of the installed JDK."/> + + <@lib.property + name = "data-collection-start-date" + type = "string" + format = "date-time" + nullable = false + last = true + desc = "The date when the engine started to collect dynamic data, such as command executions and metrics. If telemetry sending is enabled, dynamic data resets on sending the data to Camunda. + Dynamic data and the date returned by this method are reset in three cases: engine startup, after engine start when sending telemetry data to Camunda is enabled via API, after sending telemetry data to Camunda (only when this was enabled) + The date is in the format YYYY-MM-DD'T'HH:mm:ss.SSSZ."/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryLicenseKeyDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryLicenseKeyDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ff3265dc7d759b03d7dc89928ffdd5fa43e226d6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryLicenseKeyDto.ftl @@ -0,0 +1,39 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "customer" + type = "string" + desc = "The name of the customer the license was issued for."/> + + <@lib.property + name = "type" + type = "string" + desc = "The license type."/> + + <@lib.property + name = "valid-until" + type = "string" + format = "date" + desc = "The expiration date of the license."/> + + <@lib.property + name = "unlimited" + type = "boolean" + desc = "Flag that indicates if the license is unlimited."/> + + <@lib.property + name = "features" + type = "object" + addProperty = "\"additionalProperties\": { \"type\": \"string\"}" + desc = "A map of features included in the license."/> + + <@lib.property + name = "raw" + type = "string" + last = true + desc = "The raw license information."/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryProductDto.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryProductDto.ftl new file mode 100644 index 0000000000000000000000000000000000000000..902b9ebfc250d41e2855f8e1f2070674999e7912 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/dto/telemetry/TelemetryProductDto.ftl @@ -0,0 +1,29 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "name" + type = "string" + desc = "The name of the product (i.e., Camunda BPM Runtime)."/> + + <@lib.property + name = "version" + type = "string" + desc = "The version of the process engine (i.e., 7.X.Y)."/> + + <@lib.property + name = "edition" + type = "string" + desc = "The edition of the product (i.e., either community or enterprise)."/> + + <@lib.property + name = "internals" + type = "ref" + additionalProperties = false + dto = "TelemetryInternalsDto" + last = true + desc = "Internal data and metrics collected by the product."/> + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/security/auth/AuthenticationResult.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/security/auth/AuthenticationResult.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ac81debdff15df83d0b21a7672ffc232ce991ee6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/models/org/camunda/bpm/engine/rest/security/auth/AuthenticationResult.ftl @@ -0,0 +1,34 @@ +<#macro dto_macro docsUrl=""> +<@lib.dto> + + <@lib.property + name = "authenticatedUser" + type = "string" + desc = "An id of authenticated user." + /> + + <@lib.property + name = "authenticated" + type = "boolean" + desc = "A flag indicating if user is authenticated." + /> + + <#-- The tenants and groups properties are always returned as null from the /identity/verify endpoint. + Consider adjusting the description if this dto is used by another endpoint.--> + <@lib.property + name = "tenants" + type = "array" + itemType = "string" + desc = "Will be null." + /> + + <@lib.property + name = "groups" + type = "array" + itemType = "string" + desc = "Will be null." + last = true + /> + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/check/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/check/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6df3f9a5b9d5c7b356e571dfc09665398aebbe51 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/check/get.ftl @@ -0,0 +1,115 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "isUserAuthorized" + tag = "Authorization" + summary = "Perform an Authorization Check" + desc = "Performs an authorization check for the currently authenticated user." + /> + + "parameters" : [ + + <@lib.parameter + name = "permissionName" + location = "query" + type = "string" + required = true + desc = "String value representing the permission name to check for." + /> + + <@lib.parameter + name = "resourceName" + location = "query" + type = "string" + required = true + desc = "String value for the name of the resource to check permissions for." + /> + + <@lib.parameter + name = "resourceType" + location = "query" + type = "integer" + format="int32" + required = true + desc = "An integer representing the resource type to check permissions for. + See the [User Guide](${docsUrl}/user-guide/process-engine/authorization-service/#resources) + for a list of integer representations of resource types." + /> + + <@lib.parameter + name = "resourceId" + location = "query" + type = "string" + desc = "The id of the resource to check permissions for. If left blank, + a check for global permissions on the resource is performed." + /> + + <@lib.parameter + name = "userId" + location = "query" + type = "string" + desc = "The id of the user to check permissions for. The currently authenticated + user must have a READ permission for the Authorization resource. If `userId` is + blank, a check for the currently authenticated user is performed." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "AuthorizationCheckResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/authorization/check?permissionName=READ,resourceName=USER,resourceType=1,resourceId=jonny`", + "value": { + "permissionName": "READ", + "resourceName": "USER", + "resourceId": "jonny", + "authorized": true + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a permission + parameterName is not valid for the provided resourceType. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "401" + dto = "ExceptionDto" + desc = "The user is not authenticated. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "When a `userId` is passed and the user does not possess a READ permission for the + Authorization resource. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Authorization with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ea917ea440219d2cd79a23a284936476f376af66 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/count/get.ftl @@ -0,0 +1,49 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getAuthorizationCount" + tag = "Authorization" + summary = "Get Authorization Count" + desc = "Queries for authorizations using a list of parameters and retrieves the count." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/authorization-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/authorization/count?userIdIn=jonny1,jonny2`", + "value": { + "count": 2 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy` is specified. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/create/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/create/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..25853a194192c90ad687ac1ba74c8b19ea21e416 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/create/post.ftl @@ -0,0 +1,85 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "createAuthorization" + tag = "Authorization" + summary = "Create a New Authorization" + desc = "Creates a new authorization." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "AuthorizationCreateDto" + examples = ['"example-1": { + "summary": "POST `/authorization/create`", + "value": { + "type": 0, + "permissions": [ + "CREATE", + "READ" + ], + "userId": "*", + "groupId": null, + "resourceType": 1, + "resourceId": "*" + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "AuthorizationDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "POST `/authorization/create`", + "value": { + "id":"anAuthorizationId", + "type": 0, + "permissions": ["CREATE", "READ"], + "userId": "*", + "groupId": null, + "resourceType": 1, + "resourceId": "*", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "links":[ + {"method": "GET", "href":"http://localhost:8080/engine-rest/authorization/anAuthorizationId", "rel":"self"}, + {"method": "PUT", "href":"http://localhost:8080/engine-rest/authorization/anAuthorizationId", "rel":"update"}, + {"method": "DELETE", "href":"http://localhost:8080/engine-rest/authorization/anAuthorizationId", "rel":"delete"} + ] + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the properties in the request body are invalid, for example if + a permission parameter is not valid for the provided resourceType. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "The authenticated user is unauthorized to create an instance of this resource. See + the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The authorization could not be updated due to an internal server error. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a31ef8c5ce275a46bd2146e8df7afddebaed8e4a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/get.ftl @@ -0,0 +1,79 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryAuthorizations" + tag = "Authorization" + summary = "Get Authorizations" + desc = "Queries for a list of authorizations using a list of parameters. + The size of the result set can be retrieved by using the + [Get Authorization Count](${docsUrl}/reference/rest/authorization/get-query-count/) method." + /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/authorization-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "AuthorizationDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/authorization?userIdIn=jonny1,jonny2`", + "value": [ + { + "id": "anAuthorizationId", + "type": 0, + "permissions": [ + "ALL" + ], + "userId": "jonny1", + "groupId": null, + "resourceType": 1, + "resourceId": "*" + }, + { + "id": "anotherAuthorizationId", + "type": 0, + "permissions": [ + "CREATE", + "READ" + ], + "userId": "jonny2", + "groupId": null, + "resourceType": 1, + "resourceId": "*", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy` is specified. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/options.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/options.ftl new file mode 100644 index 0000000000000000000000000000000000000000..377a97b7be4bb8f5d5c9f96a534f6e22f36f3bd6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/options.ftl @@ -0,0 +1,51 @@ +<#macro endpoint_macro docsUrl=""> + + <#-- NOTE: Any changes made to this file should be mirrored to the + ./{id}/options.ftl file as well --> +{ + <@lib.endpointInfo + id = "availableOperationsAuthorization" + tag = "Authorization" + summary = "Authorization Resource Options" + desc = "The OPTIONS request allows you to check for the set of available operations that the currently + authenticated user can perform on the `/authorization` resource. Whether the user can perform an operation + or not may depend on various factors, including the users authorizations to interact with this + resource and the internal configuration of the process engine." + /> + + "responses": { + + <@lib.response + code = "200" + dto = "ResourceOptionsDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/authorization`", + "value": { + "links": [ + { + "method":"GET", + "href":"http://localhost:8080/engine-rest/authorization", + "rel":"list" + }, + { + "method":"GET", + "href":"http://localhost:8080/engine-rest/authorization/count", + "rel":"count" + }, + { + "method":"POST", + "href":"http://localhost:8080/engine-rest/authorization/create", + "rel":"create" + } + ] + } + }'] + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3d5e084f2f334aa032050c218a402f6f68b71021 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/{id}/delete.ftl @@ -0,0 +1,50 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteAuthorization" + tag = "Authorization" + summary = "Delete Authorization" + desc = "Deletes an authorization by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the authorization to be deleted." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "If the authenticated user is unauthorized to delete the resource instance. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Authorization cannot be found. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..20ddafc7189fd1ba59b93be6003d8c9a4a208bfa --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/{id}/get.ftl @@ -0,0 +1,61 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getAuthorization" + tag = "Authorization" + summary = "Get Authorization" + desc = "Retrieves an authorization by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the authorization to be retrieved." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "AuthorizationDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/authorization/anAuthorizationId`", + "value": { + "id": "anAuthorizationId", + "type": 0, + "permissions": [ + "CREATE", + "READ" + ], + "userId": "*", + "groupId": null, + "resourceType": 1, + "resourceId": "*", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6" + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Authorization with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/{id}/options.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/{id}/options.ftl new file mode 100644 index 0000000000000000000000000000000000000000..dd0e4552574cbf275e38068e604dd017f669f2d2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/{id}/options.ftl @@ -0,0 +1,64 @@ +<#macro endpoint_macro docsUrl=""> + + <#-- NOTE: Any changes made to this file should be mirrored to the + ../options.ftl file as well --> +{ + <@lib.endpointInfo + id = "availableOperationsAuthorizationInstance" + tag = "Authorization" + summary = "Authorization Resource Options" + desc = "The OPTIONS request allows you to check for the set of available operations that the currently + authenticated user can perform on a given instance of the `/authorization` resource. + Whether the user can perform an operation or not may depend on various factors, including the users + authorizations to interact with this resource and the internal configuration of the process engine." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the authorization to be retrieved." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "ResourceOptionsDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/authorization/anAuthorizationId`", + "value": { + "links": [ + { + "method":"GET", + "href":"http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel":"self" + }, + { + "method":"PUT", + "href":"http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel":"update" + }, + { + "method":"DELETE", + "href":"http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel":"delete" + } + ] + } + }'] + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/{id}/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/{id}/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..749c6e7eb89ee28a4c39c5273d1cf9c7ee9329c5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/authorization/{id}/put.ftl @@ -0,0 +1,80 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "updateAuthorization" + tag = "Authorization" + summary = "Update an Authorization" + desc = "Updates an authorization by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the authorization to be updated." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "AuthorizationUpdateDto" + examples = ['"example-1": { + "summary": "PUT `/authorization/anAuthorizationId`", + "value": { + "permissions": 16, + "userId": "*", + "groupId": null, + "resourceType": 1, + "resourceId": "*" + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the properties in the request body are invalid, for example if + a permission parameter is not valid for the provided resourceType. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "The authenticated user is unauthorized to update this resource. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "The authorization with the requested Id cannot be found." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The authorization could not be updated due to an internal server error. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1c766d79ecb1c27fddfa92c8c61515f3f4caa412 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/count/get.ftl @@ -0,0 +1,45 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getBatchesCount" + tag = "Batch" + summary = "Get List Count" + desc = "Requests the number of batches that fulfill the query criteria. + Takes the same filtering parameters as the [Get Batches](${docsUrl}/reference/rest/batch/get-query/) method." /> + + "parameters" : [ + + <#assign requestMethod="GET"/> + <#include "/lib/commons/batch.ftl" > + + <@lib.parameters + object = params + last = true /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/batch/count?type=aBatchType`", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1283c6ef30f5d7a2c9bf480e427ba2a72fa568a6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/get.ftl @@ -0,0 +1,63 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getBatches" + tag = "Batch" + summary = "Get List" + desc = "Queries for batches that fulfill given parameters. Parameters may be the properties of batches, such as the id or type. + The size of the result set can be retrieved by using the + [Get Batch Count](${docsUrl}/reference/rest/batch/get-query-count/) method." /> + + "parameters" : [ + + <#assign requestMethod="GET"/> + <#include "/lib/commons/batch.ftl" > + + <#assign last = false > + <#include "/lib/commons/sort-params.ftl" > + + <#include "/lib/commons/pagination-params.ftl" > + + <@lib.parameters + object = params + last = true /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "BatchDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "description": "Response for GET `/batch?type=aBatchType&sortBy=batchId&sortOrder=asc`", + "value": [{ + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspended": false, + "tenantId": "aTenantId", + "createUserId": "aUserId" + }] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, + for example if a `sortOrder` parameter is supplied, but no `sortBy`. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/statistics/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/statistics/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7acd58a464716819d6d8dc1354e28f59a72498b9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/statistics/count/get.ftl @@ -0,0 +1,46 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getBatchStatisticsCount" + tag = "Batch" + summary = "Get Statistics Count" + desc = "Requests the number of batch statistics that fulfill the query criteria. + Takes the same filtering parameters as the + [Get Batch Statistics](${docsUrl}/reference/rest/batch/get-statistics-query/) method." /> + + "parameters" : [ + + <#assign requestMethod="GET"/> + <#include "/lib/commons/batch.ftl" > + + <@lib.parameters + object = params + last = true /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/batch/count?type=aBatchType`", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/statistics/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/statistics/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..26723eed1626e7cffbdcff182364975c7efb712e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/statistics/get.ftl @@ -0,0 +1,67 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getBatchStatistics" + tag = "Batch" + summary = "Get Statistics" + desc = "Queries for batch statistics that fulfill given parameters. + Parameters may be the properties of batches, such as the id or type. + The size of the result set can be retrieved by using the + [Get Batch Statistics Count](${docsUrl}/reference/rest/batch/get-statistics-query-count/) method." /> + + "parameters" : [ + + <#assign requestMethod="GET"/> + <#include "/lib/commons/batch.ftl" > + + <#assign last = false > + <#include "/lib/commons/sort-params.ftl" > + + <#include "/lib/commons/pagination-params.ftl" > + + <@lib.parameters + object = params + last = true /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "BatchStatisticsDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "description": "Response for GET `/batch/statistics?type=aBatchType&sortBy=batchId&sortOrder=asc`", + "value": [{ + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "remainingJobs": 3, + "completedJobs": 7, + "failedJobs": 1, + "suspended": false, + "tenantId": "aTenantId", + "createUserId": "aUserId" + }] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, + for example if a `sortOrder` parameter is supplied, but no `sortBy`. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ca480107e1dc635b4ee4c2dc169e0f3d011faf47 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/{id}/delete.ftl @@ -0,0 +1,43 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "deleteBatch" + tag = "Batch" + summary = "Delete" + desc = "Deletes a batch by id, including all related jobs and job definitions. + Optionally also deletes the batch history." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the batch to be deleted." /> + + <@lib.parameter + name = "cascade" + location = "query" + type = "boolean" + last = true + desc = "`true`, if the historic batch and historic job logs for this batch should also be deleted."/> + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Batch with given id does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..fb2e23add7c2f980e799cbab4cf27afe313a333e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/{id}/get.ftl @@ -0,0 +1,55 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getBatch" + tag = "Batch" + summary = "Get" + desc = "Retrieves a batch by id, according to the Batch interface in the engine." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the batch to be retrieved." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "description": "Response for GET `/batch/aBatchId`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspended": false, + "tenantId": "aTenantId", + "createUserId": "aUserId" + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Batch with given id does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/{id}/suspended/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/{id}/suspended/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..716a4d32a2999ab4adcc46ee93e535ed66b188d9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/batch/{id}/suspended/put.ftl @@ -0,0 +1,46 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "updateBatchSuspensionState" + tag = "Batch" + summary = "Activate/Suspend" + desc = "Activates or suspends a batch by id." /> + + "parameters" : [ + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the batch to activate or suspend."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "SuspensionStateDto" + examples = ['"example-1": { + "summary": "PUT `/batch/aBatch/suspended`", + "value": { + "suspended" : true + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if the batch cannot be suspended or activated. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/condition/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/condition/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c3265a491ae082bd1e567fad8921225bd6b9a4e4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/condition/post.ftl @@ -0,0 +1,76 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "evaluateCondition" + tag = "Condition" + summary = "Evaluate" + desc = "Triggers evaluation of conditions for conditional start event(s). + Internally this maps to the engines condition evaluation builder method ConditionEvaluationBuilder#evaluateStartConditions(). + For more information see the [Conditional Start Events](${docsUrl}/reference/bpmn20/events/conditional-events/#conditional-start-event) + section of the [BPMN 2.0 Implementation Reference](${docsUrl}/reference/bpmn20/)." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "EvaluationConditionDto" + examples = ['"example-1": { + "summary": "POST /condition", + "description": "The content of the Request Body", + "value": { + "variables" : { + "temperature" : {"value" : 24, "type": "Integer", + "valueInfo" : { "transient" : true } }, + "city" : {"value" : "Parma", "type": "String"} + }, + "businessKey" : "aBusinessKey", + "tenantId" : "aTenantId" + } + }']/> + + "responses": { + <@lib.response + code = "200" + dto = "ProcessInstanceDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": [{ + "links": [], + "id": "aProcInstId", + "definitionId": "aProcDefId", + "definitionKey": "aProcDefKey", + "businessKey": "aBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": "aTenantId" + }, + { + "links": [], + "id": "anotherId", + "definitionId": "aProcDefId", + "definitionKey": "aProcDefKey", + "businessKey": "aBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": aTenantId + }] + }']/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "If both tenantId and withoutTenantId are supplied."/> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + last = true + desc = "If the user is not allowed to start the process instance of the process definition, which start condition was evaluated to `true`."/> + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a38c1c646858358b8b77884e3654dc62a1316601 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/count/get.ftl @@ -0,0 +1,42 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionDefinitionsCount" + tag = "Decision Definition" + summary = "Get List Count" + desc = "Requests the number of decision definitions that fulfill the query criteria. + Takes the same filtering parameters as the + [Get Decision Definition](${docsUrl}/reference/rest/decision-definition/get-query/) method." /> + + "parameters" : [ + + <#assign requestMethod="GET"/> + <#include "/lib/commons/decision-definition.ftl" > + + <@lib.parameters + object = params + last = true /> + + ], + "responses" : { + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/count?key=dish-decision&version=2`", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ee5cb64a94c65609c1fb58fc750d0bcb39938086 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/get.ftl @@ -0,0 +1,64 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionDefinitions" + tag = "Decision Definition" + summary = "Get List" + desc = "Queries for decision definitions that fulfill given parameters. + Parameters may be the properties of decision definitions, such as the name, key or version. + The size of the result set can be retrieved by using + the [Get Decision Definition Count](${docsUrl}/reference/rest/decision-definition/get-query-count/) method." /> + + "parameters" : [ + + <#assign requestMethod="GET"/> + <#include "/lib/commons/decision-definition.ftl" > + + <#assign last = false > + <#include "/lib/commons/sort-params.ftl" > + + <#include "/lib/commons/pagination-params.ftl" > + + <@lib.parameters + object = params + last = true /> + + ], + "responses" : { + <@lib.response + code = "200" + dto = "DecisionDefinitionDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition?key=dish-decision&sortBy=category&sortOrder=asc`", + "value": [ + { + "id": "dish-decision:1:c633e8a8-41b7-11e6-b0ef-00aa004d0001", + "key": "dish-decision", + "category": "http://camunda.org/schema/1.0/dmn", + "name": "Dish Decision", + "version": 1, + "resource": "drd-dish-decision.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionId":"dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionKey":"dish", + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5 + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, + for example if a `sortOrder` parameter is supplied, but no `sortBy`. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/diagram/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/diagram/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..dbe3f3012c1c4858993ccb04db6123acefaf146c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/diagram/get.ftl @@ -0,0 +1,58 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getDecisionDefinitionDiagramByKey" + tag = "Decision Definition" + summary = "Get Diagram By Key" + desc = "Returns the diagram for the latest version of the decision definition which belongs to no tenant" /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the decision definition (the latest version thereof) to be retrieved."/> + ], + + "responses" : { + + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + + <@lib.response + code = "204" + desc = "The decision definition doesn't have an associated diagram." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given key does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/evaluate/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/evaluate/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..12e6fff471b28f0b14850860272d0fdfd2a070c1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/evaluate/post.ftl @@ -0,0 +1,60 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "evaluateDecisionByKey" + tag = "Decision Definition" + summary = "Evaluate By Key" + desc = "Evaluates the latest version of the decision definition which belongs to no tenant. + The input values of the decision have to be supplied in the request body." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the decision definition (the latest version thereof) to be evaluated." /> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "EvaluateDecisionDto" + examples = [ '"example-1": { + "summary": "POST /decision-definition/key/aKey/evaluate", + "value": { + "variables" : { + "amount" : { "value" : 600, "type" : "Double" }, + "invoiceCategory" : { "value" : "Misc", "type" : "String" } + } + } + }' + ] /> + + "responses" : { + <@lib.response + code = "200" + dto = "VariableValueDto" + array = true + additionalProperties = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/decision-definition/key/aKey/evaluate`", + "value": [ + { + "result": { "value" : "management", "type" : "String", "valueInfo" : null } + } + ] + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given key does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..343a6703f144b409f2cd286f67044b713cae9171 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/get.ftl @@ -0,0 +1,53 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionDefinitionByKey" + tag = "Decision Definition" + summary = "Get Decision Definition By Key" + desc = "Retrieves the latest version of the decision definition which belongs to no tenant." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the decision definition (the latest version thereof) to be retrieved." /> + + + ], + "responses" : { + <@lib.response + code = "200" + dto = "DecisionDefinitionDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/key/dish-decision`", + "value": { + "id": "aDecisionDefinitionId", + "key": "dish-decision", + "category": "http://camunda.org/schema/1.0/dmn", + "name": "Dish Decision", + "version": 1, + "resource": "drd-dish-decision.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionId":"dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionKey":"dish", + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5 + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given key does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/history-time-to-live/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/history-time-to-live/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0c47863587927757da6168dff1efb486c5c6e5ec --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/history-time-to-live/put.ftl @@ -0,0 +1,57 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "updateHistoryTimeToLiveByDecisionDefinitionKey" + tag = "Decision Definition" + summary = "Update History Time to Live By Key" + desc = "Updates the latest version of the decision definition which belongs to no tenant. + The field is used within [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup)." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the decision definitions to change history time to live."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoryTimeToLiveDto" + examples = ['"example-1": { + "summary": "PUT `/decision-definition/key/aKey/history-time-to-live`", + "value": { + "historyTimeToLive" : 5 + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the request parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given key does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/diagram/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/diagram/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ed50b49cd807c708a117f3a3e50f8c56e272486a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/diagram/get.ftl @@ -0,0 +1,65 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getDecisionDefinitionDiagramByKeyAndTenant" + tag = "Decision Definition" + summary = "Get Diagram By Key And Tenant" + desc = "Returns the XML of the latest version of the decision definition for tenant." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the decision definition (the latest version thereof) to be retrieved."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the decision definition belongs to." /> + ], + + "responses" : { + + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + + <@lib.response + code = "204" + desc = "The decision definition doesn't have an associated diagram." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given key does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/evaluate/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/evaluate/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..82021ad89d3fda05ddfe02aca79821e4a9cc55d7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/evaluate/post.ftl @@ -0,0 +1,68 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "evaluateDecisionByKeyAndTenant" + tag = "Decision Definition" + summary = "Evaluate By Key And Tenant" + desc = "Evaluates the latest version of the decision definition for tenant. + The input values of the decision have to be supplied in the request body." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the decision definition (the latest version thereof) to be evaluated." /> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the decision definition belongs to." /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "EvaluateDecisionDto" + examples = [ '"example-1": { + "summary": "POST /decision-definition/key/aKey/tenand-id/aTenantId/evaluate", + "value": { + "variables" : { + "amount" : { "value" : 600, "type" : "Double" }, + "invoiceCategory" : { "value" : "Misc", "type" : "String" } + } + } + }' + ] /> + + "responses" : { + <@lib.response + code = "200" + dto = "VariableValueDto" + array = true + additionalProperties = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/decision-definition/akey/aKey/tenand-id/aTenantId/evaluate`", + "value": [ + { + "result": { "value" : "management", "type" : "String", "valueInfo" : null } + } + ] + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given key does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d1c08d71b05703794712c52553742015db99a3c4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/get.ftl @@ -0,0 +1,60 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionDefinitionByKeyAndTenantId" + tag = "Decision Definition" + summary = "Get Decision Definition By Key And Tenant Id" + desc = "Retrieves the latest version of the decision definition for tenant" /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the decision definition (the latest version thereof) to be retrieved." /> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the decision definition belongs to." /> + + + ], + "responses" : { + <@lib.response + code = "200" + dto = "DecisionDefinitionDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/key/dish-decision/tenant-id/aTenantId`", + "value": { + "id": "aDecisionDefinitionId", + "key": "dish-decision", + "category": "http://camunda.org/schema/1.0/dmn", + "name": "Dish Decision", + "version": 1, + "resource": "drd-dish-decision.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionId":"dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionKey":"dish", + "tenantId": aTenantId, + "versionTag": null, + "historyTimeToLive": 5 + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given key does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/history-time-to-live/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/history-time-to-live/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9751a76a3b9b9abdb357de2a464570c320e1cf79 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/history-time-to-live/put.ftl @@ -0,0 +1,67 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "updateHistoryTimeToLiveByDecisionDefinitionKeyAndTenant" + tag = "Decision Definition" + summary = "Update History Time to Live By Key And Tenant" + desc = "Updates the latest version of the decision definition for tenant. + The field is used within [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup). + The value of the update is mandatory by default and does not allow `null` values. To enable them, please + set the feature flag `enforceHistoryTimeToLive` to `false`. Read more in [Configuration Properties] + (${docsUrl}/reference/deployment-descriptors/tags/process-engine#configuration-properties)" /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the decision definitions to change history time to live."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the decision definition belongs to." /> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoryTimeToLiveDto" + examples = ['"example-1": { + "summary": "PUT `/decision-definition/key/aKey/tenant-id/aTenantId/history-time-to-live`", + "value": { + "historyTimeToLive" : 5 + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the request parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given key does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/xml/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/xml/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2bb433a5965e1dce6a6cdbcbb28ec19123ed1b14 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/tenant-id/{tenant-id}/xml/get.ftl @@ -0,0 +1,66 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionDefinitionDmnXmlByKeyAndTenant" + tag = "Decision Definition" + summary = "Get XML By Key and Tenant" + desc = "Retrieves the XML of the latest version of the decision definition for tenant" /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the decision definition (the latest version thereof)." /> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the decision definition belongs to." /> + + + ], + "responses" : { + <@lib.response + code = "200" + dto = "DecisionDefinitionDiagramDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/key/aKey/tenant-id/aTenantId/xml`", + "value": { + "id": "aDecisionDefinitionId", + "dmnXml": " + + + + + + + + \\"not okay\\" + + + + + " + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given key does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/xml/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/xml/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..bd150c7e52640d24ad44cf455fcd7c475646ca9a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/key/{key}/xml/get.ftl @@ -0,0 +1,59 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionDefinitionDmnXmlByKey" + tag = "Decision Definition" + summary = "Get XML By Key" + desc = "Retrieves the XML for the latest version of the decision definition which belongs to no tenant." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the decision definition (the latest version thereof)." /> + + + ], + "responses" : { + <@lib.response + code = "200" + dto = "DecisionDefinitionDiagramDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/key/aKey/xml`", + "value": { + "id": "aDecisionDefinitionId", + "dmnXml": " + + + + + + + + \\"not okay\\" + + + + + " + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given key does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/diagram/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/diagram/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..bc011f06bde1bcd003ae20983d29979672292bca --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/diagram/get.ftl @@ -0,0 +1,58 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getDecisionDefinitionDiagram" + tag = "Decision Definition" + summary = "Get Diagram" + desc = "Retrieves the diagram of a decision definition." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process definition."/> + ], + + "responses" : { + + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + + <@lib.response + code = "204" + desc = "The decision definition doesn't have an associated diagram." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/evaluate/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/evaluate/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5a766c31388c93e981c99ac98664c2a73f1c13e4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/evaluate/post.ftl @@ -0,0 +1,60 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "evaluateDecisionById" + tag = "Decision Definition" + summary = "Evaluate By Id" + desc = "Evaluates a given decision and returns the result. + The input values of the decision have to be supplied in the request body." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the decision definition to be evaluated." /> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "EvaluateDecisionDto" + examples = [ '"example-1": { + "summary": "POST /decision-definition/aDecisionDefinitionId/evaluate", + "value": { + "variables" : { + "amount" : { "value" : 600, "type" : "Double" }, + "invoiceCategory" : { "value" : "Misc", "type" : "String" } + } + } + }' + ] /> + + "responses" : { + <@lib.response + code = "200" + dto = "VariableValueDto" + array = true + additionalProperties = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/decision-definition/aDecisionDefinitionId/evaluate`", + "value": [ + { + "result": { "value" : "management", "type" : "String", "valueInfo" : null } + } + ] + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given id does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8a26b92c3185c1535cbaf0b50b986f52940ad1fb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/get.ftl @@ -0,0 +1,53 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionDefinitionById" + tag = "Decision Definition" + summary = "Get Decision Definition By Id" + desc = "Retrieves a decision definition by id, according to the `DecisionDefinition` interface in the engine." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the decision definition to be retrieved." /> + + + ], + "responses" : { + <@lib.response + code = "200" + dto = "DecisionDefinitionDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/aDecisionDefinitionId`", + "value": { + "id": "aDecisionDefinitionId", + "key": "dish-decision", + "category": "http://camunda.org/schema/1.0/dmn", + "name": "Dish Decision", + "version": 1, + "resource": "drd-dish-decision.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionId":"dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionKey":"dish", + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5 + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given id does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/history-time-to-live/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/history-time-to-live/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e4a648b4e70320ed27c117169ea26db58a6b6c7a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/history-time-to-live/put.ftl @@ -0,0 +1,57 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "updateHistoryTimeToLiveByDecisionDefinitionId" + tag = "Decision Definition" + summary = "Update History Time to Live" + desc = "Updates history time to live for decision definition. + The field is used within [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup)." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the decision definition to change history time to live."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoryTimeToLiveDto" + examples = ['"example-1": { + "summary": "PUT `/decision-definition/aDecisionDefinitionId/history-time-to-live`", + "value": { + "historyTimeToLive" : 5 + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the request parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/xml/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/xml/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7f3a130261464db468078604c2c9a7b9c89c1f7a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-definition/{id}/xml/get.ftl @@ -0,0 +1,59 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionDefinitionDmnXmlById" + tag = "Decision Definition" + summary = "Get XML By Id" + desc = "Retrieves the DMN XML of a decision definition." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the decision definition." /> + + + ], + "responses" : { + <@lib.response + code = "200" + dto = "DecisionDefinitionDiagramDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/aDecisionDefinitionId/xml`", + "value": { + "id": "aDecisionDefinitionId", + "dmnXml": " + + + + + + + + \\"not okay\\" + + + + + " + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Decision definition with given id does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..931f3a30f9fdfeee36c1faf982b393e0f7868453 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/count/get.ftl @@ -0,0 +1,54 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionRequirementsDefinitionsCount" + tag = "Decision Requirements Definition" + summary = "Get Decision Requirements Definition Count" + desc = "Requests the number of decision requirements definitions that fulfill the query + criteria. + Takes the same filtering parameters as the + [Get Decision Requirements Definitions](${docsUrl}/reference/rest/decision-requirements-definition/get-query/) + method." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/decision-requirements-definition.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/decision-requirements-definition/count?key=dish`", + "description": "GET `/decision-requirements-definition/count?key=dish`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if + a `sortOrder` parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d264e1621e98f5df5a34bc8f51251cfbcd7f0a57 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/get.ftl @@ -0,0 +1,67 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionRequirementsDefinitions" + tag = "Decision Requirements Definition" + summary = "Get Decision Requirements Definitions" + desc = "Queries for decision requirements definitions that fulfill given parameters. + Parameters may be the properties of decision requirements definitions, such as the name, + key or version. The size of the result set can be retrieved by using the + [Get Decision Requirements Definition Count](${docsUrl}/reference/rest/decision-requirements-definition/get-query-count/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/decision-requirements-definition.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "DecisionRequirementsDefinitionDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/decision-requirements-definition?key=dish&sortBy=version&sortOrder=asc`", + "description": "GET `/decision-requirements-definition?key=dish&sortBy=version&sortOrder=asc`", + "value": [ + { + "id": "dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "key": "dish", + "category": "drd-test", + "name": "Dish", + "version": 1, + "resource": "dish.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "tenantId": null + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if + a `sortOrder` parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/diagram/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/diagram/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..693113b224d8c6aac627ab0ff76198316f99ccde --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/diagram/get.ftl @@ -0,0 +1,73 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-diagram/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionRequirementsDefinitionDiagramByKey" + tag = "Decision Requirements Definition" + summary = "Get Decision Requirements Diagram by Key" + desc = "Retrieves the diagram of a decision requirements definition. + Returns the diagram for the latest version of the decision requirements + definition which belongs to no tenant." + /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the decision requirements definition (the latest version thereof) to be + retrieved." + last = true + /> + + ], + + "responses": { + + <@lib.multiTypeResponse + code = "200" + types = [ + { + "binary": true, + "mediaType": "image/*", + "examples": ['"example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/diagram`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/diagram`", + "value": "" + }'] + }, + { + "binary": true, + "mediaType": "application/octet-stream", + "examples": ['"example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/diagram`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/diagram`", + "value": "" + }'] + } + ] + desc = "The image diagram of the decision requirements definition." + /> + + <@lib.response + code = "204" + desc = "The decision requirements definition doesn't have an associated diagram. This + method returns no content." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Decision requirements definition with given id or key does not + exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3c4bf17b668a75740bf8915dcd3fd9d67c4e6b7b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/get.ftl @@ -0,0 +1,62 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionRequirementsDefinitionByKey" + tag = "Decision Requirements Definition" + summary = "Get Decision Requirements Definition by Key" + desc = "Retrieves a decision requirements definition according to the + `DecisionRequirementsDefinition` interface in the engine. + Returns the latest version of the decision requirements definition + which belongs to no tenant." + /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the decision requirements definition (the latest version thereof) to be retrieved." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "DecisionRequirementsDefinitionDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey`", + "description": "GET `/decision-requirements-definition/key/invoiceKey`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "key": "invoiceKey", + "category": "invoice", + "name": "receiptInvoice", + "version": 2, + "resource": "invoice.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "tenantId": null + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Decision requirements definition with given id or key does not + exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}/diagram/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}/diagram/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..309726b55d9d48c4ed1840161534b07c56e6ec41 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}/diagram/get.ftl @@ -0,0 +1,81 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-diagram/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionRequirementsDefinitionDiagramByKeyAndTenantId" + tag = "Decision Requirements Definition" + summary = "Get Decision Requirements Diagram by Key and Tenant ID" + desc = "Retrieves the diagram of a decision requirements definition. + Returns the diagram of the latest version of the decision requirements + definition for a tenant." + /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the decision requirements definition (the latest version thereof) to be + retrieved." + /> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant to which the decision requirements definition belongs to." + last = true + /> + + ], + + "responses": { + + <@lib.multiTypeResponse + code = "200" + types = [ + { + "binary": true, + "mediaType": "image/*", + "examples": ['"example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/diagram`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/diagram`", + "value": "" + }'] + }, + { + "binary": true, + "mediaType": "application/octet-stream", + "examples": ['"example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/diagram`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/diagram`", + "value": "" + }'] + } + ] + desc = "The image diagram of the decision requirements definition." + /> + + <@lib.response + code = "204" + desc = "The decision requirements definition doesn't have an associated diagram. This + method returns no content." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Decision requirements definition with given id or key does not + exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..87e42d6ec9ffaf55d1afaed56e93298fa0050d23 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}/get.ftl @@ -0,0 +1,70 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionRequirementsDefinitionByKeyAndTenantId" + tag = "Decision Requirements Definition" + summary = "Get Decision Requirements Definition by Key and Tenant ID" + desc = "Retrieves a decision requirements definition according to the + `DecisionRequirementsDefinition` interface in the engine. + Returns the latest version of the decision requirements definition + for a tenant." + /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the decision requirements definition (the latest version thereof) to be retrieved." + /> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant to which the decision requirements definition belongs to." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "DecisionRequirementsDefinitionDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey`/tenant-id/tenantA", + "description": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "key": "invoiceKey", + "category": "invoice", + "name": "receiptInvoice", + "version": 2, + "resource": "invoice.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "tenantId": "tenantA" + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Decision requirements definition with given id or key does not + exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}/xml/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}/xml/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..730000aa2484d5f066d02d21e5212b0fa8761828 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}/xml/get.ftl @@ -0,0 +1,67 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-xml/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionRequirementsDefinitionDmnXmlByKeyAndTenantId" + tag = "Decision Requirements Definition" + summary = "Get DMN XML by Key and Tenant ID" + desc = "Retrieves the DMN XML of a decision requirements definition. + Returns the XML of the latest version of the decision requirements + definition for a tenant." + /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the decision requirements definition (the latest version thereof) to be + retrieved." + /> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant to which the decision requirements definition belongs to." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "DecisionRequirementsDefinitionXmlDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/xml`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/xml`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "dmnXml": "..." + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = " + Decision requirements definition with given id or key does not + exist. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/xml/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/xml/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d23d743eedd300f8ba26ca00a575a8a0ff87a1a2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/key/{key}/xml/get.ftl @@ -0,0 +1,59 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-xml/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionRequirementsDefinitionDmnXmlByKey" + tag = "Decision Requirements Definition" + summary = "Get DMN XML by Key" + desc = "Retrieves the DMN XML of a decision requirements definition. + Returns the XML for the latest version of the decision requirements + definition which belongs to no tenant." + /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the decision requirements definition (the latest version thereof) to be + retrieved." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "DecisionRequirementsDefinitionXmlDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/xml`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/xml`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "dmnXml": "..." + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = " + Decision requirements definition with given id or key does not + exist. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/{id}/diagram/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/{id}/diagram/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..848297ad5f8219c0c7498a798d86f6bb7b49cfa3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/{id}/diagram/get.ftl @@ -0,0 +1,71 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-diagram/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionRequirementsDefinitionDiagramById" + tag = "Decision Requirements Definition" + summary = "Get Decision Requirements Diagram by ID" + desc = "Retrieves the diagram of a decision requirements definition." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the decision requirements definition." + last = true + /> + + ], + + "responses": { + + <@lib.multiTypeResponse + code = "200" + types = [ + { + "binary": true, + "mediaType": "image/*", + "examples": ['"example-1": { + "summary": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/diagram`", + "description": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/diagram`", + "value": "" + }'] + }, + { + "binary": true, + "mediaType": "application/octet-stream", + "examples": ['"example-1": { + "summary": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/diagram`", + "description": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/diagram`", + "value": "" + }'] + } + ] + desc = "The image diagram of the decision requirements definition." + + /> + + <@lib.response + code = "204" + desc = "The decision requirements definition doesn't have an associated diagram. This + method returns no content." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Decision requirements definition with given id or key does not + exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5b1f87be9f2cffc76cdf9edf16d56713f9759377 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/{id}/get.ftl @@ -0,0 +1,60 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionRequirementsDefinitionById" + tag = "Decision Requirements Definition" + summary = "Get Decision Requirements Definition by ID" + desc = "Retrieves a decision requirements definition according to the + `DecisionRequirementsDefinition` interface in the engine." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the decision requirements definition to be retrieved." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "DecisionRequirementsDefinitionDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c`", + "description": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "key": "invoiceKey", + "category": "invoice", + "name": "receiptInvoice", + "version": 2, + "resource": "invoice.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "tenantId": null + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Decision requirements definition with given id or key does not + exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/{id}/xml/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/{id}/xml/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ea378c3ebc1fea2579931a07cf326aa615d22bf9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/decision-requirements-definition/{id}/xml/get.ftl @@ -0,0 +1,53 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-xml/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionRequirementsDefinitionDmnXmlById" + tag = "Decision Requirements Definition" + summary = "Get DMN XML by ID" + desc = "Retrieves the DMN XML of a decision requirements definition." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the decision requirements definition." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "DecisionRequirementsDefinitionXmlDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/xml`", + "description": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/xml`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "dmnXml": "..." + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Decision requirements definition with given id or key does not + exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5615d331fca32cabacfabd9a297b74fffc10f2a2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/count/get.ftl @@ -0,0 +1,42 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getDeploymentsCount" + tag = "Deployment" + summary = "Get List Count" + desc = "Queries for the number of deployments that fulfill given parameters. Takes the same parameters as the + [Get Deployments](${docsUrl}/reference/rest/deployment/get-query/) method." /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/deployment-query-params.ftl" > + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/deployment/count?name=deploymentName`", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, for example, if an invalid operator for variable + comparison is used. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/create/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/create/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7d569f05a0ef0c30bb01fb946b36e8eeaa12bf20 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/create/post.ftl @@ -0,0 +1,108 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "createDeployment" + tag = "Deployment" + summary = "Create" + desc = "Creates a deployment. + + **Security Consideration** + + Deployments can contain custom code in form of scripts or EL expressions to customize process behavior. + This may be abused for remote execution of arbitrary code." /> + + <@lib.requestBody + mediaType = "multipart/form-data" + dto = "MultiFormDeploymentDto" /> + + "responses": { + + <@lib.response + code = "200" + dto = "DeploymentWithDefinitionsDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/deployment/create`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/deployment/aDeploymentId", + "rel": "self" + } + ], + "id": "aDeploymentId", + "name": "aName", + "source": "process application", + "deploymentTime": "2013-01-23T13:59:43.000+0200", + "tenantId": null, + "deployedProcessDefinitions": { + "aProcDefId": { + "id": "aProcDefId", + "key": "aKey", + "category": "aCategory", + "description": "aDescription", + "name": "aName", + "version": 42, + "resource": "aResourceName", + "deploymentId": "aDeploymentId", + "diagram": "aResourceName.png", + "suspended": true, + "tenantId": null, + "versionTag": null + } + }, + "deployedCaseDefinitions": null, + "deployedDecisionDefinitions": null, + "deployedDecisionRequirementsDefinitions": null + } + }' + ] /> + + <@lib.response + code = "400" + dto = "ParseExceptionDto" + last = true + desc = "Bad Request. In case one of the bpmn resources cannot be parsed. + + See the [Introduction](${docsUrl}/reference/rest/overview/#parse-exceptions) for + the error response format." + examples = ['"example-1": { + "summary": "GET /deployment?name=deploymentName", + "value": { + "type": "ParseException", + "message": "ENGINE-09005 Could not parse BPMN process. Errors: Exclusive Gateway \'ExclusiveGateway_1\' has outgoing sequence flow \'SequenceFlow_0\' without condition which is not the default flow.", + "details": { + "invoice.bpmn": { + "errors": [ + { + "message": "Exclusive Gateway \'ExclusiveGateway_1\' has outgoing sequence flow \'SequenceFlow_0\' without condition which is not the default flow.", + "line": 77, + "column": 15, + "mainBpmnElementId": "ExclusiveGateway_1", + "bpmnElementIds": [ + "ExclusiveGateway_1", + "SequenceFlow_0" + ] + } + ], + "warnings": [ + { + "message": "It is not recommended to use a cancelling boundary timer event with a time cycle.", + "line": 87, + "column": 20, + "mainBpmnElementId": "BoundaryEvent_1", + "bpmnElementIds": [ + "BoundaryEvent_1" + ] + } + ] + } + } + } + }' + ] /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..82af1b9c5b015e65263ee9a8afcd23d4aa8a3ecc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/get.ftl @@ -0,0 +1,58 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getDeployments" + tag = "Deployment" + summary = "Get List" + desc = "Queries for deployments that fulfill given parameters. Parameters may be the properties of deployments, + such as the id or name or a range of the deployment time. The size of the result set can be retrieved by + using the [Get Deployment count](${docsUrl}/reference/rest/deployment/get-query-count/) method." /> + + "parameters" : [ + + <#assign last = false > + + <#include "/lib/commons/deployment-query-params.ftl" > + + <#assign sortByValues = [ '"id"', '"name"', '"deploymentTime"', '"tenantId"' ] > + <#include "/lib/commons/sort-params.ftl" > + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "DeploymentDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/deployment?name=deploymentName`", + "value": [ + { + "id": "someId", + "name": "deploymentName", + "source": "process application", + "tenantId": null, + "deploymentTime": "2013-04-23T13:42:43.000+0200" + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, + but no `sortBy`, or if an invalid operator for variable comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/registered/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/registered/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a96ac403cbce816aba03d745927843b6eddd0704 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/registered/get.ftl @@ -0,0 +1,30 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getRegisteredDeployments" + tag = "Deployment" + summary = "Get Registered Deployments" + desc = "Queries the registered deployment IDs for the current application." /> + + "responses" : { + <@lib.response + code = "200" + mediaType = "application/json" + flatType="string" + array = true + last = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": [ + "deploymentId1", + "deploymentId2", + "deploymentId3" + ] + }'] /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..fb9e9fab91fd92b395147700ba6ab846af3b50eb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/delete.ftl @@ -0,0 +1,61 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "deleteDeployment" + tag = "Deployment" + summary = "Delete" + desc = "Deletes a deployment by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the deployment to be deleted." /> + + <@lib.parameter + name = "cascade" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "`true`, if all process instances, historic process instances and jobs for this deployment + should be deleted." /> + + <@lib.parameter + name = "skipCustomListeners" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "`true`, if only the built-in ExecutionListeners should be notified with the end event." /> + + <@lib.parameter + name = "skipIoMappings" + location = "query" + type = "boolean" + defaultValue = 'false' + last = true + desc = "`true`, if all input/output mappings should not be invoked." /> + + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "A Deployment with the provided id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3beb62d5f0195fdbbd674a5af19a959f1531f414 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/get.ftl @@ -0,0 +1,49 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getDeployment" + tag = "Deployment" + summary = "Get" + desc = "Retrieves a deployment by id, according to the `Deployment` interface of the engine." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the deployment." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "DeploymentDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/deployments/someDeploymentId`", + "value": { + "id": "someDeploymentId", + "name": "deploymentName", + "source": "process application", + "deploymentTime": "2013-04-23T13:42:43.000+0200" + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Deployment with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/redeploy/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/redeploy/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..56704224826af87bf38651d01f9f412a4fb723ce --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/redeploy/post.ftl @@ -0,0 +1,97 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "redeploy" + tag = "Deployment" + summary = "Redeploy" + desc = "Re-deploys an existing deployment. + + The deployment resources to re-deploy can be restricted by using the properties `resourceIds` or + `resourceNames`. If no deployment resources to re-deploy are passed then all existing resources of the + given deployment are re-deployed. + + **Warning**: Deployments can contain custom code in form of scripts or EL expressions to customize + process behavior. This may be abused for remote execution of arbitrary code. See the section on + [security considerations for custom code](${docsUrl}/user-guide/process-engine/securing-custom-code/) in + the user guide for details." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the deployment to re-deploy." /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "RedeploymentDto" + examples = ['"example-1": { + "summary": "POST `/deployment/anDeploymentId/redeploy`", + "value": { + "resourceIds": [ "aResourceId" ], + "resourceNames": [ "aResourceName" ], + "source" : "cockpit" + } + }'] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "DeploymentWithDefinitionsDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/deployment/aDeploymentId", + "rel": "self" + } + ], + "id": "aDeploymentId", + "name": "aName", + "source": "cockpit", + "deploymentTime": "2015-10-13T13:59:43.000+0200", + "tenantId": null, + "deployedProcessDefinitions": { + "aProcDefId": { + "id": "aProcDefId", + "key": "aKey", + "category": "aCategory", + "description": "aDescription", + "name": "aName", + "version": 42, + "resource": "aResourceName", + "deploymentId": "aDeploymentId", + "diagram": "aResourceName.png", + "suspended": true, + "tenantId": null, + "versionTag": null + } + }, + "deployedCaseDefinitions": null, + "deployedDecisionDefinitions": null, + "deployedDecisionRequirementsDefinitions": null + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Deployment or a deployment resource for the given deployment does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/resources/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/resources/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f5311785222662516afb9d2629f8eaa9b8d7184a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/resources/get.ftl @@ -0,0 +1,56 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getDeploymentResources" + tag = "Deployment" + summary = "Get Resources" + desc = "Retrieves all deployment resources of a given deployment." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the deployment to retrieve the deployment resources for." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "DeploymentResourceDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/deployment/anDeploymentId/resources`", + "value": [ + { + "id": "anResourceId", + "name": "anResourceName", + "deploymentId": "anDeploymentId" + }, + { + "id": "anotherResourceId", + "name": "anotherResourceName", + "deploymentId": "anDeploymentId" + } + ] + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Deployment resources for the given deployment do not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/resources/{resourceId}/data/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/resources/{resourceId}/data/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8db97c2a56d395fac0d1764d40d8e222730c0b20 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/resources/{resourceId}/data/get.ftl @@ -0,0 +1,63 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getDeploymentResourceData" + tag = "Deployment" + summary = "Get Resource (Binary)" + desc = "Retrieves the binary content of a deployment resource for the given deployment by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the deployment." /> + + <@lib.parameter + name = "resourceId" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the deployment resource." /> + + ], + + "responses" : { + + "200": { + "description": "Request successful. The media type of the response depends on the filename.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For files without any MIME type information, a byte stream is returned." + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information are returned as the saved type. For example, a + `process.bpmn` resource will have the media type `application/xml`." + } + } + } + }, + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Deployment Resource with given resource id or deployment id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/resources/{resourceId}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/resources/{resourceId}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e361dba29764a3d50fca1b3ef2faee75cf059e9c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/deployment/{id}/resources/{resourceId}/get.ftl @@ -0,0 +1,55 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getDeploymentResource" + tag = "Deployment" + summary = "Get Resource" + desc = "Retrieves a deployment resource by resource id for the given deployment." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the deployment" /> + + <@lib.parameter + name = "resourceId" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the deployment resource" /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "DeploymentResourceDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/deployments/someDeploymentId/resources/someResourceId`", + "value": { + "id": "someResourceId", + "name": "someResourceName", + "deploymentId": "someDeploymentId" + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Deployment Resource with given resource id or deployment id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/engine/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/engine/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..01c925e52652c509176102c9f346a3b32575b165 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/engine/get.ftl @@ -0,0 +1,30 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getProcessEngineNames" + tag = "Engine" + summary = "Get List" + desc = "Retrieves the names of all process engines available on your platform. + **Note**: You cannot prepend `/engine/{name}` to this method." /> + + "responses" : { + <@lib.response + code = "200" + dto = "ProcessEngineDto" + array = true + last=true + desc = "Request successful." + examples = ['"example-1": { + "value": [ + { + "name": "default" + }, + { + "name": "anotherEngineName" + } + ] + }'] /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/event-subscription/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/event-subscription/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ba0e753e35823a465ba7ccc1b2e9640dbc661fbc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/event-subscription/count/get.ftl @@ -0,0 +1,42 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getEventSubscriptionsCount" + tag = "Event Subscription" + summary = "Get List Count" + desc = "Queries for the number of event subscriptions that fulfill given parameters. + Takes the same parameters as the + [Get Event Subscriptions](${docsUrl}/reference/rest/event-subscription/get-query/) method." /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/event-subscription-query-params.ftl" > + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/event-subscription/count`", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/event-subscription/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/event-subscription/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0ffc5186b1ab99cc5d753dd7141204e16a7c50fb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/event-subscription/get.ftl @@ -0,0 +1,67 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getEventSubscriptions" + tag = "Event Subscription" + summary = "Get List" + desc = "Queries for event subscriptions that fulfill given parameters. + The size of the result set can be retrieved by using the + [Get Event Subscriptions count](${docsUrl}/reference/rest/event-subscription/get-query-count/) method." /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/event-subscription-query-params.ftl" > + + <#assign sortByValues = ['"created"', '"tenantId"']> + <#include "/lib/commons/sort-params.ftl" > + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + ], + + "responses" : { + <@lib.response + code = "200" + dto = "EventSubscriptionDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/event-subscription?eventType=message&sortBy=created&sortOrder=desc`", + "value": [ + { + "id":"anId", + "eventType":"message", + "eventName":"anEventName", + "executionId":"anExecutionId", + "processInstanceId":"aProcessInstanceId", + "activityId":"anActivityId", + "createdDate":"2020-04-20T15:23:12.229+0200", + "tenantId":null + }, + { + "id":"anotherId", + "eventType":"message", + "eventName":"anotherEventName", + "executionId":"anotherExecutionId", + "processInstanceId":"anotherProcessInstanceId", + "activityId":"anotherActivityId", + "createdDate":"2020-04-20T15:20:12.229+0200", + "tenantId":null + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid, + for example if a `sortOrder` parameter is supplied, but no `sortBy`. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format."/> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0eadfbecdf724cab54823a79fe4d9c0454681837 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/count/get.ftl @@ -0,0 +1,52 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/get-query-count/index.html --> +{ + <@lib.endpointInfo + id = "getExecutionsCount" + tag = "Execution" + summary = "Get Execution Count" + desc = "Queries for the number of executions that fulfill given parameters. + Takes the same parameters as the [Get + Executions](${docsUrl}/reference/rest/execution/get-query/) method." + /> + + "parameters" : [ + + <#assign last = true > + <#assign requestMethod="GET"/> + <#include "/lib/commons/execution-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "description": "GET `/execution/count?variables=myVariable_eq_camunda`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if an invalid operator + for variable comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..731e369b1f2be4116a50cdef6e9940a59f973d69 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/count/post.ftl @@ -0,0 +1,65 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/post-query-count/index.html --> +{ + <@lib.endpointInfo + id = "queryExecutionsCount" + tag = "Execution" + summary = "Get Execution Count (POST)" + desc = "Queries for the number of executions that fulfill given parameters. This method + takes the same message body as the [Get Executions + POST](${docsUrl}/reference/rest/execution/post-query/) method and + therefore it is slightly more powerful than the [Get Execution + Count](${docsUrl}/reference/rest/execution/get-query-count/) method." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "ExecutionQueryDto" + examples = ['"example-1": { + "summary": "POST `/execution/count`", + "value": { + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "processDefinitionId": "aProcessDefinitionId" + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "description": "POST `/execution/count`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if an invalid operator + for variable comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8b57ba3497516f32ba1f705f6b671498fca9c71b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/get.ftl @@ -0,0 +1,66 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/get-query/index.html --> +{ + <@lib.endpointInfo + id = "getExecutions" + tag = "Execution" + summary = "Get Executions" + desc = "Queries for the executions that fulfill given parameters. + Parameters may be static as well as dynamic runtime properties of + executions. + The size of the result set can be retrieved by using the [Get + Execution Count](${docsUrl}/reference/rest/execution/get-query-count/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#assign requestMethod="GET"/> + <#include "/lib/commons/execution-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "ExecutionDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/execution?variables=myVariable_eq_camunda`", + "value": [ + { + "id": "anId", + "processInstanceId": "aProcInstId", + "ended": false, + "tenantId": null + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`, or if an invalid operator + for variable comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..43d0fbd3a4d3befd531a685caa99d59407a069fe --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/post.ftl @@ -0,0 +1,91 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/post-query/index.html --> +{ + <@lib.endpointInfo + id = "queryExecutions" + tag = "Execution" + summary = "Get Executions (POST)" + desc = "Queries for executions that fulfill given parameters through a JSON object. + This method is slightly more powerful than the [Get + Executions](${docsUrl}/reference/rest/execution/get-query/) method + because it allows + to filter by multiple instance and execution variables of types + `String`, `Number` or `Boolean`." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "ExecutionQueryDto" + examples = ['"example-1": { + "summary": "POST `/execution`", + "value": { + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "processDefinitionId": "aProcessDefinitionId", + "sorting": [ + { + "sortBy": "definitionKey", + "sortOrder": "asc" + }, + { + "sortBy": "instanceId", + "sortOrder": "desc" + } + ] + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "ExecutionDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "POST `/execution`", + "value": [ + { + "id": "anId", + "processInstanceId": "aProcInstId", + "ended": false, + "tenantId": null + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`, or if an invalid operator + for variable comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/create-incident/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/create-incident/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ab2e5d284feeff0f82d7ee93bbdf7106ab8c43a1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/create-incident/post.ftl @@ -0,0 +1,76 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/post-create-incident/index.html --> +{ + <@lib.endpointInfo + id = "createIncident" + tag = "Execution" + summary = "Create Incident" + desc = "Creates a custom incident with given properties." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the execution to create a new incident for." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "CreateIncidentDto" + examples = ['"example-1": { + "summary": "POST `/execution/anExecutionId/create-incident`", + "value": { + "incidentType": "aType", + "configuration": "aConfiguration" + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "IncidentDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "POST `/execution/anExecutionId/create-incident`", + "value": { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecutionId", + "incidentTimestamp": "2014-03-01T08:00:00.000+0200", + "incidentType": "failedJob", + "activityId": "serviceTask", + "failedActivityId": "serviceTask", + "causeIncidentId": "aCauseIncidentId", + "rootCauseIncidentId": "aRootCauseIncidentId", + "configuration": "aConfiguration", + "tenantId": null, + "incidentMessage": "anIncidentMessage", + "jobDefinitionId": "aJobDefinitionId" + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if the incident type is null, the execution does not exist or the + execution is not related to any activity." + last = true + /> + + } + +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3566ef9310f6c5f8074df5aad93abc47ec948232 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/get.ftl @@ -0,0 +1,54 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/get/index.html --> +{ + <@lib.endpointInfo + id = "getExecution" + tag = "Execution" + summary = "Get Execution" + desc = "Retrieves an execution by id, according to the `Execution` interface in the + engine." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the execution to be retrieved." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "ExecutionDto" + desc = "Request successful." + examples = ['"example-1": { + "description": "GET `/execution/anExecutionId`", + "value": { + "id": "anExecutionId", + "processInstanceId": "aProcInstId", + "ended": false, + "tenantId": null + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Execution with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..b867ddd2e418c90b548ceac85f170d85e4fafea0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/get.ftl @@ -0,0 +1,99 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/local-variables/get-local-variables/index.html --> +{ + <@lib.endpointInfo + id = "getLocalExecutionVariables" + tag = "Execution" + summary = "Get Local Execution Variables" + desc = "Retrieves all variables of a given execution by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the execution to retrieve the variables from." + /> + + <@lib.parameter + name = "deserializeValues" + location = "query" + type = "boolean" + desc = "Determines whether serializable variable values (typically + variables that store custom Java objects) should be deserialized + on server side (default `true`). + + If set to `true`, a serializable variable will be deserialized on + server side and transformed to JSON using + [Jackson's](https://github.com/FasterXML/jackson) POJO/bean + property introspection feature. Note that this requires the Java + classes of the variable value to be on the REST API's classpath. + + If set to `false`, a serializable variable will be returned in its + serialized format. For example, a variable that is serialized as + XML will be returned as a JSON string containing XML. + + **Note:** While `true` is the default value for reasons of + backward compatibility, we recommend setting this parameter to + `false` when developing web applications that are independent of + the Java process applications deployed to the engine." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + additionalProperties = true + dto = "VariableValueDto" + desc = "Request successful. Returns A JSON object of variables key-value pairs. Each key is a variable name and each value a VariableValueDto" + examples = ['"example-1": { + "summary": "GET `/execution/anExecutionId/localVariables`", + "description": "GET `/execution/anExecutionId/localVariables`", + "value": { + "aVariableKey": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }, + "example-2": { + "summary": "GET `/execution/anExecutionId/localVariables?deserializeValues=false`", + "description": "GET `/execution/anExecutionId/localVariables?deserializeValues=false`", + "value": { + "aVariableKey": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }'] + /> + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "Execution with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9ecad14710ebdeb342c5dd990b2ecc45719ba1ed --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/post.ftl @@ -0,0 +1,77 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/local-variables/post-local-variables/index.html --> +{ + <@lib.endpointInfo + id = "modifyLocalExecutionVariables" + tag = "Execution" + summary = "Update/Delete Local Execution Variables" + desc = "Updates or deletes the variables in the context of an execution by id. The updates + do not propagate upwards in the execution hierarchy. + Updates precede deletions. So, if a variable is updated AND deleted, + the deletion overrides the update." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the execution to set variables for." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "PatchVariablesDto" + examples = ['"example-1": { + "summary": "POST `/execution/anExecutionId/localVariables`", + "value": { + "modifications": { + "aVariable": { + "value": "aValue", + "type": "String" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + }, + "deletions": [ + "aThirdVariable", + "FourthVariable" + ] + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable value or type is invalid, for example if the value could not be parsed + to an Integer value or the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "Update or delete could not be executed, for example because the execution does not + exist." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/data/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/data/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f4e0ce025da807d3792f9f71ff732ea42fe917c6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/data/get.ftl @@ -0,0 +1,92 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/local-variables/get-local-variable-binary/index.html --> +{ + <@lib.endpointInfo + id = "getLocalExecutionVariableBinary" + tag = "Execution" + summary = "Get Local Execution Variable (Binary)" + desc = "Retrieves a binary variable from the context of a given execution by id. Does not + traverse the parent execution hierarchy. Applicable for byte array and + file variables." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the execution to retrieve the variable from." + /> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + desc = "The name of the variable to get." + last = true + /> + + ], + + "responses": { + + "200": { + "description": "Request successful. + For binary variables or files without any MIME type information, a byte stream is returned. + File variables with MIME type information are returned as the saved type. + Additionally, for file variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1" :{ + "summary": "binary variable: Status 200", + "value": "Content-Type: application/octet-stream" + } + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type. + Additionally, for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1" :{ + "summary": "file variable: Status 200", + "value": "Content-Type: text/plain; charset=UTF-8. Content-Disposition: attachment; filename=\"someFile.txt\"" + } + } + } + } + }, + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Variable instance with given id exists but is not a binary variable. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Variable instance with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/data/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/data/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c256f0c171e3ae2b499af13a1d6a65ef91795a5a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/data/post.ftl @@ -0,0 +1,124 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/local-variables/put-local-variable-binary/index.html --> +{ + <@lib.endpointInfo + id = "setLocalExecutionVariableBinary" + tag = "Execution" + summary = "Post Local Execution Variable (Binary)" + desc = "Sets the serialized value for a binary variable or the binary value for a file + variable in the context of a given execution by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the execution to set the variable for." + /> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + desc = "The name of the variable to set." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "multipart/form-data" + dto = "MultiFormVariableBinaryDto" + examples = [ + '"example-1": { + "summary": "Post binary content of a byte array variable", + "description": "POST /execution/anExecutionId/localVariables/aVarName/data", + "value": " + ``` + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y + Content-Disposition: form-data; name=\\"data\\"; filename=\\"unspecified\\" + Content-Type: application/octet-stream + Content-Transfer-Encoding: binary + + <> + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y + Content-Disposition: form-data; name=\\"valueType\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + Bytes + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y-- + ``` + " + }', + '"example-2": { + "summary": "Post the JSON serialization of a Java Class **(deprecated)**", + "description": "POST /execution/anExecutionId/localVariables/aVarName/data", + "value": " + ``` + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y + Content-Disposition: form-data; name=\\"data\\" + Content-Type: application/json; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + [\\"foo\\", \\"bar\\"] + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y + Content-Disposition: form-data; name=\\"type\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + java.util.ArrayList + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y-- + ``` + " + }', + '"example-3": { + "summary": "Post a text file", + "description": "POST /execution/anExecutionId/localVariables/aVarName/data", + "value": " + ``` + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y + Content-Disposition: form-data; name=\\"data\\"; filename=\\"myFile.txt\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: binary + + <> + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y + Content-Disposition: form-data; name=\\"valueType\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + File + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y-- + ``` + " + }' + + + ] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable value or type is invalid, for example if no filename is set. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2f63c4ad40c193b88cbb744b152195ce33c6a975 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/delete.ftl @@ -0,0 +1,44 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/local-variables/delete-local-variable/index.html --> +{ + <@lib.endpointInfo + id = "deleteLocalExecutionVariable" + tag = "Execution" + summary = "Delete Local Execution Variable" + desc = "Deletes a variable in the context of a given execution by id. Deletion does not + propagate upwards in the execution hierarchy." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the execution to delete the variable from." + /> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + desc = "The name of the variable to delete." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..99acb975358589d02f7604ec3ad6c985bb462adf --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/get.ftl @@ -0,0 +1,104 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/local-variables/get-local-variable/index.html --> +{ + <@lib.endpointInfo + id = "getLocalExecutionVariable" + tag = "Execution" + summary = "Get Local Execution Variable" + desc = "Retrieves a variable from the context of a given execution by id. Does not traverse + the parent execution hierarchy." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the execution to retrieve the variable from." + /> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + desc = "The name of the variable to get." + /> + + <@lib.parameter + name = "deserializeValue" + location = "query" + type = "boolean" + desc = "Determines whether serializable variable values (typically + variables that store custom Java objects) should be deserialized + on server side (default `true`). + + If set to `true`, a serializable variable will be deserialized on + server side and transformed to JSON using + [Jackson's](https://github.com/FasterXML/jackson) POJO/bean + property introspection feature. Note that this requires the Java + classes of the variable value to be on the REST API's classpath. + If set to `false`, a serializable variable will be returned in its + serialized format. For example, a variable that is serialized as + XML will be returned as a JSON string containing XML. + + **Note:** While `true` is the default value for reasons of + backward compatibility, we recommend setting this parameter to + `false` when developing web applications that are independent of + the Java process applications deployed to the engine." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "VariableValueDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/execution/anExecutionId/localVariables/aVarName`", + "description": "GET `/execution/anExecutionId/localVariables/aVarName`", + "value": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }, + "example-2": { + "summary": "GET `/execution/anExecutionId/localVariables/aVarName?deserializeValue=false`", + "description": "GET `/execution/anExecutionId/localVariables/aVarName?deserializeValue=false`", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + '] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Variable with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1518ced005a727b2e8b5c647c174d09e763ed521 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/localVariables/{varName}/put.ftl @@ -0,0 +1,75 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/local-variables/put-local-variable/index.html --> +{ + <@lib.endpointInfo + id = "putLocalExecutionVariable" + tag = "Execution" + summary = "Put Local Execution Variable" + desc = "Sets a variable in the context of a given execution by id. Update does not + propagate upwards in the execution hierarchy." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the execution to set the variable for." + /> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + desc = "The name of the variable to set." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "VariableValueDto" + examples = ['"example-1": { + "summary": "PUT `/execution/anExecutionId/localVariables/aVarName`", + "value": { + "value": "someValue", + "type": "String" + } + }, + "example-2":{ + "summary": "PUT `/execution/anExecutionId/localVariables/aVarName`", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable value or type is invalid, for example if the value could not be parsed + to an Integer value or the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/messageSubscriptions/{messageName}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/messageSubscriptions/{messageName}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..02394a0e980cab00549140f98f205c372b0322aa --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/messageSubscriptions/{messageName}/get.ftl @@ -0,0 +1,69 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/message-event-subscription/get-message-subscription/index.html --> +{ + <@lib.endpointInfo + id = "getMessageEventSubscription" + tag = "Execution" + summary = "Get Message Event Subscription" + desc = "Retrieves a message event subscription for a given execution by id and a message + name." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the execution that holds the subscription." + /> + + <@lib.parameter + name = "messageName" + location = "path" + type = "string" + required = true + desc = "The name of the message that the subscription corresponds to." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "EventSubscriptionDto" + desc = "Request successful." + examples = ['"example-1": { + "description": "GET `/execution/anExecutionId/messageSubscriptions/someMessage`", + "value": { + "id": "anEventSubscriptionId", + "eventType": "message", + "eventName": "anEvent", + "executionId": "anExecutionId", + "processInstanceId": "aProcInstId", + "activityId": "anActivity", + "tenantId": null, + "createdDate": "2013-01-23T13:59:43.000+0200" + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "A message subscription for the given name and execution does not exist. + This may either mean that the execution does not exist, or that + it is not subscribed on such a message. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/messageSubscriptions/{messageName}/trigger/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/messageSubscriptions/{messageName}/trigger/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..63d072cfa54c8c2372a11beac8e1ffbc503ddafe --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/messageSubscriptions/{messageName}/trigger/post.ftl @@ -0,0 +1,83 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/message-event-subscription/post-message/index.html --> +{ + <@lib.endpointInfo + id = "triggerEvent" + tag = "Execution" + summary = "Trigger Message Event Subscription" + desc = "Delivers a message to a specific execution by id, to trigger an existing message + event subscription. Inject process variables as the message's + payload." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the execution to submit the message to." + /> + + <@lib.parameter + name = "messageName" + location = "path" + type = "string" + required = true + desc = "The name of the message that the addressed subscription corresponds to." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "ExecutionTriggerDto" + examples = ['"example-1": { + "summary": "POST `/execution/anExecutionId/messageSubscriptions/someMessage/trigger`", + "value": { + "variables": { + "aVariable": { + "value": true, + "type": "Boolean" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + } + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable value or type is invalid, for example if the value could not be parsed + to an Integer value or the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The addressed execution has no pending message subscriptions for the given message. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/signal/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/signal/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..fdb6f8f75a2030319f30e31f1380b99a72453dd1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/execution/{id}/signal/post.ftl @@ -0,0 +1,64 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/execution/post-signal/index.html --> +{ + <@lib.endpointInfo + id = "signalExecution" + tag = "Execution" + summary = "Trigger Execution" + desc = "Signals an execution by id. Can for example be used to explicitly skip user tasks + or signal asynchronous continuations." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the execution to signal." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "ExecutionTriggerDto" + examples = ['"example-1": { + "summary": "POST `/execution/{id}/signal`", + "value": { + "variables": { + "myVariable": { + "value": "camunda", + "type": "String" + }, + "mySecondVariable": { + "value": 124, + "type": "Integer" + } + } + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable value or type is invalid, for example if the value could not be parsed + to an Integer value or the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..24df766ec67d9dfe7b3aea5a5cf15e1a5f912f8a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/count/get.ftl @@ -0,0 +1,42 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getExternalTasksCount" + tag = "External Task" + summary = "Get List Count" + desc = "Queries for the number of external tasks that fulfill given parameters. Takes the same parameters as the + [Get External Tasks](${docsUrl}/reference/rest/external-task/get-query/) method." /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/external-task-query-params.ftl" > + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /external-task/count?topicName=aTopic", + "value": { + "count": 42 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2540451ca2004defb7bdfd5dc377fcaa3a440d83 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/count/post.ftl @@ -0,0 +1,46 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "queryExternalTasksCount" + tag = "External Task" + summary = "Get List Count (POST)" + desc = "Queries for the number of external tasks that fulfill given parameters. This method takes the same message + body as the [Get External Tasks (POST)](${docsUrl}/reference/rest/external-task/post-query/) method." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "ExternalTaskQueryDto" + examples = ['"example-1": { + "summary": "POST /external-task/count", + "value": { + "topicName": "aTopicName", + "withRetriesLeft": true + } + }'] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/fetchAndLock/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/fetchAndLock/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ab52d521f4f5808a9777e9794a741b537a5f0391 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/fetchAndLock/post.ftl @@ -0,0 +1,247 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "fetchAndLock" + tag = "External Task" + summary = "Fetch and Lock" + desc = "Fetches and locks a specific number of external tasks for execution by a worker. Query can be restricted + to specific task topics and for each task topic an individual lock time can be provided." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "FetchExternalTasksDto" + examples = ['"example-1": { + "summary": "POST /external-task/fetchAndLock (1)", + "description": "Request with variable filtering", + "value": { + "workerId": "aWorkerId", + "maxTasks": 2, + "usePriority": true, + "topics": [ + { + "topicName": "createOrder", + "lockDuration": 10000, + "variables": [ + "orderId" + ] + } + ] + } + }', + '"example-2": { + "summary": "POST /external-task/fetchAndLock (2)", + "description": "Request with all variables included", + "value": { + "workerId": "aWorkerId", + "maxTasks": 2, + "usePriority": true, + "topics": [ + { + "topicName": "createOrder", + "lockDuration": 10000, + "processDefinitionId": "aProcessDefinitionId", + "tenantIdIn": "tenantOne" + } + ] + } + }', + '"example-3": { + "summary": "POST /external-task/fetchAndLock (3)", + "description": "Request with includeExtensionProperties", + "value": { + "workerId":"aWorkerId", + "maxTasks":1, + "usePriority":true, + "topics": + [{"topicName": "createOrder", + "lockDuration": 10000, + "includeExtensionProperties": true + }] + } + }', + '"example-4": { + "summary": "POST /external-task/fetchAndLock (4)", + "description": "Request with order by priority & createTime", + "value": { + "workerId": "aWorkerId", + "maxTasks": 2, + "usePriority": true, + "sorting": [ + { + "sortBy":"createTime", + "sortOrder":"asc" + } + ] + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "LockedExternalTaskDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST /external-task/fetchAndLock (1)", + "description": "Request with variable filtering", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "workerId": "aWorkerId", + "priority": 4, + "topicName": "createOrder", + "variables": { + "orderId": { + "type": "String", + "value": "1234", + "valueInfo": {} + } + } + }, + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anotherErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "workerId": "aWorkerId", + "priority": 0, + "topicName": "createOrder", + "variables": { + "orderId": { + "type": "String", + "value": "3456", + "valueInfo": {} + } + }, + "extensionProperties": { + "key": "value" + } + } + ] + }', + '"example-2": { + "summary": "POST /external-task/fetchAndLock (2)", + "description": "Request with all variables included", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.00+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": "tenantOne", + "retries": 3, + "workerId": "aWorkerId", + "priority": 4, + "topicName": "createOrder", + "businessKey": "aBusinessKey", + "variables": { + "orderId": { + "type": "String", + "value": "1234", + "valueInfo": {} + } + } + }, + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anotherErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "workerId": "aWorkerId", + "priority": 0, + "topicName": "createOrder", + "businessKey": "aBusinessKey", + "variables": { + "orderId": { + "type": "String", + "value": "3456", + "valueInfo": {} + } + } + } + ] + }', + '"example-3": { + "summary": "POST /external-task/fetchAndLock (3)", + "description": "Request with includeExtensionProperties", + "value": [{ + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "retries": null, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "createOrder", + "tenantId": null, + "variables": {}, + "priority": 0, + "businessKey": "default", + "extensionProperties": { + "property2": "value2", + "property1": "value1" + } + } + ] + }' + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c3c8cb27183480b4c1d12022e376ba139e2f280c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/get.ftl @@ -0,0 +1,88 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getExternalTasks" + tag = "External Task" + summary = "Get List" + desc = "Queries for the external tasks that fulfill given parameters. Parameters may be static as well as dynamic + runtime properties of executions. The size of the result set can be retrieved by using the + [Get External Task Count](${docsUrl}/reference/rest/external-task/get-query-count/) method." /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/external-task-query-params.ftl" > + + <#assign sortByValues = [ '"id"', '"lockExpirationTime"', '"processInstanceId"', '"processDefinitionId"', + '"processDefinitionKey"', '"taskPriority"', '"tenantId"' ] > + <#include "/lib/commons/sort-params.ftl" > + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ExternalTaskDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /external-task?topicName=aTopic", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "aTopic", + "priority": 9, + "businessKey": "aBusinessKey" + }, + { + "activityId": "anotherActivityId", + "activityInstanceId": "anotherActivityInstanceId", + "errorMessage": "anotherErrorMessage", + "executionId": "anotherExecutionId", + "id": "anotherExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "anotherProcessDefinitionId", + "processDefinitionKey": "anotherProcessDefinitionKey", + "processInstanceId": "anotherProcessInstanceId", + "tenantId": null, + "retries": 1, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "aTopic", + "priority": 3, + "businessKey": "aBusinessKey" + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, + but no `sortBy`. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3e73481429f61a27fd8a3b3103c46031a75c4602 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/post.ftl @@ -0,0 +1,107 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "queryExternalTasks" + tag = "External Task" + summary = "Get List (POST)" + desc = "Queries for external tasks that fulfill given parameters in the form of a JSON object. + + This method is slightly more powerful than the + [Get External Tasks](${docsUrl}/reference/rest/external-task/get-query/) method because it allows to + specify a hierarchical result sorting." /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "ExternalTaskQueryDto" + examples = ['"example-1": { + "summary": "POST /external-task", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "sorting": [ + { + "sortBy": "processDefinitionKey", + "sortOrder": "asc" + }, + { + "sortBy": "lockExpirationTime", + "sortOrder": "desc" + }, + { + "sortBy": "createTime", + "sortOrder": "asc" + } + ] + } + }'] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "ExternalTaskDto" + array = true + desc = "Request successful. The Response is a JSON array of external task objects." + examples = ['"example-1": { + "summary": "Status 200 Response", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "aTopic", + "priority": 9, + "businessKey": "aBusinessKey" + }, + { + "activityId": "anotherActivityId", + "activityInstanceId": "anotherActivityInstanceId", + "errorMessage": "anotherErrorMessage", + "executionId": "anotherExecutionId", + "id": "anotherExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "anotherProcessDefinitionKey", + "processInstanceId": "anotherProcessInstanceId", + "tenantId": null, + "retries": 1, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "aTopic", + "priority": 3, + "businessKey": "aBusinessKey" + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, + but no `sortBy`. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/retries-async/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/retries-async/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..aba69c01d5a77795f3d8a4e37539e8fc0797867a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/retries-async/post.ftl @@ -0,0 +1,69 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "setExternalTaskRetriesAsyncOperation" + tag = "External Task" + summary = "Set Retries Async" + desc = "Sets the number of retries left to execute external tasks by id asynchronously. If retries are set to 0, + an incident is created." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "SetRetriesForExternalTasksDto" + examples = ['"example-1": { + "summary": "POST /external-task/retries-async", + "value": { + "retries": 123, + "externalTaskIds": [ + "anExternalTask", + "anotherExternalTask" + ] + } + }'] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "If neither externalTaskIds nor externalTaskQuery are present or externalTaskIds contains null value or + the number of retries is negative or null, an exception of type `InvalidRequestException` is returned. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, + e.g., due to a caught BPMN boundary event. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/retries/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/retries/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d134432564c2f1b524a14e548d55870ef9375bdf --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/retries/put.ftl @@ -0,0 +1,50 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "setExternalTaskRetries" + tag = "External Task" + summary = "Set Retries Sync" + desc = "Sets the number of retries left to execute external tasks by id synchronously. If retries are set to 0, + an incident is created." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "SetRetriesForExternalTasksDto" + examples = ['"example-1": { + "summary": "PUT /external-task/retries", + "value": { + "retries": 123, + "externalTaskIds": [ + "anExternalTask", + "anotherExternalTask" + ] + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "In case the number of retries is negative or null, an exception of type `InvalidRequestException` is + returned. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, + e.g., due to a caught BPMN boundary event. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/topic-names/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/topic-names/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0053835c17a570bbc884c081dbb25dc721b7b7bc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/topic-names/get.ftl @@ -0,0 +1,64 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getTopicNames" + tag = "External Task" + summary = "Get External Task Topic Names" + desc = "Queries for distinct topic names of external tasks that fulfill given parameters. + Query can be restricted to only tasks with retries left, tasks that are locked, or tasks + that are unlocked. The parameters withLockedTasks and withUnlockedTasks are + exclusive. Setting them both to true will return an empty list. + Providing no parameters will return a list of all distinct topic names with external tasks." + /> + + "parameters" : [ + + <@lib.parameter + name = "withLockedTasks" + location = "query" + type = "boolean" + desc = "Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired). + Value may only be `true`, as `false` matches any external task." /> + + <@lib.parameter + name = "withUnlockedTasks" + location = "query" + type = "boolean" + desc = "Only include external tasks that are currently not locked (i.e., they have no lock or it has expired). + Value may only be `true`, as `false` matches any external task." /> + + <@lib.parameter + name = "withRetriesLeft" + location = "query" + type = "boolean" + desc = "Only include external tasks that have a positive (> 0) number of retries (or `null`). Value may only be + `true`, as `false` matches any external task." + last = true /> + + ], + + "responses" : { + + <@lib.response + code = "200" + mediaType = "application/json" + flatType="string" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /external-task/topic-names?withLockedTasks", + "value": [ + "topic-a", + "topic-b", + "topic-c" + ] + }'] /> + + <@lib.response + code = "400" + last = true + desc = "Returned if some of the query parameters are invalid." /> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/bpmnError/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/bpmnError/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ff3a387a85328ca737c33bcc256ce25a904838ce --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/bpmnError/post.ftl @@ -0,0 +1,80 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "handleExternalTaskBpmnError" + tag = "External Task" + summary = "Handle BPMN Error" + desc = "Reports a business error in the context of a running external task by id. The error code must be specified + to identify the BPMN error handler." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the external task in which context a BPMN error is reported."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "ExternalTaskBpmnError" + examples = ['"example-1": { + "summary": "POST /external-task/anId/bpmnError", + "value": { + "workerId": "aWorker", + "errorCode": "bpmn-error", + "errorMessage": "anErrorMessage", + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + } + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if the task's most recent lock was not acquired by the provided worker. + + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, + e.g., due to a caught BPMN boundary event. + + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Returned if the corresponding process instance could not be resumed successfully. + + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/complete/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/complete/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..fb3ed84b40b110d7b68aa20d350bbe6f5c51e50e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/complete/post.ftl @@ -0,0 +1,80 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "completeExternalTaskResource" + tag = "External Task" + summary = "Complete" + desc = "Completes an external task by id and updates process variables." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to complete." /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "CompleteExternalTaskDto" + examples = ['"example-1": { + "summary": "POST /external-task/anId/complete", + "value": { + "workerId": "aWorker", + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + }, + "localVariables": { + "aLocalVariable": { + "value": "aStringValue" + } + } + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if the task's most recent lock was not acquired by the provided worker. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, + e.g., due to a caught BPMN boundary event. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Returned if the corresponding process instance could not be resumed successfully. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/errorDetails/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/errorDetails/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..cefdd685f3e0b0d8a18fb3714da6b752af3ffedc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/errorDetails/get.ftl @@ -0,0 +1,57 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getExternalTaskErrorDetails" + tag = "External Task" + summary = "Get Error Details" + desc = "Retrieves the error details in the context of a running external task by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the external task for which the error details should be retrieved."/> + + ], + + "responses" : { + + <@lib.response + code = "200" + mediaType= "text/plain" + desc = "Request successful." + contentDesc = "The error details for the external task." + examples = ['"example-1": { + "summary": "GET `external-task/someId/errorDetails`", + "description": "GET `external-task/someId/errorDetails`", + "value": "org.apache.ibatis.jdbc.RuntimeSqlException: org.apache.ibatis.jdbc.RuntimeSqlException: test cause + at org.camunda.bpm.engine.test.api.externaltask.ExternalTaskServiceTest.testHandleFailureWithErrorDetails(ExternalTaskServiceTest.java:1424) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + ..." + }']/> + + + <@lib.response + code = "204" + desc = "Request successful. In case the external task has no error details." /> + + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "An external task with the given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/extendLock/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/extendLock/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0e6769d07fee351bc103ed209781161589b1a9c9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/extendLock/post.ftl @@ -0,0 +1,59 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "extendLock" + tag = "External Task" + summary = "Extend Lock" + desc = "Extends the timeout of the lock by a given amount of time." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the external task."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "ExtendLockOnExternalTaskDto" + examples = ['"example-1": { + "summary": "POST /external-task/anId/extendLock", + "value": { + "workerId": "anId", + "newDuration": 100000 + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "In case the new lock duration is negative or the external task is not locked by the given worker or not + locked at all, an exception of type `InvalidRequestException` is returned. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, + e.g., due to a caught BPMN boundary event. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/failure/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/failure/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1ce79ac97c062bf9001782c9be3dab71806a64fe --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/failure/post.ftl @@ -0,0 +1,67 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "handleFailure" + tag = "External Task" + summary = "Handle Failure" + desc = "Reports a failure to execute an external task by id. A number of retries and a timeout until the task can + be retried can be specified. If retries are set to 0, an incident for this task is created." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the external task to report a failure for."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "ExternalTaskFailureDto" + examples = ['"example-1": { + "summary": "POST /external-task/anId/failure", + "value": { + "workerId": "aWorker", + "errorMessage": "Does not compute", + "retries": 3, + "retryTimeout": 60000 + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if the task's most recent lock was not acquired by the provided worker. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, + e.g., due to a caught BPMN boundary event. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Returned if the corresponding process instance could not be resumed successfully. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9239834e89ca44ac272ceaf5fb0ec46b07d79b3d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/get.ftl @@ -0,0 +1,62 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getExternalTask" + tag = "External Task" + summary = "Get" + desc = "Retrieves an external task by id, corresponding to the `ExternalTask` interface in the engine." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the external task to be retrieved." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ExternalTaskDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /external-task/anExternalTaskId", + "value": { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "suspended": false, + "workerId": "aWorkerId", + "priority":0, + "topicName": "aTopic", + "businessKey": "aBusinessKey" + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "External task with the given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/lock/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/lock/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d5e7620bd454702a3965d1d19db66aade8cf0ee6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/lock/post.ftl @@ -0,0 +1,58 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "lock" + tag = "External Task" + desc = "Lock an external task by a given id for a specified worker and amount of time." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the external task."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "LockExternalTaskDto" + examples = ['"example-1": { + "summary": "POST /external-task/anId/lock", + "value": { + "workerId": "anId", + "lockDuration": 100000 + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "In case the lock duration is negative or the external task is already locked by + a different worker, an exception of type `InvalidRequestException` is returned. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, + e.g., due to a caught BPMN boundary event. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/priority/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/priority/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..35e6e2774f4dfa5fb028e0f44e77f7902db02cde --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/priority/put.ftl @@ -0,0 +1,50 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "setExternalTaskResourcePriority" + tag = "External Task" + summary = "Set Priority" + desc = "Sets the priority of an existing external task by id. The default value of a priority is 0." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the external task to set the priority for."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "PriorityDto" + examples = ['"example-1": { + "summary": "PUT /external-task/anId/priority", + "value": { + "priority": 5 + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, + e.g., due to a caught BPMN boundary event. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/retries/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/retries/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..b0882f34d54c7fef09492337b50c8c5631f9001d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/retries/put.ftl @@ -0,0 +1,58 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "setExternalTaskResourceRetries" + tag = "External Task" + summary = "Set Retries" + desc = "Sets the number of retries left to execute an external task by id. If retries are set to 0, an + incident is created." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the external task to set the number of retries for."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "RetriesDto" + examples = ['"example-1": { + "summary": "PUT /external-task/anId/retries", + "value": { + "retries": 123 + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, + e.g., due to a caught BPMN boundary event. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "In case the number of retries is negative or null, an exception of type `InvalidRequestException` + is returned. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/unlock/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/unlock/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..cfafb6f242325b05505ad6ef9d1c2551c1698f0e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/external-task/{id}/unlock/post.ftl @@ -0,0 +1,40 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "unlock" + tag = "External Task" + summary = "Unlock" + desc = "Unlocks an external task by id. Clears the task's lock expiration time and worker id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the external task to unlock." /> + + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, + e.g., due to a caught BPMN boundary event. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..58d29ba60c07844e0687885eb01c4121c8d1c8f4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/count/get.ftl @@ -0,0 +1,55 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getFilterCount" + tag = "Filter" + summary = "Get Filter Count" + desc = "Retrieves the number of filters that fulfill a provided query. Corresponds to the + size of the result set when using the + [Get Filters](${docsUrl}/reference/rest/filter/get-query/) method." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/filter-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "request", + "description": "GET `/filter/count?resourceType=Task&owner=aUserId`", + "value": { + "count": 3 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + Returned if some of the query parameters are invalid, for example if + a `sortOrder`parameter is supplied, but no `sortBy`, or if an invalid operator + for variable comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/create/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/create/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ce643b448552193249e0183ed5b2f598c9261060 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/create/post.ftl @@ -0,0 +1,83 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/post-create/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "createFilter" + tag = "Filter" + summary = "Create Filter" + desc = "Creates a new filter." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "CreateFilterDto" + examples = ['"example-1": { + "summary": "request", + "description": "POST `/filter/create`", + "value": { + "resourceType": "Task", + "name": "Accounting Tasks", + "owner": "jonny1", + "query": { + "candidateGroup": "accounting" + }, + "properties": { + "color": "#3e4d2f", + "description": "Tasks assigned to group accounting", + "priority": 5 + } + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "FilterDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "request", + "description": "POST `/filter/create`", + "value": { + "id": "aFilterId", + "resourceType": "Task", + "name": "Accounting Tasks", + "owner": "jonny1", + "query": { + "candidateGroup": "accounting" + }, + "properties": { + "color": "#3e4d2f", + "description": "Tasks assigned to group accounting", + "priority": 5 + } + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + Filter was invalid. See + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = " + The authenticated user is unauthorized to create a new filter. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..18844a136ee9747dad2515c1944993d066b561b4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/get.ftl @@ -0,0 +1,124 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getFilterList" + tag = "Filter" + summary = "Get Filters" + desc = "Queries for a list of filters using a list of parameters. The size of the result + set can be retrieved + by using the [Get Filter Count](${docsUrl}/reference/rest/filter/get-query-count/) method." + /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/filter-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + <@lib.parameter + name = "itemCount" + location = "query" + type = "boolean" + desc = "If set to `true`, each filter result will contain an `itemCount` property + with the number of items matched by the filter itself." /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "FilterDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "request", + "description": "GET `/filter?resourceType=Task`", + "value": [ + { + "id": "aFilter", + "resourceType": "Task", + "name": "My Filter", + "owner": "jonny1", + "query": { + "assignee": "jonny1" + }, + "properties": { + "color": "#58FA58", + "description": "Filters assigned to me" + } + }, + { + "id": "anotherFilter", + "resourceType": "Task", + "name": "Accountants Filter", + "owner": "demo", + "query": { + "candidateGroup": "accountant" + }, + "properties": { + "description": "Filters assigned to me", + "priority": 10 + } + } + ] + }', + '"example-2": { + "summary": "request with itemCount", + "description": "GET `/filter?resourceType=Task&itemCount=true`", + "value": [ + { + "id": "aFilter", + "resourceType": "Task", + "name": "My Filter", + "owner": "jonny1", + "query": { + "assignee": "jonny1" + }, + "properties": { + "color": "#58FA58", + "description": "Filters assigned to me" + }, + "itemCount": 13 + }, + { + "id": "anotherFilter", + "resourceType": "Task", + "name": "Accountants Filter", + "owner": "demo", + "query": { + "candidateGroup": "accountant" + }, + "properties": { + "description": "Filters assigned to me", + "priority": 10 + }, + "itemCount": 42 + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + Returned if some of the query parameters are invalid, for example if + a `sortOrder` + parameter is supplied, but no `sortBy` is specified. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/options.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/options.ftl new file mode 100644 index 0000000000000000000000000000000000000000..11fa8fc560dff303dd649fae4d4cfb44bb068501 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/options.ftl @@ -0,0 +1,50 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/options/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "filterResourceOptions" + tag = "Filter" + summary = "Filter Resource Options" + desc = "The OPTIONS request allows you to check for the set of available operations + that the currently authenticated user can perform on the `/filter` resource. + Whether the user can perform an operation or not may depend on various + factors, including the users authorizations to interact with this + resource and the internal configuration of the process engine." + /> + + "responses": { + + <@lib.response + code = "200" + dto = "ResourceOptionsDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "request", + "description": "OPTIONS `/filter`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/filter/create", + "rel": "create" + } + ] + } + }'] + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..af567e8e8dc99e30398efb7794ae0a443ce50480 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/count/get.ftl @@ -0,0 +1,63 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-execute-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "executeFilterCount" + tag = "Filter" + summary = "Execute Filter Count" + desc = "Executes the saved query of the filter by id and returns the count." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the filter to execute." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "request", + "description": "GET `/filter/aTaskFilterId/count`", + "value": { + "count": 2 + } + }'] + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = " + The authenticated user is unauthorized to read this filter. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = " + Filter with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..44256bb453c1da0ff903bcd8089225e96c8e3996 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/count/post.ftl @@ -0,0 +1,89 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/post-execute-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "postExecuteFilterCount" + tag = "Filter" + summary = "Execute Filter Count (POST)" + desc = "Executes the saved query of the filter by id and returns the count. This method is + slightly more powerful then the [Get Execute Filter Count](${docsUrl}/reference/rest/filter/get-execute-count/) + method because it allows to extend the saved query of the filter." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the filter to execute." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + flatType = "object" + requestDesc = "A JSON object which corresponds to the type of the saved query of the filter, i.e., if the resource type of the filter is Task the body should form a valid task query corresponding to the Task resource." + examples = ['"example-1": { + "summary": "request", + "description": "POST `filter/aTaskFilterId/singleResult`. Note: The examples show a task filter. So the request body corresponds to a task query. For other resource types the request body will differ.", + "value": { + "assignee": "jonny1", + "taskDefinitionKey": "aTaskKey" + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "request", + "description": "POST `filter/aTaskFilterId/singleResult`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + The extending query was invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = " + The authenticated user is unauthorized to read this filter. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = " + Filter with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c1d4e5427a9595166d3ea557e5096c6e4af3097f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/delete.ftl @@ -0,0 +1,56 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/delete/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteFilter" + tag = "Filter" + summary = "Delete Filter" + desc = "Deletes a filter by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the filter to be deleted." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = " + The authenticated user is unauthorized to delete this filter. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = " + Filter cannot be found. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..bcb8a1d87275be7afbf0b00a3a32bf14fd4e507a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/get.ftl @@ -0,0 +1,98 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getSingleFilter" + tag = "Filter" + summary = "Get Single Filter" + desc = "Retrieves a single filter by id, according to the `Filter` interface in the engine." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the filter to be retrieved." + /> + + <@lib.parameter + name = "itemCount" + location = "query" + type = "boolean" + desc = "If set to `true`, each filter result will contain an `itemCount` + property with the number of items matched by the filter itself." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "FilterDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "request", + "description": "GET `/filter/aFilterId`", + "value": { + "id": "9917d731-3cde-11e4-b704-f0def1e59da8", + "name": "Accounting Tasks", + "owner": null, + "properties": { + "color": "#3e4d2f", + "description": "Tasks assigned to group accounting", + "priority": 5 + }, + "query": { + "candidateGroup": "accounting" + }, + "resourceType": "Task" + } + }', + '"example-2": { + "summary": "request with itemCount", + "description": "GET `/filter/aFilterId?itemCount=true`", + "value": { + "id": "9917d731-3cde-11e4-b704-f0def1e59da8", + "name": "Accounting Tasks", + "owner": null, + "properties": { + "color": "#3e4d2f", + "description": "Tasks assigned to group accounting", + "priority": 5 + }, + "query": { + "candidateGroup": "accounting" + }, + "resourceType": "Task", + "itemCount": 23 + } + }'] + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "The authenticated user is unauthorized to read this filter. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Filter with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/list/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/list/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..bcae3251c28252262429651ea7ae1c942207af2f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/list/get.ftl @@ -0,0 +1,112 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-execute-list/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "executeFilterList" + tag = "Filter" + summary = "Execute Filter List" + desc = "Executes the saved query of the filter by id and returns the result list." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the filter to execute." + /> + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + flatType = "object" + array = true + desc = "Request successful. A JSON array containing JSON objects corresponding to the matching entity interface in the engine. This depends on the saved query in the filter. Therefore it is not possible to specify a generic result format, i.e., if the resource type of the filter is Task the result will correspond to the Task interface in the engine." + examples = ['"example-1": { + "summary": "request", + "description": "GET `/filter/aTaskFilterId/list/?firstResult=0&maxResults=2`. **Note**: The examples show the result of a task filter. So the response corresponds to a task, but for other filters the response format will differ.", + "value": [ + { + "assignee": "jonny1", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T15:45:48.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "aExecutionId", + "followUp": null, + "formKey": null, + "id": "aTaskId", + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "aProcessId", + "processInstanceId": "aProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "aTaskKey" + }, + { + "assignee": "demo", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T10:42:18.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "anotherExecutionId", + "followUp": null, + "formKey": null, + "id": "anotherTaskId", + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "anotherProcessId", + "processInstanceId": "anotherProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "anotherTaskKey" + } + ] + }'] + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = " + The authenticated user is unauthorized to read this filter. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = " + Filter with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/list/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/list/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ee162a482f0db4e4282022f6a975f6fabaf23f12 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/list/post.ftl @@ -0,0 +1,116 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/post-execute-list/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "postExecuteFilterList" + tag = "Filter" + summary = "Execute Filter List (POST)" + desc = "Executes the saved query of the filter by id and returns the result list. This + method is slightly more powerful then the + [Get Execute FilterList](${docsUrl}/reference/rest/filter/get-execute-list/) method + because it allows to extend the saved query of the filter." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the filter to execute." + /> + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + <@lib.requestBody + mediaType = "application/json" + flatType = "object" + requestDesc= "A JSON object which corresponds to the type of the saved query of the filter, i.e., if the resource type of the filter is Task the body should form a valid task query corresponding to the Task resource." + examples = ['"example-1": { + "summary": "request", + "description": "POST `/filter/aTaskFilterId/list/?firstResult=0&maxResults=2`. **Note**: The examples show a task filter. So the request body corresponds to a task query. For other resource types the request body will differ.", + "value": { + "assignee": "jonny1", + "taskDefinitionKey": "aTaskKey" + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + flatType = "object" + array = true + desc = "Request successful. A JSON array containing JSON objects corresponding to the matching entity interface in the engine. This depends on the saved query in the filter. Therefore it is not possible to specify a generic result format, i.e., if the resource type of the filter is Task the result will correspond to the Task interface in the engine." + examples = ['"example-1": { + "summary": "request", + "description": "POST `/filter/aTaskFilterId/list/?firstResult=0&maxResults=2`. **Note**: The examples show the result of a task filter. So the response corresponds to a task, but for other filters the response format will differ.", + "value": [ + { + "assignee": "jonny1", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T15:45:48.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "aExecutionId", + "followUp": null, + "formKey": null, + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "id": "aTaskId", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "aProcessId", + "processInstanceId": "aProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "aTaskKey" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + The extending query was invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = " + The authenticated user is unauthorized to read this filter. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = " + Filter with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/options.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/options.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a79c36f27f014539958ce7d5d9fc6f6321916c5e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/options.ftl @@ -0,0 +1,92 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/options/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "filterResourceOptionsSingle" + tag = "Filter" + summary = "Filter Resource Options" + desc = "The OPTIONS request allows you to check for the set of available operations + that the currently authenticated user can perform on the `/filter` resource. + Whether the user can perform an operation or not may depend on various + factors, including the users authorizations to interact with this + resource and the internal configuration of the process engine." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the filter to be checked." + last = true + /> + ], + + "responses": { + + <@lib.response + code = "200" + dto = "ResourceOptionsDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "request", + "description": "OPTIONS `/filter/aFilterId`", + "value": { + "links":[ + { + "method": "GET", + "href":"http://localhost:8080/engine-rest/filter/aFilterId", + "rel":"self" + }, + { + "method": "GET", + "href":"http://localhost:8080/engine-rest/filter/aFilterId/singleResult", + "rel":"singleResult" + }, + { + "method": "POST", + "href":"http://localhost:8080/engine-rest/filter/aFilterId/singleResult", + "rel":"singleResult" + }, + { + "method": "GET", + "href":"http://localhost:8080/engine-rest/filter/aFilterId/list", + "rel":"list" + }, + { + "method": "POST", + "href":"http://localhost:8080/engine-rest/filter/aFilterId/list", + "rel":"list" + }, + { + "method": "GET", + "href":"http://localhost:8080/engine-rest/filter/aFilterId/count", + "rel":"count" + }, + { + "method": "POST", + "href":"http://localhost:8080/engine-rest/filter/aFilterId/count", + "rel":"count" + }, + { + "method": "PUT", + "href":"http://localhost:8080/engine-rest/filter/aFilterId", + "rel":"update" + }, + { + "method": "DELETE", + "href":"http://localhost:8080/engine-rest/filter/aFilterId", + "rel":"delete" + } + ] + } + }'] + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..491a18cc20a942ca8bc2fee41aeb2a16def6e503 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/put.ftl @@ -0,0 +1,88 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/put-update/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "updateFilter" + tag = "Filter" + summary = "Update Filter" + desc = "Updates an existing filter." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the filter to be updated." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "CreateFilterDto" + examples = ['"example-1": { + "summary": "request", + "description": "PUT `/filter/aFilterID`", + "value": { + "resourceType": "Task", + "name": "My Tasks", + "owner": "jonny1", + "query": { + "assignee": "jonny1" + }, + "properties": { + "color": "#99CCFF", + "description": "Tasks assigned to me", + "priority": -10 + } + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + Filter was invalid. See + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = " + The authenticated user is unauthorized to update this filter. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = " + Filter cannot be found. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/singleResult/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/singleResult/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9b7b9b6432a6066b9b64c72d10cefe760d472e1e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/singleResult/get.ftl @@ -0,0 +1,99 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-execute-single-result/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "executeFilterSingleResult" + tag = "Filter" + summary = "Execute Filter Single Result" + desc = "Executes the saved query of the filter by id and returns the single result." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the filter to execute." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + flatType = "object" + desc = "Request successful. A JSON object corresponding to the matching entity interface in the engine. This depends on the saved query in the filter. Therefore it is not possible to specify a generic result format, i.e., if the resource type of the filter is Task the result will correspond to the Task interface in the engine." + examples = ['"example-1": { + "summary": "request", + "description": "GET `/filter/aTaskFilterId/singleResult`. **Note**: The examples show the result of a task filter. So the response corresponds to a task, but for other filters the response format will differ.", + "value": { + "assignee": "jonny1", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T15:45:48.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "aExecutionId", + "followUp": null, + "formKey": null, + "id": "aTaskId", + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "aProcessId", + "processInstanceId": "aProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "aTaskKey" + } + }'] + /> + + <@lib.response + code = "204" + desc = "Request successful, but the result was empty. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + The executed filter returned more than one single result. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = " + The authenticated user is unauthorized to read this filter. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = " + Filter with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/singleResult/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/singleResult/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..75ef3376cfe08cf21ad05d28f0c3487518fd0f17 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/filter/{id}/singleResult/post.ftl @@ -0,0 +1,115 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/post-execute-single-result/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "postExecuteFilterSingleResult" + tag = "Filter" + summary = "Execute Filter Single Result (POST)" + desc = "Executes the saved query of the filter by id and returns the single result. This method is slightly more + powerful then the [Get Execute Filter Single Result](${docsUrl}/reference/rest/filter/get-execute-single-result/) + method because it allows to extend the saved query of the filter." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the filter to execute." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + flatType = "object" + requestDesc = "A JSON object which corresponds to the type of the saved query of the filter, i.e., if the resource type of the filter is Task the body should form a valid task query corresponding to the Task resource." + examples = ['"example-1": { + "summary": "request", + "description": "POST `filter/aTaskFilterId/singleResult`. **Note**: The examples show a task filter. So the request body corresponds to a task query. For other resource types the request body will differ.", + "value": { + "assignee": "jonny1", + "taskDefinitionKey": "aTaskKey" + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + flatType = "object" + desc = "Request successful. A JSON object corresponding to the corresponding entity interface in the engine. This depends on the saved query in the filter. Therefore it is not possible specify a generic result format, i.e., if the resource type of the filter is Task the result will correspond to the Task interface in the engine." + examples = ['"example-1": { + "summary": "request", + "description": "POST `filter/aTaskFilterId/singleResult`. **Note**: The examples show the result of a task filter. So the response corresponds to a task, but for other filters the response format will differ.", + "value": { + "assignee": "jonny1", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T15:45:48.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "aExecutionId", + "followUp": null, + "formKey": null, + "id": "aTaskId", + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "aProcessId", + "processInstanceId": "aProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "aTaskKey" + } + }'] + /> + + <@lib.response + code = "204" + desc = "Request successful, but the result was empty. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + The executed filter returned more than one single result or the + extending query was invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = " + The authenticated user is unauthorized to read this filter. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = " + Filter with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f9f4f6c29ecb1155d1973a0b1bdbb32719701ddf --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/count/get.ftl @@ -0,0 +1,50 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/group/get-query-count/index.html --> +{ + <@lib.endpointInfo + id = "getGroupCount" + tag = "Group" + summary = "Get List Count" + desc = "Queries for groups using a list of parameters and retrieves the count." + /> + + "parameters" : [ + + <#assign requestMethod="GET"/> + <#include "/lib/commons/group-query-params.ftl" > + + <@lib.parameters + object = params + last = true + /> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/group/count?name=Sales`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response + format." + /> + + } + +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9aea9a33cd8194a1c4bd71b72e25bd7c504f32b1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/count/post.ftl @@ -0,0 +1,50 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/group/post-query-count/index.html --> +{ + <@lib.endpointInfo + id = "queryGroupCount" + tag = "Group" + summary = "Get List Count (POST)" + desc = "Queries for groups using a list of parameters and retrieves the count." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "GroupQueryDto" + examples = ['"example-1": { + "summary": "POST `/group/count`", + "value": { + "name": "Sales" + } + }'] + /> + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "POST `/group/count`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response + format." + last = true + /> + + } + +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/create/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/create/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e1118006476a0d8cd364503c3cf8af267cd27117 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/create/post.ftl @@ -0,0 +1,48 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/group/post-create/index.html --> +{ + <@lib.endpointInfo + id = "createGroup" + tag = "Group" + summary = "Create Group" + desc = "Creates a new group." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "GroupDto" + examples = ['"example-1": { + "summary": "POST `/group/create`", + "value": { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + }'] + /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "Identity service is read-only (Cannot modify users / groups / memberships)." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The group could not be created due to an internal server error. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the + error response format." + last = true + /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..80672d7f3ad9c2a7a68e044fe84059dfcf67c9f4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/get.ftl @@ -0,0 +1,57 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getQueryGroups" + tag = "Group" + summary = "Get List" + desc = "Queries for a list of groups using a list of parameters. The size of the result set can be retrieved + by using the [Get Group Count](${docsUrl}/reference/rest/group/get-query-count) method." /> + + "parameters" : [ + + <#assign requestMethod="GET"/> + <#include "/lib/commons/group-query-params.ftl" > + + <#assign last = false > + + <#include "/lib/commons/sort-params.ftl" > + + <#include "/lib/commons/pagination-params.ftl" > + + <@lib.parameters + object = params + last = true + /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "GroupDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/group?name=Sales`", + "value": [ + {"id":"sales", + "name":"Sales", + "type":"Organizational Unit"} + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, + but no `sortBy` is specified. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/options.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/options.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0963a5923bd441fe4caa38cf898ff4b756b90c33 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/options.ftl @@ -0,0 +1,51 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/group/options/index.html --> +{ + <@lib.endpointInfo + id = "availableGroupOperations" + tag = "Group" + summary = "Group Resource Options" + desc = "The `/group` resource supports two custom OPTIONS requests, this one for the resource as such and one for + individual group instances. The OPTIONS request allows checking for the set of available operations that + the currently authenticated user can perform on the `/group` resource. If the user can perform an operation + or not may depend on various things, including the users authorizations to interact with this resource and + the internal configuration of the process engine." + /> + + "responses" : { + + <@lib.response + code = "200" + dto = "ResourceOptionsDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/group`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/group", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/group/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/group/create", + "rel": "create" + } + ] + } + }'] + last = true + /> + + } + +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..bd84bb3b4473e53930093b162d036809cc908bab --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/post.ftl @@ -0,0 +1,62 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/group/post-query/index.html --> +{ + <@lib.endpointInfo + id = "postQueryGroups" + tag = "Group" + summary = "Get List (POST)" + desc = "Queries for a list of groups using a list of parameters. + The size of the result set can be retrieved by using the + [Get Group Count (POST)](${docsUrl}/reference/rest/group/post-query-count/) method." + /> + + "parameters" : [ + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + ], + + <#assign requestMethod="POST"/> + <@lib.requestBody + mediaType = "application/json" + dto = "GroupQueryDto" + examples = ['"example-1": { + "summary": "POST `/group`", + "value": { + "name": "Sales" + } + }'] + /> + + "responses" : { + + <@lib.response + code = "200" + dto = "GroupDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "POST `/group`", + "value": [ + { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, + but no `sortBy` is specified. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0e67cc5d24e0cf4855947689b1996189c70f7443 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/delete.ftl @@ -0,0 +1,47 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/group/delete/index.html --> +{ + <@lib.endpointInfo + id = "deleteGroup" + tag = "Group" + summary = "Delete Group" + desc = "Deletes a group by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the group to be deleted." + last = true + /> + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "Identity service is read-only (Cannot modify users / groups / memberships)." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Group cannot be found. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for + the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3ddec87a2f67a0151cbcb5541c0d17f513f45489 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/get.ftl @@ -0,0 +1,47 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getGroup" + tag = "Group" + summary = "Get Group" + desc = "Retrieves a group by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the group to be retrieved."/> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "GroupDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/group/sales`", + "value": { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Group with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/members/options.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/members/options.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2384cd5ae893d522662bb9df784c54723b588185 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/members/options.ftl @@ -0,0 +1,42 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "availableGroupMembersOperations" + tag = "Group" + summary = "Group Membership Resource Options" + desc = "The OPTIONS request allows checking for the set of available operations that the currently authenticated + user can perform on the resource. If the user can perform an operation or not may depend on various + things, including the users authorizations to interact with this resource and the internal configuration + of the process engine." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the group." /> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ResourceOptionsDto" + last = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "OPTIONS `/group/sales/members`", + "value": {"links":[ + {"method":"DELETE","href":"http://localhost:8080/engine-rest/group/sales/members","rel":"delete"}, + {"method":"PUT","href":"http://localhost:8080/engine-rest/group/sales/members","rel":"create"}] + } + }'] /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/members/{userId}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/members/{userId}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a932b6c9b4ddce6a89358b44604982066d7ab74b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/members/{userId}/delete.ftl @@ -0,0 +1,50 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteGroupMember" + tag = "Group" + summary = "Delete a Group Member" + desc = "Removes a member from a group." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the group." /> + + <@lib.parameter + name = "userId" + location = "path" + type = "string" + required = true + last = true + desc = "The id of user to remove from the group." /> + + ], + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "Identity service is read-only (Cannot modify users / groups / memberships)."/> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "In case an error occurs. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/members/{userId}/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/members/{userId}/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..408c7fd72380cfa932724ce47ba172ca65e65d00 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/members/{userId}/put.ftl @@ -0,0 +1,50 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "createGroupMember" + tag = "Group" + summary = "Create Group Member" + desc = "Adds a member to a group." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the group." /> + + <@lib.parameter + name = "userId" + location = "path" + type = "string" + required = true + last = true + desc = "The id of user to add to the group." /> + + ], + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "Identity service is read-only (Cannot modify users / groups / memberships)."/> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "In case an internal error occurs. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/options.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/options.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7b1a239b9df19985fd87c1b4f8dbf0d89d942ebb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/options.ftl @@ -0,0 +1,62 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/group/options/index.html --> +{ + <@lib.endpointInfo + id = "availableGroupInstanceOperations" + tag = "Group" + summary = "Group Resource Instance Options" + desc = "The `/group` resource supports two custom OPTIONS requests, one for the resource as such and this one for individual group instances. + The OPTIONS request allows checking for the set of available operations that the currently authenticated user can perform on the + `/group/{id}` resource instance. If the user can perform an operation or not may depend on various things, including the users authorizations + to interact with this resource and the internal configuration of the process engine." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the group." + last = true + /> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ResourceOptionsDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/group/aGroupId`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/group/aGroupId", + "rel":"self" + }, + { + "method": "DELETE", + "href":"http://localhost:8080/engine-rest/group/aGroupId", + "rel":"delete" + }, + { + "method": "PUT", + "href":"http://localhost:8080/engine-rest/group/aGroupId", + "rel":"update" + } + ] + } + }'] + last = true + /> + + } + +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7a038dcfb718aecab4d168afd56bad6c56578986 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/group/{id}/put.ftl @@ -0,0 +1,67 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/group/put-update/index.html --> +{ + <@lib.endpointInfo + id = "updateGroup" + tag = "Group" + summary = "Update Group" + desc = "Updates a given group by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the group." + last = true + /> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "GroupDto" + examples = ['"example-1": { + "summary": "PUT `/group/sales`", + "value": { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + }'] + /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful. No content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "Identity service is read-only (Cannot modify users / groups / memberships)." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "If the group with the requested Id cannot be found." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The group could not be updated due to an internal server error. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error + response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a305432eabc54611f8d83946bd156c720e794247 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/count/get.ftl @@ -0,0 +1,40 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricActivityInstancesCount" + tag = "Historic Activity Instance" + summary = "Get List Count" + desc = "Queries for the number of historic activity instances that fulfill the given parameters. + Takes the same parameters as the [Get Historic Activity Instance](${docsUrl}/reference/rest/history/activity-instance/get-activity-instance-query/) method." /> + + "parameters": [ + <#assign requestMethod="GET"/> + <#include "/lib/commons/history-activity-instance.ftl" > + + <@lib.parameters + object = params + last = true/> + ], + "responses": { + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/history/activity-instance/count?activityType=userTask`", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7059c77852b42c394740d4acf71e3d9d2823be31 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/count/post.ftl @@ -0,0 +1,45 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryHistoricActivityInstancesCount" + tag = "Historic Activity Instance" + summary = "Get List Count (POST)" + desc = "Queries for the number of historic activity instances that fulfill the given parameters." /> + + <#assign requestMethod="POST"/> + <@lib.requestBody + mediaType = "application/json" + dto = "HistoricActivityInstanceQueryDto" + examples = [ + '"example-1": { + "summary": "POST `/history/activity-instance/count`", + "value": { + "activityType": "userTask" + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response 1", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..555ccde724be7ef19aeee7605afb2d8005ef54d9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/get.ftl @@ -0,0 +1,71 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricActivityInstances" + tag = "Historic Activity Instance" + summary = "Get List" + desc = "Queries for historic activity instances that fulfill the given parameters. + The size of the result set can be retrieved by using the + [Get Historic Activity Instance Count](${docsUrl}/reference/rest/history/activity-instance/get-activity-instance-query-count/) method." /> + + "parameters" : [ + + <#assign requestMethod="GET"/> + <#include "/lib/commons/history-activity-instance.ftl" > + + <#assign last = false > + + <#include "/lib/commons/sort-params.ftl" > + + <#include "/lib/commons/pagination-params.ftl" > + + <@lib.parameters + object = params + last = true/> + + ], + "responses" : { + <@lib.response + code = "200" + dto = "HistoricActivityInstanceDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/history/activity-instance?activityType=userTask&taskAssignee=peter`", + "value": [ + { + "activityId": "anActivity", + "activityName": "anActivityName", + "activityType": "userTask", + "assignee": "peter", + "calledProcessInstanceId": "aHistoricCalledProcessInstanceId", + "calledCaseInstanceId": null, + "canceled": true, + "completeScope": false, + "durationInMillis": 2000, + "endTime": "2013-04-23T18:42:43.000+0200", + "executionId": "anExecutionId", + "id": "aHistoricActivityInstanceId", + "parentActivityInstanceId": "aHistoricParentActivityInstanceId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "startTime": "2013-04-23T11:20:43.000+0200", + "taskId": "aTaskId", + "tenantId":null, + "removalTime":"2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..964f0278a7b8a2f1e4c8b95e0fa80fa1ec47ade4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/post.ftl @@ -0,0 +1,83 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "queryHistoricActivityInstances" + tag = "Historic Activity Instance" + summary = "Get List (POST)" + desc = "Queries for historic activity instances that fulfill the given parameters. + The size of the result set can be retrieved by using the + [Get Historic Activity Instance Count](${docsUrl}/reference/rest/history/activity-instance/get-activity-instance-query-count/) method." /> + + "parameters" : [ + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + ], + + <#assign requestMethod="POST"/> + <@lib.requestBody + mediaType = "application/json" + dto = "HistoricActivityInstanceQueryDto" + examples = [ + '"example-1": { + "summary": "POST `/history/activity-instance`", + "value": { + "activityType": "userTask", + "taskAssignee": "peter", + "sorting": + [{"sortBy": "activityId", + "sortOrder": "asc" + }, + {"sortBy": "executionId", + "sortOrder": "desc" + }] + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "HistoricActivityInstanceDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response 1", + "value": [ + { + "activityId": "anActivity", + "activityName": "anActivityName", + "activityType": "userTask", + "assignee": "peter", + "calledProcessInstanceId": "aHistoricCalledProcessInstanceId", + "calledCaseInstanceId": null, + "canceled": true, + "completeScope": false, + "durationInMillis": 2000, + "endTime": "2013-04-23T18:42:43.000+0200", + "executionId": "anExecutionId", + "id": "aHistoricActivityInstanceId", + "parentActivityInstanceId": "aHistoricParentActivityInstanceId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "startTime": "2013-04-23T11:20:43.000+0200", + "taskId": "aTaskId", + "tenantId":null, + "removalTime":"2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0c5c8e866fec41d871f3ab18886629531f719773 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/activity-instance/{id}/get.ftl @@ -0,0 +1,65 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getHistoricActivityInstance" + tag = "Historic Activity Instance" + summary = "Get" + desc = "Retrieves a historic activity instance by id, according to the `HistoricActivityInstance` interface in the engine." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the historic activity instance to be retrieved." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "HistoricActivityInstanceDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/activity-instance/aActivityInstId`", + "value": { + "id": "aActivityInstId", + "activityId": "anActivity", + "activityName": "anActivityName", + "activityType": "userTask", + "assignee": "peter", + "calledProcessInstanceId": "aHistoricCalledProcessInstanceId", + "calledCaseInstanceId": null, + "canceled": true, + "completeScope": false, + "durationInMillis": 2000, + "endTime": "2013-04-23T18:42:43.000+0200", + "executionId": "anExecutionId", + "parentActivityInstanceId": "aHistoricParentActivityInstanceId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "startTime": "2013-04-23T11:20:43.000+0200", + "taskId": "aTaskId", + "tenantId":null, + "removalTime":"2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Not Found + Historic activity instance with given id does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/cleanable-batch-report/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/cleanable-batch-report/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3605581c2dd471139ec8d4a35c9d9fe371f8b670 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/cleanable-batch-report/count/get.ftl @@ -0,0 +1,44 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/batch/get-cleanable-batch-report-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getCleanableHistoricBatchesReportCount" + tag = "Historic Batch" + summary = "Get Cleanable Batch Report Count" + desc = "Queries for the number of report results about a historic batch operations relevant + to history cleanup (see + [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup) + ). + Takes the same parameters as the + [Get Cleanable Batch Report](${docsUrl}/reference/rest/history/batch/get-cleanable-batch-report/) + method." + /> + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/batch/cleanable-batch-report/count`", + "description": "GET `/history/batch/cleanable-batch-report/count`", + "value": { + "count": 10 + } + }'] + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/cleanable-batch-report/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/cleanable-batch-report/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..67bdc432125724b6eb89fa49226e184208cd27e7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/cleanable-batch-report/get.ftl @@ -0,0 +1,77 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/batch/get-cleanable-batch-report/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getCleanableHistoricBatchesReport" + tag = "Historic Batch" + summary = "Get Cleanable Batch Report" + desc = "Retrieves a report about a historic batch operations relevant to history cleanup + (see + [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup) + ) so that you can tune the history time to live. + These reports include the count of the finished batches, cleanable + batches and type of the batch. + The size of the result set can be retrieved by using the + [Get Cleanable Batch Report Count](${docsUrl}/reference/rest/history/batch/get-cleanable-batch-report-count/) + method. + + **Please note:** + The history time to live for batch operations does not support [Multi-Tenancy](${docsUrl}/user-guide/process-engine/multi-tenancy.md). + The report will return an information for all batch operations (for all tenants) if you have permissions + to see the history. + " + /> + + "parameters" : [ + <#assign sortByValues = [ + '"finished"' + ]> + <#assign last = false > + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CleanableHistoricBatchReportResultDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/batch/cleanable-batch-report`", + "description": "GET `/history/batch/cleanable-batch-report` + + An array containing finished batches information relevant to history cleanup.", + "value": [ + { + "batchType": "instance-modification", + "historyTimeToLive": 5, + "finishedBatchCount": 100, + "cleanableBatchCount": 53 + }, + { + "batchType": "instance-deletion", + "historyTimeToLive": 5, + "finishedBatchCount": 1000, + "cleanableBatchCount": 13 + } + ] + }'] + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..afc014a1328a0b71ecce36bef65a07a7dc7857e5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/count/get.ftl @@ -0,0 +1,56 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/batch/get-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricBatchesCount" + tag = "Historic Batch" + summary = "Get Historic Batch Count" + desc = "Requests the number of historic batches that fulfill the query criteria. + Takes the same filtering parameters as the + [Get Historic Batches](${docsUrl}/reference/rest/history/batch/get-query/) + method." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/historic-batch-params.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/history/batch/count?type=aBatchType`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + Returned if some of the query parameters are invalid, for example if + a `sortOrder` parameter is supplied, but no `sortBy`. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7d595c4d61a22cb2217e45c1f2b16684b7b67cb0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/get.ftl @@ -0,0 +1,75 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/batch/get-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricBatches" + tag = "Historic Batch" + summary = "Get Historic Batches" + desc = "Queries for historic batches that fulfill given parameters. Parameters may be + the properties of batches, such as the id or type. The + size of the result set can be retrieved by using the + [Get Historic Batch Count](${docsUrl}/reference/rest/history/batch/get-query-count/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/historic-batch-params.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricBatchDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/history/batch?type=aBatchType&completed=true&sortBy=batchId&sortOrder=asc`", + "value": [ + { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "createUserId": "aUserId", + "startTime": "2016-04-12T15:29:33.000+0200", + "endTime": "2016-04-12T16:23:34.000+0200", + "removalTime": "2016-04-15T16:23:34.000+0200" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + Returned if some of the query parameters are invalid, for example if + a `sortOrder` parameter is supplied, but no `sortBy`. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/set-removal-time/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/set-removal-time/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..879e8708a4cd7073d519969b35d41983cdc7c3d6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/set-removal-time/post.ftl @@ -0,0 +1,76 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/batch/post-batch-set-removal-time/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "setRemovalTimeAsyncHistoricBatch" + tag = "Historic Batch" + summary = "Set Removal Time Async (POST)" + desc = "Sets the removal time to multiple historic batches asynchronously (batch). + + At least __historicBatchIds__ or __historicBatchQuery__ has to be + provided. If both are provided, + all instances matching query criterion and instances from the list + will be updated with a removal time." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "SetRemovalTimeToHistoricBatchesDto" + examples = ['"example-1": { + "summary": "POST `/history/batch/set-removal-time`", + "value": { + "absoluteRemovalTime": "2019-05-05T11:56:24.725+0200", + "historicBatchQuery": { + "completed": true + }, + "historicBatchIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7", + "b4d2ad94-7240-11e9-98b7-be5e0f7575b7" + ] + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "POST `/history/batch/set-removal-time`", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "batch-set-removal-time", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting" + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + Request was unsuccessful due to a bad user request. This occurs if + some of the query parameters are invalid, e.g. if neither + historicBatchIds nor historicBatchQuery is present or if no mode is + specified. + + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..36379a2df60a09501713e4b4b07185d25c7dcc28 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/{id}/delete.ftl @@ -0,0 +1,43 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/batch/delete/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteHistoricBatch" + tag = "Historic Batch" + summary = "Delete Historic Batch" + desc = "Deletes a historic batch by id, including related historic job logs." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the batch to be deleted." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Historic batch with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..955865e0c409fdd6714a2ed5398f84af753cc5c8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/batch/{id}/get.ftl @@ -0,0 +1,67 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/batch/get/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricBatch" + tag = "Historic Batch" + summary = "Get Historic Batch" + desc = "Retrieves a historic batch by id, according to the `HistoricBatch` interface in the + engine." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the historic batch to be retrieved." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricBatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/history/batch/aBatchId`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "size": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "createUserId": "aUserId", + "startTime": "2016-04-12T15:29:33.000+0200", + "endTime": "2016-04-12T16:23:34.000+0200", + "removalTime": "2016-04-15T16:23:34.000+0200" + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = " + Historic batch with given id does not exist. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/cleanup/configuration/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/cleanup/configuration/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7517144f922bf9933a189ccb751b999dc41d2f17 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/cleanup/configuration/get.ftl @@ -0,0 +1,33 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/history-cleanup/get-cleanup-configuration/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoryCleanupConfiguration" + tag = "History Cleanup" + summary = "Get History Cleanup Configuration" + desc = "Retrieves history cleanup batch window configuration (See + [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup))." + /> + + "responses": { + + <@lib.response + code = "200" + dto = "HistoryCleanupConfigurationDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/cleanup/configuration`", + "description": "GET `/history/cleanup/configuration`", + "value": { + "batchWindowStartTime": "2017-09-11T23:59:00.000+0200", + "batchWindowEndTime": "2017-09-12T02:00:00.000+0200", + "enabled": "true" + } + }'] + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/cleanup/job/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/cleanup/job/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5db6c78b11fdbb3000e9e2791cab14473d6691a8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/cleanup/job/get.ftl @@ -0,0 +1,52 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/history-cleanup/get-history-cleanup-job/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "findCleanupJob" + tag = "History Cleanup" + deprecated = true + summary = "Find clean up history job (GET)" + desc = "**Deprecated!** Use `GET /history/cleanup/jobs` instead. + + Finds history cleanup job (See + [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup))." + /> + + "responses": { + + <@lib.response + code = "200" + dto = "JobDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/cleanup/job`", + "description": "GET `/history/cleanup/job`", + "value": { + "id": "074bd92a-1a95-11e7-8ceb-34f39ab71d4e", + "jobDefinitionId": null, + "processInstanceId": null, + "processDefinitionId": null, + "processDefinitionKey": null, + "executionId": null, + "exceptionMessage": null, + "retries": 3, + "dueDate": "2017-04-06T13:57:45.000+0200", + "suspended": false, + "priority": 0, + "tenantId": null, + "createTime": "2017-05-05T17:00:00+0200" + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "History clean up job does not exist." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/cleanup/jobs/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/cleanup/jobs/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..939dcf86d25719358c5d7556288b99b4b7b6e518 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/cleanup/jobs/get.ftl @@ -0,0 +1,67 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/history-cleanup/get-history-cleanup-jobs/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "findCleanupJobs" + tag = "History Cleanup" + summary = "Find clean up history jobs (GET)" + desc = "Finds history cleanup jobs (See + [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup))." + /> + + "responses": { + + <@lib.response + code = "200" + dto = "JobDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/cleanup/jobs`", + "description": "GET `/history/cleanup/jobs`", + "value": [ + { + "id": "aJobId", + "jobDefinitionId": null, + "processInstanceId": null, + "processDefinitionId": null, + "processDefinitionKey": null, + "executionId": null, + "exceptionMessage": null, + "retries": 3, + "dueDate": "aDueDate", + "suspended": false, + "priority": 0, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200" + }, + { + "id": "anotherJobId", + "jobDefinitionId": null, + "processInstanceId": null, + "processDefinitionId": null, + "processDefinitionKey": null, + "executionId": null, + "exceptionMessage": null, + "retries": 3, + "dueDate": "anotherDueDate", + "suspended": false, + "priority": 0, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200" + } + ] + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "History clean up jobs are empty." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/cleanup/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/cleanup/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6f3d1de1e8bb89eba2bc726fc94bbc8f79510ee9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/cleanup/post.ftl @@ -0,0 +1,70 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/history-cleanup/post-history-cleanup/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "cleanupAsync" + tag = "History Cleanup" + summary = "Clean up history (POST)" + desc = "Schedules asynchronous history cleanup (See + [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup)). + + **Note:** This endpoint will return at most a single history cleanup job. + Since version `7.9.0` it is possible to configure multiple + [parallel history cleanup jobs](${docsUrl}/user-guide/process-engine/history/#parallel-execution). Use + [`GET /history/cleanup/jobs`](${docsUrl}/reference/rest/history/history-cleanup/get-history-cleanup-jobs) + to find all the available history cleanup jobs." + /> + + "parameters" : [ + + <@lib.parameter + name = "immediatelyDue" + location = "query" + type = "boolean" + desc = "When true the job will be scheduled for nearest future. When `false`, the job will be + scheduled for next batch window start time. Default is `true`." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "JobDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/history/cleanup?immediatelyDue=false`", + "description": "POST `/history/cleanup?immediatelyDue=false`", + "value": { + "id": "074bd92a-1a95-11e7-8ceb-34f39ab71d4e", + "jobDefinitionId": null, + "processInstanceId": null, + "processDefinitionId": null, + "processDefinitionKey": null, + "executionId": null, + "exceptionMessage": null, + "retries": 3, + "dueDate": "2017-04-06T13:57:45.000+0200", + "suspended": false, + "priority": 0, + "tenantId": null, + "createTime": "2017-04-01T09:45:15.039+0100" + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid or the engine + does not participate in history cleanup. See + [Cleanup Execution Participation per Node](${docsUrl}/user-guide/process-engine/history/#cleanup-execution-participation-per-node)." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-definition/cleanable-decision-instance-report/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-definition/cleanable-decision-instance-report/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0e69ae9cfcf9a23bea16a20705ac9f636464ee02 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-definition/cleanable-decision-instance-report/count/get.ftl @@ -0,0 +1,52 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/decision-definition/get-cleanable-decision-instance-report-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getCleanableHistoricDecisionInstanceReportCount" + tag = "Historic Decision Definition" + summary = "Get Cleanable Decision Instance Report Count" + desc = "Queries for the number of report results about a decision definition and finished + decision instances relevant to history cleanup (see + [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup)). + Takes the same parameters as the [Get Cleanable Decision Instance Report](${docsUrl}/reference/rest/history/decision-definition/get-cleanable-decision-instance-report/) + method." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/history-cleanable-decision-definition-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "request", + "description": "GET `/history/decision-definition/cleanable-decision-instance-report/count`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the + error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-definition/cleanable-decision-instance-report/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-definition/cleanable-decision-instance-report/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..04747985b0a088356ffb29923a3db62ba5b162a3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-definition/cleanable-decision-instance-report/get.ftl @@ -0,0 +1,79 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/decision-definition/get-cleanable-decision-instance-report/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getCleanableHistoricDecisionInstanceReport" + tag = "Historic Decision Definition" + summary = "Get Cleanable Decision Instance Report" + desc = "Retrieves a report about a decision definition and finished decision instances + relevant to history cleanup (see + [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup)), + so that you can tune the history time to live. + These reports include the count of the finished historic decision + instances, cleanable decision instances and basic decision definition + data - id, key, name and version. + The size of the result set can be retrieved by using the + [Get Cleanable Decision Instance Report Count](${docsUrl}/reference/rest/history/decision-definition/get-cleanable-decision-instance-report-count/) method." + /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/history-cleanable-decision-definition-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CleanableHistoricDecisionInstanceReportResultDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "request", + "description": "GET `/history/decision-definition/cleanable-decision-instance-report`", + "value": [ + { + "decisionDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "decisionDefinitionKey": "invoice", + "decisionDefinitionName": "Invoice Receipt", + "decisionDefinitionVersion": 1, + "historyTimeToLive": 5, + "finishedDecisionInstanceCount": 100, + "cleanableDecisionInstanceCount": 53, + "tenantId": "aTenantId" + }, + { + "decisionDefinitionId": "invoice:2:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "decisionDefinitionKey": "invoice", + "decisionDefinitionName": "Invoice Receipt v2.0", + "decisionDefinitionVersion": 2, + "historyTimeToLive": 5, + "finishedDecisionInstanceCount": 1000, + "cleanableDecisionInstanceCount": 13, + "tenantId": "aTenantId" + } + ] + }'] + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the + error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..076f0f23ad939e443d7349d6142f8c922296e3cf --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/count/get.ftl @@ -0,0 +1,51 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/decision-instance/get-decision-instance-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricDecisionInstancesCount" + tag = "Historic Decision Instance" + summary = "Get Historic Decision Instance Count" + desc = "Queries for the number of historic decision instances that fulfill the given parameters. + Takes the same parameters as the + [Get Historic Decision Instances](${docsUrl}/reference/rest/history/decision-instance/get-decision-instance-query/) + method." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/historic-decision-instance-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/decision-instance/count`", + "value": { + "count": 4 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/delete/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/delete/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c9bcef6f824a60405312ce4b802cec4df9eb5744 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/delete/post.ftl @@ -0,0 +1,72 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/decision-instance/post-delete/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteAsync" + tag = "Historic Decision Instance" + summary = "Delete Async (POST)" + desc = "Delete multiple historic decision instances asynchronously (batch). + At least `historicDecisionInstanceIds` or `historicDecisionInstanceQuery` + has to be provided. If both are provided then all instances matching query + criterion and instances from the list will be deleted." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "DeleteHistoricDecisionInstancesDto" + examples = ['"example-1": { + "summary": "POST `/history/decision-instance/delete`", + "description": "POST `/history/decision-instance/delete`", + "value": { + "historicDecisionInstanceIds": [ + "aDecision", + "secondDecision" + ], + "historicDecisionInstanceQuery": { + "decisionDefinitionKey": "a-definition-key" + }, + "deleteReason": "a delete reason" + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/history/decision-instance/delete`", + "description": "POST `/history/decision-instance/delete`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspened": false, + "tenantId": null, + "createUserId": "aUser" + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, i.e. neither + `historicDecisionInstanceIds` nor `historicDecisionInstanceQuery` is + present. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6d81bcda6fb3ffd1cf338dd6478e680bb8ec776b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/get.ftl @@ -0,0 +1,130 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricDecisionInstances" + tag = "Historic Decision Instance" + summary = "Get Historic Decision Instances" + desc = "Queries for historic decision instances that fulfill the given parameters. + The size of the result set can be retrieved by using the + [Get Historic Decision Instance Count](${docsUrl}/reference/rest/history/decision-instance/get-decision-instance-query-count/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/historic-decision-instance-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/historic-decision-instance-single-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricDecisionInstanceDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "request including inputs and outputs", + "description": "GET `/history/decision-instance?includeInputs=true&includeOutputs=true`", + "value": [ + { + "activityId": "assignApprover", + "activityInstanceId": "assignApprover:67e9de1e-579d-11e5-9848-f0def1e59da8", + "collectResultValue": null, + "decisionDefinitionId": "invoice-assign-approver:1:4c864d79-579d-11e5-9848-f0def1e59da8", + "decisionDefinitionKey": "invoice-assign-approver", + "decisionDefinitionName": "Assign Approver", + "evaluationTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "id": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "inputs": [ + { + "clauseId": "clause1", + "clauseName": "Invoice Amount", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c41-579d-11e5-9848-f0def1e59da8", + "type": "Double", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": 123.0, + "valueInfo": {} + }, + { + "clauseId": "clause2", + "clauseName": "Invoice Category", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c40-579d-11e5-9848-f0def1e59da8", + "type": "String", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": "Misc", + "valueInfo": {} + } + ], + "outputs": [ + { + "clauseId": "clause3", + "clauseName": "Approver Group", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c42-579d-11e5-9848-f0def1e59da8", + "ruleId": "DecisionRule_1of5a87", + "ruleOrder": 1, + "type": "String", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": "accounting", + "valueInfo": {}, + "variableName": "result" + } + ], + "processDefinitionId": "invoice:1:4c6e3197-579d-11e5-9848-f0def1e59da8", + "processDefinitionKey": "invoice", + "processInstanceId": "67e98fec-579d-11e5-9848-f0def1e59da8", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "caseDefinitionId": null, + "caseDefinitionKey": null, + "caseInstanceId": null, + "tenantId": null, + "userId": null, + "rootDecisionInstanceId": null, + "decisionRequirementsDefinitionId": null, + "decisionRequirementsDefinitionKey": null + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/set-removal-time/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/set-removal-time/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..523890cd2e1beb40287f9294c27a9c4c919c3dfa --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/set-removal-time/post.ftl @@ -0,0 +1,80 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/decision-instance/post-decision-instance-set-removal-time/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "setRemovalTimeAsyncHistoricDecisionInstance" + tag = "Historic Decision Instance" + summary = "Set Removal Time Async (POST)" + desc = "Sets the removal time to multiple historic decision instances asynchronously + (batch). + + At least `historicDecisionInstanceIds` or + `historicDecisionInstanceQuery` has to be provided. If both are + provided, all instances matching query criterion and instances from the list + will be updated with a removal time." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "SetRemovalTimeToHistoricDecisionInstancesDto" + examples = ['"example-1": { + "summary": "POST `/history/decision-instance/set-removal-time`", + "description": "POST `/history/decision-instance/set-removal-time`", + "value": { + "absoluteRemovalTime": "2019-05-05T11:56:24.725+0200", + "hierarchical": true, + "historicDecisionInstanceQuery": { + "evaluatedBefore": "2019-09-05T17:02:10.123+0200" + }, + "historicDecisionInstanceIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7", + "b4d2ad94-7240-11e9-98b7-be5e0f7575b7" + ] + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/history/decision-instance/set-removal-time`", + "description": "POST `/history/decision-instance/set-removal-time`", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "decision-set-removal-time", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "suspended": false, + "tenantId": "accounting", + "createUserId": "demo-user" + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Request was unsuccessfull due to a bad user request. This occurs if + some of the query parameters are invalid, e. g. if neither + historicDecisionInstances nor historicDecisionInstanceQuery is + present or if no mode is specified. + + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3629865ec6df944090d7fd5bde482fdb23f70da7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-instance/{id}/get.ftl @@ -0,0 +1,124 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/decision-instance/get-decision-instance/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricDecisionInstance" + tag = "Historic Decision Instance" + summary = "Get Historic Decision Instance" + desc = "Retrieves a historic decision instance by id, according to the + `HistoricDecisionInstance` interface in the engine." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the historic decision instance to be retrieved." + /> + + <#assign last = true > + <#include "/lib/commons/historic-decision-instance-single-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricDecisionInstanceDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "request including inputs and outputs", + "description": "GET `/history/decision-instance/aDecisionInstId?includeInput=true&includeOutputs=true`", + "value": { + "activityId": "assignApprover", + "activityInstanceId": "assignApprover:67e9de1e-579d-11e5-9848-f0def1e59da8", + "collectResultValue": null, + "decisionDefinitionId": "invoice-assign-approver:1:4c864d79-579d-11e5-9848-f0def1e59da8", + "decisionDefinitionKey": "invoice-assign-approver", + "decisionDefinitionName": "Assign Approver", + "evaluationTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "id": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "inputs": [ + { + "clauseId": "clause1", + "clauseName": "Invoice Amount", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c41-579d-11e5-9848-f0def1e59da8", + "type": "Double", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": 123.0, + "valueInfo": {} + }, + { + "clauseId": "clause2", + "clauseName": "Invoice Category", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c40-579d-11e5-9848-f0def1e59da8", + "type": "String", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": "Misc", + "valueInfo": {} + } + ], + "outputs": [ + { + "clauseId": "clause3", + "clauseName": "Approver Group", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c42-579d-11e5-9848-f0def1e59da8", + "ruleId": "DecisionRule_1of5a87", + "ruleOrder": 1, + "type": "String", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": "accounting", + "valueInfo": {}, + "variableName": "result" + } + ], + "processDefinitionId": "invoice:1:4c6e3197-579d-11e5-9848-f0def1e59da8", + "processDefinitionKey": "invoice", + "processInstanceId": "67e98fec-579d-11e5-9848-f0def1e59da8", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "caseDefinitionId": null, + "caseDefinitionKey": null, + "caseInstanceId": null, + "tenantId": null, + "userId": null, + "rootDecisionInstanceId": null, + "decisionRequirementsDefinitionId": null, + "decisionRequirementsDefinitionKey": null + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Historic decision instance with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-requirements-definition/{id}/statistics/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-requirements-definition/{id}/statistics/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6b1e9d528e111d555bd6e0941156b32eced63cad --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/decision-requirements-definition/{id}/statistics/get.ftl @@ -0,0 +1,73 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/decision-requirements-definition/get-statistics/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getDecisionStatistics" + tag = "Historic Decision Requirements Definition" + summary = "Get DRD Statistics" + desc = "Retrieves evaluation statistics of a given decision requirements definition." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the decision requirements definition." + /> + + <@lib.parameter + name = "decisionInstanceId" + location = "query" + type = "string" + desc = "Restrict query results to be based only on specific evaluation + instance of a given decision requirements definition." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricDecisionInstanceStatisticsDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "request", + "description": "GET `/history/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/statistics`", + "value": [ + { + "decisionDefinitionKey": "dish-decision", + "evaluations": 1 + } + ] + }', + '"example-2": { + "summary": "request with decisionInstanceId", + "description": "GET `/history/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/statistics?decisionInstanceId=17`", + "value": [ + { + "decisionDefinitionKey": "dish-decision", + "evaluations": 1 + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0da7dbb3e55386cd0f4348dd934840e89948549c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/count/get.ftl @@ -0,0 +1,49 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricDetailsCount" + tag = "Historic Detail" + summary = "Get Historic Detail Count" + desc = "Queries for the number of historic details that fulfill the given parameters. + Takes the same parameters as the [Get Historic + Details](${docsUrl}/reference/rest/history/detail/get-detail-query/) + method." + /> + + "parameters" : [ + + <#assign requestMethod="GET"/> + <#include "/lib/commons/history-detail-query-params.ftl" > + <@lib.parameters + object = params + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/detail/count?variableName=my_variable`", + "description": "GET `/history/detail/count?variableName=my_variable`", + "value": { + "count": 3 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7c811c7a1965821a44066e6244cdf0ee65242d38 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/get.ftl @@ -0,0 +1,113 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricDetails" + tag = "Historic Detail" + summary = "Get Historic Details" + desc = "Queries for historic details that fulfill the given parameters. + The size of the result set can be retrieved by using the + [Get Historic Detail Count](${docsUrl}/reference/rest/history/detail/get-detail-query-count/) method." + /> + + "parameters" : [ + + <#assign last = false > + <#assign requestMethod="GET"/> + <#include "/lib/commons/history-detail-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#include "/lib/commons/pagination-params.ftl"> + <#assign last = true > + <#include "/lib/commons/deserialize-values-parameter.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricDetailDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/detail?processInstanceId=3cd597b7-001a-11e7-8c6b-34f39ab71d4e`", + "description": "GET `/history/detail?processInstanceId=3cd597b7-001a-11e7-8c6b-34f39ab71d4e`", + "value": [ + { + "type": "variableUpdate", + "id": "3cd79390-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "amount", + "variableInstanceId": "3cd65b08-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "Double", + "value": 30.0, + "valueInfo": {}, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + }, + { + "type": "variableUpdate", + "id": "3cd79392-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "invoiceDocument", + "variableInstanceId": "3cd65b0a-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "File", + "value": null, + "valueInfo": { + "mimeType": "application/pdf", + "filename": "invoice.pdf" + }, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d435ddac8c957c0c7f2d7838791bf92ed0b2942a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/post.ftl @@ -0,0 +1,127 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryHistoricDetails" + tag = "Historic Detail" + summary = "Get Historic Details (POST)" + desc = "Queries for historic details that fulfill the given parameters. This method is slightly more + powerful than the [Get Historic Details](${docsUrl}/reference/rest/history/detail/get-detail-query/) + method because it allows sorting by multiple parameters. The size of the result set can be retrieved by + using the [Get Historic Detail Count](${docsUrl}/reference/rest/history/detail/get-detail-query-count/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/pagination-params.ftl"> + <#assign last = true > + <#include "/lib/commons/deserialize-values-parameter.ftl"> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoricDetailQueryDto" + examples = ['"example-1": { + "summary": "POST `/history/detail?firstResult=1&maxResults=10`", + "description": "POST `/history/detail?firstResult=1&maxResults=10`", + "value": { + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "occurredAfter": "2018-01-29T10:15:45.000+0100", + "sorting": [ + { + "sortBy": "processInstanceId", + "sortOrder": "asc" + } + ] + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricDetailDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/history/detail?firstResult=1&maxResults=10`", + "description": "POST `/history/detail?firstResult=1&maxResults=10`", + "value": [ + { + "type": "variableUpdate", + "id": "3cd79390-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "amount", + "variableInstanceId": "3cd65b08-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "Double", + "value": 30.0, + "valueInfo": {}, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + }, + { + "type": "variableUpdate", + "id": "3cd79392-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "invoiceDocument", + "variableInstanceId": "3cd65b0a-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "File", + "value": null, + "valueInfo": { + "mimeType": "application/pdf", + "filename": "invoice.pdf" + }, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/{id}/data/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/{id}/data/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..044c7268d9bc043f1e129ddf40ff1e3eb7d4f2f9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/{id}/data/get.ftl @@ -0,0 +1,81 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/detail/get-detail-binary/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "historicDetailBinary" + tag = "Historic Detail" + summary = "Get Historic Detail (Binary)" + desc = "Retrieves the content of a historic variable update by id. Applicable for byte + array and file variables." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the historic variable update." + last = true + /> + + ], + + "responses": { + + "200": { + "description": "Request successful.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/history/detail/someId/data`", + "value": "binary variable: Status 200. Content-Type: application/octet-stream" + } + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type. Additionally, + for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1": { + "summary": "GET `/history/detail/someId/data`", + "value": "file variable: Status 200. Content-Type: text/plain; charset=UTF-8. + Content-Disposition: attachment; filename='someFile.txt'" + } + } + } + } + }, + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Detail with given id exists but is not a binary variable. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Detail with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..56d66e5d423d2ff1fe17eacade326db54b032cdd --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/detail/{id}/get.ftl @@ -0,0 +1,99 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/detail/get-detail/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "historicDetail" + tag = "Historic Detail" + summary = "Get Historic Detail" + desc = "Retrieves a historic detail by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the detail." + /> + + <@lib.parameter + name = "deserializeValue" + location = "query" + type = "boolean" + desc = "Determines whether serializable variable values (typically + variables that store custom Java objects) should be deserialized + on server side (default `true`). + + If set to `true`, a serializable variable will be deserialized on + server side and transformed to JSON using + [Jackson's](https://github.com/FasterXML/jackson) POJO/bean + property introspection feature. Note that this requires the Java + classes of the variable value to be on the REST API's classpath. + + If set to `false`, a serializable variable will be returned in its + serialized format. For example, a variable that is serialized as + XML will be returned as a JSON string containing XML. + + **Note:** While `true` is the default value for reasons of + backward compatibility, we recommend setting this parameter to + `false` when developing web applications that are independent of + the Java process applications deployed to the engine." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricDetailDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/detail/3cd79390-001a-11e7-8c6b-34f39ab71d4e`", + "description": "GET `/history/detail/3cd79390-001a-11e7-8c6b-34f39ab71d4e`", + "value": { + "type": "variableUpdate", + "id": "3cd79390-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "amount", + "variableInstanceId": "3cd65b08-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "Double", + "value": 30.0, + "valueInfo": {}, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Variable with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0c13e8f1f8e0fd8800f2ab5b1bb0680919262052 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/count/get.ftl @@ -0,0 +1,51 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/get-external-task-log-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricExternalTaskLogsCount" + tag = "Historic External Task Log" + summary = "Get External Task Log Count" + desc = "Queries for the number of historic external task logs that fulfill the given + parameters. + Takes the same parameters as the + [Get External Task Logs](${docsUrl}/reference/rest/history/external-task-log/get-external-task-log-query/) + method." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/historic-external-task-log-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/external-task-log/count?externalTaskId=anExternalTaskId`", + "description": "GET `/history/external-task-log/count?externalTaskId=anExternalTaskId`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..cd15e12208868075f09c92c2267b9ef92795b213 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/count/post.ftl @@ -0,0 +1,55 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/post-external-task-log-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryHistoricExternalTaskLogsCount" + tag = "Historic External Task Log" + summary = "Get External Task Log Count (POST)" + desc = "Queries for the number of historic external task logs that fulfill the given + parameters. + This method takes the same message body as the + [Get External Task Logs (POST)](${docsUrl}/reference/rest/history/external-task-log/post-external-task-log-query/) + method and therefore it is slightly more powerful than the + [Get External Task Log Count](${docsUrl}/reference/rest/history/external-task-log/get-external-task-log-query-count/) + method." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoricExternalTaskLogQueryDto" + examples = ['"example-1": { + "summary": "POST `/history/external-task-log/count`", + "value": { + "externalTaskId": "anExternalTaskId" + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/history/external-task-log/count`", + "description": "POST `/history/external-task-log/count`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5a570815e22aedf13425cfdc276f1353273bb406 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/get.ftl @@ -0,0 +1,79 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/get-external-task-log-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricExternalTaskLogs" + tag = "Historic External Task Log" + summary = "Get External Task Logs" + desc = "Queries for historic external task logs that fulfill the given parameters. + The size of the result set can be retrieved by using the + [Get External Task Log Count](${docsUrl}/reference/rest/history/external-task-log/get-external-task-log-query-count/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/historic-external-task-log-query-params.ftl"> + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricExternalTaskLogDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/external-task-log?externalTaskId=anExternalTaskId`", + "description": "GET `/history/external-task-log?externalTaskId=anExternalTaskId`", + "value": [ + { + "id": "someId", + "timestamp": "2017-01-15T15:22:20.000+0200", + "externalTaskId": "anExternalTaskId", + "topicName": "aTopicName", + "workerId": "aWorkerId", + "retries": 3, + "priority": 5, + "errorMessage": "An error occured!", + "activityId": "externalServiceTask", + "activityInstanceId": "externalServiceTask:15", + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "tenantId": null, + "creationLog": false, + "failureLog": true, + "successLog": false, + "deletionLog": false, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..93068a527dd74166bba0b3639b3c05794f1a0f22 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/post.ftl @@ -0,0 +1,77 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/post-external-task-log-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryHistoricExternalTaskLogs" + tag = "Historic External Task Log" + summary = "Get External Task Logs (POST)" + desc = "Queries for historic external task logs that fulfill the given parameters. + This method is slightly more powerful than the + [Get External Task Logs](${docsUrl}/reference/rest/history/external-task-log/get-external-task-log-query/) + method because it allows filtering by historic external task logs + values of the different types `String`, `Number` or `Boolean`." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoricExternalTaskLogQueryDto" + examples = ['"example-1": { + "summary": "POST `/history/external-task-log`", + "value": { + "externalTaskId": "anExternalTaskId" + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricExternalTaskLogDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/history/external-task-log`", + "description": "POST `/history/external-task-log`", + "value": [ + { + "id": "someId", + "timestamp": "2017-01-15T15:22:20.000+0200", + "externalTaskId": "anExternalTaskId", + "topicName": "aTopicName", + "workerId": "aWorkerId", + "retries": 3, + "priority": 5, + "errorMessage": "An error occured!", + "activityId": "externalServiceTask", + "activityInstanceId": "externalServiceTask:15", + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "tenantId": null, + "creationLog": false, + "failureLog": true, + "successLog": false, + "deletionLog": false, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/{id}/error-details/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/{id}/error-details/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..bd3edf7a471be58a194ae3b9e4b9a3ae4c48b4f2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/{id}/error-details/get.ftl @@ -0,0 +1,55 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/get-external-task-log-error-details/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getErrorDetailsHistoricExternalTaskLog" + tag = "Historic External Task Log" + summary = "Get External Task Log Error Details" + desc = "Retrieves the corresponding error details of the passed historic external task log + by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the historic external task log to get the error details for." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + mediaType= "text/plain" + desc = "Request successful." + contentDesc = "Returns the error details of the historic external task log with the given ID." + examples = ['"example-1": { + "summary": "GET `history/external-task-log/someId/error-details`", + "description": "GET `history/external-task-log/someId/error-details`", + "value": "java.lang.RuntimeException: A exception message! + at org.camunda.bpm.pa.service.FailingDelegate.execute(FailingDelegate.java:10) + at org.camunda.bpm.engine.impl.delegate.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:34) + at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37) + ..." + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Historic external task log with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3cb2df18f448d4db327f2768281d810c1d577cb7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/{id}/get.ftl @@ -0,0 +1,71 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/get-external-task-log/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricExternalTaskLog" + tag = "Historic External Task Log" + summary = "Get External Task Log" + desc = "Retrieves a historic external task log by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the log entry." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricExternalTaskLogDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/history/external-task-log/someId`", + "value": { + "id": "someId", + "timestamp": "2017-01-15T15:22:20.000+0200", + "externalTaskId": "anExternalTaskId", + "topicName": "aTopicName", + "workerId": "aWorkerId", + "retries": 3, + "priority": 5, + "errorMessage": "An error occured!", + "activityId": "externalServiceTask", + "activityInstanceId": "externalServiceTask:15", + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "tenantId": null, + "creationLog": false, + "failureLog": true, + "successLog": false, + "deletionLog": false, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Historic external task log with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/identity-link-log/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/identity-link-log/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..667fca2c0eec2789ffe617004e545592ba3868fe --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/identity-link-log/count/get.ftl @@ -0,0 +1,53 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/identity-links/get-identity-link-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricIdentityLinksCount" + tag = "Historic Identity Link Log" + summary = "Get Identity Link Log Count" + desc = "Queries for the number of historic identity link logs that fulfill the given + parameters. Takes the same parameters as the + [Get Identity-Link-Logs](${docsUrl}/reference/rest/history/identity-links/get-identity-link-query/) + method." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/history-identity-link.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/identity-link-log/count?taskId=aTaskId`", + "description": "GET `/history/identity-link-log/count?taskId=aTaskId`", + "value": { + "count": 2 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/identity-link-log/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/identity-link-log/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..51fb2f0d31e65aeea4e8616d47d46d66bb101b25 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/identity-link-log/get.ftl @@ -0,0 +1,85 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/identity-links/get-identity-link-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricIdentityLinks" + tag = "Historic Identity Link Log" + summary = "Get Identity Link Logs" + desc = "Queries for historic identity link logs that fulfill given parameters. + The size of the result set can be retrieved by using the + [Get Identity-Link-Log Count](${docsUrl}/reference/rest/history/identity-links/get-identity-link-query-count/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/history-identity-link.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricIdentityLinkLogDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/identity-link-log?taskId=aTaskId`", + "description": "GET `/history/identity-link-log?taskId=aTaskId`", + "value": [ + { + "id": "1", + "time": "2014-03-01T08:00:00.000+0200", + "type": "candidate", + "userId": "aUserId", + "groupId": "aGroupId", + "taskId": "aTaskId", + "processDefinitionId": "12", + "operationType": "add", + "assignerId": "aAssignerId", + "processDefinitionKey": "oneTaskProcess", + "tenantId": "tenant1", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "2", + "time": "2014-03-05T10:00:00.000+0200", + "type": "candidate", + "userId": "aUserId", + "groupId": "aGroupId", + "taskId": "aTaskId", + "processDefinitionId": "12", + "operationType": "delete", + "assignerId": "aAssignerId", + "processDefinitionKey": "oneTaskProcess", + "tenantId": "tenant1", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/incident/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/incident/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3e4945f2bc926986af2e56645d039971b33f77c8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/incident/count/get.ftl @@ -0,0 +1,54 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/incident/get-incident-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricIncidentsCount" + tag = "Historic Incident" + summary = "Get Incident Count" + desc = "Queries for the number of historic incidents that fulfill the given parameters. + Takes the same parameters as the + [Get Incidents](${docsUrl}/reference/rest/history/incident/get-incident-query/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/historic-incident-query-params.ftl" > + <#assign last = true > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/incident/count?processInstanceId=aProcInstId`", + "description": "GET `/history/incident/count?processInstanceId=aProcInstId`", + "value": { + "count": 2 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/incident/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/incident/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1a082e69a0d3063b8b883be794de7b9ac9320861 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/incident/get.ftl @@ -0,0 +1,103 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/filter/get-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricIncidents" + tag = "Historic Incident" + summary = "Get Incidents" + desc = "Queries for historic incidents that fulfill given parameters. + The size of the result set can be retrieved by using the + [Get Incident Count](${docsUrl}/reference/rest/history/incident/get-incident-query-count/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#assign requestMethod="GET"/> + <#include "/lib/commons/historic-incident-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricIncidentDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/incident?processInstanceId=aProcInstId`", + "description": "GET `/history/incident?processInstanceId=aProcInstId`", + "value": [ + { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecutionId", + "createTime": "2014-03-01T08:00:00.000+0200", + "endTime": null, + "incidentType": "failedJob", + "activityId": "serviceTask", + "failedActivityId": "serviceTask", + "causeIncidentId": "aCauseIncidentId", + "rootCauseIncidentId": "aRootCauseIncidentId", + "configuration": "aConfiguration", + "incidentMessage": "anIncidentMessage", + "tenantId": null, + "jobDefinitionId": "aJobDefinitionId", + "open": true, + "deleted": false, + "resolved": false, + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "annotation": "an annotation" + }, + { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anotherExecutionId", + "createTime": "2014-03-01T08:00:00.000+0200", + "endTime": "2014-03-10T12:00:00.000+0200", + "incidentType": "customIncidentType", + "activityId": "userTask", + "failedActivityId": "userTask", + "causeIncidentId": "anotherCauseIncidentId", + "rootCauseIncidentId": "anotherRootCauseIncidentId", + "configuration": "anotherConfiguration", + "incidentMessage": "anotherIncidentMessage", + "tenantId": null, + "jobDefinitionId": null, + "open": false, + "deleted": false, + "resolved": true, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "annotation": "another annotation" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f23483b064caaa481c615a1238a9e6394353f5a8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/count/get.ftl @@ -0,0 +1,50 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/job-log/get-job-log-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricJobLogsCount" + tag = "Historic Job Log" + summary = "Get Job Log Count" + desc = "Queries for the number of historic job logs that fulfill the given parameters. + Takes the same parameters as the + [Get Job Logs](${docsUrl}/reference/rest/history/job-log/get-job-log-query/) + method." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/history-job-log-params.ftl"> + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/job-log/count?jobId=aJobId`", + "description": "GET `/history/job-log/count?jobId=aJobId`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..22c79582fe21b63c39156ba8a6893217ac6bf044 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/count/post.ftl @@ -0,0 +1,54 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/job-log/post-job-log-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryHistoricJobLogsCount" + tag = "Historic Job Log" + summary = "Get Job Log Count (POST)" + desc = "Queries for the number of historic job logs that fulfill the given parameters. + This method takes the same message body as the + [Get Job Logs (POST)](${docsUrl}/reference/rest/history/job-log/post-job-log-query/) + method and therefore it is slightly more powerful than the + [Get Job Log Count](${docsUrl}/reference/rest/history/job-log/get-job-log-query-count/) + method." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoricJobLogQueryDto" + examples = ['"example-1": { + "summary": "POST `/history/job-log/count`", + "value": { + "jobId": "aJobId" + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/history/job-log/count`", + "description": "POST `/history/job-log/count`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2274dfbb11a374486b6ba52875784439a7f506e9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/get.ftl @@ -0,0 +1,84 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/job-log/get-job-log-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricJobLogs" + tag = "Historic Job Log" + summary = "Get Job Logs" + desc = "Queries for historic job logs that fulfill the given parameters. + The size of the result set can be retrieved by using the + [Get Job Log Count](${docsUrl}/reference/rest/history/job-log/get-job-log-query-count/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/history-job-log-params.ftl"> + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricJobLogDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/job-log?jobId=aJobId`", + "description": "GET `/history/job-log?jobId=aJobId`", + "value": [ + { + "id": "someId", + "timestamp": "2015-01-15T15:22:20.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "jobId": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "activityId": "serviceTask", + "jobType": "message", + "jobHandlerType": "async-continuation", + "jobDueDate": null, + "jobRetries": 3, + "jobPriority": 15, + "jobExceptionMessage": null, + "failedActivityId": null, + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "deploymentId": "aDeploymentId", + "rootProcessInstanceId": "aRootProcessInstanceId", + "tenantId": null, + "hostname": "aHostname", + "batchId": "aBatchId", + "creationLog": true, + "failureLog": false, + "successLog": false, + "deletionLog": false + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} +d \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ba8afeb9a1fb3a20f04abbb53d0babad3b8da0c7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/post.ftl @@ -0,0 +1,89 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/job-log/post-job-log-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryHistoricJobLogs" + tag = "Historic Job Log" + summary = "Get Job Logs (POST)" + desc = "Queries for historic job logs that fulfill the given parameters. + This method is slightly more powerful than the + [Get Job Logs](${docsUrl}/reference/rest/history/job-log/get-job-log-query/) + method because it allows filtering by historic job logs values of the + different types `String`, `Number` or `Boolean`." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoricJobLogQueryDto" + examples = ['"example-1": { + "summary": "POST `/history/job-log`", + "value": { + "jobId": "aJobId" + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricJobLogDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/history/job-log`", + "description": "POST `/history/job-log`", + "value": [ + { + "id": "someId", + "timestamp": "2015-01-15T15:22:20.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "jobId": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "activityId": "serviceTask", + "jobType": "message", + "jobHandlerType": "async-continuation", + "jobDueDate": null, + "jobRetries": 3, + "jobPriority": 15, + "jobExceptionMessage": null, + "failedActivityId": null, + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "deploymentId": "aDeploymentId", + "rootProcessInstanceId": "aRootProcessInstanceId", + "tenantId": null, + "hostname": "aHostname", + "batchId": "aBatchId", + "creationLog": true, + "failureLog": false, + "successLog": false, + "deletionLog": false + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6a7df1c1bccf0ddaa1043e368677e5a482ffd5d4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/{id}/get.ftl @@ -0,0 +1,76 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/job-log/get-job-log/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricJobLog" + tag = "Historic Job Log" + summary = "Get Job Log" + desc = "Retrieves a historic job log by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the log entry." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricJobLogDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/history/job-log/someId`", + "value": { + "id": "someId", + "timestamp": "2015-01-15T15:22:20.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "jobId": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "activityId": "serviceTask", + "jobType": "message", + "jobHandlerType": "async-continuation", + "jobDueDate": null, + "jobRetries": 3, + "jobPriority": 15, + "jobExceptionMessage": null, + "failedActivityId": null, + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "deploymentId": "aDeploymentId", + "rootProcessInstanceId": "aRootProcessInstanceId", + "tenantId": null, + "hostname": "aHostname", + "batchId": "aBatchId", + "creationLog": true, + "failureLog": false, + "successLog": false, + "deletionLog": false + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Historic job log with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/{id}/stacktrace/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/{id}/stacktrace/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8fc187f6d0158f8139d0191620467deac061ccdc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/job-log/{id}/stacktrace/get.ftl @@ -0,0 +1,57 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/job-log/get-job-log-stacktrace/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getStacktraceHistoricJobLog" + tag = "Historic Job Log" + summary = "Get Job Log Exception Stacktrace" + desc = "Retrieves the corresponding exception stacktrace to the passed historic job log by + id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the historic job log to get the exception stacktrace for." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + mediaType= "text/plain" + desc = "Request successful." + contentDesc = "Returns the stacktrace of the exception for the historic job with the given ID." + examples = ['"example-1": { + "summary": "response", + "description": "GET `history/job-log/someId/stacktrace` + + The result is the corresponding stacktrace as plain text.", + "value": "java.lang.RuntimeException: A exception message! + at org.camunda.bpm.pa.service.FailingDelegate.execute(FailingDelegate.java:10) + at org.camunda.bpm.engine.impl.delegate.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:34) + at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37) + ..." + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Historic job log with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-definition/cleanable-process-instance-report/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-definition/cleanable-process-instance-report/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..fadf50a16e059f2cbf20cfe59fbbb0db912d835e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-definition/cleanable-process-instance-report/count/get.ftl @@ -0,0 +1,54 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/process-definition/get-cleanable-process-instance-report-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getCleanableHistoricProcessInstanceReportCount" + tag = "Historic Process Definition" + summary = "Get Cleanable Process Instance Report Count" + desc = "Queries for the number of report results about a process definition and finished + process instances relevant to history cleanup (see + [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup)). + Takes the same parameters as the + [Get Cleanable Process Instance Report](${docsUrl}/reference/rest/history/process-definition/get-cleanable-process-instance-report/) + method." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/history-process-definition-process-instance-report.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/process-definition/cleanable-process-instance-report/count`", + "description": "GET `/history/process-definition/cleanable-process-instance-report/count`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-definition/cleanable-process-instance-report/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-definition/cleanable-process-instance-report/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..11ac6e573931d70c5efd09f91e7eebbb97081b45 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-definition/cleanable-process-instance-report/get.ftl @@ -0,0 +1,81 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/process-definition/get-cleanable-process-instance-report-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getCleanableHistoricProcessInstanceReport" + tag = "Historic Process Definition" + summary = "Get Cleanable Process Instance Report" + desc = "Retrieves a report about a process definition and finished process instances + relevant to history cleanup (see + [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup)) + so that you can tune the history time to live. + These reports include the count of the finished historic process + instances, cleanable process instances and basic process definition + data - id, key, name and version. + The size of the result set can be retrieved by using the + [Get Cleanable Process Instance Report Count](${docsUrl}/reference/rest/history/process-definition/get-cleanable-process-instance-report-count/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/history-process-definition-process-instance-report.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CleanableHistoricProcessInstanceReportResultDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/process-definition/cleanable-process-instance-report`", + "description": "GET `/history/process-definition/cleanable-process-instance-report`", + "value": [ + { + "processDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionName": "Invoice Receipt", + "processDefinitionVersion": 1, + "historyTimeToLive": 5, + "finishedProcessInstanceCount": 100, + "cleanableProcessInstanceCount": 53, + "tenantId": "aTenantId" + }, + { + "processDefinitionId": "invoice:2:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionName": "Invoice Receipt v2.0", + "processDefinitionVersion": 2, + "historyTimeToLive": 5, + "finishedProcessInstanceCount": 1000, + "cleanableProcessInstanceCount": 13, + "tenantId": "aTenantId" + } + ] + }'] + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-definition/{id}/statistics/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-definition/{id}/statistics/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..83c7ee1ffdcd545e42c0e563cc41093dde28358c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-definition/{id}/statistics/get.ftl @@ -0,0 +1,137 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/process-definition/get-historic-activity-statistics-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricActivityStatistics" + tag = "Historic Process Definition" + summary = "Get Historic Activity Statistics" + desc = "Retrieves historic statistics of a given process definition, grouped by activities. + These statistics include the number of running activity instances and, + optionally, the number of canceled activity instances, finished + activity instances and activity instances which completed a scope + (i.e., in BPMN 2.0 manner: a scope is completed by an activity + instance when the activity instance consumed a token but did not emit + a new token). + **Note:** This only includes historic data." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the process definition." + /> + + <#include "/lib/commons/history-process-definition-activity-statistics.ftl" > + <@lib.parameters + object = params + last = last + /> + <#assign last = true > + <#include "/lib/commons/sort-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricActivityStatisticsDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Request With `canceled=true`", + "description": "GET `history/process-definition/aProcessDefinitionId/statistics?canceled=true`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "canceled": 50, + "finished": 0, + "completeScope": 0, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + }, + { + "id": "anotherActivity", + "instances": 200, + "canceled": 150, + "finished": 0, + "completeScope": 0, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + } + ] + }', + '"example-2": { + "summary": "Request With `finished=true`", + "description": "GET `history/process-definition/aProcessDefinitionId/statistics?finished=true`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "canceled": 0, + "finished": 20, + "completeScope": 0, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + }, + { + "id":"anotherActivity", + "instances": 200, + "canceled": 0, + "finished": 30, + "completeScope": 0, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + } + ] + }', + '"example-3": { + "summary": "Request With `completeScope=true`", + "description": "GET `history/process-definition/aProcessDefinitionId/statistics?completeScope=true`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "canceled": 0, + "finished": 0, + "completeScope": 20, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + }, + { + "id":"anotherActivity", + "instances": 200, + "canceled": 0, + "finished": 0, + "completeScope": 1, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..788a1538997607f7da468477503fb0b8d8010d6b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/count/get.ftl @@ -0,0 +1,40 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricProcessInstancesCount" + tag = "Historic Process Instance" + summary = "Get List Count" + desc = "Queries for the number of historic process instances that fulfill the given parameters. + Takes the same parameters as the [Get Process Instances](${docsUrl}/reference/rest/history/process-instance/get-process-instance-query/) method." /> + + "parameters": [ + <#assign requestMethod="GET"/> + <#include "/lib/commons/history-process-instance.ftl" > + <@lib.parameters + object = params + skip = ["orQueries"] <#-- OR Queries not avaialble in GET --> + last = true/> + ], + "responses": { + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/history/process-instance/count?variables=myVariable_eq_camunda`", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2cadd04b6c9987ae87b6f2cf78d7a8d1bc8d1a67 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/count/post.ftl @@ -0,0 +1,61 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryHistoricProcessInstancesCount" + tag = "Historic Process Instance" + summary = "Get List Count (POST)" + desc = "Queries for the number of historic process instances that fulfill the given parameters. + This method takes the same message body as the [Get Process Instances (POST)](${docsUrl}/reference/rest/history/process-instance/get-process-instance-query/) method and + therefore it is slightly more powerful than the [Get Process Instance Count](${docsUrl}/reference/rest/history/process-instance/post-process-instance-query-count/) method." /> + + <#assign requestMethod="POST"/> + <@lib.requestBody + mediaType = "application/json" + dto = "HistoricProcessInstanceQueryDto" + examples = [ + '"example-1": { + "summary": "POST `/history/process-instance/count`", + "value": { + "finishedAfter": "2013-01-01T00:00:00.000+0200", + "finishedBefore": "2013-04-01T23:59:59.000+0200", + "executedActivityAfter": "2013-03-23T13:42:44.000+0200", + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ] + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response 1", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/delete/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/delete/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..536b42b7188e31217e49654f84d5529055538a7e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/delete/post.ftl @@ -0,0 +1,62 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteHistoricProcessInstancesAsync" + tag = "Historic Process Instance" + summary = "Delete Async (POST)" + desc = "Delete multiple historic process instances asynchronously (batch). + At least `historicProcessInstanceIds` or `historicProcessInstanceQuery` has to be provided. + If both are provided then all instances matching query criterion and instances from the list will be deleted." /> + + + <@lib.requestBody + mediaType = "application/json" + dto = "DeleteHistoricProcessInstancesDto" + examples = [ + '"example-1": { + "summary": "POST `/history/process-instance/delete`", + "value": { + "deleteReason" : "aReason", + "historicProcessInstanceIds": ["aProcess","secondProcess"], + "historicProcessInstanceQuery": { + "startedAfter": "2016-10-11T11:44:13.000+0200", + "finishedBefore": "2016-10-13T11:44:17.000+0200" + } + } + }' + ] /> + "responses": { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/history/process-instance/delete`", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "process-set-removal-time", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting", + "suspended": false, + "createUserId": null + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, i.e. neither historicProcessInstanceIds, + nor historicProcessInstanceQuery is present. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e315a9842e876a4e4066f54b58a0da1d539e6499 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/get.ftl @@ -0,0 +1,71 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricProcessInstances" + tag = "Historic Process Instance" + summary = "Get List" + desc = "Queries for historic process instances that fulfill the given parameters. + The size of the result set can be retrieved by using the + [Get Process Instance Count](${docsUrl}/reference/rest/history/process-instance/get-process-instance-query-count/) method." /> + + "parameters" : [ + + <#assign requestMethod="GET"/> + <#include "/lib/commons/history-process-instance.ftl" > + + <#assign last = false > + <#include "/lib/commons/sort-params.ftl" > + + <#include "/lib/commons/pagination-params.ftl" > + + <@lib.parameters + object = params + skip = ["orQueries"] <#-- OR Queries not available in GET --> + last = true /> + + ], + "responses" : { + <@lib.response + code = "200" + dto = "HistoricProcessInstanceDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/history/process-instance?finishedAfter=2013-01-01T00:00:00.000%2b0200&finishedBefore=2013-04-01T23:59:59.000%2b0200&executedActivityAfter=2013-03-23T13:42:44.000%2b0200`", + "value": [ + { + "id":"7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e", + "businessKey":null, + "processDefinitionId":"invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey":"invoice", + "processDefinitionName":"Invoice Receipt", + "processDefinitionVersion":1, + "startTime":"2017-02-10T14:33:19.000+0200", + "endTime":null, + "removalTime": null, + "durationInMillis":null, + "startUserId":null, + "startActivityId":"StartEvent_1", + "deleteReason":null, + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "superProcessInstanceId":null, + "superCaseInstanceId":null, + "caseInstanceId":null, + "tenantId":null, + "state":"ACTIVE", + "restartedProcessInstanceId":"2bef365d-3406-11ef-bd73-0a0027000003" + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c80b3a4876c76750351752fafae6f712ef1434fc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/post.ftl @@ -0,0 +1,96 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryHistoricProcessInstances" + tag = "Historic Process Instance" + summary = "Get List (POST)" + desc = "Queries for historic process instances that fulfill the given parameters. + This method is slightly more powerful than the + [Get Process Instance](${docsUrl}/reference/rest/history/process-instance/get-process-instance-query/) + because it allows filtering by multiple process variables of types `String`, `Number` or `Boolean`." /> + + "parameters" : [ + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + ], + <#assign requestMethod="POST"/> + <@lib.requestBody + mediaType = "application/json" + dto = "HistoricProcessInstanceQueryDto" + examples = [ + '"example-1": { + "summary": "POST `/history/process-instance`", + "value": { + "finishedAfter": "2013-01-01T00:00:00.000+0200", + "finishedBefore": "2013-04-01T23:59:59.000+0200", + "executedActivityAfter": "2013-03-23T13:42:44.000+0200", + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "sorting":[ + { + "sortBy": "businessKey", + "sortOrder": "asc" + }, + { + "sortBy": "startTime", + "sortOrder": "desc" + } + ] + } + }' + ] /> + "responses" : { + <@lib.response + code = "200" + dto = "HistoricProcessInstanceDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/history/process-instance`", + "value": [ + { + "id":"7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e", + "businessKey":null, + "processDefinitionId":"invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey":"invoice", + "processDefinitionName":"Invoice Receipt", + "processDefinitionVersion":1, + "startTime":"2017-02-10T14:33:19.000+0200", + "endTime":null, + "removalTime": null, + "durationInMillis":null, + "startUserId":null, + "startActivityId":"StartEvent_1", + "deleteReason":null, + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "superProcessInstanceId":null, + "superCaseInstanceId":null, + "caseInstanceId":null, + "tenantId":null, + "state":"ACTIVE", + "restartedProcessInstanceId":"2bef365d-3406-11ef-bd73-0a0027000003" + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/report/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/report/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..07c4d3387432a573127ceefb2c3cb7f039367445 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/report/get.ftl @@ -0,0 +1,130 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getHistoricProcessInstanceDurationReport" + tag = "Historic Process Instance" + summary = "Get Duration Report" + desc = "Retrieves a report about the duration of completed process instances, grouped by a period. + These reports include the maximum, minimum and average duration of all completed process instances which were started in a given period. + + **Note:** This only includes historic data." /> + + "parameters" : [ + + <@lib.parameter + name = "reportType" + location = "query" + type = "string" + required = true + desc = "**Mandatory.** Specifies the type of the report to retrieve. + To retrieve a report about the duration of process instances, the value must be set to `duration`." /> + + <@lib.parameter + name = "periodUnit" + location = "query" + type = "string" + required = true + enumValues = ["month", "quarter"] + desc = "**Mandatory.** Specifies the granularity of the report. Valid values are `month` and `quarter`." /> + + <@lib.parameter + name = "processDefinitionIdIn" + location = "query" + type = "array" + desc = "Filter by process definition ids. Must be a comma-separated list of process definition ids." /> + + <@lib.parameter + name = "processDefinitionKeyIn" + location = "query" + type = "array" + desc = "Filter by process definition keys. Must be a comma-separated list of process definition keys." /> + + <@lib.parameter + name = "startedBefore" + location = "query" + type = "string" + format = "date-time" + desc = "Restrict to instances that were started before the given date. + By [default](), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2016-01-23T14:42:45.000+0200`." /> + + <@lib.parameter + name = "startedAfter" + location = "query" + type = "string" + format = "date-time" + last = true + desc = "Restrict to instances that were started after the given date. + By [default](${docsUrl}/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2016-01-23T14:42:45.000+0200`." /> + + ], + + "responses" : { + + <@lib.multiTypeResponse + code = "200" + desc = "Request successful." + types = [ + { + "dto": "DurationReportResultDto", + "array": true, + "examples": ['"example-1": { + "summary": "GET `/history/process-instance/report?reportType=duration&periodUnit=quarter&processDefinitionKeyIn=invoice`", + "value": [ + { + "period": 1, + "periodUnit": "QUARTER", + "maximum": 500000, + "minimum": 250000, + "average": 375000 + }, + { + "period": 2, + "periodUnit": "QUARTER", + "maximum": 600000, + "minimum": 300000, + "average": 450000 + }, + { + "period": 3, + "periodUnit": "QUARTER", + "maximum": 1000000, + "minimum": 500000, + "average": 750000 + }, + { + "period": 4, + "periodUnit": "QUARTER", + "maximum": 200000, + "minimum": 100000, + "average": 150000 + } + ] + }' + ] + }, + { + "mediaType": "application/csv" + }, + { + "mediaType": "text/csv" + } + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid or mandatory parameters are not supplied. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + <@lib.response + code = "403" + dto = "ExceptionDto" + last = true + desc = "If the authenticated user is unauthorized to read the history. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/set-removal-time/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/set-removal-time/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..07c4c8bbfa8f553287c55dee3458b1d90e16455a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/set-removal-time/post.ftl @@ -0,0 +1,81 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "setRemovalTimeAsync" + tag = "Historic Process Instance" + summary = "Set Removal Time Async (POST)" + desc = "Sets the removal time to multiple historic process instances asynchronously (batch). + + At least `historicProcessInstanceIds` or `historicProcessInstanceQuery` has to be provided. + If both are provided, all instances matching query criterion and instances from the list will be updated with a removal time." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "SetRemovalTimeToHistoricProcessInstancesDto" + examples = [ + '"example-1": { + "summary": "POST `/history/process-instance/set-removal-time`", + "value": { + "absoluteRemovalTime": "2019-05-05T11:56:24.725+0200", + "hierarchical": true, + "historicProcessInstanceQuery": { + "unfinished": true + }, + "historicProcessInstanceIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7", + "b4d2ad94-7240-11e9-98b7-be5e0f7575b7" + ] + } + }', + '"example-2": { + "summary": "POST `/history/process-instance/set-removal-time`", + "value": { + "absoluteRemovalTime": "2019-05-05T11:56:24.725+0200", + "hierarchical": true, + "updateInChunks": true, + "updateChunkSize": 300, + "historicProcessInstanceQuery": { + "unfinished": true + }, + "historicProcessInstanceIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7", + "b4d2ad94-7240-11e9-98b7-be5e0f7575b7" + ] + } + }' + ] /> + "responses" : { + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/history/process-instance/set-removal-time`", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "process-set-removal-time", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting", + "suspended": false, + "createUserId": null + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Request was unsuccessfull due to a bad user request. This occurs if some of the query parameters are invalid, + e. g. if neither `historicProcessInstances` nor `historicProcessInstanceQuery` is present or if no mode is specified. + + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..59d9d0600b0b98efdf37ce2c8c45beed4709365c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/{id}/delete.ftl @@ -0,0 +1,41 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteHistoricProcessInstance" + tag = "Historic Process Instance" + summary = "Delete" + desc = "Deletes a process instance from the history by id." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the historic process instance to be deleted."/> + + <@lib.parameter + name = "failIfNotExists" + location = "query" + type = "boolean" + last = true + desc = "If set to `false`, the request will still be successful if the process id is not found." /> + + ], + "responses": { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Not found + Historic process instance with given id does not exist." /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e26e84a4490ab5b5aab21d209b83a6ac1aa91b30 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/{id}/get.ftl @@ -0,0 +1,65 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getHistoricProcessInstance" + tag = "Historic Process Instance" + summary = "Get" + desc = "Retrieves a historic process instance by id, according to the `HistoricProcessInstance` interface in the engine." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the historic process instance to be retrieved." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "HistoricProcessInstanceDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/process-instance/7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e`", + "value": { + "id":"7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e", + "businessKey":null, + "processDefinitionId":"invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey":"invoice", + "processDefinitionName":"Invoice Receipt", + "processDefinitionVersion":1, + "startTime":"2017-02-10T14:33:19.000+0200", + "endTime":null, + "removalTime": null, + "durationInMillis":null, + "startUserId":null, + "startActivityId":"StartEvent_1", + "deleteReason":null, + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "superProcessInstanceId":null, + "superCaseInstanceId":null, + "caseInstanceId":null, + "tenantId":null, + "state":"ACTIVE", + "restartedProcessInstanceId":"2bef365d-3406-11ef-bd73-0a0027000003" + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Not Found + Historic process instance with given id does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/{id}/variable-instances/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/{id}/variable-instances/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..aa5f95ba7a42351db030767d17d7f2b5aae7d635 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/process-instance/{id}/variable-instances/delete.ftl @@ -0,0 +1,36 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteHistoricVariableInstancesOfHistoricProcessInstance" + tag = "Historic Process Instance" + summary = "Delete Variable Instances" + desc = "Deletes all variables of a process instance from the history by id." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process instance for which all historic variables are to be deleted."/> + + ], + "responses": { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Not found + Historic process instance with given id does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#parse-exceptions) for the error response format." /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..70eea05ef9a8af0cffd257e17e81bab7be0d2f17 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/count/get.ftl @@ -0,0 +1,54 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/task/get-task-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricTaskInstancesCount" + tag = "Historic Task Instance" + summary = "Get Task Count" + desc = "Queries for the number of historic tasks that fulfill the given parameters. + Takes the same parameters as the + [Get Tasks (Historic)](${docsUrl}/reference/rest/history/task/get-task-query/) + method." + /> + + "parameters" : [ + + <#assign last = true > + <#assign requestMethod="GET"/> + <#include "/lib/commons/history-task-instance-query-params.ftl" > + <@lib.parameters + object = params + skip = ["orQueries"] <#-- OR Queries not avaialble in GET --> + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/task/count?taskAssginee=anAssignee&taskPriority=50`", + "description": "GET `/history/task/count?taskAssginee=anAssignee&taskPriority=50`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3c394601cdc8f064b4ba4efb5dd5c0986b0e2cc7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/count/post.ftl @@ -0,0 +1,65 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/task/post-task-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryHistoricTaskInstancesCount" + tag = "Historic Task Instance" + summary = "Get Task Count (POST)" + desc = "Queries for the number of historic tasks that fulfill the given parameters. Takes the + same parameters as the [Get Tasks (Historic)](${docsUrl}/reference/rest/history/task/get-task-query/) + method. Corresponds to the size of the result set of the + [Get Tasks (Historic) (POST)](${docsUrl}/reference/rest/history/task/post-task-query/) + method and takes the same parameters." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoricTaskInstanceQueryDto" + examples = ['"example-1": { + "summary": "POST `/history/task/count`", + "value": { + "taskVariables": [ + { + "name": "varName", + "value": "varValue", + "operator": "eq" + }, + { + "name": "anotherVarName", + "value": 30, + "operator": "neq" + } + ], + "priority": 10 + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/history/task/count`", + "description": "POST `/history/task/count`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..68e8fbcabb55558a6163ed96b313b87a4c9906e8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/get.ftl @@ -0,0 +1,85 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/task/get-task-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricTaskInstances" + tag = "Historic Task Instance" + summary = "Get Tasks (Historic)" + desc = "Queries for historic tasks that fulfill the given parameters. The size of the result + set can be retrieved by using the + [Get Task Count](${docsUrl}/reference/rest/history/task/get-task-query-count/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#assign requestMethod="GET"/> + <#include "/lib/commons/history-task-instance-query-params.ftl" > + <@lib.parameters + object = params + skip = ["orQueries"] <#-- OR Queries not avaialble in GET --> + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + array = true + dto = "HistoricTaskInstanceDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/task?taskAssignee=anAssignee&priority=42`", + "description": "GET `/history/task?taskAssignee=anAssignee&priority=42`", + "value": [ + { + "id":"anId", + "processDefinitionId":"aProcDefId", + "processInstanceId":"aProcInstId", + "executionId":"anExecution", + "caseDefinitionId":"aCaseDefId", + "caseInstanceId":"aCaseInstId", + "caseExecutionId":"aCaseExecution", + "activityInstanceId":"anActInstId", + "name":"aName", + "description":"aDescription", + "deleteReason":"aDeleteReason", + "owner":"anOwner", + "assignee":"anAssignee", + "startTime":"2013-01-23T13:42:42.000+0200", + "endTime":"2013-01-23T13:45:42.000+0200", + "duration":2000, + "taskDefinitionKey":"aTaskDefinitionKey", + "priority":42, + "due":"2013-01-23T13:49:42.000+0200", + "parentTaskId":"aParentId", + "followUp:":"2013-01-23T13:44:42.000+0200", + "tenantId":null, + "removalTime":"2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId":"aRootProcessInstanceId", + "taskState": "aTaskState" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..21793f4b72274b4bb7297296fb327d1637054468 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/post.ftl @@ -0,0 +1,110 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryHistoricTaskInstances" + tag = "Historic Task Instance" + summary = "Get Tasks (Historic) (POST)" + desc = "Queries for historic tasks that fulfill the given parameters. This method is slightly more powerful + than the [Get Tasks (Historic)](${docsUrl}/reference/rest/history/task/get-task-query/) method because + it allows filtering by multiple process or task variables of types `String`, `Number` or `Boolean`. + The size of the result set can be retrieved by using the + [Get Task Count (POST)](${docsUrl}/reference/rest/history/task/post-task-query-count/) + method." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoricTaskInstanceQueryDto" + examples = ['"example-1": { + "summary": "POST `/history/task`", + "value": { + "taskVariables": [ + { + "name": "varName", + "value": "varValue", + "operator": "eq" + }, + { + "name": "anotherVarName", + "value": 30, + "operator": "neq" + } + ], + "priority": 10, + "sorting": [ + { + "sortBy": "priority", + "sortOrder": "asc" + }, + { + "sortBy": "duration", + "sortOrder": "desc" + } + ] + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + array = true + dto = "HistoricTaskInstanceDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/history/task`", + "description": "POST `/history/task`", + "value": [ + { + "id":"anId", + "processDefinitionId":"aProcDefId", + "processInstanceId":"aProcInstId", + "executionId":"anExecution", + "caseDefinitionId":"aCaseDefId", + "caseInstanceId":"aCaseInstId", + "caseExecutionId":"aCaseExecution", + "activityInstanceId":"anActInstId", + "name":"aName", + "description":"aDescription", + "deleteReason":"aDeleteReason", + "owner":"anOwner", + "assignee":"anAssignee", + "startTime":"2013-01-23T13:42:42.000+0200", + "endTime":"2013-01-23T13:45:42.000+0200", + "duration":2000, + "taskDefinitionKey":"aTaskDefinitionKey", + "priority":10, + "due":"2013-01-23T13:49:42.000+0200", + "parentTaskId":"aParentId", + "followUp:":"2013-01-23T13:44:42.000+0200", + "tenantId":null, + "removalTime":"2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId":"aRootProcessInstanceId", + "taskState":"aTaskState" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/report/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/report/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..123b0e6650e9ac758c9f3a6226295910deb4dc11 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/task/report/get.ftl @@ -0,0 +1,144 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/task/get-task-report/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <#assign dateFormatDescription = "By [default](${docsUrl}/reference/rest/overview/date-format/), + the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, + e.g., `2013-01-23T14:42:45.000+0200`." /> + <@lib.endpointInfo + id = "getHistoricTaskInstanceReport" + tag = "Historic Task Instance" + summary = "Get Task Report (Historic)" + desc = "Retrieves a report of completed tasks. When the report type is set to `count`, the + report contains a list of completed task counts where an entry contains the task name, the + definition key of the task, the process definition id, the process definition key, the process + definition name and the count of how many tasks were completed for the specified key in a given + period. When the report type is set to `duration`, the report contains a minimum, maximum and + average duration value of all completed task instances in a given period." + /> + + "parameters" : [ + + <@lib.parameter + name = "reportType" + location = "query" + type = "string" + enumValues = [ "duration", "count" ] + desc = "**Mandatory.** Specifies the kind of the report to execute. To retrieve a report + about the duration of process instances the value must be set to `duration`. For a + report of the completed tasks in a specific timespan the value must be set to `count`." + /> + + <@lib.parameter + name = "periodUnit" + location = "query" + type = "string" + enumValues = [ "MONTH", "QUARTER" ] + desc = "When the report type is set to `duration`, this parameter is **mandatory**. + Specifies the granularity of the report. Valid values are `month` and `quarter`." + /> + + <@lib.parameter + name = "completedBefore" + location = "query" + type = "string" + format = "date-time" + desc = "Restrict to tasks that were completed before the given date. ${dateFormatDescription}" + /> + + <@lib.parameter + name = "completedAfter" + location = "query" + type = "string" + format = "date-time" + desc = "Restrict to tasks that were completed after the given date. ${dateFormatDescription}" + /> + + <@lib.parameter + name = "groupBy" + location = "query" + type = "string" + desc = "When the report type is set to `count`, this parameter is **mandatory**. Groups the + tasks report by a given criterion. Valid values are `taskName` and `processDefinition`." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + array = true + dto = "HistoricTaskInstanceReportResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Request for completed task report", + "description": "GET `/history/task/report?reportType=count&groupBy=processDefinition`", + "value": [ + { + "taskName":null, + "processDefinitionId":"aProcessDefinitionId", + "processDefinitionKey":"aProcessDefinitionKey", + "processDefinitionName":"A Process Definition Name", + "count":42 + }, + { + "taskName":null, + "processDefinitionId":"anotherProcessDefinitionId", + "processDefinitionKey":"anotherProcessDefinitionKey", + "processDefinitionName":"Another Process Definition Name", + "count":9000 + } + ] + }', + '"example-2": { + "summary": "Request for duration report.", + "description": "GET `/history/task/report?reportType=duration&periodUnit=quarter`", + "value": [ + { + "period":1, + "periodUnit":"QUARTER", + "maximum":500000, + "minimum":250000, + "average":375000 + }, + { + "period":2, + "periodUnit":"QUARTER", + "maximum":600000, + "minimum":300000, + "average":450000 + }, + { + "period":3, + "periodUnit":"QUARTER", + "maximum":1000000, + "minimum":500000, + "average":750000 + }, + { + "period":4, + "periodUnit":"QUARTER", + "maximum":200000, + "minimum":100000, + "average":150000 + } + ] + }' + ] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `completedAfter` + parameter is supplied, but the date format is wrong. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/user-operation/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/user-operation/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4f85c702b585c91e58bd2388988180807db87afc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/user-operation/count/get.ftl @@ -0,0 +1,53 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/user-operation-log/get-user-operation-log-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryUserOperationCount" + tag = "Historic User Operation Log" + summary = "Get User Operation Log Count" + desc = "Queries for the number of user operation log entries that fulfill the given parameters. + Takes the same parameters as the + [Get User Operation Log (Historic)](${docsUrl}/reference/rest/history/user-operation-log/get-user-operation-log-query/) + method." + /> + + "parameters" : [ + + <#assign last = true > + <#assign requestMethod="GET"/> + <#include "/lib/commons/user-operation-log-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/user-operation?operationType=Claim&userId=demo`", + "description": "GET `/history/user-operation?operationType=Claim&userId=demo`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/user-operation/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/user-operation/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ff87fa26ef7b8f802658f2785b26402e19fdd8d5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/user-operation/get.ftl @@ -0,0 +1,120 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/user-operation-log/get-user-operation-log-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryUserOperationEntries" + tag = "Historic User Operation Log" + summary = "Get User Operation Log (Historic)" + desc = "Queries for user operation log entries that fulfill the given parameters. + The size of the result set can be retrieved by using the + [Get User Operation Log Count](${docsUrl}/reference/rest/history/user-operation-log/get-user-operation-log-query-count/) + method. + + Note that the properties of operation log entries are interpreted as + restrictions on the entities they apply to. That means, if a single + process instance is updated, the field `processInstanceId` is + populated. If a single operation updates all process instances of the + same process definition, the field `processInstanceId` is `null` (a + `null` restriction is viewed as a wildcard, i.e., matches a process + instance with any id) and the field `processDefinitionId` is + populated. This way, which entities were changed by a user operation + can easily be reconstructed." + /> + + "parameters" : [ + + <#assign last = false > + <#assign requestMethod="GET"/> + <#include "/lib/commons/user-operation-log-query-params.ftl"> + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + array = true + dto = "UserOperationLogEntryDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Gets an operation that updates a single task.", + "description": "GET `/history/user-operation?operationType=Claim&userId=demo&sortBy=timestamp&sortOrder=asc`", + "value": [ + { + "id":"anUserOperationLogEntryId", + "deploymentId":"aDeploymentId", + "processDefinitionId":"aProcessDefinitionId", + "processDefinitionKey":null, + "processInstanceId":"aProcessInstanceId", + "executionId":"anExecutionId", + "taskId":"aTaskId", + "jobId":"aJobId", + "jobDefinitionId":"aJobDefinitionId", + "userId":"demo", + "timestamp":"2014-02-25T14:58:37.000+0200", + "operationId":"anOperationId", + "operationType":"Claim", + "entityType":"Task", + "property":"assignee", + "orgValue":null, + "newValue":"demo", + "removalTime":"2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId":"aRootProcessInstanceId", + "category":"TaskWorker", + "annotation":"anAnnotation" + } + ] + }', + '"example-2": { + "summary": "Gets an operation that updates a multiple process instances with the same key.", + "description": "GET `/history/user-operation?operationType=Suspend&userId=demo`", + "value": [ + { + "id":"anUserOperationLogEntryId", + "deploymentId":"aDeploymentId", + "processDefinitionId":"aProcessDefinitionId", + "processDefinitionKey":"aProcessDefinitionKey", + "processInstanceId":null, + "executionId":null, + "taskId":null, + "jobId":null, + "jobDefinitionId":null, + "userId":"demo", + "timestamp":"2014-02-25T14:58:37.000+0200", + "operationId":"anOperationId", + "operationType":"Suspend", + "entityType":"ProcessInstance", + "property":"suspensionState", + "orgValue":null, + "newValue":"suspended", + "removalTime":"2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId":"aRootProcessInstanceId", + "category":"Operator", + "annotation":"anAnnotation" + } + ] + }' + ] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/user-operation/{operationId}/clear-annotation/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/user-operation/{operationId}/clear-annotation/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e24a3660e994e99c898ecf610ce1b6d82eb2d060 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/user-operation/{operationId}/clear-annotation/put.ftl @@ -0,0 +1,50 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/user-operation-log/clear-annotation/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "clearAnnotationUserOperationLog" + tag = "Historic User Operation Log" + summary = "Clear Annotation of an User Operation Log (Historic)" + desc = "Clear the annotation which was previously set for auditing reasons." + /> + + "parameters" : [ + + <@lib.parameter + name = "operationId" + location = "path" + type = "string" + required = true + desc = "The operation id of the operation log to be updated." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + examples = ['"example-1": { + "summary": "Status 204", + "description": "PUT `/history/user-operation/a02a5890-ad41-11e9-8609-c6bbb7c7e9e3/clear-annotation`", + "value": "No content." + }' + ] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the request parameters are invalid, for example if the + `operationId` path parameter value does not exists. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/user-operation/{operationId}/set-annotation/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/user-operation/{operationId}/set-annotation/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5c4f86cfffa3605d474928b654f6c4dded3c6bf6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/user-operation/{operationId}/set-annotation/put.ftl @@ -0,0 +1,61 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/user-operation-log/set-annotation/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "setAnnotationUserOperationLog" + tag = "Historic User Operation Log" + summary = "Set Annotation to an User Operation Log (Historic)" + desc = "Set an annotation for auditing reasons." + /> + + "parameters" : [ + + <@lib.parameter + name = "operationId" + location = "path" + type = "string" + required = true + desc = "The operation id of the operation log to be updated." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "AnnotationDto" + examples = ['"example-1": { + "summary": "PUT `/history/user-operation/a02a5890-ad41-11e9-8609-c6bbb7c7e9e3/set-annotation`", + "value": { + "annotation": "Instances restarted due to wrong turn" + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + examples = ['"example-1": { + "summary": "Status 204", + "description": "PUT `/history/user-operation/a02a5890-ad41-11e9-8609-c6bbb7c7e9e3/set-annotation`", + "value": "No content." + }' + ] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the request parameters are invalid, for example if the + `operationId` path parameter value does not exists. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..42e6f97dafe153c19003db8cb67813974c57e78c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/count/get.ftl @@ -0,0 +1,54 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/variable-instance/get-variable-instance-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricVariableInstancesCount" + tag = "Historic Variable Instance" + summary = "Get Variable Instance Count" + desc = "Queries for the number of historic variable instances that fulfill the given + parameters. + Takes the same parameters as the + [Get Variable Instances](${docsUrl}/reference/rest/history/variable-instance/get-variable-instance-query/) + method." + /> + + "parameters" : [ + + <#assign last = true > + <#assign requestMethod="GET"/> + <#include "/lib/commons/historic-variable-instance-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/variable-instance/count?variableName=my_variable`", + "description": "GET `/history/variable-instance/count?variableName=my_variable`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..560e5d3116128bd7dc320d3b74121c593f0f0785 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/count/post.ftl @@ -0,0 +1,56 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/variable-instance/post-variable-instance-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryHistoricVariableInstancesCount" + tag = "Historic Variable Instance" + summary = "Get Variable Instance Count (POST)" + desc = "Queries for historic variable instances that fulfill the given parameters. + This method takes the same message body as the + [Get Variable Instances (POST)](${docsUrl}/reference/rest/history/variable-instance/post-variable-instance-query/) + method and therefore it is more powerful regarding variable values + than the + [Get Variable Instance Count](${docsUrl}/reference/rest/history/variable-instance/get-variable-instance-query-count/) + method." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoricVariableInstanceQueryDto" + examples = ['"example-1": { + "summary": "POST `/history/variable-instance/count`", + "value": { + "variableName": "someVariable", + "variableValue": 42 + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/history/variable-instance/count`", + "description": "POST `/history/variable-instance/count`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c5b3828034ff918957c58069532f9fb17e2f0008 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/get.ftl @@ -0,0 +1,81 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/variable-instance/get-variable-instance-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricVariableInstances" + tag = "Historic Variable Instance" + summary = "Get Variable Instances" + desc = "Queries for historic variable instances that fulfill the given parameters. + The size of the result set can be retrieved by using the + [Get Variable Instance Count](${docsUrl}/reference/rest/history/variable-instance/get-variable-instance-query-count/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#assign requestMethod="GET"/> + <#include "/lib/commons/historic-variable-instance-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#include "/lib/commons/pagination-params.ftl"> + <#assign last = true > + <#include "/lib/commons/deserialize-values-parameter.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricVariableInstanceDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/history/variable-instance?variableName=my_variable`", + "description": "GET `/history/variable-instance?variableName=my_variable`", + "value": [ + { + "id": "someId", + "name": "my_variable", + "type": "String", + "value": "my_value", + "valueInfo": {}, + "processDefinitionKey": "aVariableInstanceProcDefKey", + "processDefinitionId": "aVariableInstanceProcDefId", + "processInstanceId": "aVariableInstanceProcInstId", + "executionId": "aVariableInstanceExecutionId", + "activityInstanceId": "aVariableInstanceActivityInstId", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "errorMessage": null, + "state": "CREATED", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3a688dd4a7b110c0d17bc311a44f130b9196a31c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/post.ftl @@ -0,0 +1,98 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/variable-instance/post-variable-instance-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryHistoricVariableInstances" + tag = "Historic Variable Instance" + summary = "Get Variable Instances (POST)" + desc = "Queries for historic variable instances that fulfill the given parameters. + This method is slightly more powerful than the + [Get Variable Instances](${docsUrl}/reference/rest/history/variable-instance/get-variable-instance-query/) + method because it allows filtering by variable values of the different + types `String`, `Number` or `Boolean`." + /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/pagination-params.ftl"> + <#assign last = true > + <#include "/lib/commons/deserialize-values-parameter.ftl"> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoricVariableInstanceQueryDto" + examples = ['"example-1": { + "summary": "POST `/history/variable-instance`", + "value": { + "variableName": "someVariable", + "variableValue": 42, + "sorting": [ + { + "sortBy": "variableName", + "sortOrder": "asc" + }, + { + "sortBy": "instanceId", + "sortOrder": "desc" + } + ] + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricVariableInstanceDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/history/variable-instance`", + "description": "POST `/history/variable-instance`", + "value": [ + { + "id": "someId", + "name": "someVariable", + "type": "Integer", + "variableType": "integer", + "value": 5, + "valueInfo": {}, + "processDefinitionKey": "aProcessDefinitionKey", + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcInstId", + "executionId": "aExecutionId", + "activityInstanceId": "aActivityInstId", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "errorMessage": null, + "state": "CREATED", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/{id}/data/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/{id}/data/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9bf461815245db1d83677a859ba826ef7df67c07 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/{id}/data/get.ftl @@ -0,0 +1,75 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/variable-instance/get-variable-instance-binary/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricVariableInstanceBinary" + tag = "Historic Variable Instance" + summary = "Get Variable Instance (Binary)" + desc = "Retrieves the content of a historic variable by id. Applicable for variables that + are serialized as binary data." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the variable instance." + last = true + /> + + ], + + "responses": { + + <@lib.multiTypeResponse + code = "200" + desc = "Request successful." + types = [ + { + "binary": true, + "mediaType": "application/octet-stream", + "examples": ['"example-1": { + "summary": "GET `/history/variable-instance/someId/data`", + "description": "For binary variables or files without any MIME type information, a byte stream is returned.", + "value": "" + }'] + }, + { + "binary": true, + "mediaType": "*/*", + "examples": ['"example-1": { + "summary": "GET `/history/variable-instance/someId/data`", + "description": "File variables with MIME type information are returned as the saved type. Additionally, + for file variables the Content-Disposition header will be set.", + "value": "" + }'] + } + ] + + + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Variable with given id exists but is not a binary variable. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Variable with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6ed53c75bc779ab338886c4cdd714a6cfd8a5ae4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/{id}/delete.ftl @@ -0,0 +1,43 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/variable-instance/delete-variable-instance/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteHistoricVariableInstance" + tag = "Historic Variable Instance" + summary = "Delete Variable Instance" + desc = "Deletes a historic variable instance by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the variable instance." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Variable with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..96c608eac3a52a1abf64153d855a24eaeac90610 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/history/variable-instance/{id}/get.ftl @@ -0,0 +1,73 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/variable-instance/get-variable-instance/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getHistoricVariableInstance" + tag = "Historic Variable Instance" + summary = "Get Variable Instance" + desc = "Retrieves a historic variable by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the variable instance." + /> + + <#assign last = true> + <#include "/lib/commons/deserialize-values-parameter.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "HistoricVariableInstanceDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/history/variable-instance/someId`", + "value": { + "id": "someId", + "name": "amount", + "type": "Integer", + "value": 5, + "valueInfo": {}, + "processDefinitionKey": "aProcessDefinitionKey", + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "aExecutionId", + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "errorMessage": null, + "state": "CREATED", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Variable with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/identity/groups/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/identity/groups/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d883c0c5c93c7d63ab19050d22121a84528478f9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/identity/groups/get.ftl @@ -0,0 +1,62 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/identity/get-group-info/index.html --> +{ + <@lib.endpointInfo + id = "getGroupInfo" + tag = "Identity" + summary = "Get a User's Groups" + desc = "Gets the groups of a user by id and includes all users that share a group with the + given user." + /> + + "parameters" : [ + <@lib.parameter + name = "userId" + location = "query" + type = "string" + required = true + last = true + desc = "The id of the user to get the groups for." + /> + ], + + "responses": { + + <@lib.response + code = "200" + dto = "IdentityServiceGroupInfoDto" + desc = "Request successful." + examples = ['"example-1": { + "description": "GET `/identity/groups?userId=aUserId`", + "value": { + "groups": [ + { + "id": "group1Id", + "name": "group1" + } + ], + "groupUsers": [ + { + "firstName": "firstName", + "lastName": "lastName", + "displayName": "firstName lastName", + "id": "anotherUserId" + } + ] + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "If the `userId` query parameter is missing. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/identity/password-policy/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/identity/password-policy/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9805827c7491233e949b96981afc74855aa844a8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/identity/password-policy/get.ftl @@ -0,0 +1,75 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/identity/get-password-policy/index.html --> +{ + <@lib.endpointInfo + id = "getPasswordPolicy" + tag = "Identity" + summary = "Get Password Policy" + desc = "A password policy consists of a list of rules that new passwords must follow to be + policy compliant. This end point returns a JSON representation of the + list of policy rules. More information on password policies in Camunda can be found in the password policy + [user guide](${docsUrl}/user-guide/process-engine/password-policy/) and in + the [security instructions](${docsUrl}/user-guide/security/)." + /> + + "responses": { + + <@lib.response + code = "200" + dto = "PasswordPolicyDto" + desc = "Request successful. This example uses the built-in password policy that enforces a minimum password length, + and some complexity rules." + examples = ['"example-1": { + "description": "GET `/identity/password-policy`", + "value": { + "rules": [ + { + "placeholder": "PASSWORD_POLICY_USER_DATA", + "parameter": null + }, + { + "placeholder": "PASSWORD_POLICY_LENGTH", + "parameter": { + "minLength": "10" + } + }, + { + "placeholder": "PASSWORD_POLICY_LOWERCASE", + "parameter": { + "minLowerCase": "1" + } + }, + { + "placeholder": "PASSWORD_POLICY_UPPERCASE", + "parameter": { + "minUpperCase": "1" + } + }, + { + "placeholder": "PASSWORD_POLICY_DIGIT", + "parameter": { + "minDigit": "1" + } + }, + { + "placeholder": "PASSWORD_POLICY_SPECIAL", + "parameter": { + "minSpecial": "1" + } + } + ] + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "No password policy was found." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/identity/password-policy/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/identity/password-policy/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..04e650c1529df813ea6fec0a9333e35255a9981b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/identity/password-policy/post.ftl @@ -0,0 +1,90 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/identity/validate-password/index.html --> +{ + <@lib.endpointInfo + id = "checkPassword" + tag = "Identity" + summary = "Validate Password" + desc = "A password policy consists of a list of rules that new passwords must follow to be + policy compliant. A password can be checked for compliancy via this + end point. More information on password policies in Camunda can be found in the password policy + [user guide](${docsUrl}/user-guide/process-engine/password-policy/) and in + the [security instructions](${docsUrl}/user-guide/security/)." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "PasswordPolicyRequestDto" + examples = ['"example-1": { + "summary": "POST `/identity/password-policy`", + "value": { + "password": "myPassword", + "profile": { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "jonny@camunda.org" + } + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "CheckPasswordPolicyResultDto" + desc = "Request successful. This example uses the built-in password policy that enforces a minimum password length, and + some complexity rules. The checked password is myPassword which is not complex enough to match all of + the policy rules." + examples = ['"example-1": { + "description": "POST `/identity/password-policy`", + "value": { + "rules": [ + { + "placeholder": "PASSWORD_POLICY_USER_DATA", + "parameter": null, + "valid": true + }, + { + "placeholder": "PASSWORD_POLICY_LOWERCASE", + "parameter": {"minLowerCase": "1"}, + "valid": true + }, + { + "placeholder": "PASSWORD_POLICY_LENGTH", + "parameter": {"minLength": "10"}, + "valid": false + }, + { + "placeholder": PASSWORD_POLICY_UPPERCASE", + "parameter": {"minUpperCase": "1"}, + "valid": false + }, + { + "placeholder": "PASSWORD_POLICY_DIGIT", + "parameter": {"minDigit": "1"}, + "valid": false + }, + { + "placeholder": "PASSWORD_POLICY_SPECIAL", + "parameter": {"minSpecial": "1"}, + "valid": false + } + ], + "valid": false + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "No password policy was found to check the password against." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/identity/verify/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/identity/verify/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..23d8405d0a3d9d5434ffff41823cf2c11f202d97 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/identity/verify/post.ftl @@ -0,0 +1,49 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/identity/verify-user/index.html --> +{ + <@lib.endpointInfo + id = "verifyUser" + tag = "Identity" + summary = "Verify User" + desc = "Verifies that user credentials are valid." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "BasicUserCredentialsDto" + examples = ['"example-1": { + "summary": "POST `/identity/verify`", + "value": { + "username": "testUser", + "password": "testPassword" + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "AuthenticationResult" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "POST `/identity/verify`", + "value": { + "authenticatedUser": "testUser", + "authenticated": true + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "If body does not contain username or password." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3668c2955efd417c24fa60a0f64ec70c15141895 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/count/get.ftl @@ -0,0 +1,37 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getIncidentsCount" + tag = "Incident" + summary = "Get List Count" + desc = "Queries for the number of incidents that fulfill given parameters. Takes the same parameters as the + [Get Incidents](${docsUrl}/reference/rest/incident/get-query/) method." /> + + "parameters": [ + <#assign last = true > + <#include "/lib/commons/incident-query-params.ftl"> + ], + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/incident/count?processInstanceId=aProcInstId`", + "value": + { + "count": 2 + }}'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error + response format." /> + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..42fe37b0667a8fc9300d4c693c017400268f250e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/get.ftl @@ -0,0 +1,79 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getIncidents" + tag = "Incident" + summary = "Get List" + desc = "Queries for incidents that fulfill given parameters. The size of the result set can be retrieved by using + the [Get Incident Count](${docsUrl}/reference/rest/incident/get-query-count/) method." /> + + "parameters": [ + <#assign last = false > + <#include "/lib/commons/incident-query-params.ftl"> + + <#assign sortByValues = [ '"incidentId"', '"incidentMessage"', '"incidentTimestamp"', '"incidentType"', + '"executionId"', '"activityId"', '"processInstanceId"', '"processDefinitionId"', + '"causeIncidentId"', '"rootCauseIncidentId"', '"configuration"', '"tenantId"' ] > + <#include "/lib/commons/sort-params.ftl" > + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + ], + "responses" : { + + <@lib.response + code = "200" + dto = "IncidentDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/incident/anIncidentId`", + "value": [ + { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecutionId", + "incidentTimestamp": "2014-03-01T08:00:00.000+0200", + "incidentType": "failedJob", + "activityId": "serviceTask", + "failedActivityId": "serviceTask", + "causeIncidentId": "aCauseIncidentId", + "rootCauseIncidentId": "aRootCauseIncidentId", + "configuration": "aConfiguration", + "tenantId": null, + "incidentMessage": "anIncidentMessage", + "jobDefinitionId": "aJobDefinitionId", + "annotation": "an annotation" + }, + { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anotherExecutionId", + "incidentTimestamp": "2014-03-01T09:00:00.000+0200", + "incidentType": "customIncidentType", + "activityId": "userTask", + "failedActivityId": "userTask", + "causeIncidentId": "anotherCauseIncidentId", + "rootCauseIncidentId": "anotherRootCauseIncidentId", + "configuration": "anotherConfiguration", + "tenantId": null, + "incidentMessage": "anotherIncidentMessage", + "jobDefinitionId": null, + "annotation": "another annotation" + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, + but no `sortBy`. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error + response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/{id}/annotation/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/{id}/annotation/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e68605efc19ff8bf8e1c3e3804f2e06734176c32 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/{id}/annotation/delete.ftl @@ -0,0 +1,33 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "clearIncidentAnnotation" + tag = "Incident" + summary = "Clear Incident Annotation" + desc = "Clears the annotation of an incident with given id." /> + + "parameters": [ + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the incident to clear the annotation at." /> + ], + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if no incident can be found for the given id." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/{id}/annotation/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/{id}/annotation/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6be4bd8fa6a42ebc1cf4f0be5197601b40c48729 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/{id}/annotation/put.ftl @@ -0,0 +1,44 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "setIncidentAnnotation" + tag = "Incident" + summary = "Set Incident Annotation" + desc = "Sets the annotation of an incident with given id." /> + + "parameters": [ + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the incident to clear the annotation at." /> + ], + <@lib.requestBody + mediaType = "application/json" + dto = "AnnotationDto" + examples = [ + '"example-1": { + "summary": "PUT `/incident/7c80cc8f-ef95-11e6-b6e6-34f39ab71d4b/annotation`", + "value": { + "annotation": "my annotation" + } + }' + ] /> + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if no incident can be found for the given id." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2ce096e3973a723b0d93c10aec0e0bfe927827ab --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/{id}/delete.ftl @@ -0,0 +1,40 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "resolveIncident" + tag = "Incident" + summary = "Resolve Incident" + desc = "Resolves an incident with given id." /> + + "parameters": [ + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the incident to be resolved." /> + ], + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Returned if an incident with given id does not exist." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if an incident is not related to any execution or an incident is of type `failedJob` or + `failedExternalTask`. To resolve such an incident, please refer to the + [Incident Types](${docsUrl}/user-guide/process-engine/incidents/#incident-types) section." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..64d138e3e5f3cd1504bdf17b7357e14df53ba297 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/{id}/get.ftl @@ -0,0 +1,54 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getIncident" + tag = "Incident" + summary = "Get Incident" + desc = "Retrieves an incident by ID." /> + + "parameters": [ + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the incident to be retrieved." /> + ], + "responses" : { + + <@lib.response + code = "200" + dto = "IncidentDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/incident/anIncidentId`", + "value": { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecutionId", + "incidentTimestamp": "2014-03-01T08:00:00.000+0200", + "incidentType": "failedJob", + "activityId": "serviceTask", + "failedActivityId": "serviceTask", + "causeIncidentId": "aCauseIncidentId", + "rootCauseIncidentId": "aRootCauseIncidentId", + "configuration": "aConfiguration", + "tenantId": null, + "incidentMessage": "anIncidentMessage", + "jobDefinitionId": "aJobDefinitionId", + "annotation": "an annotation" + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Returned if an incident with given id does not exist." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4334b5849bdf048be1621a941a1648e8d870170b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/count/get.ftl @@ -0,0 +1,54 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/get-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getJobDefinitionsCount" + tag = "Job Definition" + summary = "Get Job Definition Count" + desc = "Queries for the number of job definitions that fulfill given parameters. + Takes the same parameters as the + [Get Job Definitions](${docsUrl}/reference/rest/job-definition/get-query/) + method." + /> + + "parameters" : [ + + <#assign last = true > + <#assign requestMethod="GET"/> + <#include "/lib/commons/job-definition-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/job-definition/count?activityIdIn=ServiceTask1,ServiceTask2`", + "description": "GET `/job-definition/count?activityIdIn=ServiceTask1,ServiceTask2`", + "value": { + "count": 2 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c1bd640137bc200310d3a87b5ed9f738521691ba --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/count/post.ftl @@ -0,0 +1,58 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/post-query-count/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryJobDefinitionsCount" + tag = "Job Definition" + summary = "Get Job Definition Count (POST)" + desc = "Queries for the number of job definitions that fulfill given parameters. This + method takes the same message body as the + [Get Job Definitions (POST)](${docsUrl}/reference/rest/job-definition/post-query/) + method and therefore it is slightly more powerful than the + [Get Job Definition Count](${docsUrl}/reference/rest/job-definition/get-query-count/) + method." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "JobDefinitionQueryDto" + examples = ['"example-1": { + "summary": "POST `/job-definition/count`", + "value": { + "activityIdIn": [ + "ServiceTask1", + "ServiceTask2" + ] + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/job-definition/count`", + "description": "POST `/job-definition/count`", + "value": { + "count": 2 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..cc1f71d0af793ceb17494ac3fed9943da026fccf --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/get.ftl @@ -0,0 +1,81 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/get-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getJobDefinitions" + tag = "Job Definition" + summary = "Get Job Definitions" + desc = "Queries for job definitions that fulfill given parameters. + The size of the result set can be retrieved by using the + [Get Job Definition Count](${docsUrl}/reference/rest/job-definition/get-query-count/) + method." + /> + + "parameters" : [ + + <#assign last = false > + <#assign requestMethod="GET"/> + <#include "/lib/commons/job-definition-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "JobDefinitionDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/job-definition?activityIdIn=ServiceTask1,ServiceTask2`", + "description": "GET `/job-definition?activityIdIn=ServiceTask1,ServiceTask2`", + "value": [ + { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask1", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": false, + "overridingJobPriority": 15, + "tenantId": null, + "deploymentId": "aDeploymentId" + }, + { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask2", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": true, + "overridingJobPriority": null, + "tenantId": null, + "deploymentId": "aDeploymentId" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..548af983f8fd79b21a2ae87a4f7b84f5507b67b3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/post.ftl @@ -0,0 +1,98 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/post-query/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryJobDefinitions" + tag = "Job Definition" + summary = "Get Job Definitions (POST)" + desc = "Queries for job definitions that fulfill given parameters. This method is slightly + more powerful than the + [Get Job Definitions](${docsUrl}/reference/rest/job-definition/get-query/) + method because it allows filtering by multiple job definitions of + types `String`, `Number` or `Boolean`." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "JobDefinitionQueryDto" + examples = ['"example-1": { + "summary": "POST `/job-definition`", + "value": { + "activityIdIn": [ + "ServiceTask1", + "ServiceTask2" + ], + "sorting": [ + { + "sortBy": "activityId", + "sortOrder": "asc" + }, + { + "sortBy": "jobType", + "sortOrder": "asc" + } + ] + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "JobDefinitionDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "POST `/job-definition`", + "description": "POST `/job-definition`", + "value": [ + { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask1", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": false, + "overridingJobPriority": 15, + "tenantId": null, + "deploymentId": "aDeploymentId" + }, + { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask2", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": true, + "overridingJobPriority": null, + "tenantId": null, + "deploymentId": "aDeploymentId" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/suspended/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/suspended/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..39f7e3be826a671a50b811e540da6c2d6266c76d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/suspended/put.ftl @@ -0,0 +1,56 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/put-activate-suspend-by-proc-def-id/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "updateSuspensionStateJobDefinitions" + tag = "Job Definition" + summary = "Activate/Suspend Job Definitions" + desc = "Activates or suspends job definitions with the given process definition id or process definition key." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "JobDefinitionsSuspensionStateDto" + examples = ['"example-1": { + "summary": "suspend by process definition id", + "description": "PUT `/job-definition/suspended`", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "suspended": true, + "includeJobs": true, + "executionDate": "2013-11-21T10:49:45.000+0200" + } + }', + '"example-2": { + "summary": "suspend by process definition key", + "description": "PUT `/job-definition/suspended`", + "value": { + "processDefinitionKey": "aProcessDefinitionKey", + "suspended": true, + "includeJobs": true, + "executionDate": "2013-11-21T10:49:45.000+0200" + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the request parameters are invalid, for example if the provided + `executionDate` parameter doesn't have the expected format. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..35aa8f34277546642d70b76bdafa8d436255a3e1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/{id}/get.ftl @@ -0,0 +1,60 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/get/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getJobDefinition" + tag = "Job Definition" + summary = "Get Job Definition" + desc = "Retrieves a job definition by id, according to the `JobDefinition` interface in the engine." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the job definition to be retrieved." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "JobDefinitionDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/job-definition/aJobDefinitionId`", + "description": "GET `/job-definition/aJobDefinitionId`", + "value": { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask1", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": false, + "overridingJobPriority": 15, + "tenantId": null, + "deploymentId": "aDeploymentId" + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Job definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/{id}/jobPriority/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/{id}/jobPriority/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2f099decb0a5e3333659009ea30e5f53365857a9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/{id}/jobPriority/put.ftl @@ -0,0 +1,69 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/put-set-job-priority/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "setJobPriorityJobDefinition" + tag = "Job Definition" + summary = "Set Job Definition Priority by Id" + desc = "Sets an overriding execution priority for jobs with the given definition id. + Optionally, the priorities of all the definitions' existing jobs are + updated accordingly. The priority can be reset by setting it to + `null`, meaning that a new job's priority will not be determined based + on its definition's priority any longer. See the + [user guide on job prioritization](${docsUrl}/user-guide/process-engine/the-job-executor/#set-job-definition-priorities-via-managementservice-api) + for details." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the job definition to be updated." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "JobDefinitionPriorityDto" + examples = ['"example-1": { + "summary": "PUT `/job-definition/aJobDefId/jobPriority`", + "value": { + "priority": 10, + "includeJobs": true + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Job definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The retries could not be set successfully. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/{id}/retries/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/{id}/retries/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5c14b7435c42d374ac802f6d4d13473cd17cbc8e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/{id}/retries/put.ftl @@ -0,0 +1,56 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/put-set-job-retries/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "setJobRetriesJobDefinition" + tag = "Job Definition" + summary = "Set Job Retries By Job Definition Id" + desc = "Sets the number of retries of all **failed** jobs associated with the given job + definition id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the job definition to be updated." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "RetriesDto" + examples = ['"example-1": { + "summary": "PUT `/job-definition/aJobDefId/retries`", + "value": { + "retries": 3, + "dueDate": "2017-04-06T13:57:45.000+0200" + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The retries could not be set successfully. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/{id}/suspended/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/{id}/suspended/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c61e41487ddb3c616f6509ccddc724b97fc1d9a8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job-definition/{id}/suspended/put.ftl @@ -0,0 +1,57 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job-definition/put-activate-suspend-by-id/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "updateSuspensionStateJobDefinition" + tag = "Job Definition" + summary = "Activate/Suspend Job Definition By Id" + desc = "Activates or suspends a given job definition by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the job definition to activate or suspend." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "JobDefinitionSuspensionStateDto" + examples = ['"example-1": { + "summary": "PUT `/job-definition/aJobDefinitionId/suspended`", + "value": { + "suspended": true, + "includeJobs": true, + "executionDate": "2013-11-21T10:49:45.000+0200" + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the request parameters are invalid, for example if the provided + `executionDate` parameter doesn't have the expected format. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..933311dcd97a6f5a7e900f1d23c6db4234dfe2dc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/count/get.ftl @@ -0,0 +1,52 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/get-query-count/index.html --> +{ + <@lib.endpointInfo + id = "getJobsCount" + tag = "Job" + summary = "Get Job Count" + desc = "Queries for the number of jobs that fulfill given parameters. + Takes the same parameters as the [Get + Jobs](${docsUrl}/reference/rest/job/get-query/) method." + /> + + "parameters" : [ + + <#assign last = true > + <#assign requestMethod="GET"/> + <#include "/lib/commons/job-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "description": "GET `/job/count?dueDates=gt_2012-07-17T17:00:00.000+0200,lt_2012-07-17T18:00:00.000+0200&createTimes=gt_2012-05-05T10:00:00.000+0200,lt_2012-07-16T15:00:00.000+0200`", + "value": { + "count": 2 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example, if an invalid operator + for due date comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..52686d7cadd8e52a8aa5a89ac3ff1334d64732ea --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/count/post.ftl @@ -0,0 +1,72 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/post-query-count/index.html --> +{ + <@lib.endpointInfo + id = "queryJobsCount" + tag = "Job" + summary = "Get Job Count (POST)" + desc = "Queries for jobs that fulfill given parameters. This method takes the same message + body as the [Get Jobs POST](${docsUrl}/reference/rest/job/post- + query/) method and therefore it is slightly more powerful than the + [Get Job Count](${docsUrl}/reference/rest/job/get-query-count/) + method." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "JobQueryDto" + examples = ['"example-1": { + "summary": "POST `/job/count`", + "value": { + "dueDates": [ + { + "operator": "gt", + "value": "2012-07-17T17:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2012-07-17T18:00:00.000+0200" + } + ], + "createTimes": [ + { + "operator": "gt", + "value": "2012-05-05T10:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2012-07-16T15:00:00.000+0200" + } + ] + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "description": "POST `/job/count`", + "value": { + "count": 2 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example, if an invalid operator + for due date comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a1e36ce02d7f51dd8778733be61dfd5203e81cfb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/get.ftl @@ -0,0 +1,90 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/get-query/index.html --> +{ + <@lib.endpointInfo + id = "getJobs" + tag = "Job" + summary = "Get Jobs" + desc = "Queries for jobs that fulfill given parameters. + The size of the result set can be retrieved by using the [Get Job + Count](${docsUrl}/reference/rest/job/get-query-count/) method." + /> + + "parameters" : [ + + <#assign last = false > + <#assign requestMethod="GET"/> + <#include "/lib/commons/job-query-params.ftl" > + <@lib.parameters + object = params + last = last + /> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "JobDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "description": "GET `/job/count?dueDates=gt_2012-07-17T17:00:00.000+0200,lt_2012-07-17T18:00:00.000+0200&createTimes=gt_2012-05-05T10:00:00.000+0200,lt_2012-07-16T15:00:00.000+0200`", + "value": [ + { + "id": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "dueDate": "2018-07-17T17:05:00.000+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aPDKey", + "executionId": "anExecutionId", + "retries": 0, + "exceptionMessage": "An exception Message", + "failedActivityId": "anActivityId", + "suspended": false, + "priority": 10, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": "aBatchId" + }, + { + "id": "anotherJobId", + "jobDefinitionId": "anotherJobDefinitionId", + "dueDate": "2018-07-17T17:55:00.000+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "anotherPDId", + "processDefinitionKey": "anotherPDKey", + "executionId": "anotherExecutionId", + "retries": 0, + "exceptionMessage": "Another exception Message", + "failedActivityId": "anotherActivityId", + "suspended": true, + "priority": 8, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": null + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`, or if an invalid operator + for due date comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ef8a07730872618fa428a604a4c5b5ab9e13b16b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/post.ftl @@ -0,0 +1,123 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/post-query/index.html --> +{ + <@lib.endpointInfo + id = "queryJobs" + tag = "Job" + summary = "Get Jobs (POST)" + desc = "Queries for jobs that fulfill given parameters. This method is slightly more + powerful than the [Get Jobs](${docsUrl}/reference/rest/job/get-query/) + method because it allows filtering by multiple jobs of types `String`, + `Number` or `Boolean`." + /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl"> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "JobQueryDto" + examples = ['"example-1": { + "summary": "POST `/job`", + "value": { + "dueDates": [ + { + "operator": "gt", + "value": "2018-07-17T17:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2018-07-17T18:00:00.000+0200" + } + ], + "createTimes": [ + { + "operator": "gt", + "value": "2012-05-05T10:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2012-07-16T15:00:00.000+0200" + } + ], + "sorting": [ + { + "sortBy": "jobDueDate", + "sortOrder": "asc" + }, + { + "sortBy": "jobRetries", + "sortOrder": "asc" + } + ] + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "JobDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "description": "POST `/job`", + "value": [ + { + "id": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "dueDate": "2018-07-17T17:05:00.000+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aPDKey", + "executionId": "anExecutionId", + "retries": 0, + "exceptionMessage": "An exception Message", + "failedActivityId": "anActivityId", + "suspended": false, + "priority": 10, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": "aBatchId" + }, + { + "id": "anotherJobId", + "jobDefinitionId": "anotherJobDefinitionId", + "dueDate": "2018-07-17T17:55:00.000+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "anotherPDId", + "processDefinitionKey": "anotherPDKey", + "executionId": "anotherExecutionId", + "retries": 0, + "exceptionMessage": "Another exception Message", + "failedActivityId": "anotherActivityId", + "suspended": true, + "priority": 8, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": null + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`, or if an invalid operator + for due date comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/retries/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/retries/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6847e35af08d31a48b670c3f9e98a90c505e1516 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/retries/post.ftl @@ -0,0 +1,78 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/post-set-job-retries/index.html --> +{ + <@lib.endpointInfo + id = "setJobRetriesAsyncOperation" + tag = "Job" + summary = "Set Job Retries Async (POST)" + desc = "Create a batch to set retries of jobs asynchronously." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "SetJobRetriesDto" + examples = ['"example-1": { + "summary": "POST `/job/retries`", + "value": { + "retries" : 5, + "dueDate": "2017-04-06T13:57:45.000+0200", + "jobIds": ["aJob","secondJob"], + "jobQuery": { + "dueDates": + [ + { + "operator": "gt", + "value": "2012-07-17T17:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2012-07-17T18:00:00.000+0200" + } + ] + } + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 OK", + "description": "POST `/job/retries`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspened": false, + "tenantId": "aTenantId", + "createUserId": "userId" + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if neither + processInstanceIds nor processInstanceQuery is present. Or if the + retry count is not specified. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/suspended/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/suspended/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..af6284ed0d0969d14a60d77515ed9f3b26be60ff --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/suspended/put.ftl @@ -0,0 +1,74 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/put-activate-suspend-by-proc-def-key/index.html --> +<#-- This file is actually based on four doc files found under put-activate-suspend-by-* as they all describe the same endpoint --> +{ + <@lib.endpointInfo + id = "updateSuspensionStateBy" + tag = "Job" + summary = "Activate/Suspend Jobs" + desc = "Activates or suspends jobs matching the given criterion. + This can only be on of: + * `jobDefinitionId` + * `processDefinitionId` + * `processInstanceId` + * `processDefinitionKey`" + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "JobSuspensionStateDto" + examples = [ + '"example-1": { + "summary": "Activates or suspends jobs with the given job definition id. PUT `/job/suspended`", + "value": { + "jobDefinitionId" : "aJobDefinitionId", + "suspended": true + } + }', + '"example-2": { + "summary": "Activates or suspends jobs with the given process definition id. PUT `/job/suspended`", + "value": { + "processDefinitionId" : "aProcessDefinitionId", + "suspended": true + } + }', + '"example-3": { + "summary": "Activates or suspends jobs with the given process instance id. PUT `/job/suspended`", + "value": { + "processInstanceId" : "aProcessInstanceId", + "suspended": true + } + }', + '"example-4": { + "summary": "Activates or suspends jobs with the given process definition key. PUT `/job/suspended`", + "value": { + "processDefinitionKey": "aProcessDefinitionKey", + "suspended": true + } + }' + + + ] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if the request parameters are invalid, for example, if `jobDefinitionId` and + `processDefinitionId` are both specified. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..fa40d55cd2f74c31b682394e3f93cfd3cd1191c5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/delete.ftl @@ -0,0 +1,50 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteJob" + tag = "Job" + summary = "Delete Job" + desc = "Deletes a job by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the job to be deleted." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Job with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The job could not be deleted. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/duedate/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/duedate/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5cb327da23d96b5f165e873184d2ee976d82649d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/duedate/put.ftl @@ -0,0 +1,63 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/put-set-job-duedate/index.html --> +{ + <@lib.endpointInfo + id = "setJobDuedate" + tag = "Job" + summary = "Set Job Due Date" + desc = "Updates the due date of a job by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the job to be updated." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "JobDuedateDto" + examples = ['"example-1": { + "summary": "PUT `/job/aJobId/duedate`", + "value": { + "duedate": "2013-08-13T18:43:28.000+0200", + "cascade": false + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Job with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The due date could not be set successfully. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/duedate/recalculate/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/duedate/recalculate/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..88ca8ab446e4e57477dd22b066cdbfd1fae0e931 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/duedate/recalculate/post.ftl @@ -0,0 +1,59 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/post-recalculate-job-duedate/index.html --> +{ + <@lib.endpointInfo + id = "recalculateDuedate" + tag = "Job" + summary = "Recalculate Job Due Date" + desc = "Recalculates the due date of a job by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the job to be updated." + /> + + <@lib.parameter + name = "creationDateBased" + location = "query" + type = "boolean" + desc = "Recalculate the due date based on the creation date of the job or the current date. + Value may only be `false`, as `true` is the default behavior. " + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Job with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The due date could not be recalculated successfully. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/execute/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/execute/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..55a3b838386bd070e9f38985c31e26b7ec18ecac --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/execute/post.ftl @@ -0,0 +1,52 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/post-execute-job/index.html --> +{ + <@lib.endpointInfo + id = "executeJob" + tag = "Job" + summary = "Execute Job" + desc = "Executes a job by id. **Note:** The execution of the job happens synchronously in + the same thread." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the job to be executed." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Job with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The job could not be executed successfully. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3fb4e3403237dfdc77ec0fdc123902f68fdeaa9e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/get.ftl @@ -0,0 +1,64 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/get/index.html --> +{ + <@lib.endpointInfo + id = "getJob" + tag = "Job" + summary = "Get Job" + desc = "Retrieves a job by id, according to the `Job` interface in the engine." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the job to be retrieved." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "JobDto" + desc = "Request successful." + examples = ['"example-1": { + "description": "GET `/job/aJobId`", + "value": { + "id": "aJobId", + "jobDefinitionId": "f9eec330-e3ff-11e8-8f7d-e4a7a094a9d6", + "dueDate": "2018-07-17T17:00:00+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "timer:1:f9ee9c1f-e3ff-11e8-8f7d-e4a7a094a9d6", + "processDefinitionKey": "timer", + "executionId": "anExecutionId", + "retries": 0, + "exceptionMessage": "An exception Message", + "failedActivityId": "anActivityId", + "suspended": false, + "priority": 10, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": "aBatchId" + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Job with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/priority/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/priority/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7ac2bd4075466d1397d249156a36ff2719f2162b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/priority/put.ftl @@ -0,0 +1,62 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/put-set-job-priority/index.html --> +{ + <@lib.endpointInfo + id = "setJobPriority" + tag = "Job" + summary = "Set Job Priority" + desc = "Sets the execution priority of a job by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the job to be updated." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "PriorityDto" + examples = ['"example-1": { + "summary": "PUT `/job/aJobId/priority`", + "value": { + "priority": 10 + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Job with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The priority could not be set successfully. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/retries/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/retries/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1626db1649d34a41038f0ce2915bd5ae049f1aad --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/retries/put.ftl @@ -0,0 +1,63 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/put-set-job-retries/index.html --> +{ + <@lib.endpointInfo + id = "setJobRetries" + tag = "Job" + summary = "Set Job Retries" + desc = "Sets the retries of the job to the given number of retries by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the job to be updated." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "JobRetriesDto" + examples = ['"example-1": { + "summary": "PUT `/job/aJobId/retries`", + "value": { + "retries": 3, + "dueDate": "2017-04-06T13:57:45.000+0200" + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Job with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The retries could not be set successfully. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/stacktrace/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/stacktrace/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..340f6a75a6e89c6a2832b0eacd834ed8fcb48cfd --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/stacktrace/get.ftl @@ -0,0 +1,53 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/get-exception-stacktrace/index.html --> +{ + <@lib.endpointInfo + id = "getStacktrace" + tag = "Job" + summary = "Get Exception Stacktrace" + desc = "Retrieves the exception stacktrace corresponding to the passed job id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the job to get the exception stacktrace for." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + mediaType= "text/plain" + desc = "Request successful." + contentDesc = "Returns the stacktrace of the exception for the job with the given ID." + examples = ['"example-1": { + "description": "GET `/job/aJobId/stacktrace`", + "value": "java.lang.RuntimeException: A exception message! + at org.camunda.bpm.pa.service.FailingDelegate.execute(FailingDelegate.java:10) + at org.camunda.bpm.engine.impl.delegate.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:34) + at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37) + ..." + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Job with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/suspended/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/suspended/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d84f5f82601b983cc491d48913bd2fa3a34437cb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/job/{id}/suspended/put.ftl @@ -0,0 +1,46 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/job/put-activate-suspend-by-id/index.html --> +{ + <@lib.endpointInfo + id = "updateJobSuspensionState" + tag = "Job" + summary = "Activate/Suspend Job By Id" + desc = "Activates or suspends a given job by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the job to activate or suspend." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "SuspensionStateDto" <#-- Note: The java code uses JobSuspensionStateDto, but this endpoint only requires one attribute. As JobSuspensionStateDto is quite complex it could be confusing to the user to use it here.--> + examples = ['"example-1": { + "summary": "PUT `/job/aJobId/suspended`", + "value": { + "suspended": true + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/message/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/message/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..191459468b4e496f46e5877119357719cae045ae --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/message/post.ftl @@ -0,0 +1,141 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "deliverMessage" + tag = "Message" + summary = "Correlate" + desc = "Correlates a message to the process engine to either trigger a message start event or an intermediate message + catching event. Internally this maps to the engine's message correlation builder methods + `MessageCorrelationBuilder#correlateWithResult()` and `MessageCorrelationBuilder#correlateAllWithResult()`. + For more information about the correlation behavior, see the [Message Events](${docsUrl}/bpmn20/events/message-events/) + section of the [BPMN 2.0 Implementation Reference](${docsUrl}/reference/bpmn20/)." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "CorrelationMessageDto" + examples = ['"example-1": { + "summary": "POST /message", + "description": "Correlate without result", + "value": { + "messageName" : "aMessage", + "businessKey" : "aBusinessKey", + "correlationKeys" : { + "aVariable" : {"value" : "aValue", "type": "String"} + }, + "processVariables" : { + "aVariable" : {"value" : "aNewValue", "type": "String", + "valueInfo" : { "transient" : true } + }, + "anotherVariable" : {"value" : true, "type": "Boolean"} + } + } + }, + "example-2": { + "summary": "POST /message", + "description": "Correlate with result", + "value": { + "messageName" : "aMessage", + "businessKey" : "aBusinessKey", + "correlationKeys" : { + "aVariable" : {"value" : "aValue", "type": "String"} + }, + "processVariables" : { + "aVariable" : {"value" : "aNewValue", "type": "String", + "valueInfo" : { "transient" : true } + }, + "anotherVariable" : {"value" : true, "type": "Boolean"} + }, + "resultEnabled" : true + } + }, + "example-3": { + "summary": "POST /message", + "description": "Correlate with result and variables", + "value": { + "messageName" : "aMessage", + "businessKey" : "aBusinessKey", + "correlationKeys" : { + "aVariable" : {"value" : "aValue", "type": "String"} + }, + "processVariables" : { + "aVariable" : {"value" : "aNewValue", "type": "String", + "valueInfo" : { "transient" : true } + }, + "anotherVariable" : {"value" : true, "type": "Boolean"} + }, + "resultEnabled" : true, + "variablesInResultEnabled" : true + } + }'] + /> + + "responses" : { + + <@lib.response + code = "200" + dto = "MessageCorrelationResultWithVariableDto" + array = true + desc = "Request successful. The property `resultEnabled` in the request body was `true`. + The `variables` property is only returned, if the property variablesInResultEnable` + was set to `true` in the request." + examples = ['"example-1": { + "summary": "Status 200 Response.", + "description": "The Response content of a status 200. The property `variablesInResultEnabled` in the request body was `false` (Default).", + "value": [{ + "resultType": "ProcessDefinition", + "execution": null, + "processInstance": { + "links": [], + "id": "aProcInstId", + "definitionId": "aProcDefId", + "definitionKey": "aProcDefKey", + "businessKey": "aKey", + "caseInstanceId": "aCaseInstId", + "ended": false, + "suspended": false, + "tenantId": "aTenantId" + } + }] + }, + "example-2": { + "summary": "Status 200 Response.", + "description": "The Response content of a status 200. The property `variablesInResultEnabled` in the request body was `true`.", + "value": [{ + "resultType": "Execution", + "execution": { + "id": "anExecutionId", + "processInstanceId": "aProcInstId", + "ended": false, + "tenantId": "aTenantId" + }, + "processInstance": null, + "variables" : { + "aVariable" : {"value" : "aNewValue", "type": "String", + "valueInfo" : { "transient" : true } + }, + "anotherVariable" : {"value" : true, "type": "Boolean"} + } + }] + }']/> + + <@lib.response + code = "204" + desc = "Request successful. The property `resultEnabled` in the request body was `false` (Default)." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if: + * no `messageName` was supplied + * both `tenantId` and `withoutTenantId` are supplied + * the message has not been correlated to exactly one entity (execution or process definition) + * the variable value or type is invalid, for example if the value could not be parsed to an Integer value or the passed variable type is not supported. + + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/metrics/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/metrics/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7540c5c8e4f8c2d742247458cb78411fd752e43d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/metrics/get.ftl @@ -0,0 +1,104 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "interval" + tag = "Metrics" + summary = "Get Metrics in Interval" + desc = "Retrieves a list of metrics, aggregated for a given interval." /> + + "parameters" : [ + + <@lib.parameter + name = "name" + location = "query" + type = "string" + enumValues = ["activity-instance-start", + "activity-instance-end", + "decision-instances", + "flow-node-instances", + "job-acquisition-attempt", + "job-acquired-success", + "job-acquired-failure", + "job-execution-rejected", + "job-successful", + "job-failed", + "job-locked-exclusive", + "executed-decision-elements", + "history-cleanup-removed-process-instances", + "history-cleanup-removed-case-instances", + "history-cleanup-removed-decision-instances", + "history-cleanup-removed-batch-operations", + "history-cleanup-removed-task-metrics", + "process-instances"] + desc = "The name of the metric." /> + + <@lib.parameter + name = "reporter" + location = "query" + type = "string" + desc = "The name of the reporter (host), on which the metrics was logged. This will have + value provided by the [hostname configuration property](${docsUrl}/reference/deployment-descriptors/tags/process-engine/#hostname)." /> + + <@lib.parameter + name = "startDate" + location = "query" + type = "string" + format = "date-time" + desc = "The start date (inclusive)."/> + + <@lib.parameter + name = "endDate" + location = "query" + type = "string" + format = "date-time" + desc = "The end date (exclusive)."/> + + <#assign last = false /> + <#include "/lib/commons/pagination-params.ftl" > + + <@lib.parameter + name = "interval" + location = "query" + type = "integer" + format = "int64" + defaultValue = "900" + desc = "The interval for which the metrics should be aggregated. Time unit is seconds. + Default: The interval is set to 15 minutes (900 seconds)." /> + + <@lib.parameter + name = "aggregateByReporter" + location = "query" + type = "string" + last = true + desc = "Aggregate metrics by reporter." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "MetricsIntervalResultDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /metrics?name=flow-node-instances&startDate=1970-01-01T01:45:00.000%2b0200&endDate=1970-01-01T02:00:00.000%2b0200", + "value": [ + { + "timestamp":"1970-01-01T01:45:00.000+0200", + "name":"flow-node-instances", + "reporter":"REPORTER", + "value":23 + } + ] + }']/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/metrics/task-worker/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/metrics/task-worker/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2d2733b0a0a09b2dedf61a841d3ba810596c1b92 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/metrics/task-worker/delete.ftl @@ -0,0 +1,35 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteTaskMetrics" + tag = "Metrics" + summary = "Delete Task Worker Metrics" + desc = "Deletes all task worker metrics prior to the given date or all if no date is provided." /> + + "parameters" : [ + + <@lib.parameter + name = "date" + location = "query" + type = "string" + format = "date-time" + last = true + desc = "The date prior to which all task worker metrics should be deleted."/> + + ], + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + last = true + desc = "If the user who performs the operation is not a camunda-admin user." /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/metrics/{metrics-name}/sum/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/metrics/{metrics-name}/sum/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..22642eee190ed876be53d55a328b1e3999070dbd --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/metrics/{metrics-name}/sum/get.ftl @@ -0,0 +1,69 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getMetrics" + tag = "Metrics" + summary = "Get Sum" + desc = "Retrieves the `sum` (count) for a given metric." /> + + "parameters" : [ + + <@lib.parameter + name = "metrics-name" + location = "path" + required = true + type = "string" + enumValues = ["activity-instance-start", + "activity-instance-end", + "decision-instances", + "flow-node-instances", + "job-acquisition-attempt", + "job-acquired-success", + "job-acquired-failure", + "job-execution-rejected", + "job-successful", + "job-failed", + "job-locked-exclusive", + "executed-decision-elements", + "history-cleanup-removed-process-instances", + "history-cleanup-removed-case-instances", + "history-cleanup-removed-decision-instances", + "history-cleanup-removed-batch-operations", + "history-cleanup-removed-task-metrics", + "unique-task-workers", + "process-instances", + "task-users"] + desc = "The name of the metric." /> + + <@lib.parameter + name = "startDate" + location = "query" + type = "string" + format = "date-time" + desc = "The start date (inclusive)."/> + + <@lib.parameter + name = "endDate" + location = "query" + type = "string" + format = "date-time" + last = true + desc = "The end date (exclusive)."/> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "MetricsResultDto" + last = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /metrics/activity-instance-end/sum?startDate=2015-01-01T00:00:00.000%2b0200", + "value": { "result": 4342343241 } + }']/> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/migration/execute/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/migration/execute/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1d2d89e1304759387072cede025305cbc0860631 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/migration/execute/post.ftl @@ -0,0 +1,105 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/migration/execute-migration/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "executeMigrationPlan" + tag = "Migration" + summary = "Execute Migration Plan" + desc = "Executes a migration plan synchronously for multiple process instances. To execute + a migration plan asynchronously, use the + [Execute Migration Plan Async(Batch)](${docsUrl}/reference/rest/migration/execute-migration-async/) + method. + + For more information about the difference between synchronous and asynchronous + execution of a migration plan, please refer to the related section of + [the user guide](${docsUrl}/user-guide/process-engine/process-instance-migration/#executing-a-migration-plan)." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "MigrationExecutionDto" + examples = ['"example-1": { + "summary": "POST `/migration/execute`", + "value": { + "migrationPlan": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "instructions": [ + { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ] + }, + { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + } + ], + "variables": { + "foo": { + "type": "Object", + "value": "[5,9]", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/json" + } + } + } + }, + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId1" + }, + "skipCustomListeners": true + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Invalid variable value, for example if the value could not be parsed to an Integer value or the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The request is not valid if one or more of the following statements apply: + + * The provided migration plan is not valid, so an exception of type + `MigrationPlanValidationException` is returned. + * The provided migration plan is not valid for a specific process + instance it is applied to, so an exception of type + `MigratingProcessInstanceValidationException` is returned. + * In case additional parameters of the request are unexpected, an + exception of type `InvalidRequestException` is returned. + + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/migration/executeAsync/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/migration/executeAsync/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..dab663129df9ab0a89da07d25fb0425d07027413 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/migration/executeAsync/post.ftl @@ -0,0 +1,118 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/migration/execute-migration-async/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "executeMigrationPlanAsync" + tag = "Migration" + summary = "Execute Migration Plan Async (Batch)" + desc = "Executes a migration plan asynchronously (batch) for multiple process instances. + To execute a migration plan synchronously, use the + [Execute MigrationPlan](${docsUrl}/reference/rest/migration/execute-migration/) + method. + + For more information about the difference between synchronous and asynchronous + execution of a migration plan, please refer to the related section of + [the user guide](${docsUrl}/user-guide/process-engine/process-instance-migration/#executing-a-migration-plan)." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "MigrationExecutionDto" + examples = ['"example-1": { + "summary": "POST `/migration/executeAsync`", + "value": { + "migrationPlan": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "instructions": [ + { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ] + }, + { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + } + ], + "variables": { + "foo": { + "type": "Object", + "value": "[5,9]", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/json" + } + } + } + }, + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId1" + }, + "skipCustomListeners": true + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "POST `/migration/executeAsync`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId" + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Invalid variable value, for example if the value could not be parsed to an Integer value or the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The request is not valid if one or more of the following statements apply: + + * The provided migration plan is not valid, so an exception of type + `MigrationPlanValidationException` is returned. + * In case additional parameters of the request are unexpected, an + exception of type `InvalidRequestException` is returned. + + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/migration/generate/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/migration/generate/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c1ed3ad11887712fb37460aadb6043012f2ce777 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/migration/generate/post.ftl @@ -0,0 +1,104 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/migration/generate-migration/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "generateMigrationPlan" + tag = "Migration" + summary = "Generate Migration Plan" + desc = "Generates a migration plan for two process definitions. The generated migration + plan contains migration instructions which map equal activities + between the + two process definitions." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "MigrationPlanGenerationDto" + examples = ['"example-1": { + "summary": "POST `/migration/generate`", + "value": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "updateEventTriggers": true, + "variables": { + "foo": { + "type": "Object", + "value": "[5,6]", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/json" + } + } + } + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "MigrationPlanDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "POST `/migration/generate`", + "value": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "instructions": [ + { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ], + "updateEventTrigger": false + }, + { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + } + ], + "variables": { + "foo": { + "type": "Object", + "value": "[5,6]", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/json" + } + } + } + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Invalid variable value, for example if the value could not be parsed to an Integer value or the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + The requested migration was invalid. See + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/migration/validate/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/migration/validate/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7bc826136d9d75f6a8e29e2bb82918aacb035afe --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/migration/validate/post.ftl @@ -0,0 +1,134 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/migration/validate-migration-plan/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "validateMigrationPlan" + tag = "Migration" + summary = "Validate Migration Plan" + desc = "Validates a migration plan statically without executing it. This + corresponds to the + [creation time validation](${docsUrl}/user-guide/process-engine/process-instance-migration/#creation-time-validation) + described in the user guide." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "MigrationPlanDto" + examples = ['"example-1": { + "summary": "POST `/migration/validate`", + "value": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "instructions": [ + { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ] + }, + { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + } + ], + "variables": { + "foo": { + "type": "Object", + "value": "...", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/x-java-serialized-object" + } + } + } + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "MigrationPlanReportDto" + desc = "Request successful. The validation report was returned." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "POST `/migration/validate`", + "value": { + "instructionReports": [ + { + "instruction": { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ], + "updateEventTrigger": false + }, + "failures": [ + "failure1", + "failure2" + ] + }, + { + "instruction": { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + }, + "failures": [ + "failure1", + "failure2" + ] + } + ], + "variableReports": { + "foo": { + "type": "Object", + "value": "...", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/x-java-serialized-object" + }, + "failures": [ + "Cannot set variable with name foo. Java serialization format is prohibited" + ] + } + } + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Invalid variable value, for example if the value could not be parsed to an Integer value or the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "In case additional parameters of the request are unexpected, an + exception of type `InvalidRequestException` is returned. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/modification/execute/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/modification/execute/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..101b080c21ce78ba675a1264bcdcf35c2d3dd72c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/modification/execute/post.ftl @@ -0,0 +1,75 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/modification/post-modification-sync/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "executeModification" + tag = "Modification" + summary = "Execute Modification" + desc = "Executes a modification synchronously for multiple process instances. + To modify a single process instance, use the + [Modify Process Instance Execution State](${docsUrl}/reference/rest/process-instance/post-modification/) method. + To execute a modification asynchronously, use the + [Execute Modification Async (Batch)](${docsUrl}/reference/rest/modification/post-modification-async/) method. + + For more information about the difference between synchronous and + asynchronous execution of a modification, please refer to the related + section of the + [user guide](${docsUrl}/user-guide/process-engine/process-instance-migration.md#executing-a-migration-plan)." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "ModificationDto" + examples = ['"example-1": { + "summary": "POST `/modification/execute`", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + }, + { + "type": "cancel", + "activityId": "anotherTask", + "cancelCurrentActiveActivityInstances": true + } + ], + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId" + }, + "skipCustomListeners": true, + "annotation": "Modified to resolve an error." + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + In case following parameters are missing: instructions, + processDefinitionId, activityId or transitionId, processInstanceIds + or processInstanceQuery, an exception of type + `InvalidRequestException` is returned. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/modification/executeAsync/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/modification/executeAsync/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4ae789ee1addf91b15ec2181271458bca3b7f60c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/modification/executeAsync/post.ftl @@ -0,0 +1,89 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/modification/post-modification-async/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "executeModificationAsync" + tag = "Modification" + summary = "Execute Modification Async (Batch)" + desc = "Executes a modification asynchronously for multiple process instances. To execute a + modification synchronously, use the + [Execute Modification](${docsUrl}/reference/rest/modification/post-modification-sync/) method. + + For more information about the difference between synchronous and + asynchronous execution of a modification, please refer to the related + section of the + [user guide](${docsUrl}/user-guide/process-engine/process-instance-migration.md#executing-a-migration-plan)." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "ModificationDto" + examples = ['"example-1": { + "summary": "POST `/modification/executeAsync`", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + }, + { + "type": "cancel", + "activityId": "anotherTask", + "cancelCurrentActiveActivityInstances": true + } + ], + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId" + }, + "skipCustomListeners": true, + "annotation": "Modified to resolve an error." + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "POST `/modification/executeAsync`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId" + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = " + In case following parameters are missing: instructions, + processDefinitionId, activityId or transitionId, processInstanceIds + or processInstanceQuery, an exception of type + `InvalidRequestException` is returned. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format. + " + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c462dbb208629170ec5af05164baba5611680ce8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/count/get.ftl @@ -0,0 +1,44 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getProcessDefinitionsCount" + tag = "Process Definition" + summary = "Get List Count" + desc = "Requests the number of process definitions that fulfill the query criteria. + Takes the same filtering parameters as the [Get Definitions](${docsUrl}/reference/rest/process-definition/get-query/) method." /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/process-definition-query-params.ftl" > + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition/count?keyLike=Key&version=47`", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..64597a0b9aa57e8cfaf75ddb7050eda0e29e674b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/get.ftl @@ -0,0 +1,80 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getProcessDefinitions" + tag = "Process Definition" + summary = "Get List" + desc = "Queries for process definitions that fulfill given parameters. Parameters may be the properties of + process definitions, such as the name, key or version. The size of the result set can be retrieved + by using the [Get Definition Count](${docsUrl}/reference/rest/process-definition/get-query-count/) method." /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/process-definition-query-params.ftl" > + + <#assign sortByValues = [ '"category"', '"key"', '"id"', '"name"', '"version"', + '"deploymentId"', '"deployTime"', '"tenantId "', '"versionTag"' ] > + <#include "/lib/commons/sort-params.ftl" > + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessDefinitionDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition?keyLike=invoice&sortBy=version&sortOrder=asc`", + "value": [{ + "id": "invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 1, + "resource": "invoice.v1.bpmn", + "deploymentId": "c398cd26-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5, + "startableInTasklist": true + }, { + "id": "invoice:2:c3e1bd16-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 2, + "resource": "invoice.v2.bpmn", + "deploymentId": "c3d82020-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "startableInTasklist": true + }] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, + but no `sortBy`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a739cb93a24c5a179ec95e0a4fb14dec8e4135f0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/delete.ftl @@ -0,0 +1,67 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteProcessDefinitionsByKey" + tag = "Process Definition" + summary = "Delete By Key" + desc = "Deletes process definitions by a given key which belong to no tenant id." /> + + "parameters": [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definitions to be deleted."/> + + <@lib.parameter + name = "cascade" + location = "query" + type = "boolean" + desc = "`true`, if all process instances, historic process instances and jobs + for this process definition should be deleted."/> + + <@lib.parameter + name = "skipCustomListeners" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "`true`, if only the built-in ExecutionListeners should be notified with the end event." /> + + <@lib.parameter + name = "skipIoMappings" + location = "query" + type = "boolean" + defaultValue = 'false' + last = true + desc = "A boolean value to control whether input/output mappings should be executed during deletion. + `true`, if input/output mappings should not be invoked." /> + + ], + "responses": { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "Forbidden + The process definitions with the given `key` cannot be deleted due to missing permissions. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Not found + Process definition with given `key` does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/deployed-start-form/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/deployed-start-form/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9a731eab429202d37501492daa4481b7999d088f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/deployed-start-form/get.ftl @@ -0,0 +1,78 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getDeployedStartFormByKey" + tag = "Process Definition" + summary = "Get Deployed Start Form" + desc = "Retrieves the deployed form that can be referenced from a start event. + For further information please refer to [User Guide](${docsUrl}/user-guide/task-forms/#embedded-task-forms)." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the process definition (the latest version thereof) to be retrieved."/> + ], + + "responses" : { + + <@lib.response + code = "200" + mediaType = "application/xhtml+xml" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "Resonse for GET `/process-definition/key/processDefinitionKey/deployed-start-form`", + "value": "
+ +
+ +
+ +
+ (e.g. "Great Pizza for Everyone Inc.") +
+
+
+ +
" + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The form key has wrong format. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "The deployed start form cannot be retrieved due to missing permissions on process definition resource. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "No deployed start form for a given process definition exists. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/diagram/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/diagram/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7086e9141b5bd71f3b35ffc172167551ec3081a8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/diagram/get.ftl @@ -0,0 +1,63 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getProcessDefinitionDiagramByKey" + tag = "Process Definition" + summary = "Get Diagram" + desc = "Retrieves the diagram for the latest version of the process definition which belongs to no tenant. + + If the process definition's deployment contains an image resource with the same file name + as the process definition, the deployed image will be returned by the Get Diagram endpoint. + Example: `someProcess.bpmn` and `someProcess.png`. + Supported file extentions for the image are: `svg`, `png`, `jpg`, and `gif`." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the process definition."/> + ], + + "responses" : { + + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + + <@lib.response + code = "204" + desc = "The process definition doesn't have an associated diagram." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/form-variables/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/form-variables/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..01dc62b44ae8cd237d769139d9e414436937facf --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/form-variables/get.ftl @@ -0,0 +1,95 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getStartFormVariablesByKey" + tag = "Process Definition" + summary = "Get Start Form Variables" + desc = "Retrieves the start form variables for the latest process definition which belongs to no tenant + (only if they are defined via the + [Generated Task Form](${docsUrl}/user-guide/task-forms/#generated-task-forms) approach). + The start form variables take form data specified on the start event into account. + If form fields are defined, the variable types and default values + of the form fields are taken into account." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition (the latest version thereof) to be retrieved." /> + + <@lib.parameter + name = "variableNames" + location = "query" + type = "string" + desc = "A comma-separated list of variable names. Allows restricting the list of requested + variables to the variable names in the list. It is best practice to restrict the + list of variables to the variables actually required by the form in order to + minimize fetching of data. If the query parameter is ommitted all variables are + fetched. If the query parameter contains non-existent variable names, the variable + names are ignored." /> + + <@lib.parameter + name = "deserializeValues" + location = "query" + type = "boolean" + defaultValue = "true" + last = true + desc = "Determines whether serializable variable values (typically variables that store + custom Java objects) should be deserialized on server side (default true). + + If set to true, a serializable variable will be deserialized on server side and + transformed to JSON using [Jackson's](http://jackson.codehaus.org/) POJO/bean + property introspection feature. Note that this requires the Java classes of the + variable value to be on the REST API's classpath. + + If set to false, a serializable variable will be returned in its serialized format. + For example, a variable that is serialized as XML will be returned as a JSON string + containing XML. + + **Note**: While true is the default value for reasons of backward compatibility, we + recommend setting this parameter to false when developing web applications that are + independent of the Java process applications deployed to the engine." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + additionalProperties = true + dto = "VariableValueDto" + desc = "Request successful. A JSON object containing a property for each variable returned." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "GET `/process-definition/anId/form-variables`", + "value": { + "amount": { + "type": "integer", + "value": 5, + "valueInfo": {} + }, + "firstName": { + "type": "String", + "value": "Jonny", + "valueInfo": {} + } + + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "The key is null or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e5259114bd161abab2d417ccadcd00a0ab1e0746 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/get.ftl @@ -0,0 +1,59 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getProcessDefinitionByKey" + tag = "Process Definition" + summary = "Get" + desc = "Retrieves the latest version of the process definition which belongs to no tenant according to the `ProcessDefinition` interface in the engine." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the process definition (the latest version thereof) to be retrieved."/> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessDefinitionDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition/key/invoice`", + "value": { + "id": "invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 1, + "resource": "invoice.v1.bpmn", + "deploymentId": "c398cd26-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5, + "startableInTasklist": true + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Process definition with given `key` does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/history-time-to-live/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/history-time-to-live/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..639a4b25ccf5e530bd1cf71cb32ab2cf4908ca33 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/history-time-to-live/put.ftl @@ -0,0 +1,60 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "updateHistoryTimeToLiveByProcessDefinitionKey" + tag = "Process Definition" + summary = "Update History Time to Live" + desc = "Updates history time to live for the latest version of the process definition which belongs to no tenant. + The field is used within [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup). + The value of the update is mandatory by default and does not allow `null` values. To enable them, please + set the feature flag `enforceHistoryTimeToLive` to `false`. Read more in [Configuration Properties] + (${docsUrl}/reference/deployment-descriptors/tags/process-engine#configuration-properties)" /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the process definition to change history time to live."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoryTimeToLiveDto" + examples = ['"example-1": { + "summary": "PUT `/process-definition/key/aProcessDefinitionKey/history-time-to-live`", + "value": { + "historyTimeToLive" : 5 + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the request parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/rendered-form/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/rendered-form/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8b8256ef0d564701f158ba777d72b41b44b356db --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/rendered-form/get.ftl @@ -0,0 +1,68 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getRenderedStartFormByKey" + tag = "Process Definition" + summary = "Get Rendered Start Form" + desc = "Retrieves the rendered form for the latest version of the process definition which belongs to no tenant. + This method can be used to get the HTML rendering of a + [Generated Task Form](${docsUrl}/user-guide/task-forms/#generated-task-forms)." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the process definition (the latest version thereof) to be retrieved."/> + + ], + + "responses" : { + + <@lib.response + code = "200" + mediaType = "application/xhtml+xml" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "A `/process-definition/key/anKey/rendered-form` HTML + GET response body providing the rendered (generated) form content.", + "value": "
+
+ +
+ +
+
+
+ +
+ +
+
+
" + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Process definition has no form field metadata defined. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given key does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/start/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/start/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..69fab658647d5f577ae024e672e2c39a7aca698d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/start/post.ftl @@ -0,0 +1,202 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "startProcessInstanceByKey" + tag = "Process Definition" + summary = "Start Instance" + desc = "Instantiates a given process definition, starts the latest version of the process definition + which belongs to no tenant. + Process variables and business key may be supplied in the request body." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the process definition (the latest version thereof) to be retrieved."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "StartProcessInstanceDto" + examples = ['"example-1": { + "summary": "Starting a process instance at its default initial activity", + "value": { + "variables": { + "aVariable" : { + "value" : "aStringValue", + "type": "String" + }, + "anotherVariable" : { + "value" : true, + "type": "Boolean" + } + }, + "businessKey" : "myBusinessKey" + } + }', + '"example-2": { + "summary": "Starting a process instance with variables in return", + "value": { + "variables": { + "aVariable" : { + "value" : "aStringValue", + "type": "String" + }, + "anotherVariable" : { + "value" : true, + "type": "Boolean" + } + }, + "businessKey" : "myBusinessKey", + "withVariablesInReturn": true + } + }', + '"example-3": { + "summary": "Starting a process instance at two specific activities", + "value": { + "variables": { + "aProcessVariable" : { + "value" : "aStringValue", + "type": "String" + } + }, + "businessKey" : "myBusinessKey", + "skipCustomListeners" : true, + "startInstructions" : + [ + { + "type": "startBeforeActivity", + "activityId": "activityId", + "variables": { + "var": { + "value": "aVariableValue", + "local": false, + "type": "String"} + } + }, + { + "type": "startAfterActivity", + "activityId": "anotherActivityId", + "variables": { + "varLocal": { + "value": "anotherVariableValue", + "local": true, + "type": "String" + } + } + } + ] + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessInstanceWithVariablesDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response 1", + "description": "Response for starting a process instance at its default initial activity", + "value": { + "links": [ + { + "method": "GET", + "href":"http://localhost:8080/rest-test/process-instance/anId", + "rel":"self" + } + ], + "id":"anId", + "definitionId":"aProcessDefinitionId", + "definitionKey":"aProcessDefinitionKey", + "businessKey":"myBusinessKey", + "caseInstanceId": null, + "tenantId":null, + "ended":false, + "suspended":false + } + }', + '"example-2": { + "summary": "Status 200 Response 2", + "description": "Response for starting a process instance with variables in return", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/aProcInstId", + "rel": "self" + } + ], + "id": "aProcInstId", + "definitionId": "aProcessDefinitionId", + "definitionKey":"aProcessDefinitionKey", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": null, + "variables": { + "anotherVariable": { + "type": "Boolean", + "value": true, + "valueInfo": { + "transient" : true + } + }, + "aVariable": { + "type": "String", + "value": "aStringValue", + "valueInfo": { } + } + } + } + }', + '"example-3": { + "summary": "Status 200 Response 3", + "description": "Response for starting a process instance at two specific activities", + "value": { + "links": [ + { + "method": "GET", + "href":"http://localhost:8080/rest-test/process-instance/anId", + "rel":"self" + } + ], + "id":"anId", + "definitionId":"aProcessDefinitionId", + "definitionKey":"aProcessDefinitionKey", + "businessKey":"myBusinessKey", + "caseInstanceId": null, + "tenantId":null, + "ended":false, + "suspended":false + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The instance could not be created due to an invalid variable value, + for example if the value could not be parsed to an `Integer` value or + the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "The instance could not be created successfully. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/startForm/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/startForm/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c41820d36ddbaf7b1a7c29e81f4a49811d824244 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/startForm/get.ftl @@ -0,0 +1,56 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getStartFormByKey" + tag = "Process Definition" + summary = "Get Start Form Key" + desc = "Retrieves the key of the start form for the latest version of the process definition + which belongs to no tenant. + The form key corresponds to the `FormData#formKey` property in the engine." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the process definition (the latest version thereof) for which the form key is to be retrieved."/> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "FormDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "GET `process-definition/key/aKey/startForm`", + "value": { + "key":"aFormKey", + "contextPath":"http://localhost:8080/my-process-application/" + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Process definition has no start form defined. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given key does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/statistics/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/statistics/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..879c50c5cb6ca2f7b517b8442154b50de0274788 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/statistics/get.ftl @@ -0,0 +1,115 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getActivityStatisticsByProcessDefinitionKey" + tag = "Process Definition" + summary = "Get Activity Instance Statistics" + desc = "Retrieves runtime statistics of the latest version of the given process definition + which belongs to no tenant, grouped by activities. + These statistics include the number of running activity instances, optionally the number of failed jobs + and also optionally the number of incidents either grouped by incident types or + for a specific incident type. + **Note**: This does not include historic data." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition (the latest version thereof) to be retrieved."/> + + <#assign last = true > + <#include "/lib/commons/statistics-query-params.ftl" > + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ActivityStatisticsResultDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/statistics?failedJobs=true", + "description": "Request with Query Parameter `failedJobs=true`", + "value": [{ + "id":"anActivity", + "instances": 123, + "failedJobs": 42, + "incidents": [] + }, + {"id": "anotherActivity", + "instances": 124, + "failedJobs": 43, + "incidents": [] + }] + }', + '"example-2": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/statistics?incidents=true", + "description": "Request with Query Parameter `incidents=true`", + "value": [{ + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [{ + "incidentType": "failedJob", + "incidentCount": 42 + }, { + "incidentType": "anIncident", + "incidentCount": 20 + }] + }, { + "id": "anotherActivity", + "instances": 124, + "failedJobs": 0, + "incidents": [{ + "incidentType": "failedJob", + "incidentCount": 43 + }, { + "incidentType": "anIncident", + "incidentCount": 22 + }, { + "incidentType": "anotherIncident", + "incidentCount": 15 + }] + }] + }', + '"example-3": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/statistics?incidentsForType=anIncident", + "description": "Request with Query Parameter `incidentsForType=anIncident`", + "value": [{ + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents" : [{ + "incidentType": "anIncident", + "incidentCount": 20 + }] + }] + }' + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given key does not exist. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/submit-form/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/submit-form/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5add06e8ddac803323664466ffd566460b5a8b18 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/submit-form/post.ftl @@ -0,0 +1,103 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "submitFormByKey" + tag = "Process Definition" + summary = "Submit Start Form" + desc = "Starts the latest version of the process definition which belongs to no tenant + using a set of process variables and the business key. + If the start event has Form Field Metadata defined, the process engine will perform backend validation + for any form fields which have validators defined. + See [Documentation on Generated Task Forms](${docsUrl}/user-guide/task-forms/#generated-task-forms)." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the process definition to submit the form for."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "StartProcessInstanceFormDto" + examples = ['"example-1": { + "summary": "POST `/process-definition/key/aProcessDefinitionKey/submit-form`", + "value": { + "variables": { + "aVariable" : { + "value" : "aStringValue", + "type": "String" + }, + "anotherVariable" : { + "value" : true, + "type": "Boolean" + } + }, + "businessKey" : "myBusinessKey" + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessInstanceDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response 1", + "description": "POST `/process-definition/key/aProcessDefinitionKey/submit-form`", + "value": { + "links": [ + { + "method": "GET", + "href":"http://localhost:8080/rest-test/process-instance/anId", + "rel":"self" + } + ], + "id":"anId", + "definitionId":"aProcessDefinitionId", + "definitionKey":"aProcessDefinitionKey", + "businessKey":"myBusinessKey", + "caseInstanceId": null, + "tenantId":null, + "ended":false, + "suspended":false + } + }' + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The instance could not be created due to an invalid variable value, + for example if the value could not be parsed to an `Integer` value or + the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Process definition with given key does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "The instance could not be created successfully. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/suspended/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/suspended/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e0abbbb0c50c66acdd4a785222f4c56c2b7628e8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/suspended/put.ftl @@ -0,0 +1,62 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "updateProcessDefinitionSuspensionStateByKey" + tag = "Process Definition" + summary = "Activate/Suspend by Id" + desc = "Activates or suspends a given process definition by latest version of process definition key + which belongs to no tenant." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the process definition (the latest version thereof) to be activated/suspended."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "ProcessDefinitionSuspensionStateDto" + requestDesc = "**Note**: Unallowed properties are `processDefinitionId` and `processDefinitionKey`." + examples = ['"example-1": { + "summary": "PUT `/process-definition/key/aProcessDefinitionKey/suspended`", + "value": { + "suspended" : true, + "includeProcessInstances" : true, + "executionDate" : "2013-11-21T10:49:45T14:42:45" + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, + for example if the provided `executionDate` parameter doesn't have the expected format or + if the `processDefinitionKey` parameter is `null`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given key does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5b72cd29186a10f3705398c523ac0413c8704d20 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/delete.ftl @@ -0,0 +1,74 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteProcessDefinitionsByKeyAndTenantId" + tag = "Process Definition" + summary = "Delete By Key" + desc = "Deletes process definitions by a given key and which belong to a tenant id." /> + + "parameters": [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definitions to be deleted."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant the process definitions belong to."/> + + <@lib.parameter + name = "cascade" + location = "query" + type = "boolean" + desc = "`true`, if all process instances, historic process instances and jobs + for this process definition should be deleted."/> + + <@lib.parameter + name = "skipCustomListeners" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "`true`, if only the built-in ExecutionListeners should be notified with the end event." /> + + <@lib.parameter + name = "skipIoMappings" + location = "query" + type = "boolean" + defaultValue = 'false' + last = true + desc = "A boolean value to control whether input/output mappings should be executed during deletion. + `true`, if input/output mappings should not be invoked." /> + + ], + "responses": { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "Forbidden + The process definitions with the given `key` cannot be deleted due to missing permissions. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Not found + Process definition with given key does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/deployed-start-form/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/deployed-start-form/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..478e557d4e34d0fef2ab3fce935cb7d1cce5ce7e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/deployed-start-form/get.ftl @@ -0,0 +1,86 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getDeployedStartFormByKeyAndTenantId" + tag = "Process Definition" + summary = "Get Deployed Start Form" + desc = "Retrieves the deployed form that can be referenced from a start event. + For further information please refer to [User Guide](${docsUrl}/user-guide/task-forms/#embedded-task-forms)." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition (the latest version thereof) to be retrieved."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the process definitions belong to."/> + ], + + "responses" : { + + <@lib.response + code = "200" + mediaType = "application/xhtml+xml" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "Resonse for GET + `/process-definition/key/processDefinitionKey/tenant-id/tenantId/deployed-start-form`", + "value": "
+ +
+ +
+ +
+ (e.g. "Great Pizza for Everyone Inc.") +
+
+
+ +
" + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The form key has wrong format. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "The deployed start form cannot be retrieved due to missing permissions on process definition resource. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "No deployed start form for a given process definition exists. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/diagram/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/diagram/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..109e03ff17d236413b47dd088315c6062998ecb1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/diagram/get.ftl @@ -0,0 +1,70 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getProcessDefinitionDiagramByKeyAndTenantId" + tag = "Process Definition" + summary = "Get Diagram" + desc = "Retrieves the diagram for the latest version of the process definition for tenant. + + If the process definition's deployment contains an image resource with the same file name + as the process definition, the deployed image will be returned by the Get Diagram endpoint. + Example: `someProcess.bpmn` and `someProcess.png`. + Supported file extentions for the image are: `svg`, `png`, `jpg`, and `gif`." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the process definition belongs to."/> + ], + + "responses" : { + + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + + <@lib.response + code = "204" + desc = "The process definition doesn't have an associated diagram." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/form-variables/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/form-variables/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..77a3c1552abbd8ccf03b96c29662abf6ef9d1822 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/form-variables/get.ftl @@ -0,0 +1,102 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getStartFormVariablesByKeyAndTenantId" + tag = "Process Definition" + summary = "Get Start Form Variables" + desc = "Retrieves the start form variables for the latest process definition for a tenant + (only if they are defined via the + [Generated Task Form](${docsUrl}/user-guide/task-forms/#generated-task-forms) approach). + The start form variables take form data specified on the start event into account. + If form fields are defined, the variable types and default values + of the form fields are taken into account." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition (the latest version thereof) to be retrieved." /> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant the process definition belongs to." /> + + <@lib.parameter + name = "variableNames" + location = "query" + type = "string" + desc = "A comma-separated list of variable names. Allows restricting the list of requested + variables to the variable names in the list. It is best practice to restrict the + list of variables to the variables actually required by the form in order to + minimize fetching of data. If the query parameter is ommitted all variables are + fetched. If the query parameter contains non-existent variable names, the variable + names are ignored." /> + + <@lib.parameter + name = "deserializeValues" + location = "query" + type = "boolean" + defaultValue = "true" + last = true + desc = "Determines whether serializable variable values (typically variables that store + custom Java objects) should be deserialized on server side (default true). + + If set to true, a serializable variable will be deserialized on server side and + transformed to JSON using [Jackson's](http://jackson.codehaus.org/) POJO/bean + property introspection feature. Note that this requires the Java classes of the + variable value to be on the REST API's classpath. + + If set to false, a serializable variable will be returned in its serialized format. + For example, a variable that is serialized as XML will be returned as a JSON string + containing XML. + + **Note**: While true is the default value for reasons of backward compatibility, we + recommend setting this parameter to false when developing web applications that are + independent of the Java process applications deployed to the engine." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + additionalProperties = true + dto = "VariableValueDto" + desc = "Request successful. A JSON object containing a property for each variable returned." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "GET `/process-definition/anId/form-variables`", + "value": { + "amount": { + "type": "integer", + "value": 5, + "valueInfo": {} + }, + "firstName": { + "type": "String", + "value": "Jonny", + "valueInfo": {} + } + + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "The key is null or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c5b0c50318aed617323d5135748d7ae39496ca62 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/get.ftl @@ -0,0 +1,67 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getLatestProcessDefinitionByTenantId" + tag = "Process Definition" + summary = "Get" + desc = "Retrieves the latest version of the process definition for tenant according to + the `ProcessDefinition` interface in the engine." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition (the latest version thereof) to be retrieved."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the process definition belongs to."/> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessDefinitionDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition/key/invoice/tenant-id/tenantOne`", + "value": { + "id": "invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 1, + "resource": "invoice.v1.bpmn", + "deploymentId": "c398cd26-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": "tenantOne", + "versionTag": null, + "historyTimeToLive": 5, + "startableInTasklist": true + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Process definition with given `key` does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/history-time-to-live/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/history-time-to-live/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..88593f8166436cf510a48d8bdfdee9cefe0a5ee2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/history-time-to-live/put.ftl @@ -0,0 +1,64 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "updateHistoryTimeToLiveByProcessDefinitionKeyAndTenantId" + tag = "Process Definition" + summary = "Update History Time to Live" + desc = "Updates history time to live for the latest version of the process definition for a tenant. + The field is used within [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup)." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition to change history time to live."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the process definition belongs to."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoryTimeToLiveDto" + examples = ['"example-1": { + "summary": "PUT `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/history-time-to-live`", + "value": { + "historyTimeToLive" : 5 + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the request parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/rendered-form/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/rendered-form/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..37b9668208850881682d97c6ee8c500d4919be3b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/rendered-form/get.ftl @@ -0,0 +1,75 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getRenderedStartFormByKeyAndTenantId" + tag = "Process Definition" + summary = "Get Rendered Start Form" + desc = "Retrieves the rendered form for the latest version of the process definition for a tenant. + This method can be used to get the HTML rendering of a + [Generated Task Form](${docsUrl}/user-guide/task-forms/#generated-task-forms)." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition (the latest version thereof) to be retrieved."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the process definition belongs to."/> + + ], + + "responses" : { + + <@lib.response + code = "200" + mediaType = "application/xhtml+xml" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "A `/process-definition/key/anKey/tenand-id/aTenantId/rendered-form` HTML + GET response body providing the rendered (generated) form content.", + "value": "
+
+ +
+ +
+
+
+ +
+ +
+
+
" + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Process definition has no form field metadata defined. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given key does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/start/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/start/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..304e307aa8ca41cce3321960f0792bee1d9fffe2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/start/post.ftl @@ -0,0 +1,208 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "startProcessInstanceByKeyAndTenantId" + tag = "Process Definition" + summary = "Start Instance" + desc = "Instantiates a given process definition, starts the latest version of the process definition for tenant. + Process variables and business key may be supplied in the request body." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition (the latest version thereof) to be retrieved."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the process definition belongs to."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "StartProcessInstanceDto" + examples = ['"example-1": { + "summary": "Starting a process instance at its default initial activity", + "value": { + "variables": { + "aVariable" : { + "value" : "aStringValue", + "type": "String" + }, + "anotherVariable" : { + "value" : true, + "type": "Boolean" + } + }, + "businessKey" : "myBusinessKey" + } + }', + '"example-2": { + "summary": "Starting a process instance with variables in return", + "value": { + "variables": { + "aVariable" : { + "value" : "aStringValue", + "type": "String" + }, + "anotherVariable" : { + "value" : true, + "type": "Boolean" + } + }, + "businessKey" : "myBusinessKey", + "withVariablesInReturn": true + } + }', + '"example-3": { + "summary": "Starting a process instance at two specific activities", + "value": { + "variables": { + "aProcessVariable" : { + "value" : "aStringValue", + "type": "String" + } + }, + "businessKey" : "myBusinessKey", + "skipCustomListeners" : true, + "startInstructions" : + [ + { + "type": "startBeforeActivity", + "activityId": "activityId", + "variables": { + "var": { + "value": "aVariableValue", + "local": false, + "type": "String"} + } + }, + { + "type": "startAfterActivity", + "activityId": "anotherActivityId", + "variables": { + "varLocal": { + "value": "anotherVariableValue", + "local": true, + "type": "String" + } + } + } + ] + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessInstanceWithVariablesDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response 1", + "description": "Response for starting a process instance at its default initial activity", + "value": { + "links": [ + { + "method": "GET", + "href":"http://localhost:8080/rest-test/process-instance/anId", + "rel":"self" + } + ], + "id":"anId", + "definitionId":"aProcessDefinitionId", + "definitionKey":"aProcessDefinitionKey", + "businessKey":"myBusinessKey", + "caseInstanceId": null, + "tenantId":null, + "ended":false, + "suspended":false + } + }', + '"example-2": { + "summary": "Status 200 Response 2", + "description": "Response for starting a process instance with variables in return", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/aProcInstId", + "rel": "self" + } + ], + "id": "aProcInstId", + "definitionId": "aProcessDefinitionId", + "definitionKey":"aProcessDefinitionKey", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": null, + "variables": { + "anotherVariable": { + "type": "Boolean", + "value": true, + "valueInfo": { + "transient" : true + } + }, + "aVariable": { + "type": "String", + "value": "aStringValue", + "valueInfo": { } + } + } + } + }', + '"example-3": { + "summary": "Status 200 Response 3", + "description": "Response for starting a process instance at two specific activities", + "value": { + "links": [ + { + "method": "GET", + "href":"http://localhost:8080/rest-test/process-instance/anId", + "rel":"self" + } + ], + "id":"anId", + "definitionId":"aProcessDefinitionId", + "definitionKey":"aProcessDefinitionKey", + "businessKey":"myBusinessKey", + "caseInstanceId": null, + "tenantId":null, + "ended":false, + "suspended":false + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The instance could not be created due to an invalid variable value, + for example if the value could not be parsed to an `Integer` value or + the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "The instance could not be created successfully. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/startForm/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/startForm/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7cdcedc0fabe806b61c44bb21a5e39c84cd74ca9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/startForm/get.ftl @@ -0,0 +1,62 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getStartFormByKeyAndTenantId" + tag = "Process Definition" + summary = "Get Start Form Key" + desc = "Retrieves the key of the start form for the latest version of the process definition for a tenant. + The form key corresponds to the `FormData#formKey` property in the engine." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition (the latest version thereof) for which the form key is to be retrieved."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the process definition belongs to."/> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "FormDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "GET `process-definition/key/aKey/tenant-id/aTenantId/startForm`", + "value": { + "key":"aFormKey", + "contextPath":"http://localhost:8080/my-process-application/" + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Process definition has no start form defined. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given key does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/statistics/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/statistics/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..61ed7490f1fc4a77dd720f16f8af2c0770052abf --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/statistics/get.ftl @@ -0,0 +1,123 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getActivityStatisticsByProcessDefinitionKeyAndTenantId" + tag = "Process Definition" + summary = "Get Activity Instance Statistics" + desc = "Retrieves runtime statistics of the latest version of the given process definition for a tenant, + grouped by activities. + These statistics include the number of running activity instances, optionally the number of failed jobs + and also optionally the number of incidents either grouped by incident types or + for a specific incident type. + **Note**: This does not include historic data." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition (the latest version thereof) to be retrieved."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant the process definition belongs to."/> + + <#assign last = true > + <#include "/lib/commons/statistics-query-params.ftl" > + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ActivityStatisticsResultDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/statistics?failedJobs=true", + "description": "Request with Query Parameter `failedJobs=true`", + "value": [{ + "id":"anActivity", + "instances": 123, + "failedJobs": 42, + "incidents": [] + }, + {"id": "anotherActivity", + "instances": 124, + "failedJobs": 43, + "incidents": [] + }] + }', + '"example-2": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/statistics?incidents=true", + "description": "Request with Query Parameter `incidents=true`", + "value": [{ + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [{ + "incidentType": "failedJob", + "incidentCount": 42 + }, { + "incidentType": "anIncident", + "incidentCount": 20 + }] + }, { + "id": "anotherActivity", + "instances": 124, + "failedJobs": 0, + "incidents": [{ + "incidentType": "failedJob", + "incidentCount": 43 + }, { + "incidentType": "anIncident", + "incidentCount": 22 + }, { + "incidentType": "anotherIncident", + "incidentCount": 15 + }] + }] + }', + '"example-3": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/statistics?incidentsForType=anIncident", + "description": "Request with Query Parameter `incidentsForType=anIncident`", + "value": [{ + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents" : [{ + "incidentType": "anIncident", + "incidentCount": 20 + }] + }] + }' + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given key does not exist. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/submit-form/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/submit-form/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..71190939ee8941f95b8fb42a65be9729b4e232e1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/submit-form/post.ftl @@ -0,0 +1,110 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "submitFormByKeyAndTenantId" + tag = "Process Definition" + summary = "Submit Start Form" + desc = "Starts the latest version of the process definition for a tenant + using a set of process variables and the business key. + If the start event has Form Field Metadata defined, the process engine will perform backend validation + for any form fields which have validators defined. + See [Documentation on Generated Task Forms](${docsUrl}/user-guide/task-forms/#generated-task-forms)." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition to submit the form for."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the process definition belongs to."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "StartProcessInstanceFormDto" + examples = ['"example-1": { + "summary": "POST `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/submit-form`", + "value": { + "variables": { + "aVariable" : { + "value" : "aStringValue", + "type": "String" + }, + "anotherVariable" : { + "value" : true, + "type": "Boolean" + } + }, + "businessKey" : "myBusinessKey" + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessInstanceDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response 1", + "description": "POST `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/submit-form`", + "value": { + "links": [ + { + "method": "GET", + "href":"http://localhost:8080/rest-test/process-instance/anId", + "rel":"self" + } + ], + "id":"anId", + "definitionId":"aProcessDefinitionId", + "definitionKey":"aProcessDefinitionKey", + "businessKey":"myBusinessKey", + "caseInstanceId": null, + "tenantId":null, + "ended":false, + "suspended":false + } + }' + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The instance could not be created due to an invalid variable value, + for example if the value could not be parsed to an `Integer` value or + the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Process definition with given key does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "The instance could not be created successfully. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/suspended/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/suspended/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c8fb1b2f9587501c25e3aaecdc3cb8746c005c9f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/suspended/put.ftl @@ -0,0 +1,69 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "updateProcessDefinitionSuspensionStateByKeyAndTenantId" + tag = "Process Definition" + summary = "Activate/Suspend by Id" + desc = "Activates or suspends a given process definition by the latest version of + the process definition for tenant." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition (the latest version thereof) to be activated/suspended."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the process definition belongs to."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "ProcessDefinitionSuspensionStateDto" + requestDesc = "**Note**: Unallowed properties are `processDefinitionId` and `processDefinitionKey`." + examples = ['"example-1": { + "summary": "PUT `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/suspended`", + "value": { + "suspended" : true, + "includeProcessInstances" : true, + "executionDate" : "2013-11-21T10:49:45T14:42:45" + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, + for example if the provided `executionDate` parameter doesn't have the expected format or + if the `processDefinitionKey` parameter is `null`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given key does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/xml/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/xml/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1d999b51ffc52596e50b89023c2e10536b64c06a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/tenant-id/{tenant-id}/xml/get.ftl @@ -0,0 +1,69 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getProcessDefinitionBpmn20XmlByKeyAndTenantId" + tag = "Process Definition" + summary = "Get XML" + desc = "Retrieves latest version the BPMN 2.0 XML of a process definition. + Returns the XML for the latest version of the process definition for tenant." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + desc = "The key of the process definition (the latest version thereof) whose XML should be retrieved."/> + + <@lib.parameter + name = "tenant-id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the tenant the process definition belongs to."/> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessDefinitionDiagramDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/xml`", + "value": { + "id": "anProcessDefinitionId", + "bpmn20Xml": "\n + + + + + + " + } + }' + ] /> + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "The Process Definition xml cannot be retrieved due to missing permissions on the Process Definition resource. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/xml/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/xml/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..37479d1cc4b5c5716597c56830811c33a4bff1f1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/{key}/xml/get.ftl @@ -0,0 +1,61 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getProcessDefinitionBpmn20XmlByKey" + tag = "Process Definition" + summary = "Get XML" + desc = "Retrieves latest version the BPMN 2.0 XML of a process definition." /> + + "parameters" : [ + + <@lib.parameter + name = "key" + location = "path" + type = "string" + required = true + last = true + desc = "The key of the process definition (the latest version thereof) whose XML should be retrieved."/> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessDefinitionDiagramDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/process-definition/key/aProcessDefinitionKey/xml`", + "value": { + "id": "anProcessDefinitionId", + "bpmn20Xml": "\n + + + + + + " + } + }' + ] /> + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "The Process Definition xml cannot be retrieved due to missing permissions on the Process Definition resource. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/statistics/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/statistics/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6c375e175bc3d92bcde9e97a14d8cb0032c47c99 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/statistics/get.ftl @@ -0,0 +1,229 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getProcessDefinitionStatistics" + tag = "Process Definition" + summary = "Get Process Instance Statistics" + desc = "Retrieves runtime statistics of the process engine, grouped by process definitions. + These statistics include the number of running process instances, optionally the number of failed jobs + and also optionally the number of incidents either grouped by incident types or + for a specific incident type. + **Note**: This does not include historic data." /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/statistics-query-params.ftl" > + + <@lib.parameter + name = "rootIncidents" + location = "query" + type = "boolean" + last = true + desc = "Valid values for this property are `true` or `false`. + If this property has been set to `true` the result will include the corresponding number of + root incidents for each occurred incident type. + If it is set to `false`, the incidents will not be included in the result. + Cannot be used in combination with `incidentsForType` or `incidents`."/> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessDefinitionStatisticsResultDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /process-definition/statistics?failedJobs=true", + "description": "Request with Query Parameter `failedJobs=true`", + "value": [{ + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id":"aProcessDefinitionId", + "instances": 123, + "failedJobs": 42, + "definition": + {"id": "aProcessDefinitionId", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": "1.0.0", + "historyTimeToLive": null, + "startableInTasklist": false}, + "incidents": [] + }, + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId:2", + "instances": 124, + "failedJobs": 43, + "definition": + {"id": "aProcessDefinitionId:2", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "startableInTasklist": false}, + "incidents": [] + }] + }', + '"example-2": { + "summary": "GET /process-definition/statistics?incidents=true", + "description": "Request with Query Parameter `incidents=true`", + "value": [{ + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId", + "instances": 123, + "failedJobs": 0, + "definition": { + "id": "aProcessDefinitionId", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": "1.0.0", + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [{ + "incidentType": "failedJob", + "incidentCount": 42 + }, { + "incidentType": "anIncident", + "incidentCount": 20 + }] + }, { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId:2", + "instances": 124, + "failedJobs": 0, + "definition": { + "id": "aProcessDefinitionId:2", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [{ + "incidentType": "failedJob", + "incidentCount": 43 + }, { + "incidentType": "anIncident", + "incidentCount": 22 + }, { + "incidentType": "anotherIncident", + "incidentCount": 15 + }] + }] + }', + '"example-3": { + "summary": "GET /process-definition/statistics?incidentsForType=anIncident", + "description": "Request with Query Parameter `incidentsForType=anIncident`", + "value": [{ + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id":"aProcessDefinitionId", + "id": "aProcessDefinitionId", + "instances": 123, + "failedJobs": 0, + "definition": { + "id": "aProcessDefinitionId", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": "1.0.0", + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents" : [{ + "incidentType": "anIncident", + "incidentCount": 20 + }] + }] + }', + '"example-4": { + "summary": "GET /process-definition/statistics?rootIncidents=true", + "description": "Request with Query Parameter `rootIncidents=true`", + "value": [{ + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId", + "instances": 123, + "failedJobs": 0, + "definition": { + "id": "aProcessDefinitionId", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": "1.0.0", + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [{ + "incidentType": "failedJob", + "incidentCount": 62 + }, { + "incidentType": "anIncident", + "incidentCount": 20 + }] + }] + }' + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/suspended/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/suspended/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..aceaaf314fde20b8c0c13812e50b8c6da22bee49 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/suspended/put.ftl @@ -0,0 +1,50 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "updateProcessDefinitionSuspensionState" + tag = "Process Definition" + summary = "Activate/Suspend By Key" + desc = "Activates or suspends process definitions with the given process definition key." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "ProcessDefinitionSuspensionStateDto" + requestDesc = "**Note**: Unallowed property is `processDefinitionId`." + examples = ['"example-1": { + "summary": "PUT `/process-definition/suspended`", + "value": { + "processDefinitionKey" : "aProcessDefinitionKey", + "suspended" : true, + "includeProcessInstances" : true, + "executionDate" : "2013-11-21T10:49:45T14:42:45" + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, + for example if the provided `executionDate` parameter doesn't have the expected format or + if the `processDefinitionKey` parameter is `null`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given key does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..59f351e5678469b290e9d9c44dc493399bd303f3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/delete.ftl @@ -0,0 +1,59 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteProcessDefinition" + tag = "Process Definition" + summary = "Delete" + desc = "Deletes a process definition by id." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the process definition to be deleted."/> + + <@lib.parameter + name = "cascade" + location = "query" + type = "boolean" + desc = "`true`, if all process instances, historic process instances and jobs + for this process definition should be deleted."/> + + <@lib.parameter + name = "skipCustomListeners" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "`true`, if only the built-in ExecutionListeners should be notified with the end event." /> + + <@lib.parameter + name = "skipIoMappings" + location = "query" + type = "boolean" + defaultValue = 'false' + last = true + desc = "A boolean value to control whether input/output mappings should be executed during deletion. + `true`, if input/output mappings should not be invoked." /> + + ], + "responses": { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Not found + Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/deployed-start-form/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/deployed-start-form/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6296584b65e850f2fff5ac028b9f16ea84186ed7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/deployed-start-form/get.ftl @@ -0,0 +1,86 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getDeployedStartForm" + tag = "Process Definition" + summary = "Get Deployed Start Form" + desc = "Retrieves the deployed form that can be referenced from a start event. + For further information please refer to [User Guide](${docsUrl}/user-guide/task-forms/#embedded-task-forms)." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process definition to get the deployed start form for."/> + ], + + "responses" : { + + <@lib.multiTypeResponse + code = "200" + desc = "Request successful." + types = [ + { + "mediaType": "application/xhtml+xml", + "examples": ['"example-1": { + "summary": "Status 200 Response", + "description": "Resonse for GET `/process-definition/processDefinitionId/deployed-start-form`", + "value": "
+ +
+ +
+ +
+ (e.g. "Great Pizza for Everyone Inc.") +
+
+
+ +
" + }'] + }, + { + "mediaType": "application/json", + "flatType": "string" + } + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The form key has wrong format. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "The deployed start form cannot be retrieved due to missing permissions on process definition resource. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "No deployed start form for a given process definition exists. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/diagram/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/diagram/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e104690f0ba938bd24a5d84f78d620834bc40c50 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/diagram/get.ftl @@ -0,0 +1,63 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getProcessDefinitionDiagram" + tag = "Process Definition" + summary = "Get Diagram" + desc = "Retrieves the diagram of a process definition. + + If the process definition's deployment contains an image resource with the same file name + as the process definition, the deployed image will be returned by the Get Diagram endpoint. + Example: `someProcess.bpmn` and `someProcess.png`. + Supported file extentions for the image are: `svg`, `png`, `jpg`, and `gif`." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process definition."/> + ], + + "responses" : { + + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + + <@lib.response + code = "204" + desc = "The process definition doesn't have an associated diagram." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/form-variables/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/form-variables/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e3f79c19f5a59e206c835448c57af23a5aa2f1a2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/form-variables/get.ftl @@ -0,0 +1,95 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getStartFormVariables" + tag = "Process Definition" + summary = "Get Start Form Variables" + desc = "Retrieves the start form variables for a process definition + (only if they are defined via the + [Generated Task Form](${docsUrl}/user-guide/task-forms/#generated-task-forms) approach). + The start form variables take form data specified on the start event into account. + If form fields are defined, the variable types and default values + of the form fields are taken into account." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the process definition to retrieve the variables for." /> + + <@lib.parameter + name = "variableNames" + location = "query" + type = "string" + desc = "A comma-separated list of variable names. Allows restricting the list of requested + variables to the variable names in the list. It is best practice to restrict the + list of variables to the variables actually required by the form in order to + minimize fetching of data. If the query parameter is ommitted all variables are + fetched. If the query parameter contains non-existent variable names, the variable + names are ignored." /> + + <@lib.parameter + name = "deserializeValues" + location = "query" + type = "boolean" + defaultValue = "true" + last = true + desc = "Determines whether serializable variable values (typically variables that store + custom Java objects) should be deserialized on server side (default true). + + If set to true, a serializable variable will be deserialized on server side and + transformed to JSON using [Jackson's](http://jackson.codehaus.org/) POJO/bean + property introspection feature. Note that this requires the Java classes of the + variable value to be on the REST API's classpath. + + If set to false, a serializable variable will be returned in its serialized format. + For example, a variable that is serialized as XML will be returned as a JSON string + containing XML. + + **Note**: While true is the default value for reasons of backward compatibility, we + recommend setting this parameter to false when developing web applications that are + independent of the Java process applications deployed to the engine." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "VariableValueDto" + additionalProperties = true + desc = "Request successful. A JSON object containing a property for each variable returned." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "GET `/process-definition/anId/form-variables`", + "value": { + "amount": { + "type": "integer", + "value": 5, + "valueInfo": {} + }, + "firstName": { + "type": "String", + "value": "Jonny", + "valueInfo": {} + } + + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "The id is null or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..054ebe27c4f6e39da29ede5e158df6a94c80fed3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/get.ftl @@ -0,0 +1,59 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getProcessDefinition" + tag = "Process Definition" + summary = "Get" + desc = "Retrieves a process definition according to the `ProcessDefinition` interface in the engine." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process definition to be retrieved."/> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessDefinitionDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition/invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e`", + "value": { + "id": "invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 1, + "resource": "invoice.v1.bpmn", + "deploymentId": "c398cd26-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5, + "startableInTasklist": true + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Process definition with given `id` does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/history-time-to-live/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/history-time-to-live/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0191ab748f21944be294448800ee098666d202d2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/history-time-to-live/put.ftl @@ -0,0 +1,60 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "updateHistoryTimeToLiveByProcessDefinitionId" + tag = "Process Definition" + summary = "Update History Time to Live" + desc = "Updates history time to live for process definition. + The field is used within [History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup). + The value of the update is mandatory by default and does not allow `null` values. To enable them, please + set the feature flag `enforceHistoryTimeToLive` to `false`. Read more in [Configuration Properties] + (${docsUrl}/reference/deployment-descriptors/tags/process-engine#configuration-properties)" /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process definition to change history time to live."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "HistoryTimeToLiveDto" + examples = ['"example-1": { + "summary": "PUT `/process-definition/aProcessDefinitionId/history-time-to-live`", + "value": { + "historyTimeToLive" : 5 + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the request parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/rendered-form/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/rendered-form/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d046969215cf5317f26e6c9e6af9fb6069e0ccf9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/rendered-form/get.ftl @@ -0,0 +1,68 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getRenderedStartForm" + tag = "Process Definition" + summary = "Get Rendered Start Form" + desc = "Retrieves the rendered form for a process definition. + This method can be used to get the HTML rendering of a + [Generated Task Form](${docsUrl}/user-guide/task-forms/#generated-task-forms)." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process definition to get the rendered start form for."/> + + ], + + "responses" : { + + <@lib.response + code = "200" + mediaType = "application/xhtml+xml" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "A `/process-definition/anId/rendered-form` HTML + GET response body providing the rendered (generated) form content.", + "value": "
+
+ +
+ +
+
+
+ +
+ +
+
+
" + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Process definition has no form field metadata defined. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/restart-async/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/restart-async/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5a8e92f92b00c1d7da0ca8ebec26d83717746e6f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/restart-async/post.ftl @@ -0,0 +1,113 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "restartProcessInstanceAsyncOperation" + tag = "Process Definition" + summary = "Restart Process Instance Async" + desc = "Restarts process instances that were canceled or terminated asynchronously. + Can also restart completed process instances. + It will create a new instance using the original instance information. + To execute the restart asynchronously, use the + [Restart Process Instance](${docsUrl}/reference/rest/process-definition/post-restart-process-instance-sync/) method. + + For more information about the difference between synchronous and asynchronous execution, + please refer to the related section of the + [User Guide](${docsUrl}/user-guide/process-engine/process-instance-restart/#execution)." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process definition of the process instances to restart."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "RestartProcessInstanceDto" + examples = ['"example-1": { + "summary": "Restarting one or more Process Instances with known processInstanceIds", + "value": { + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + } + ], + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "initialVariables" : true, + "skipCustomListeners" : true, + "withoutBusinessKey" : true + } + }', + '"example-2": { + "summary": "Restarting one or more Process Instances using a historicProcessInstanceQuery", + "value": { + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + } + ], + "historicProcessInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId", + "processInstanceBusinessKey" : "businessKey" + }, + "initialVariables" : true, + "skipCustomListeners" : true, + "withoutBusinessKey" : true + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "In case following parameters are missing: `instructions`, `activityId` or `transitionId`, + `processInstanceIds` or `historicProcessInstanceQuery`, + an exception of type `InvalidRequestException` is returned. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/restart/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/restart/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..21d943c5fe9421092fdef7b9647eddbef2c38f13 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/restart/post.ftl @@ -0,0 +1,94 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "restartProcessInstance" + tag = "Process Definition" + summary = "Restart Process Instance" + desc = "Restarts process instances that were canceled or terminated synchronously. + Can also restart completed process instances. + It will create a new instance using the original instance information. + To execute the restart asynchronously, use the + [Restart Process Instance Async](${docsUrl}/reference/rest/process-definition/post-restart-process-instance-async/) method. + + For more information about the difference between synchronous and asynchronous execution, + please refer to the related section of the + [User Guide](${docsUrl}/user-guide/process-engine/process-instance-restart/#execution)." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process definition of the process instances to restart."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "RestartProcessInstanceDto" + examples = ['"example-1": { + "summary": "Restarting one or more Process Instances with known processInstanceIds", + "value": { + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + } + ], + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "initialVariables" : true, + "skipCustomListeners" : true, + "withoutBusinessKey" : true + } + }', + '"example-2": { + "summary": "Restarting one or more Process Instances using a historicProcessInstanceQuery", + "value": { + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + } + ], + "historicProcessInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId", + "processInstanceBusinessKey" : "businessKey" + }, + "initialVariables" : true, + "skipCustomListeners" : true, + "withoutBusinessKey" : true + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "In case following parameters are missing: `instructions`, `activityId` or `transitionId`, + `processInstanceIds` or `historicProcessInstanceQuery`, an exception of type `InvalidRequestException` is returned. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/start/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/start/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4807fbe271529fdbe7b238170e454baf248adc30 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/start/post.ftl @@ -0,0 +1,201 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "startProcessInstance" + tag = "Process Definition" + summary = "Start Instance" + desc = "Instantiates a given process definition. + Process variables and business key may be supplied in the request body." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process definition to be retrieved."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "StartProcessInstanceDto" + examples = ['"example-1": { + "summary": "Starting a process instance at its default initial activity", + "value": { + "variables": { + "aVariable" : { + "value" : "aStringValue", + "type": "String" + }, + "anotherVariable" : { + "value" : true, + "type": "Boolean" + } + }, + "businessKey" : "myBusinessKey" + } + }', + '"example-2": { + "summary": "Starting a process instance with variables in return", + "value": { + "variables": { + "aVariable" : { + "value" : "aStringValue", + "type": "String" + }, + "anotherVariable" : { + "value" : true, + "type": "Boolean" + } + }, + "businessKey" : "myBusinessKey", + "withVariablesInReturn": true + } + }', + '"example-3": { + "summary": "Starting a process instance at two specific activities", + "value": { + "variables": { + "aProcessVariable" : { + "value" : "aStringValue", + "type": "String" + } + }, + "businessKey" : "myBusinessKey", + "skipCustomListeners" : true, + "startInstructions" : + [ + { + "type": "startBeforeActivity", + "activityId": "activityId", + "variables": { + "var": { + "value": "aVariableValue", + "local": false, + "type": "String"} + } + }, + { + "type": "startAfterActivity", + "activityId": "anotherActivityId", + "variables": { + "varLocal": { + "value": "anotherVariableValue", + "local": true, + "type": "String" + } + } + } + ] + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessInstanceWithVariablesDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response 1", + "description": "Response for starting a process instance at its default initial activity", + "value": { + "links": [ + { + "method": "GET", + "href":"http://localhost:8080/rest-test/process-instance/anId", + "rel":"self" + } + ], + "id":"anId", + "definitionId":"aProcessDefinitionId", + "definitionKey":"aProcessDefinitionKey", + "businessKey":"myBusinessKey", + "caseInstanceId": null, + "tenantId":null, + "ended":false, + "suspended":false + } + }', + '"example-2": { + "summary": "Status 200 Response 2", + "description": "Response for starting a process instance with variables in return", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/aProcInstId", + "rel": "self" + } + ], + "id": "aProcInstId", + "definitionId": "aProcessDefinitionId", + "definitionKey":"aProcessDefinitionKey", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": null, + "variables": { + "anotherVariable": { + "type": "Boolean", + "value": true, + "valueInfo": { + "transient" : true + } + }, + "aVariable": { + "type": "String", + "value": "aStringValue", + "valueInfo": { } + } + } + } + }', + '"example-3": { + "summary": "Status 200 Response 3", + "description": "Response for starting a process instance at two specific activities", + "value": { + "links": [ + { + "method": "GET", + "href":"http://localhost:8080/rest-test/process-instance/anId", + "rel":"self" + } + ], + "id":"anId", + "definitionId":"aProcessDefinitionId", + "definitionKey":"aProcessDefinitionKey", + "businessKey":"myBusinessKey", + "caseInstanceId": null, + "tenantId":null, + "ended":false, + "suspended":false + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The instance could not be created due to an invalid variable value, + for example if the value could not be parsed to an `Integer` value or + the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "The instance could not be created successfully. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/startForm/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/startForm/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3cd3aa82a8ee5a8b9f647f1a02e2dc3ed185e168 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/startForm/get.ftl @@ -0,0 +1,55 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getStartForm" + tag = "Process Definition" + summary = "Get Start Form Key" + desc = "Retrieves the key of the start form for a process definition. + The form key corresponds to the `FormData#formKey` property in the engine." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process definition to get the start form key for."/> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "FormDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "GET `process-definition/anId/startForm`", + "value": { + "key":"aFormKey", + "contextPath":"http://localhost:8080/my-process-application/" + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Process definition has no start form defined. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/static-called-process-definitions/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/static-called-process-definitions/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..773172d28d168a87535bf4b2730927494ba3b104 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/static-called-process-definitions/get.ftl @@ -0,0 +1,104 @@ +<#-- Generated From File: camunda-docs-manual/public/reference/rest/process-definition/get-static-called-process-definitions/index.html --> +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getStaticCalledProcessDefinitions" + tag = "Process Definition" + summary = "Get Static Called Process Definitions" + desc = "For the given process, returns a list of called process definitions corresponding + to + the `CalledProcessDefinition` interface in the engine. The list + contains all process definitions + that are referenced statically by call activities in the given + process. This endpoint does not + resolve process definitions that are referenced with expressions. Each + called process definition + contains a list of call activity ids, which specifies the call + activities that are calling that + process. This endpoint does not resolve references to case + definitions." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the process definition." + last = true + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CalledProcessDefinitionDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/process-definition/aProcessDefinitionId/static-called-process-definitions`", + "description": "GET `/process-definition/aProcessDefinitionId/static-called-process-definitions`", + "value": [ + { + "id": "ACalledProcess:1:1bbd4e83-f8f1-11eb-9344", + "key": "ACalledProcess", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "ACalledProcess", + "version": 1, + "resource": "called-process.bpmn", + "deploymentId": "1baa3baf-f8f1-11eb-9344-0e0bbdd53e42", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "calledFromActivityIds": [ + "aCallActivityId" + ], + "callingProcessDefinitionId": "aProcessDefinitionId", + "startableInTasklist": true + }, + { + "id": "AnotherCalledProcess:2:1bc2f3d5-f8f1-11eb-9344", + "key": "AnotherCalledProcess", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "AnotherCalledProcess", + "version": 2, + "resource": "another-called-process.bpmn", + "deploymentId": "1baa3baf-f8f1-11eb-9344-0e0bbdd53e42", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "calledFromActivityIds": [ + "aSecondCallActivityId", + "aThirdCallActivityId" + ], + "callingProcessDefinitionId": "aProcessDefinitionId", + "startableInTasklist": true + } + ] + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Process definition with given key does not exist. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/statistics/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/statistics/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..980458c40b41451599a2d821ec8211df85b89ff2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/statistics/get.ftl @@ -0,0 +1,119 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getActivityStatistics" + tag = "Process Definition" + summary = "Get Activity Instance Statistics" + desc = "Retrieves runtime statistics of a given process definition, grouped by activities. + These statistics include the number of running activity instances, optionally the number of failed jobs + and also optionally the number of incidents either grouped by incident types or for a specific incident type. + **Note**: This does not include historic data." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the process definition."/> + + <#assign last = true > + <#include "/lib/commons/statistics-query-params.ftl" > + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ActivityStatisticsResultDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /process-definition/aProcessDefinitionId/statistics?failedJobs=true", + "description": "Request with Query Parameter `failedJobs=true`", + "value": [{ + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id":"anActivity", + "instances": 123, + "failedJobs": 42, + "incidents": [] + }, + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anotherActivity", + "instances": 124, + "failedJobs": 43, + "incidents": [] + }] + }', + '"example-2": { + "summary": "GET /process-definition/aProcessDefinitionId/statistics?incidents=true", + "description": "Request with Query Parameter `incidents=true`", + "value": [{ + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [{ + "incidentType": "failedJob", + "incidentCount": 42 + }, { + "incidentType": "anIncident", + "incidentCount": 20 + }] + }, { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anotherActivity", + "instances": 124, + "failedJobs": 0, + "incidents": [{ + "incidentType": "failedJob", + "incidentCount": 43 + }, { + "incidentType": "anIncident", + "incidentCount": 22 + }, { + "incidentType": "anotherIncident", + "incidentCount": 15 + }] + }] + }', + '"example-3": { + "summary": "GET /process-definition/aProcessDefinitionId/statistics?incidentsForType=anIncident", + "description": "Request with Query Parameter `incidentsForType=anIncident`", + "value": [{ + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents" : [{ + "incidentType": "anIncident", + "incidentCount": 20 + }] + }] + }' + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given key does not exist. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/submit-form/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/submit-form/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f4059fc87ad47ce0c647724ef5ded48f1484e997 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/submit-form/post.ftl @@ -0,0 +1,102 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "submitForm" + tag = "Process Definition" + summary = "Submit Start Form" + desc = "Starts a process instance using a set of process variables and the business key. + If the start event has Form Field Metadata defined, the process engine will perform backend validation + for any form fields which have validators defined. + See [Documentation on Generated Task Forms](${docsUrl}/user-guide/task-forms/#generated-task-forms)." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process definition to submit the form for."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "StartProcessInstanceFormDto" + examples = ['"example-1": { + "summary": "POST `/process-definition/aProcessDefinitionId/submit-form`", + "value": { + "variables": { + "aVariable" : { + "value" : "aStringValue", + "type": "String" + }, + "anotherVariable" : { + "value" : true, + "type": "Boolean" + } + }, + "businessKey" : "myBusinessKey" + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessInstanceDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response 1", + "description": "POST `/process-definition/aProcessDefinitionId/submit-form`", + "value": { + "links": [ + { + "method": "GET", + "href":"http://localhost:8080/rest-test/process-instance/anId", + "rel":"self" + } + ], + "id":"anId", + "definitionId":"aProcessDefinitionId", + "definitionKey":"aProcessDefinitionKey", + "businessKey":"myBusinessKey", + "caseInstanceId": null, + "tenantId":null, + "ended":false, + "suspended":false + } + }' + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The instance could not be created due to an invalid variable value, + for example if the value could not be parsed to an `Integer` value or + the passed variable type is not supported. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Process definition with given id does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "The instance could not be created successfully. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/suspended/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/suspended/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a70f3c496e3648664b2e7e204579f2c4e98a2576 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/suspended/put.ftl @@ -0,0 +1,60 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "updateProcessDefinitionSuspensionStateById" + tag = "Process Definition" + summary = "Activate/Suspend By Id" + desc = "Activates or suspends a given process definition by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process definition to activate or suspend."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "ProcessDefinitionSuspensionStateDto" + requestDesc = "**Note**: Unallowed properties are `processDefinitionId` and `processDefinitionKey`." + examples = ['"example-1": { + "summary": "PUT `/process-definition/aProcessDefinitionId/suspended`", + "value": { + "suspended" : true, + "includeProcessInstances" : true, + "executionDate" : "2013-11-21T10:49:45T14:42:45" + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, + for example if the provided `executionDate` parameter doesn't have the expected format or + if the `processDefinitionKey` parameter is `null`. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given key does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/xml/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/xml/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d144fe10b9939d11dc8b997fafee275ef2a30c2a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/{id}/xml/get.ftl @@ -0,0 +1,71 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getProcessDefinitionBpmn20Xml" + tag = "Process Definition" + summary = "Get XML" + desc = "Retrieves the BPMN 2.0 XML of a process definition." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process definition."/> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessDefinitionDiagramDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/process-definition/id/aProcessDefinitionId/xml`", + "value": { + "id": "anProcessDefinitionId", + "bpmn20Xml": "\n + + + + + + " + } + }' + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "The Process Definition xml cannot be retrieved due to missing permissions on the Process Definition resource. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process definition with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..b03de8c9424793696348107d58bed299bf3dfc63 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/count/get.ftl @@ -0,0 +1,34 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getProcessInstancesCount" + tag = "Process Instance" + summary = "Get List Count" + desc = "Queries for the number of process instances that fulfill given parameters." /> + + "parameters": [ + <#assign last = true > + <#include "/lib/commons/process-instance-query-params.ftl"> + ], + "responses": { + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/process-instance/count?variables=myVariable_eq_camunda`", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid, for example an invalid operator for variable comparison is used."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..788c341d511ae57a224920fc4e963507916545fa --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/count/post.ftl @@ -0,0 +1,56 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "queryProcessInstancesCount" + tag = "Process Instance" + summary = "Get List Count (POST)" + desc = "Queries for the number of process instances that fulfill the given parameters. + This method takes the same message body as the Get Instances (POST) method and + therefore it is slightly more powerful than the Get Instance Count method." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "ProcessInstanceQueryDto" + examples = [ + '"example-1": { + "summary": "POST `/process-instance/count` Request Body 1", + "value": { + "variables": + [{ + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "processDefinitionId": "aProcessDefinitionId" + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response 1", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid, for example if an invalid operator for variable comparison is used."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/delete-historic-query-based/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/delete-historic-query-based/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..fb7c5fe50f910c46a6164aa38abefba19faa7a13 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/delete-historic-query-based/post.ftl @@ -0,0 +1,62 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteAsyncHistoricQueryBased" + tag = "Process Instance" + summary = "Delete Async Historic Query Based (POST)" + desc = "Deletes a set of process instances asynchronously (batch) based on a historic process instance query." /> + + + <@lib.requestBody + mediaType = "application/json" + dto = "DeleteProcessInstancesDto" + requestDesc = "**Unallowed property**: `processInstanceQuery`" + examples = [ + '"example-1": { + "summary": "POST `/process-instance/delete-historic-query-based` Request Body 1", + "value": { + "deleteReason" : "aReason", + "historicProcessInstanceQuery": { + "startedBefore": "2017-04-28T11:24:37.765+0200" + }, + "skipCustomListeners" : true, + "skipSubprocesses" : true, + "skipIoMappings" : false + } + }' + ] /> + + "responses": { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response 1", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid, i.e., neither processInstanceIds, nor historicProcessInstanceQuery is present"/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/delete/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/delete/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..383d22e9917a72a3bb60de932beb08daa088367a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/delete/post.ftl @@ -0,0 +1,59 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteProcessInstancesAsyncOperation" + tag = "Process Instance" + summary = "Delete Async (POST)" + desc = "Deletes multiple process instances asynchronously (batch)." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "DeleteProcessInstancesDto" + requestDesc = "**Unallowed property**: `historicProcessInstanceQuery`" + examples = [ + '"example-1": { + "summary": "POST `/process-instance/delete` Request Body 1", + "value": { + "deleteReason" : "aReason", + "processInstanceIds": ["aProcess","secondProcess"], + "skipCustomListeners" : true, + "skipSubprocesses" : true, + "skipIoMappings" : false + } + }' + ] /> + + "responses": { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response 1", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid, i.e., neither processInstanceIds, nor processInstanceQuery is present"/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..de25976f1846726064a6f5bc0d2cda427a295ed5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/get.ftl @@ -0,0 +1,57 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getProcessInstances" + tag = "Process Instance" + summary = "Get List" + desc = "Queries for process instances that fulfill given parameters. + Parameters may be static as well as dynamic runtime properties of process instances. + The size of the result set can be retrieved by using the Get Instance Count method." /> + + "parameters" : [ + + <#assign last = false > + <#assign sortByValues = ['"instanceId"', '"definitionKey"', '"definitionId"', '"tenantId"', '"businessKey"']> + <#include "/lib/commons/sort-params.ftl" > + + <#include "/lib/commons/pagination-params.ftl" > + + <#assign last = true > + <#include "/lib/commons/process-instance-query-params.ftl" > + + ], + "responses" : { + <@lib.response + code = "200" + dto = "ProcessInstanceDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/process-instance?variables=myVariable_eq_camunda,mySecondVariable_neq_aBadValue`", + "value": [ + { + "links": [], + "id": "anId", + "definitionId": "aProcDefId", + "definitionKey": "aProcDefKey", + "businessKey": "aKey", + "caseInstanceId": "aCaseInstanceId", + "ended": false, + "suspended": false, + "tenantId": null + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid, + for example if a sortOrder parameter is supplied, but no sortBy, or if an invalid operator for variable comparison is used."/> + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/job-retries-historic-query-based/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/job-retries-historic-query-based/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..653900f77e7911fa87f96b840fd1aa058a90f30b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/job-retries-historic-query-based/post.ftl @@ -0,0 +1,61 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "setRetriesByProcessHistoricQueryBased" + tag = "Process Instance" + summary = "Set Job Retries Async Historic Query Based (POST)" + desc = "Create a batch to set retries of jobs asynchronously based on a historic process instance query." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "SetJobRetriesByProcessDto" + requestDesc = "Please note that if both processInstances and historicProcessInstanceQuery are provided, + then the resulting execution will be performed on the union of these sets. + **Unallowed property**: `processInstanceQuery`" + examples = ['"example-1": { + "summary": "POST `/process-instance/job-retries-historic-query-based` Request Body 1", + "value": { + "retries": 5, + "dueDate": "2017-04-06T13:57:45.000+0200", + "historicProcessInstanceQuery": { + "startedBefore": "2017-04-28T11:24:37.769+0200" + }, + "processInstances": ["aProcess","secondProcess"] + } + }'] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid, for example if neither processInstanceIds, nor historicProcessInstanceQuery is present. + Or if the retry count is not specified."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/job-retries/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/job-retries/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..14dcf8436025390bab6ad06488dbdc11db3e17b1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/job-retries/post.ftl @@ -0,0 +1,60 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "setRetriesByProcess" + tag = "Process Instance" + summary = "Set Job Retries Async (POST)" + desc = "Create a batch to set retries of jobs associated with given processes asynchronously." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "SetJobRetriesByProcessDto" + requestDesc = "Please note that if both processInstances and processInstanceQuery are provided, + then the resulting execution will be performed on the union of these sets. + **Unallowed property**: `historicProcessInstanceQuery`" + examples = ['"example-1": { + "summary": "POST `/process-instance/job-retries` Request Body 1", + "value": { + "retries": 5, + "dueDate": "2017-04-06T13:57:45.000+0200", + "processInstances": ["aProcess", "secondProcess"], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId" + } + } + }'] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspended": false, + "tenantId": "aTenantId", + "createUserId": "demo" + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid, for example if neither processInstanceIds, nor processInstanceQuery is present. + Or if the retry count is not specified."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/message-async/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/message-async/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..6068e28968849a8c9a4985e6f844eb501e4de068 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/message-async/post.ftl @@ -0,0 +1,74 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "correlateMessageAsyncOperation" + tag = "Process Instance" + summary = "Correlate Message Async (POST)" + desc = "Correlates a message asynchronously to executions that are waiting for this message. + Messages will not be correlated to process definition-level start message events to start process instances." /> + + + <@lib.requestBody + mediaType = "application/json" + dto = "CorrelationMessageAsyncDto" + examples = ['"example-1": { + "summary": "POST /process-instance/message-async", + "description": "Correlate a message to process instances in a batch", + "value": { + "messageName" : "a-message-name", + "processInstanceIds" : [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7" + ], + "processInstanceQuery": { + "processDefinitionKey": "my-process-definition-key" + }, + "variables" : { + "myVariableName": { + "value": "myStringValue" + } + } + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "correlate-message", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting", + "suspended": false, + "createUserId": null + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Bad Request + * If none of `processInstanceIds`, `processInstanceQuery`, and `historicProcessInstanceQuery` is given + * If no process instance ids where found" /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + last = true + desc = "Returned if the user is not allowed to create the batch. + + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the + error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a52e08a5c828012303e2c38cb839db27e93c330c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/post.ftl @@ -0,0 +1,84 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "queryProcessInstances" + tag = "Process Instance" + summary = "Get List (POST)" + desc = "Queries for process instances that fulfill given parameters through a JSON object. + This method is slightly more powerful than the Get Instances method because + it allows filtering by multiple process variables of types `string`, `number` or `boolean`." /> + + "parameters" : [ + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "ProcessInstanceQueryDto" + examples = [ + '"example-1": { + "summary": "POST `/process-instance` Request Body 1", + "value": { + "variables": + [{ + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "processDefinitionId": "aProcessDefinitionId", + "sorting": + [{ + "sortBy": "definitionKey", + "sortOrder": "asc" + }, { + "sortBy": "instanceId", + "sortOrder": "desc" + } + ] + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "ProcessInstanceDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response 1", + "value": [ + { + "links": [], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "definitionKey": "aProcessDefinitionKey", + "businessKey": "aKey", + "caseInstanceId": "aCaseInstanceId", + "ended": false, + "suspended": false, + "tenantId": null + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the query parameters are invalid, + for example if a sortOrder parameter is supplied, but no sortBy, or if an invalid operator for variable comparison is used."/> + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/suspended-async/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/suspended-async/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..b541363e5f49718def7c1909eebc8c0ba9973db6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/suspended-async/post.ftl @@ -0,0 +1,60 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "updateSuspensionStateAsyncOperation" + tag = "Process Instance" + summary = "Activate/Suspend In Batch" + desc = "Activates or suspends process instances asynchronously with a list of process instance ids, + a process instance query, and/or a historical process instance query." /> + + + <@lib.requestBody + mediaType = "application/json" + dto = "ProcessInstanceSuspensionStateAsyncDto" + examples = ['"example-1": { + "summary": "POST `/process-instance/suspended-async`", + "description": "Suspend Process Instance In Batch", + "value": { + "processInstanceIds" : [ + "processInstanceId1", + "processInstanceIdN" + ], + "suspended" : true + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the request parameters are invalid, + for example if the provided processDefinitionId or processDefinitionKey parameter is null."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/suspended/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/suspended/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8e068509216c29522b777e48f8a9b518134dc353 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/suspended/put.ftl @@ -0,0 +1,74 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "updateSuspensionState" + tag = "Process Instance" + summary = "Activate/Suspend In Group" + desc = "Activates or suspends process instances by providing certain criteria: + + # Activate/Suspend Process Instance By Process Definition Id + * `suspend` + * `processDefinitionId` + + # Activate/Suspend Process Instance By Process Definition Key + + * `suspend` + * `processDefinitionKey` + * `processDefinitionTenantId` + * `processDefinitionWithoutTenantId` + + # Activate/Suspend Process Instance In Group + * `suspend` + * `processInstanceIds` + * `processInstanceQuery` + * `historicProcessInstanceQuery`" /> + + + <@lib.requestBody + mediaType = "application/json" + dto = "ProcessInstanceSuspensionStateDto" + examples = ['"example-1": { + "summary": "PUT `/process-instance/suspended`", + "description": "Suspend Process Instance By Process Definition Id", + "value": { + "processDefinitionId" : "aProcDefId", + "suspended" : true + } + }', + '"example-2": { + "summary": "PUT `/process-instance/suspended`", + "description": "Suspend Process Instance By Process Definition Key", + "value": { + "processDefinitionKey" : "aProcDefKey", + "suspended" : true + } + }', + '"example-3": { + "summary": "PUT `/process-instance/suspended`", + "description": "Suspend Process Instance In Group", + "value": { + "processInstanceIds" : [ + "processInstanceId1", + "processInstanceIdN" + ], + "suspended" : true + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Returned if some of the request parameters are invalid, + for example if the provided processDefinitionId or processDefinitionKey parameter is null."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/variables-async/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/variables-async/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..92af883091cadb4a1ab633410aa139188bcb71a9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/variables-async/post.ftl @@ -0,0 +1,77 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "setVariablesAsyncOperation" + tag = "Process Instance" + summary = "Set Variables Async (POST)" + desc = "Update or create runtime process variables in the root scope of process instances." /> + + + <@lib.requestBody + mediaType = "application/json" + dto = "SetVariablesAsyncDto" + examples = ['"example-1": { + "summary": "POST /process-instance/variables-async", + "description": "Set variables to process instances in a batch", + "value": { + "processInstanceIds" : [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7" + ], + "processInstanceQuery": { + "processDefinitionKey": "my-process-definition-key" + }, + "variables" : { + "myVariableName": { + "value": "myStringValue" + } + } + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "set-variables", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting", + "suspended": false, + "createUserId": null + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Bad Request + * The variable value or type is invalid, for example if the value could not be parsed to an Integer value or + the passed variable type is not supported + * If none of `processInstanceIds`, `processInstanceQuery` and `historicProcessInstanceQuery` is given + * If no or an empty array of `variables` is given + * If no process instance ids where found + * If a transient variable is set + * If the engine config flag `javaSerializationFormatEnabled` is `false` and a Java serialized variable is given"/> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + last = true + desc = "Returned if the user is not allowed to create the batch. + + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the + error response format."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/activity-instances/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/activity-instances/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..08e956d8ed71cb91fa96a2a7c60431621cc2361a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/activity-instances/get.ftl @@ -0,0 +1,77 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getActivityInstanceTree" + tag = "Process Instance" + summary = "Get Activity Instance" + desc = "Retrieves an Activity Instance (Tree) for a given process instance by id." /> + + "parameters" : [ + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process instance for which the activity instance should be retrieved."/> + ], + "responses": { + + <@lib.response + code = "200" + dto = "ActivityInstanceDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/process-instance/aProcessInstanceId/activity-instances`", + "value": { + "id": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6", + "parentActivityInstanceId": null, + "activityId": "invoice:2:e9d77375-f70c-11e9-8777-e4a7a094a9d6", + "activityType": "processDefinition", + "processInstanceId": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6", + "processDefinitionId": "invoice:2:e9d77375-f70c-11e9-8777-e4a7a094a9d6", + "childActivityInstances": [{ + "id": "approveInvoice:eca89509-f70c-11e9-8777-e4a7a094a9d6", + "parentActivityInstanceId": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6", + "activityId": "approveInvoice", + "activityType": "userTask", + "processInstanceId": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6", + "processDefinitionId": "invoice:2:e9d77375-f70c-11e9-8777-e4a7a094a9d6", + "childActivityInstances": [], + "childTransitionInstances": [], + "executionIds": [ + "eca75c6b-f70c-11e9-8777-e4a7a094a9d6" + ], + "activityName": "Approve Invoice", + "incidentIds": [ + "648d7e21-f71c-11e9-a725-e4a7a094a9d6" + ], + "incidents": [{ + "id": "648d7e21-f71c-11e9-a725-e4a7a094a9d6", + "activityId": "AttachedTimerBoundaryEvent" + } + ], + "name": "Approve Invoice" + } + ], + "childTransitionInstances": [], + "executionIds": [ + "eca75c6b-f70c-11e9-8777-e4a7a094a9d6" + ], + "activityName": "Invoice Receipt", + "incidentIds": null, + "incidents": null, + "name": "Invoice Receipt" + } + }' + ] /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Process instance with given id does not exist."/> + + } +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4dda8b64234510b34eb961a096b6710fb28094cb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/delete.ftl @@ -0,0 +1,43 @@ +<#macro endpoint_macro docsUrl=""> + { + <@lib.endpointInfo + id = "deleteProcessInstanceComments" + tag = "Process Instance Comment" + summary = "Delete ProcessInstance Comments" + desc = "Deletes all comments of a process instance by id." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process instance for which all comments are to be deleted."/> + + ], + "responses": { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "The authenticated user is unauthorized to delete this resource. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Process instance doesn't exist or history is not enabled. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } + } + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4f4bbd14bfbf9bed8260bb8315b22f836e11e609 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/get.ftl @@ -0,0 +1,77 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getProcessInstanceComments" + tag = "Process Instance Comment" + summary = "Get Process Instance Comments" + desc = "Gets the comments for a process instance by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process instance to retrieve the comments for." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "CommentDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /process-instance/aProcessInstanceId/comment", + "value": [ + { + "id": "commentId", + "userId": "userId", + "taskId": "aTaskId", + "processInstanceId": "aProcessInstanceId", + "time": "2013-01-02T21:37:03.764+0200", + "message": "message", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "anotherCommentId", + "userId": "anotherUserId", + "taskId": "aTaskId", + "processInstanceId": "aProcessInstanceId", + "time": "2013-02-23T20:37:43.975+0200", + "message": "anotherMessage", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "yetAnotherCommentId", + "userId": "yetAnotherUserId", + "taskId": "aTaskId", + "processInstanceId": "aProcessInstanceId", + "time": "2013-04-21T10:15:23.764+0200", + "message": "yetAnotherMessage", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + }' + ] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "No process instance exists for the given process instance id. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..fb5da8486ac63acbe2340a086c0d74d05f7c0930 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/put.ftl @@ -0,0 +1,58 @@ +<#macro endpoint_macro docsUrl=""> + { + + <@lib.endpointInfo + id = "updateProcessInstanceComment" + tag = "Process Instance Comment" + summary = "Update" + desc = "Updates a Comment." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id associated of a process instance of a comment to be updated."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "CommentDto" + requestDesc = "**Note:** Only the `id` and `message` properties will be used. Every other + property passed to this endpoint will be ignored." + examples = ['"example-1": { + "summary": "PUT /process-instance/aProcessInstanceId/comment", + "value": { + "id": "75bc161a-12da-11e4-7d3a-f4ccdc10a445", + "message": "a process instance comment" + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if a given process instance id or comment id is invalid or history is disabled in the engine. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + <@lib.response + code = "404" + dto = "AuthorizationExceptionDto" + last = true + desc = "The authenticated user is unauthorized to update this resource. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } + } + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/{commentId}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/{commentId}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..048551741aae5a7011ce12c1c27c477373ac656e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/{commentId}/delete.ftl @@ -0,0 +1,52 @@ +<#macro endpoint_macro docsUrl=""> + { + + <@lib.endpointInfo + id = "deleteProcessInstanceComment" + tag = "Process Instance Comment" + summary = "Delete" + desc = "Removes a comment from a process instance by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the process instance." /> + + <@lib.parameter + name = "commentId" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the comment to be removed." /> + + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if a given process instance id or comment id is invalid or history is disabled in the engine. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + <@lib.response + code = "404" + dto = "AuthorizationExceptionDto" + last = true + desc = "The authenticated user is unauthorized to delete this resource. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } + } + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8e8af077b26c4848d19db61e281d070f2ba8aaf0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/delete.ftl @@ -0,0 +1,63 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteProcessInstance" + tag = "Process Instance" + summary = "Delete" + desc = "Deletes a running process instance by id." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the process instance to be deleted."/> + + <@lib.parameter + name = "skipCustomListeners" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "If set to true, the custom listeners will be skipped." /> + + <@lib.parameter + name = "skipIoMappings" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "If set to true, the input/output mappings will be skipped." /> + + <@lib.parameter + name = "skipSubprocesses" + location = "query" + type = "boolean" + defaultValue = 'false' + desc = "If set to true, subprocesses related to deleted processes will be skipped." /> + + <@lib.parameter + name = "failIfNotExists" + location = "query" + type = "boolean" + defaultValue = "true" + last = true + desc = "If set to false, the request will still be successful if the process id is not found." /> + + ], + "responses": { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Not found + Process instance with given id does not exist. " /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..933bdffa4c4d506516a438124c97dad795e26d2f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/get.ftl @@ -0,0 +1,49 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getProcessInstance" + tag = "Process Instance" + summary = "Get Process Instance" + desc = "Retrieves a process instance by id, according to the `ProcessInstance` interface in the engine." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process instance to be retrieved." /> + + ], + "responses": { + + <@lib.response + code = "200" + desc = "Request successful." + dto = "ProcessInstanceDto" + examples = ['"example-1": { + "summary": "GET `/process-instance/aProcessInstanceId`", + "value": { + "id":"aProcessInstanceId", + "definitionId":"aProcDefId", + "definitionKey":"aProcDefKey", + "businessKey":"aKey", + "caseInstanceId":"aCaseInstanceId", + "ended":false, + "suspended":false, + "tenantId":null + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Process instance with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format. " /> + + } +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/modification-async/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/modification-async/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..af378ca9344803eb633b829ae1531ef7b81c0967 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/modification-async/post.ftl @@ -0,0 +1,97 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "modifyProcessInstanceAsyncOperation" + tag = "Process Instance" + summary = "Modify Process Instance Execution State Async" + desc = "Submits a list of modification instructions to change a process instance's execution state async. + A modification instruction is one of the following: + + * Starting execution before an activity + * Starting execution after an activity on its single outgoing sequence flow + * Starting execution on a specific sequence flow + * Cancelling an activity instance, transition instance, or all instances (activity or transition) for an activity + + Instructions are executed asynchronous and in the order they are provided in this request's body. + Variables can be provided with every starting instruction. + + The exact semantics of modification can be read about in the + [User guide](${docsUrl}/user-guide/process-engine/process-instance-modification/)." /> + + "parameters" : [ + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process instance to modify."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "ProcessInstanceModificationDto" + examples = ['"example-1": { + "summary": "POST `/process-instance/aProcessInstanceId/modification-async`", + "value": { + "skipCustomListeners": true, + "skipIoMappings": true, + "instructions": [{ + "type": "startBeforeActivity", + "activityId": "activityId" + }, { + "type": "cancel", + "activityInstanceId": "anActivityInstanceId" + } + ], + "annotation": "Modified to resolve an error." + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "BatchDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Bad Request + At least one modification instruction misses required parameters."/> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "Forbidden + If the user is not allowed to execute batches. See the Introduction for the error response format."/> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "The modification cannot be performed, for example because it starts a failing activity."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/modification/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/modification/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a00499cd78981cf39af14f0705302438a76aa17e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/modification/post.ftl @@ -0,0 +1,83 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "modifyProcessInstance" + tag = "Process Instance" + summary = "Modify Process Instance Execution State" + desc = "Submits a list of modification instructions to change a process instance's execution state. + A modification instruction is one of the following: + + * Starting execution before an activity + * Starting execution after an activity on its single outgoing sequence flow + * Starting execution on a specific sequence flow + * Canceling an activity instance, transition instance, or all instances (activity or transition) for an activity + + Instructions are executed immediately and in the order they are provided in this request's body. + Variables can be provided with every starting instruction. + + The exact semantics of modification can be read about in the [User guide](https://docs.camunda.org/manual/develop/user-guide/process-engine/process-instance-modification/)." /> + + "parameters" : [ + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process instance to modify."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "ProcessInstanceModificationDto" + examples = ['"example-1": { + "summary": "POST `/process-instance/aProcessInstanceId/modification`", + "value": { + "skipCustomListeners": true, + "skipIoMappings": true, + "instructions": [{ + "type": "startBeforeActivity", + "activityId": "activityId", + "variables": { + "var": { + "value": "aVariableValue", + "local": false, + "type": "String" + }, + "varLocal": { + "value": "anotherVariableValue", + "local": true, + "type": "String" + } + } + }, { + "type": "cancel", + "activityInstanceId": "anActivityInstanceId" + } + ], + "annotation": "Modified to resolve an error." + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "At least one modification instruction misses required parameters."/> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "The modification cannot be performed, for example because it starts a failing activity."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/suspended/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/suspended/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..55e4f4ac6c530e909a86bcdb38f4cc22476af502 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/suspended/put.ftl @@ -0,0 +1,40 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "updateSuspensionStateById" + tag = "Process Instance" + summary = "Activate/Suspend Process Instance By Id" + desc = "Activates or suspends a given process instance by id." /> + + "parameters" : [ + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process instance to activate or suspend."/> + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "SuspensionStateDto" + examples = ['"example-1": { + "summary": "PUT `/process-instance/aProcessInstanceId/suspended`", + "value": { + "suspended" : true + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + last = true + desc = "Request successful." /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a1c9433cb8aefcad8bb2411f095bfe72f5d5c660 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/get.ftl @@ -0,0 +1,84 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getProcessInstanceVariables" + tag = "Process Instance" + summary = "Get Process Variables" + desc = "Retrieves all variables of a given process instance by id." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the process instance to retrieve the variables from."/> + + <@lib.parameter + name = "deserializeValues" + location = "query" + type = "boolean" + defaultValue = "true" + last = true + desc = "Determines whether serializable variable values (typically variables that store custom Java objects) + should be deserialized on server side (default true). + + If set to true, a serializable variable will be deserialized on server side and transformed to JSON + using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. + Note that this requires the Java classes of the variable value to be on the REST API's classpath. + + If set to false, a serializable variable will be returned in its serialized format. + For example, a variable that is serialized as XML will be returned as a JSON string containing XML. + + Note: While true is the default value for reasons of backward compatibility, we recommend setting this parameter to false + when developing web applications that are independent of the Java process applications deployed to the engine."/> + + ], + "responses": { + + <@lib.response + code = "200" + dto = "VariableValueDto" + additionalProperties = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/process-instance/aProcessInstanceId/variables`", + "value": { + "aVariableKey": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }', + '"example-2": { + "summary": "GET `/process-instance/aProcessInstanceId/variables?deserializeValue=false`", + "value": { + "aVariableKey": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }' + ] /> + + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Process instance with given id does not exist."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..94ebfcd9fb3b7b96a23b6337309f95aaf3d3cb33 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/post.ftl @@ -0,0 +1,68 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "modifyProcessInstanceVariables" + tag = "Process Instance" + summary = "Update/Delete Process Variables" + desc = "Updates or deletes the variables of a process instance by id. Updates precede deletions. + So, if a variable is updated AND deleted, the deletion overrides the update." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the process instance to set variables for."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "PatchVariablesDto" + examples = ['"example-1": { + "summary": "POST `/process-instance/aProcessInstanceId/variables`", + "description": "Status 204 Response: No content.", + "value": { + "modifications": { + "aVariable": { + "value": "aValue", + "type": "String" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + }, + "deletions": [ + "aThirdVariable", + "FourthVariable" + ] + } + }' + ] /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Bad Request + The variable value or type is invalid, for example if the value could not be parsed to an Integer value or + the passed variable type is not supported."/> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Update or delete could not be executed, for example because the process instance does not exist."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/data/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/data/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..dc4b08ee22af290c3eb761dac1113c67f73d0467 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/data/get.ftl @@ -0,0 +1,80 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getProcessInstanceVariableBinary" + tag = "Process Instance" + summary = "Get Process Variable (Binary)" + desc = "Retrieves the content of a Process Variable by the Process Instance id and the Process Variable name. + Applicable for byte array or file Process Variables." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the process instance to retrieve the variable for."/> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + last = true + desc = "The name of the variable to retrieve."/> + + ], + "responses": { + "200": { + "description": "Request successful. + For binary variables or files without any MIME type information, a byte stream is returned. + File variables with MIME type information are returned as the saved type. + Additionally, for file variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1" :{ + "summary": "binary variable: Status 200", + "value": "Content-Type: application/octet-stream" + } + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type. + Additionally, for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1" :{ + "summary": "file variable: Status 200", + "value": "Content-Type: text/plain; charset=UTF-8. Content-Disposition: attachment; filename=\"someFile.txt\"" + } + } + } + } + }, + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Bad Request + A Process Variable with the given id exists but does not serialize as binary data."/> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Not Found + A Process Variable with the given id does not exist. "/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/data/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/data/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4f6fd717a8f517cd907f0c66c4c2f5d35a6fa18e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/data/post.ftl @@ -0,0 +1,112 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "setProcessInstanceVariableBinary" + tag = "Process Instance" + summary = "Update Process Variable (Binary)" + desc = "Sets the serialized value for a binary variable or the binary value for a file variable." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the process instance to retrieve the variable for."/> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + last = true + desc = "The name of the variable to retrieve."/> + + ], + + <@lib.requestBody + mediaType = "multipart/form-data" + dto = "MultiFormVariableBinaryDto" + requestDesc = "For binary variables a multipart form submit with the following parts:" + examples = [ '"example-1": { + "summary": "POST `/process-instance/aProcessInstanceId/variables/aVarName/data` (1)", + "description": "Post binary content of a byte array variable.", + "value": " + ``` + ------------------------------354ddb6baeff + Content-Disposition: form-data; name=\\"data\\"; filename=\\"image.png\\" + Content-Type: application/octet-stream + Content-Transfer-Encoding: binary + + <> + ------------------------------354ddb6baeff + Content-Disposition: form-data; name=\\"valueType\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + Bytes + ------------------------------1e838f8f632a-- + ``` + " + }', + '"example-2": { + "summary": "POST `/process-instance/aProcessInstanceId/variables/aVarName/data` (2)", + "description": "Post the JSON serialization of a Java Class (**deprecated**).", + "value": " + ``` + ------------------------------1e838f8f632a + Content-Disposition: form-data; name=\\"type\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + java.util.ArrayList + ------------------------------1e838f8f632a + Content-Disposition: form-data; name=\\"data\\" + Content-Type: application/json; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + [\\"foo\\",\\"bar\\"] + ------------------------------1e838f8f632a-- + ``` + " + }', + '"example-3": { + "summary": "POST `/process-instance/aProcessInstanceId/variables/aVarName/data` (3)", + "description": "Post a text file.", + "value": " + ``` + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y + Content-Disposition: form-data; name=\\"data\\"; filename=\\"myFile.txt\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: binary + + <> + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y + Content-Disposition: form-data; name=\\"valueType\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + File + ------------------------------1e838f8f632a-- + ``` + " + }' + ] /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + The variable value or type is invalid, for example if no filename is set."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d0a27f6db3bd1f47f609e365cfbaa9828176ffb7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/delete.ftl @@ -0,0 +1,36 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "deleteProcessInstanceVariable" + tag = "Process Instance" + summary = "Delete Process Variable" + desc = "Deletes a variable of a process instance by id." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the process instance to delete the variable from."/> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + last = true + desc = "The name of the variable to delete."/> + + ], + "responses": { + + <@lib.response + code = "204" + last = true + desc = "Request successful."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ee561a7b07d0fecaecd81b10e64f267260104eef --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/get.ftl @@ -0,0 +1,87 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getProcessInstanceVariable" + tag = "Process Instance" + summary = "Get Process Variable" + desc = "Retrieves a variable of a given process instance by id." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the process instance to retrieve the variable for."/> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + desc = "The name of the variable to retrieve."/> + + <@lib.parameter + name = "deserializeValue" + location = "query" + type = "boolean" + defaultValue = "true" + last = true + desc = "Determines whether serializable variable values (typically variables that store custom Java objects) + should be deserialized on server side (default true). + + If set to true, a serializable variable will be deserialized on server side and transformed to JSON + using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. + Note that this requires the Java classes of the variable value to be on the REST API's classpath. + + If set to false, a serializable variable will be returned in its serialized format. + For example, a variable that is serialized as XML will be returned as a JSON string containing XML. + + Note: While true is the default value for reasons of backward compatibility, we recommend setting this parameter to false + when developing web applications that are independent of the Java process applications deployed to the engine."/> + + ], + "responses": { + + <@lib.response + code = "200" + dto = "VariableValueDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/process-instance/aProcessInstanceId/variables/myObject123`", + "value": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }', + '"example-2": { + "summary": "GET `/process-instance/aProcessInstanceId/variables/myObject123?deserializeValue=false`", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }' + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + Variable with given id does not exist."/> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0ad920b021a9877cba73168a56b03b8d881c63ed --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/variables/{varName}/put.ftl @@ -0,0 +1,68 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "setProcessInstanceVariable" + tag = "Process Instance" + summary = "Update Process Variable" + desc = "Sets a variable of a given process instance by id." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the process instance to set the variable for." /> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + last = true + desc = "The name of the variable to set." /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "VariableValueDto" + examples = [ '"example-1": { + "summary": "PUT /process-instance/aProcessInstanceId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "someValue", + "type": "String" + } + }', + '"example-2": { + "summary": "PUT /process-instance/aProcessInstanceId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }' + ] /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful."/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Bad Request + The variable value or type is invalid, for example if the value could not be parsed to an Integer value or + the passed variable type is not supported."/> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/schema/log/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/schema/log/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..db3d8937be3ad048b7ff0b4c510f08a9e3a8beb6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/schema/log/get.ftl @@ -0,0 +1,51 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getSchemaLog" + tag = "Schema Log" + summary = "Get List" + desc = "Queries for schema log entries that fulfill given parameters." /> + + "parameters" : [ + <@lib.parameter + name = "version" + location = "query" + type = "string" + desc = "Only return schema log entries with a specific version."/> + + <#assign sortByValues = [ + '"timestamp"' + ]> + <#include "/lib/commons/sort-params.ftl"> + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + ], + "responses" : { + <@lib.response + code = "200" + dto = "SchemaLogEntryDto" + array = true + last = true + desc = "Request successful. + **Note**: In order to get any results a user of group `camunda-admin` must + be authenticated." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": [ + { + "id": "0", + "version": "7.11.0", + "timestamp": "2019-05-13T09:07:11.751+0200" + }, + { + "id": "1", + "version": "7.11.1", + "timestamp": "2019-06-1T17:22:05.123+0200" + } + ] + }'] /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/schema/log/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/schema/log/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1e28f38c616fc196f5455c95983816da5686bcd3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/schema/log/post.ftl @@ -0,0 +1,50 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "querySchemaLog" + tag = "Schema Log" + summary = "Get List (POST)" + desc = "Queries for schema log entries that fulfill given parameters." /> + + "parameters" : [ + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "SchemaLogQueryDto" + examples = ['"example-1": { + "summary": "POST /schema/log", + "description": "The content of the Request Body", + "value": { + "version": "7.11.0", + "sortBy": "timestamp", + "sortOrder": "asc" + } + }'] /> + + "responses" : { + <@lib.response + code = "200" + dto = "SchemaLogEntryDto" + array = true + last = true + desc = "Request successful. + **Note**: In order to get any results a user of group camunda-admin must be + authenticated." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": [ + { + "id": "0", + "version": "7.11.0", + "timestamp": "2019-05-13T09:07:11.751+0200" + } + ] + }'] /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/signal/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/signal/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..be550dfcf0175a5e89286cc16e53e4ccdbb704f1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/signal/post.ftl @@ -0,0 +1,70 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "throwSignal" + tag = "Signal" + summary = "Event" + desc = "A signal is an event of global scope (broadcast semantics) and is delivered to all + active handlers. Internally this maps to the engine's signal event received builder + method `RuntimeService#createSignalEvent()`. For more information about the signal + behavior, see the [Signal Events](${docsUrl}/reference/bpmn20/events/signal-events/) + section of the [BPMN 2.0 Implementation Reference](${docsUrl}/reference/bpmn20/)." /> + + "parameters" : [], + + <@lib.requestBody + mediaType = "application/json" + dto = "SignalDto" + examples = ['"examle-1": { + "summary": "POST /signal", + "description": "The content of the Request Body", + "value": { + "name": "policy_conditions_changed", + "variables": { + "newTimePeriodInMonth": { + "value": 24 + } + } + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if: + + * no name was given + * the variable value or type is invalid, for example if the value could not be + parsed to an integer value or the passed variable type is not supported + * a tenant id and an execution id is specified. + + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the + error response format." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "Returned if the user is not allowed to throw a signal event. + + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the + error response format."/> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Returned if a single execution is specified and no such execution exists or has not + subscribed to the signal. + + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the + error response format." /> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a93e452e8fa362b51ac586c420bd7a2056b2443d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/count/get.ftl @@ -0,0 +1,47 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getTasksCount" + tag = "Task" + summary = "Get List Count" + desc = "Retrieves the number of tasks that fulfill a provided filter. Corresponds to the size + of the result set when using the [Get Tasks](${docsUrl}/reference/rest/task/) method. + + **Security Consideration:** There are several query parameters (such as + assigneeExpression) for specifying an EL expression. These are disabled by default to + prevent remote code execution. See the section on + [security considerations](${docsUrl}/user-guide/process-engine/securing-custom-code/) + for custom code in the user guide for details." /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/task-query-params.ftl" > + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4e7aaaaf6ef2775d4ddf41db8054346c68909ad8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/count/post.ftl @@ -0,0 +1,99 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "queryTasksCount" + tag = "Task" + summary = "Get List Count (POST)" + desc = "Retrieves the number of tasks that fulfill the given filter. Corresponds to the size + of the result set of the [Get Tasks (POST)](${docsUrl}/reference/rest/task/post-query/) + method and takes the same parameters. + + **Security Consideration**: + There are several parameters (such as `assigneeExpression`) for specifying an EL + expression. These are disabled by default to prevent remote code execution. See the + section on + [security considerations for custom code](${docsUrl}/user-guide/process-engine/securing-custom-code/) + in the user guide for details." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "TaskQueryDto" + examples = [ + '"example-1": { + "summary": "POST `/task` Request Body 1", + "value": { + "taskVariables": [ + { + "name": "varName", + "value": "varValue", + "operator": "eq" + }, + { + "name": "anotherVarName", + "value": 30, + "operator": "neq" + } + ], + "processInstanceBusinessKeyIn": "aBusinessKey,anotherBusinessKey", + "assigneeIn": "anAssignee,anotherAssignee", + "priority": 10, + "sorting": [ + { + "sortBy": "dueDate", + "sortOrder": "asc" + }, + { + "sortBy": "processVariable", + "sortOrder": "desc", + "parameters": { + "variable": "orderId", + "type": "String" + } + } + ] + } + }', + '"example-2": { + "summary": "POST `/task` Request Body 2", + "description": "Logical query: assignee = \\"John Munda\\" AND (name = \\"Approve Invoice\\" OR priority = 5) AND (suspended = false OR taskDefinitionKey = \\"approveInvoice\\")", + "value": { + "assignee": "John Munda", + "orQueries": [ + { + "name": "Approve Invoice", + "priority": 5 + }, + { + "suspended": false, + "taskDefinitionKey": "approveInvoice" + } + ] + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response", + "value": { + "count": 1 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/create/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/create/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..bab27b97093105e58168dfe97ac6e901e0395781 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/create/post.ftl @@ -0,0 +1,48 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "createTask" + tag = "Task" + summary = "Create" + desc = "Creates a new task." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "TaskDto" + examples = ['"example-1": { + "summary": "POST /task/create", + "value": { + "id": "aTaskId", + "name": "My Task", + "description": "This have to be done very urgent", + "priority": 30, + "assignee": "peter", + "owner": "mary", + "delegationState": "PENDING", + "due": "2014-08-30T10:00:00.000+0200", + "followUp": "2014-08-25T10:00:00.000+0200", + "parentTaskId": "aParentTaskId", + "caseInstanceId": "aCaseInstanceId", + "tenantId": null + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if a not valid `delegationState` is supplied. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8dad4a4a5b37aa45441cfcda4a5f70506d3d3318 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/get.ftl @@ -0,0 +1,221 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getTasks" + tag = "Task" + summary = "Get List" + desc = "Queries for tasks that fulfill a given filter. The size of the result set can be + retrieved by using the Get Task Count method. + + **Security Consideration:** There are several query parameters (such as + assigneeExpression) for specifying an EL expression. These are disabled by default to + prevent remote code execution. See the section on + [security considerations](${docsUrl}/user-guide/process-engine/securing-custom-code/) + for custom code in the user guide for details." /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/task-query-params.ftl" > + + <#assign sortByValues = [ '"instanceId"', '"caseInstanceId"', '"dueDate"', '"executionId"', '"caseExecutionId"', + '"assignee"', '"created"', '"lastUpdated"', '"description"', '"id"', '"name"', '"nameCaseInsensitive"', + '"priority"', '"processVariable"', '"executionVariable"', '"taskVariable"', + '"caseExecutionVariable"', '"caseInstanceVariable"' ] > + <#include "/lib/commons/sort-params.ftl" > + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "TaskWithAttachmentAndCommentDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response 1", + "description": "Response for GET `/task?assignee=anAssignee&delegationState=RESOLVED&maxPriority=50`", + "value": [ + { + "id":"anId", + "name":"aName", + "assignee":"anAssignee", + "created":"2013-01-23T13:42:42.657+0200", + "due":"2013-01-23T13:49:42.323+0200", + "followUp:":"2013-01-23T13:44:42.987+0200", + "lastUpdated:":"2013-01-23T13:44:42.987+0200", + "delegationState":"RESOLVED", + "description":"aDescription", + "executionId":"anExecution", + "owner":"anOwner", + "parentTaskId":"aParentId", + "priority":42, + "processDefinitionId":"aProcDefId", + "processInstanceId":"aProcInstId", + "caseDefinitionId":"aCaseDefId", + "caseInstanceId":"aCaseInstId", + "caseExecutionId":"aCaseExecution", + "taskDefinitionKey":"aTaskDefinitionKey", + "suspended": false, + "formKey":"aFormKey", + "camundaFormRef":{ + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId": "aTenantId", + "taskState": "aTaskState" + } + ] + }', + '"example-2": { + "summary": "Status 200 response 2", + "description": "Response for GET `/task?assignee=anAssignee&withCommentAttachmentInfo=true`", + "value": [ + { + "id":"anId", + "name":"aName", + "assignee":"anAssignee", + "created":"2013-01-23T13:42:42.657+0200", + "due":"2013-01-23T13:49:42.323+0200", + "followUp:":"2013-01-23T13:44:42.987+0200", + "lastUpdated:":"2013-01-23T13:44:42.987+0200", + "delegationState":"RESOLVED", + "description":"aDescription", + "executionId":"anExecution", + "owner":"anOwner", + "parentTaskId":"aParentId", + "priority":42, + "processDefinitionId":"aProcDefId", + "processInstanceId":"aProcInstId", + "caseDefinitionId":"aCaseDefId", + "caseInstanceId":"aCaseInstId", + "caseExecutionId":"aCaseExecution", + "taskDefinitionKey":"aTaskDefinitionKey", + "suspended": false, + "formKey":"aFormKey", + "camundaFormRef":{ + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId": "aTenantId", + "attachment":false, + "comment":false + } + ] + }', + '"example-3": { + "summary": "Status 200 response 3", + "description": "Response for GET + `/task?assignee=anAssignee&withCommentAttachmentInfo=true&withTaskVariablesInReturn=true`", + "value": [ + { + "id":"anId", + "name":"aName", + "assignee":"anAssignee", + "created":"2013-01-23T13:42:42.657+0200", + "due":"2013-01-23T13:49:42.323+0200", + "followUp:":"2013-01-23T13:44:42.987+0200", + "lastUpdated:":"2013-01-23T13:44:42.987+0200", + "delegationState":"RESOLVED", + "description":"aDescription", + "executionId":"anExecution", + "owner":"anOwner", + "parentTaskId":"aParentId", + "priority":42, + "processDefinitionId":"aProcDefId", + "processInstanceId":"aProcInstId", + "caseDefinitionId":"aCaseDefId", + "caseInstanceId":"aCaseInstId", + "caseExecutionId":"aCaseExecution", + "taskDefinitionKey":"aTaskDefinitionKey", + "suspended": false, + "formKey":"aFormKey", + "camundaFormRef":{ + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId": "aTenantId", + "variables": { + "aVariableKey": { + "type": "String", + "value": "aVariableValue", + "valueInfo": {} + }, + "anotherVariableKey": { + "type": "String", + "value": "anotherVariableValue", + "valueInfo": {} + } + }, + "attachment":false, + "comment":false + } + ] + }', + '"example-4": { + "summary": "Status 200 response 4", + "description": "Response for GET + `/task?assignee=anAssignee&withCommentAttachmentInfo=true&withTaskLocalVariablesInReturn=true`", + "value": [ + { + "id":"anId", + "name":"aName", + "assignee":"anAssignee", + "created":"2013-01-23T13:42:42.657+0200", + "due":"2013-01-23T13:49:42.323+0200", + "followUp:":"2013-01-23T13:44:42.987+0200", + "lastUpdated:":"2013-01-23T13:44:42.987+0200", + "delegationState":"RESOLVED", + "description":"aDescription", + "executionId":"anExecution", + "owner":"anOwner", + "parentTaskId":"aParentId", + "priority":42, + "processDefinitionId":"aProcDefId", + "processInstanceId":"aProcInstId", + "caseDefinitionId":"aCaseDefId", + "caseInstanceId":"aCaseInstId", + "caseExecutionId":"aCaseExecution", + "taskDefinitionKey":"aTaskDefinitionKey", + "suspended": false, + "formKey":"aFormKey", + "camundaFormRef":{ + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId": "aTenantId", + "variables": { + "anotherVariableKey": { + "type": "String", + "value": "anotherVariableValue", + "valueInfo": {} + } + }, + "attachment":false, + "comment":false + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`, or if an invalid operator for variable + comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d82de3ca63b19c1303768d4437d9298a24eebc56 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/post.ftl @@ -0,0 +1,295 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "queryTasks" + tag = "Task" + summary = "Get List (POST)" + desc = "Queries for tasks that fulfill a given filter. This method is slightly more powerful + than the [Get Tasks](${docsUrl}/reference/rest/task/get-query/) method because it + allows filtering by multiple process or task variables of types `String`, `Number` + or `Boolean`. The size of the result set can be retrieved by using the + [Get Task Count (POST)](${docsUrl}/reference/rest/task/post-query-count/) method. + + **Security Consideration**: + There are several parameters (such as `assigneeExpression`) for specifying an EL + expression. These are disabled by default to prevent remote code execution. See the + section on + [security considerations for custom code](${docsUrl}/user-guide/process-engine/securing-custom-code/) + in the user guide for details." /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "TaskQueryDto" + examples = [ + '"example-1": { + "summary": "POST `/task` Request Body 1", + "value": { + "taskVariables": [ + { + "name": "varName", + "value": "varValue", + "operator": "eq" + }, + { + "name": "anotherVarName", + "value": 30, + "operator": "neq" + } + ], + "processInstanceBusinessKeyIn": "aBusinessKey,anotherBusinessKey", + "assigneeIn": "anAssignee,anotherAssignee", + "priority": 10, + "sorting": [ + { + "sortBy": "dueDate", + "sortOrder": "asc" + }, + { + "sortBy": "processVariable", + "sortOrder": "desc", + "parameters": { + "variable": "orderId", + "type": "String" + } + } + ] + } + }', + '"example-2": { + "summary": "POST `/task` Request Body 2", + "description": "Logical query: assignee = \\"John Munda\\" AND (name = \\"Approve Invoice\\" OR priority = 5) AND (suspended = false OR taskDefinitionKey = \\"approveInvoice\\")", + "value": { + "assignee": "John Munda", + "withCommentAttachmentInfo": "true", + "orQueries": [ + { + "name": "Approve Invoice", + "priority": 5 + }, + { + "suspended": false, + "taskDefinitionKey": "approveInvoice" + } + ] + } + }', + '"example-3": { + "summary": "POST `/task` Request Body 3", + "description": "Logical query: assignee = \\"John Munda\\" AND (name = \\"Approve Invoice\\" OR priority = 5) AND (suspended = false OR taskDefinitionKey = \\"approveInvoice\\")", + "value": { + "assignee": "John Munda", + "withCommentAttachmentInfo": "true", + "withTaskVariablesInReturn": "true", + "orQueries": [ + { + "name": "Approve Invoice", + "priority": 5 + }, + { + "suspended": false, + "taskDefinitionKey": "approveInvoice" + } + ] + } + }', + '"example-4": { + "summary": "POST `/task` Request Body 4", + "description": "Logical query: assignee = \\"John Munda\\" AND (name = \\"Approve Invoice\\" OR priority = 5) AND (suspended = false OR taskDefinitionKey = \\"approveInvoice\\")", + "value": { + "assignee": "John Munda", + "withCommentAttachmentInfo": "true", + "withTaskLocalVariablesInReturn": "true", + "orQueries": [ + { + "name": "Approve Invoice", + "priority": 5 + }, + { + "suspended": false, + "taskDefinitionKey": "approveInvoice" + } + ] + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "TaskWithAttachmentAndCommentDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 response 1", + "value": [ + { + "id":"anId", + "name":"aName", + "assignee":"anAssignee", + "created":"2013-01-23T13:42:42.453+0200", + "due":"2013-01-23T13:49:42.342+0200", + "followUp:":"2013-01-23T13:44:42.546+0200", + "lastUpdated:":"2013-01-23T13:44:42.546+0200", + "delegationState":"RESOLVED", + "description":"aDescription", + "executionId":"anExecution", + "owner":"anOwner", + "parentTaskId":"aParentId", + "priority":10, + "processDefinitionId":"aProcDefId", + "processInstanceId":"aProcInstId", + "caseDefinitionId":"aCaseDefId", + "caseInstanceId":"aCaseInstId", + "caseExecutionId":"aCaseExecution", + "taskDefinitionKey":"aTaskDefinitionKey", + "suspended": false, + "formKey":"aFormKey", + "camundaFormRef":{ + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId":"aTenantId", + "taskState": "aTaskState" + } + ] + }', + '"example-2": { + "summary": "Status 200 response 2", + "value": [ + { + "id": "349fffa8-6571-11e7-9a44-d6940f5ef88d", + "name": "Approve Invoice", + "assignee": "John Munda", + "created": "2017-07-10T15:10:54.670+0200", + "due": "2017-07-17T15:10:54.670+0200", + "followUp": null, + "lastUpdated": "2017-07-17T15:10:54.670+0200", + "delegationState": null, + "description": "Approve the invoice (or not).", + "executionId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "invoice:1:2c8d8057-6571-11e7-9a44-d6940f5ef88d", + "processInstanceId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "taskDefinitionKey": "approveInvoice", + "caseExecutionId": null, + "caseInstanceId": null, + "caseDefinitionId": null, + "suspended": false, + "formKey": "embedded:app:develop/invoice-forms/approve-invoice.html", + "tenantId": null, + "taskState": "aTaskState", + "attachment":false, + "comment":false + } + ] + }', + '"example-3": { + "summary": "Status 200 response 3", + "value": [ + { + "id": "349fffa8-6571-11e7-9a44-d6940f5ef88d", + "name": "Approve Invoice", + "assignee": "John Munda", + "created": "2017-07-10T15:10:54.670+0200", + "due": "2017-07-17T15:10:54.670+0200", + "followUp": null, + "lastUpdated": "2017-07-17T15:10:54.670+0200", + "delegationState": null, + "description": "Approve the invoice (or not).", + "executionId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "invoice:1:2c8d8057-6571-11e7-9a44-d6940f5ef88d", + "processInstanceId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "taskDefinitionKey": "approveInvoice", + "caseExecutionId": null, + "caseInstanceId": null, + "caseDefinitionId": null, + "suspended": false, + "formKey": "embedded:app:develop/invoice-forms/approve-invoice.html", + "tenantId": null, + "taskState": "aTaskState", + "variables": { + "aVariableKey": { + "type": "String", + "value": "aVariableValue", + "valueInfo": {} + }, + "anotherVariableKey": { + "type": "String", + "value": "anotherVariableValue", + "valueInfo": {} + } + }, + "attachment":false, + "comment":false + } + ] + }', + '"example-4": { + "summary": "Status 200 response 4", + "value": [ + { + "id": "349fffa8-6571-11e7-9a44-d6940f5ef88d", + "name": "Approve Invoice", + "assignee": "John Munda", + "created": "2017-07-10T15:10:54.670+0200", + "due": "2017-07-17T15:10:54.670+0200", + "followUp": null, + "lastUpdated": "2017-07-17T15:10:54.670+0200", + "delegationState": null, + "description": "Approve the invoice (or not).", + "executionId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "invoice:1:2c8d8057-6571-11e7-9a44-d6940f5ef88d", + "processInstanceId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "taskDefinitionKey": "approveInvoice", + "caseExecutionId": null, + "caseInstanceId": null, + "caseDefinitionId": null, + "suspended": false, + "formKey": "embedded:app:develop/invoice-forms/approve-invoice.html", + "tenantId": null, + "taskState": "aTaskState", + "variables": { + "anotherVariableKey": { + "type": "String", + "value": "anotherVariableValue", + "valueInfo": {} + } + }, + "attachment":false, + "comment":false + } + ] + }' + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`, or if an invalid operator for variable + comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/report/candidate-group-count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/report/candidate-group-count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..261d60999b96c733879caf7cfa684c4b68f5a05b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/report/candidate-group-count/get.ftl @@ -0,0 +1,65 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getTaskCountByCandidateGroup" + tag = "Task" + summary = "Get Task Count By Candidate Group" + desc = "Retrieves the number of tasks for each candidate group." + /> + + "responses": { + + <@lib.multiTypeResponse + code = "200" + desc = "Request successful." + types =[ + { + "dto": "TaskCountByCandidateGroupResultDto", + "array": true, + "examples": ['"example-1": { + "value": [ + { + "groupName": null, + "taskCount": 1 + }, + { + "groupName": "aGroupName", + "taskCount": 2 + }, + { + "groupName": "anotherGroupName", + "taskCount": 3 + } + ] + }' + ] + }, + { + "mediaType": "application/csv" + }, + { + "mediaType": "text/csv" + } + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid or mandatory parameters are not supplied. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "If the authenticated user is unauthorized to read the history. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/assignee/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/assignee/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f10a5624cf91a8dfb787bfdfc382a85e5e79ca99 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/assignee/post.ftl @@ -0,0 +1,56 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "setAssignee" + tag = "Task" + summary = "Set Assignee" + desc = "Changes the assignee of a task to a specific user. + + **Note:** The difference with the [Claim Task](${docsUrl}/reference/rest/task/post-claim/) + method is that this method does not check if the task already has a user + assigned to it." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to set the assignee for."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "UserIdDto" + requestDesc = "Provide the id of the user that will be the assignee of the task." + examples = ['"example-1": { + "summary": "Request Body", + "description": "POST `/task/anId/assignee`", + "value": { + "userId": "aUserId" + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Task with given id does not exist or setting the assignee was not successful. + See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/create/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/create/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..498934fa859e23847844b65226ff64219d3e0e3e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/create/post.ftl @@ -0,0 +1,91 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "addAttachment" + tag = "Task Attachment" + summary = "Create" + desc = "Creates an attachment for a task." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to add the attachment to."/> + + ], + + <@lib.requestBody + mediaType = "multipart/form-data" + dto = "MultiFormAttachmentDto" + examples = ['"example-1": { + "summary": "POST /task/aTaskId/attachment/create", + "description": "Post data for a new task attachment.", + "value": "------------------------------925df49a954b + Content-Disposition: form-data; name=\\"url\\" + + http://my-attachment-content-url.de + ------------------------------925df49a954b + Content-Disposition: form-data; name=\\"attachment-name\\" + + attachmentName + ------------------------------925df49a954b + Content-Disposition: form-data; name=\\"attachment-description\\" + + attachmentDescription + ------------------------------925df49a954b + Content-Disposition: form-data; name=\\"attachment-type\\" + + attachmentType + ------------------------------925df49a954b--" + }'] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "AttachmentDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "value": { + "id": "attachmentId", + "name": "attachmentName", + "taskId": "aTaskId", + "description": "attachmentDescription", + "type": "attachmentType", + "url": "http://my-attachment-content-url.de", + "createTime":"2017-02-10T14:33:19.000+0200", + "removalTime":"2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/task/aTaskId/attachment/aTaskAttachmentId", + "rel": "self" + } + ] + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The task does not exists or task id is null. No content or url to remote content exists. See the + [Introduction](/reference/rest/overview/#error-handling) for the error response format." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + last = true + desc = "The history of the engine is disabled. See the [Introduction](/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9a88dbf105d95af953ac9783a70ce4975efc9caa --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/get.ftl @@ -0,0 +1,78 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getAttachments" + tag = "Task Attachment" + summary = "Get List" + desc = "Gets the attachments for a task." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to retrieve the attachments for." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "AttachmentDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /task/aTaskId/attachment", + "value": [ + { + "id": "attachmentId", + "name": "attachmentName", + "taskId": "aTaskId", + "description": "attachmentDescription", + "type": "attachmentType", + "url": "http://my-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "anotherAttachmentId", + "name": "anotherAttachmentName", + "taskId": "aTaskId", + "description": "anotherAttachmentDescription", + "type": "anotherAttachmentType", + "url": "http://my-another-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "yetAnotherAttachmentId", + "name": "yetAnotherAttachmentName", + "taskId": "aTaskId", + "description": "yetAnotherAttachmentDescription", + "type": "yetAnotherAttachmentType", + "url": "http://yet-another-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "No task exists for the given task id. See the [Introduction](/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/{attachmentId}/data/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/{attachmentId}/data/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..96ebd130adc3a1b0b8a5101cc61597d1b1284e35 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/{attachmentId}/data/get.ftl @@ -0,0 +1,64 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getAttachmentData" + tag = "Task Attachment" + summary = "Get (Binary)" + desc = "Retrieves the binary content of a task attachment by task id and attachment id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task." /> + + <@lib.parameter + name = "attachmentId" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the attachment to be retrieved." /> + + ], + + "responses" : { + + "200": { + "description": "Request successful.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For files without any MIME type information, a byte stream is returned." + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information are returned as the saved type. Additionally, for file + responses, the Content-Disposition header will be set." + } + } + } + }, + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "The attachment content for the given task id and attachment id does not exist, or the history of the + engine is disabled. + + See the [Introduction](/reference/rest/overview/#error-handling) for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/{attachmentId}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/{attachmentId}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7af2cdb595f3b35c5516e519011c5915de54d80d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/{attachmentId}/delete.ftl @@ -0,0 +1,52 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "deleteAttachment" + tag = "Task Attachment" + summary = "Delete" + desc = "Removes an attachment from a task by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task." /> + + <@lib.parameter + name = "attachmentId" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the attachment to be removed." /> + + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "The history of the engine is disabled. See the [Introduction](/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "A Task Attachment for the given task id and attachment id does not exist. See the + [Introduction](/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/{attachmentId}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/{attachmentId}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1812ed7899bbaca4c6449a0bc54536558900e721 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/attachment/{attachmentId}/get.ftl @@ -0,0 +1,68 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getAttachment" + tag = "Task Attachment" + summary = "Get" + desc = "Retrieves a task attachment by task id and attachment id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task." /> + + <@lib.parameter + name = "attachmentId" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the attachment to be retrieved." /> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "AttachmentDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /task/aTaskId/attachment/aTaskAttachmentId", + "value": { + "id": "attachmentId", + "name": "attachmentName", + "taskId": "aTaskId", + "description": "attachmentDescription", + "type": "attachmentType", + "url": "http://my-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/task/aTaskId/attachment/aTaskAttachmentId", + "rel": "self" + } + ] + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "The attachment for the given task and attachment id does not exist or the history of the engine is + disabled. + + See the [Introduction](/reference/rest/overview/#error-handling) for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/bpmnError/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/bpmnError/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9de1a97ee032e9379b129c880722b5e6a97bc9fb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/bpmnError/post.ftl @@ -0,0 +1,78 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "handleBpmnError" + tag = "Task" + summary = "Handle BPMN Error" + desc = "Reports a business error in the context of a running task by id. The error code must + be specified to identify the BPMN error handler. See the documentation for + [Reporting Bpmn Error](${docsUrl}/reference/bpmn20/tasks/user-task/#reporting-bpmn-error) + in User Tasks." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task a BPMN error is reported for."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "TaskBpmnErrorDto" + examples = ['"example-1": { + "summary": "Request Body", + "description": "POST `/task/aTaskId/bpmnError`", + "value": { + "errorCode": "bpmn-error-543", + "errorMessage": "anErrorMessage", + "variables": { + "aVariable" : { + "value" : "aStringValue", + "type": "String" + }, + "anotherVariable" : { + "value" : true, + "type": "Boolean" + } + } + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if the `errorCode` or `id` are not present in the request. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "If the authenticated user is unauthorized to update the task. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Returned if the task does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/bpmnEscalation/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/bpmnEscalation/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..633446e4774cb07880d845bfdf0c55632366f0d5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/bpmnEscalation/post.ftl @@ -0,0 +1,78 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "handleEscalation" + tag = "Task" + summary = "Handle BPMN Escalation" + desc = "Reports an escalation in the context of a running task by id. The escalation code must + be specified to identify the escalation handler. See the documentation for + [Reporting Bpmn Escalation](${docsUrl}/reference/bpmn20/tasks/user-task/#reporting-bpmn-escalation) + in User Tasks." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task in which context a BPMN escalation is reported."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "TaskEscalationDto" + examples = ['"example-1": { + "summary": "Request Body", + "description": "POST `/task/aTaskId/bpmnEscalation`", + "value": { + "escalationCode": "bpmn-escalation-432", + "variables": { + "aVariable" : { + "value" : "aStringValue", + "type": "String" + }, + "anotherVariable" : { + "value" : true, + "type": "Boolean" + } + } + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if the escalationCode is not provided in + the request. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "If the authenticated user is unauthorized to update the process instance. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Returned if the task does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/claim/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/claim/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8f189c7cf0c96c9682b9fb6a1ab753478446cd4a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/claim/post.ftl @@ -0,0 +1,56 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "claim" + tag = "Task" + summary = "Claim" + desc = "Claims a task for a specific user. + + **Note:** The difference with the + [Set Assignee](${docsUrl}/reference/rest/task/post-assignee/) + method is that here a check is performed to see if the task already has a user + assigned to it." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to claim."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "UserIdDto" + requestDesc = "Provide the id of the user that claims the task." + examples = ['"example-1": { + "summary": "Request Body", + "description": "POST `/task/anId/claim`", + "value": { + "userId": "aUserId" + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Task with given id does not exist or claiming was not successful. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/create/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/create/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e77e0454374f0e88ba534071bb426b30ba62dc7a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/create/post.ftl @@ -0,0 +1,79 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "createComment" + tag = "Task Comment" + summary = "Create" + desc = "Creates a comment for a task by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to add the comment to." /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "CommentDto" + requestDesc = "**Note:** Only the `message` and `processInstanceId` properties will be used. Every other property passed to this endpoint will be ignored." + examples = ['"example-1": { + "summary": "POST /task/aTaskId/comment/create", + "value": { + "message": "a task comment", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687" + } + }'] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "CommentDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/task/aTaskId/comment/aTaskCommentId", + "rel": "self" + } + ], + "id": "aTaskCommentId", + "userId": "userId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-01-02T21:37:03.887+0200", + "message": "comment message", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The task does not exist or no comment message was submitted. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + last = true + desc = "The history of the engine is disabled. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..233095a0cc307cd4a9200d369d72ed5bb8b8552a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/delete.ftl @@ -0,0 +1,43 @@ +<#macro endpoint_macro docsUrl=""> + { + <@lib.endpointInfo + id = "deleteTaskComments" + tag = "Task Comment" + summary = "Delete Task Comments" + desc = "Deletes all comments of a task by task id." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task for which all comments are to be deleted."/> + + ], + "responses": { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if a given task id is invalid. Orhe history of the engine is disabled. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + <@lib.response + code = "404" + dto = "AuthorizationExceptionDto" + last = true + desc = "The authenticated user is unauthorized to delete this resource. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + } + } + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..1b4438c9620c5cf530c957241c9a8fb39b023277 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/get.ftl @@ -0,0 +1,77 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getComments" + tag = "Task Comment" + summary = "Get List" + desc = "Gets the comments for a task by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to retrieve the comments for." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "CommentDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /task/aTaskId/comment", + "value": [ + { + "id": "commentId", + "userId": "userId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-01-02T21:37:03.764+0200", + "message": "message", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "anotherCommentId", + "userId": "anotherUserId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-02-23T20:37:43.975+0200", + "message": "anotherMessage", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "yetAnotherCommentId", + "userId": "yetAnotherUserId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-04-21T10:15:23.764+0200", + "message": "yetAnotherMessage", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + }' + ] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "No task exists for the given task id. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..871e9c01558cb0a97964900a6e74b4615eaeaffe --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/put.ftl @@ -0,0 +1,58 @@ +<#macro endpoint_macro docsUrl=""> + { + + <@lib.endpointInfo + id = "updateTaskComment" + tag = "Task Comment" + summary = "Update" + desc = "Updates a Comment." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id associated of a task of a comment to be updated."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "CommentDto" + requestDesc = "**Note:** Only the `id` and `message` properties will be used. Every other + property passed to this endpoint will be ignored." + examples = ['"example-1": { + "summary": "PUT /task/aTaskId/comment", + "value": { + "id": "86cd272a-23ea-22e5-8e4a-e5bded20a556", + "message": "a task comment" + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if a given task id or comment id is invalid. Or the history of the engine is disabled. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + <@lib.response + code = "404" + dto = "AuthorizationExceptionDto" + last = true + desc = "The authenticated user is unauthorized to update this resource. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format."/> + + } + } + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/{commentId}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/{commentId}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..65a6045a06699446e555b914fe17d18f7cc53a8d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/{commentId}/delete.ftl @@ -0,0 +1,52 @@ +<#macro endpoint_macro docsUrl=""> + { + + <@lib.endpointInfo + id = "deleteTaskComment" + tag = "Task Comment" + summary = "Delete" + desc = "Removes a comment from a task by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task." /> + + <@lib.parameter + name = "commentId" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the comment to be removed." /> + + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if a given task id or comment id is invalid. Or history of the engine is disabled. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format."/> + + <@lib.response + code = "404" + dto = "AuthorizationExceptionDto" + last = true + desc = "The authenticated user is unauthorized to delete this resource. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format."/> + + } + } + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/{commentId}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/{commentId}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c24a8608679f6817f17b07a2c92462fb159686f5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/{commentId}/get.ftl @@ -0,0 +1,62 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getComment" + tag = "Task Comment" + summary = "Get" + desc = "Retrieves a task comment by task id and comment id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task." /> + + <@lib.parameter + name = "commentId" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the comment to be retrieved." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "CommentDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /task/aTaskId/comment", + "value": { + "id": "aTaskCommentId", + "userId": "userId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-01-02T21:37:03.664+0200", + "message": "comment content", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + }' + ] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "The task or comment with given task and comment id does not exist, or the history of + the engine is disabled. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/complete/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/complete/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..014fa55a4660bd438582d1564d8da97e70419058 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/complete/post.ftl @@ -0,0 +1,110 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "complete" + tag = "Task" + summary = "Complete" + desc = "Completes a task and updates process variables." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to complete."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "CompleteTaskDto" + examples = ['"example-1": { + "summary": "POST `/task/anId/complete`", + "description": "Complete Task with variables in return", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + }, + "withVariablesInReturn": true + } + }', + '"example-2": { + "summary": "POST `/task/anId/complete`", + "description": "Complete Task without variables in return", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + } + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + dto = "VariableValueDto" + additionalProperties = true + desc = "Request successful. The response contains the process variables." + examples = ['"example-1": { + "summary": "POST `/task/anId/complete`", + "description": "Response Body", + "value": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + } + }' + ] /> + + <@lib.response + code = "204" + desc = "Request successful. The response contains no variables." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable value or type is invalid, for example if the value could not be parsed + to an Integer value or the passed variable type is not supported. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "If the task does not exist or the corresponding process instance could not be + resumed successfully. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/delegate/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/delegate/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2df94368fa2ddaf40a13e25033c0afa0f3c18066 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/delegate/post.ftl @@ -0,0 +1,51 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "delegateTask" + tag = "Task" + summary = "Delegate" + desc = "Delegates a task to another user." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to delegate."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "UserIdDto" + requestDesc = "Provide the id of the user that the task should be delegated to." + examples = ['"example-1": { + "summary": "Request Body", + "description": "POST `/task/anId/delegate`", + "value": { + "userId": "aUserId" + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "If the task does not exist or delegation was not successful. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..48e5e8936a2e1bd73b21f6a09bb251a00560afc0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/delete.ftl @@ -0,0 +1,46 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "deleteTask" + tag = "Task" + summary = "Delete" + desc = "Removes a task by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to be removed."/> + + ], + + "responses" : { + + <@lib.response + code = "204" + dto = "TaskDto" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Bad Request. The Task with the given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "The Task with the given id cannot be deleted because it is part of a running process or case instance. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for + the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/deployed-form/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/deployed-form/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f2752e5621d162e90d55d9b87942e1fd33f0dcd8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/deployed-form/get.ftl @@ -0,0 +1,86 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getDeployedForm" + tag = "Task" + summary = "Get Deployed Form" + desc = "Retrieves the deployed form that is referenced from a given task. For further + information please refer to the + [User Guide](${docsUrl}/user-guide/task-forms/#embedded-task-forms)." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to get the deployed form for."/> + + ], + + "responses" : { + + <@lib.multiTypeResponse + code = "200" + desc = "Request successful." + types = [ + { + "mediaType": "application/xhtml+xml", + "examples": ['"example-1": { + "summary": "Status 200 Response", + "description": "Resonse for GET `/task/taskId/deployed-form`", + "value": "
+
+ +
+ +
+ (e.g. "Great Pizza for Everyone Inc.") +
+
+
+
" + }'] + }, + { + "mediaType": "application/json", + "flatType": "string" + } + ] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The form key has wrong format. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "403" + dto = "AuthorizationExceptionDto" + desc = "The deployed form cannot be retrieved due to missing permissions on task resource. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "No deployed form for a given task exists. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/form-variables/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/form-variables/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9327b900719eae1705169d49f78641d464f2b35a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/form-variables/get.ftl @@ -0,0 +1,92 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getFormVariables" + tag = "Task" + summary = "Get Task Form Variables" + desc = "Retrieves the form variables for a task. The form variables take form data specified + on the task into account. If form fields are defined, the variable types and default + values of the form fields are taken into account." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to retrieve the variables for." /> + + <@lib.parameter + name = "variableNames" + location = "query" + type = "string" + desc = "A comma-separated list of variable names. Allows restricting the list of requested + variables to the variable names in the list. It is best practice to restrict the + list of variables to the variables actually required by the form in order to + minimize fetching of data. If the query parameter is ommitted all variables are + fetched. If the query parameter contains non-existent variable names, the variable + names are ignored." /> + + <@lib.parameter + name = "deserializeValues" + location = "query" + type = "boolean" + defaultValue = "true" + last = true + desc = "Determines whether serializable variable values (typically variables that store + custom Java objects) should be deserialized on server side (default true). + + If set to true, a serializable variable will be deserialized on server side and + transformed to JSON using [Jackson's](http://jackson.codehaus.org/) POJO/bean + property introspection feature. Note that this requires the Java classes of the + variable value to be on the REST API's classpath. + + If set to false, a serializable variable will be returned in its serialized format. + For example, a variable that is serialized as XML will be returned as a JSON string + containing XML. + + Note: While true is the default value for reasons of backward compatibility, we + recommend setting this parameter to false when developing web applications that are + independent of the Java process applications deployed to the engine." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + additionalProperties = true + dto = "VariableValueDto" + desc = "Request successful. A JSON object containing a property for each variable returned." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "GET `/task/anId/form-variables`", + "value": { + "amount": { + "type": "integer", + "value": 5, + "valueInfo": {} + }, + "firstName": { + "type": "String", + "value": "Jonny", + "valueInfo": {} + } + + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = " id is null or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/form/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/form/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4ae45393df1fe7d850ff96bb55bdd4700b357bb1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/form/get.ftl @@ -0,0 +1,51 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getForm" + tag = "Task" + summary = "Get Form Key" + desc = "Retrieves the form key for a task. The form key corresponds to the `FormData#formKey` + property in the engine. This key can be used to do task-specific form rendering in + client applications. Additionally, the context path of the containing process + application is returned." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to retrieve the form for." /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "FormDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "GET `/task/anId/form`", + "value": { + "key":"aFormKey", + "contextPath":"http://localhost:8080/my-process-application/" + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Task with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..85b87a24f585b58c8dea4c1bf720d259cc08c9d8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/get.ftl @@ -0,0 +1,189 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getTask" + tag = "Task" + summary = "Get" + desc = "Retrieves a task by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to be retrieved."/> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "TaskWithAttachmentAndCommentDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /task/anId Response", + "value": { + "id":"anId", + "name":"aName", + "assignee":"anAssignee", + "created":"2013-01-23T13:42:42.000+0200", + "due":"2013-01-23T13:49:42.576+0200", + "followUp":"2013-01-23T13:44:42.437+0200", + "delegationState":"RESOLVED", + "description":"aDescription", + "executionId":"anExecution", + "owner":"anOwner", + "parentTaskId":"aParentId", + "priority":42, + "processDefinitionId":"aProcDefId", + "processInstanceId":"aProcInstId", + "caseDefinitionId":"aCaseDefId", + "caseInstanceId":"aCaseInstId", + "caseExecutionId":"aCaseExecution", + "taskDefinitionKey":"aTaskDefinitionKey", + "suspended": false, + "formKey":"aFormKey", + "camundaFormRef":{ + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId":"aTenantId", + "taskState": "aTaskState" + } + }', + '"example-2": { + "summary": "GET /task/anId?withCommentAttachmentInfo=true Response", + "value": [ + { + "id": "349fffa8-6571-11e7-9a44-d6940f5ef88d", + "name": "Approve Invoice", + "assignee": "John Munda", + "created": "2017-07-10T15:10:54.670+0200", + "due": "2017-07-17T15:10:54.670+0200", + "followUp": null, + "lastUpdated": "2017-07-17T15:10:54.670+0200", + "delegationState": null, + "description": "Approve the invoice (or not).", + "executionId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "invoice:1:2c8d8057-6571-11e7-9a44-d6940f5ef88d", + "processInstanceId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "taskDefinitionKey": "approveInvoice", + "caseExecutionId": null, + "caseInstanceId": null, + "caseDefinitionId": null, + "suspended": false, + "formKey": "embedded:app:develop/invoice-forms/approve-invoice.html", + "tenantId": null, + "taskState": "aTaskState", + "attachment":false, + "comment":false + } + ] + }', + '"example-3": { + "summary": "GET /task/anId?withCommentAttachmentInfo=true&withTaskVariablesInReturn=true + Response", + "value": [ + { + "id": "349fffa8-6571-11e7-9a44-d6940f5ef88d", + "name": "Approve Invoice", + "assignee": "John Munda", + "created": "2017-07-10T15:10:54.670+0200", + "due": "2017-07-17T15:10:54.670+0200", + "followUp": null, + "lastUpdated": "2017-07-17T15:10:54.670+0200", + "delegationState": null, + "description": "Approve the invoice (or not).", + "executionId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "invoice:1:2c8d8057-6571-11e7-9a44-d6940f5ef88d", + "processInstanceId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "taskDefinitionKey": "approveInvoice", + "caseExecutionId": null, + "caseInstanceId": null, + "caseDefinitionId": null, + "suspended": false, + "formKey": "embedded:app:develop/invoice-forms/approve-invoice.html", + "tenantId": null, + "taskState": "aTaskState", + "variables": { + "aVariableKey": { + "type": "String", + "value": "aVariableValue", + "valueInfo": {} + }, + "anotherVariableKey": { + "type": "String", + "value": "anotherVariableValue", + "valueInfo": {} + } + }, + "attachment":false, + "comment":false + } + ] + }', + '"example-4": { + "summary": "GET /task/anId?withCommentAttachmentInfo=true&withTaskLocalVariablesInReturn=true + Response", + "value": [ + { + "id": "349fffa8-6571-11e7-9a44-d6940f5ef88d", + "name": "Approve Invoice", + "assignee": "John Munda", + "created": "2017-07-10T15:10:54.670+0200", + "due": "2017-07-17T15:10:54.670+0200", + "followUp": null, + "lastUpdated": "2017-07-17T15:10:54.670+0200", + "delegationState": null, + "description": "Approve the invoice (or not).", + "executionId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "invoice:1:2c8d8057-6571-11e7-9a44-d6940f5ef88d", + "processInstanceId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "taskDefinitionKey": "approveInvoice", + "caseExecutionId": null, + "caseInstanceId": null, + "caseDefinitionId": null, + "suspended": false, + "formKey": "embedded:app:develop/invoice-forms/approve-invoice.html", + "tenantId": null, + "taskState": "aTaskState", + "variables": { + "anotherVariableKey": { + "type": "String", + "value": "anotherVariableValue", + "valueInfo": {} + } + }, + "attachment":false, + "comment":false + } + ] + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Task with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/identity-links/delete/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/identity-links/delete/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c802c1b3d035242690384fcda89e76674668fdab --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/identity-links/delete/post.ftl @@ -0,0 +1,50 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "deleteIdentityLink" + tag = "Task Identity Link" + summary = "Delete" + desc = "Removes an identity link from a task by id" /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to remove a link from."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "IdentityLinkDto" + examples = ['"example-1": { + "summary": "POST `/task/anId/identityLinks/delete`", + "value": { + "groupId": "theOldGroupId", + "type": "candidate" + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Task with given id does not exist. + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for + the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/identity-links/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/identity-links/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..8bca48f0304a8794d02da6de50a34863a5455c58 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/identity-links/get.ftl @@ -0,0 +1,66 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getIdentityLinks" + tag = "Task Identity Link" + summary = "Get List" + desc = "Gets the identity links for a task by id, which are the users and groups that are in + *some* relation to it (including assignee and owner)." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to retrieve the identity links for."/> + + <@lib.parameter + name = "type" + location = "query" + type = "string" + last = true + desc = "Filter by the type of links to include."/> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "IdentityLinkDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET /task/anId/identityLinks", + "value": [ + { + "userId": "userId", + "groupId": null, + "type": "assignee" + }, + { + "userId": null, + "groupId": "groupId1", + "type": "candidate" + }, + { + "userId": null, + "groupId": "groupId2", + "type": "candidate" + } + ] + }']/> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Task with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/identity-links/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/identity-links/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a7fa5fb2342587793b596bcbb91555384081b7ea --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/identity-links/post.ftl @@ -0,0 +1,50 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "addIdentityLink" + tag = "Task Identity Link" + summary = "Add" + desc = "Adds an identity link to a task by id. Can be used to link any user or group to a task + and specify a relation." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to add a link to."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "IdentityLinkDto" + examples = ['"example-1": { + "summary": "POST `/task/anId/identity-links`", + "value": { + "groupId": "aNewGroupId", + "type": "candidate" + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Task with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..113fc3883b1ccbe1d63cc68f54e39a56e5daf24a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/get.ftl @@ -0,0 +1,90 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getTaskLocalVariables" + tag = "Task Local Variable" + summary = "Get Local Task Variables" + desc = "Retrieves all variables of a given task by id." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to retrieve the variables from."/> + + <@lib.parameter + name = "deserializeValues" + location = "query" + type = "boolean" + defaultValue = "true" + last = true + desc = "Determines whether serializable variable values (typically variables that store custom Java objects) + should be deserialized on the server side (default `true`). + + If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON + using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. + Note that this requires the Java classes of the variable value to be on the REST API's classpath. + + If set to `false`, a serializable variable will be returned in its serialized format. + For example, a variable that is serialized as XML will be returned as a JSON string containing XML. + + **Note:** While `true` is the default value for reasons of backward compatibility, we recommend setting this + parameter to `false` when developing web applications that are independent of the Java process + applications deployed to the engine." /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "VariableValueDto" + additionalProperties = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/task/aTaskId/variables`", + "value": { + "aVariableKey": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }', + '"example-2": { + "summary": "GET `/task/aTaskId/variables?deserializeValue=false`", + "value": { + "aVariableKey": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }' + ] /> + + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Task id is `null` or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d55edf0322ff734610281bef43dbd64b37d3ef79 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/post.ftl @@ -0,0 +1,72 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "modifyTaskLocalVariables" + tag = "Task Local Variable" + summary = "Update/Delete Local Task Variables" + desc = "Updates or deletes the variables in the context of a task. Updates precede deletions. So, if a variable is + updated AND deleted, the deletion overrides the update." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to set variables for."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "PatchVariablesDto" + examples = ['"example-1": { + "summary": "POST `/task/aTaskId/variables`", + "description": "Status 204 Response: No content.", + "value": { + "modifications": { + "aVariable": { + "value": "aValue", + "type": "String" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + }, + "deletions": [ + "aThirdVariable", + "FourthVariable" + ] + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable value or type is invalid. For example the value could not be parsed to an `Integer` value + or the passed variable type is not supported. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Update or delete could not be executed because the task is `null` or does not exist.. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/data/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/data/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..c5f10a15ed10c4028aa1fdcc00b8fa956dc887b2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/data/get.ftl @@ -0,0 +1,84 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getTaskLocalVariableBinary" + tag = "Task Local Variable" + summary = "Get Local Task Variable (Binary)" + desc = "Retrieves a binary variable from the context of a given task by id. Applicable for byte array and file + variables." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to retrieve the variable for."/> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + last = true + desc = "The name of the variable to retrieve."/> + + ], + + "responses": { + "200": { + "description": "Request successful. + For binary variables or files without any MIME type information, a byte stream is returned. + File variables with MIME type information are returned as the saved type. + Additionally, for file variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/variables/aVarName/data", + "value": "binary variable: Status 200. Content-Type: application/octet-stream" + } + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type. + Additionally, for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/variables/aVarName/data", + "value": "file variable: Status 200. Content-Type: text/plain; charset=UTF-8. Content-Disposition: attachment; filename=\"someFile.txt\"" + } + } + } + } + }, + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Variable with given id exists but is not a binary variable.See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Variable with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/data/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/data/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3d13427ca06dd554663ee54f71c7e2e72fa2ced7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/data/post.ftl @@ -0,0 +1,122 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "setBinaryTaskLocalVariable" + tag = "Task Local Variable" + summary = "Update Local Task Variable (Binary)" + desc = "Sets the serialized value for a binary variable or the binary value for a file variable." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to retrieve the variable for."/> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + last = true + desc = "The name of the variable to retrieve."/> + + ], + + <@lib.requestBody + mediaType = "multipart/form-data" + dto = "MultiFormVariableBinaryDto" + requestDesc = "For binary variables a multipart form submit with the following parts:" + examples = [ '"example-1": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (1)", + "description": "Post binary content of a byte array variable.", + "value": " + ``` + ------------------------------354ddb6baeff + Content-Disposition: form-data; name=\\"data\\"; filename=\\"image.png\\" + Content-Type: application/octet-stream + Content-Transfer-Encoding: binary + + <> + ------------------------------354ddb6baeff + Content-Disposition: form-data; name=\\"valueType\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + Bytes + ------------------------------1e838f8f632a-- + ``` + " + }', + '"example-2": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (2)", + "description": "Post the JSON serialization of a Java Class (**deprecated**).", + "value": " + ``` + ------------------------------1e838f8f632a + Content-Disposition: form-data; name=\\"type\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + java.util.ArrayList + ------------------------------1e838f8f632a + Content-Disposition: form-data; name=\\"data\\" + Content-Type: application/json; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + [\\"foo\\",\\"bar\\"] + ------------------------------1e838f8f632a-- + ``` + " + }', + '"example-3": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (3)", + "description": "Post a text file.", + "value": " + ``` + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y + Content-Disposition: form-data; name=\\"data\\"; filename=\\"myFile.txt\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: binary + + <> + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y + Content-Disposition: form-data; name=\\"valueType\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + File + ------------------------------1e838f8f632a-- + ``` + " + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable value or type is invalid, for example if no filename is set. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Variable name is `null`, or the Task id is `null` or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..94715ce86c3eb908276d9fbeb4aa8b6e820d0bd4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/delete.ftl @@ -0,0 +1,46 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "deleteTaskLocalVariable" + tag = "Task Local Variable" + summary = "Delete Local Task Variable" + desc = "Removes a local variable from a task by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to delete the variable from."/> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + last = true + desc = "The name of the variable to be removed."/> + + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Task id is `null` or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0cb5969ff7ca4d30f66dcfa679f33ef024ab1b8e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/get.ftl @@ -0,0 +1,98 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getTaskLocalVariable" + tag = "Task Local Variable" + summary = "Get Local Task Variable" + desc = "Retrieves a variable from the context of a given task by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to retrieve the variable from."/> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + desc = "The name of the variable to get"/> + + <@lib.parameter + name = "deserializeValue" + location = "query" + type = "boolean" + defaultValue = "true" + last = true + desc = "Determines whether serializable variable values (typically variables that store custom Java objects) + should be deserialized on the server side (default `true`). + + If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON + using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. + Note that this requires the Java classes of the variable value to be on the REST API's classpath. + + If set to `false`, a serializable variable will be returned in its serialized format. + For example, a variable that is serialized as XML will be returned as a JSON string containing XML. + + Note: While `true` is the default value for reasons of backward compatibility, we recommend setting this + parameter to `false` when developing web applications that are independent of the Java process + applications deployed to the engine."/> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "VariableValueDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/task/aTaskId/variables/myObject123`", + "value": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }', + '"example-2": { + "summary": "GET `/task/aTaskId/variables/myObject123?deserializeValue=false`", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }' + ] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Variable with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Task id is `null` or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..db1f85cb856abd27d46d2949828a69f08e51e9c3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/localVariables/{varName}/put.ftl @@ -0,0 +1,79 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "putTaskLocalVariable" + tag = "Task Local Variable" + summary = "Update Local Task Variable" + desc = "Sets a variable in the context of a given task." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to set the variable for." /> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + last = true + desc = "The name of the variable to set." /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "VariableValueDto" + examples = [ '"example-1": { + "summary": "PUT /task/aTaskId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "someValue", + "type": "String" + } + }', + '"example-2": { + "summary": "PUT /task/aTaskId/variables/aVarName", + "description": "An Object Variable PUT Request. Status 204. No content.", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable name, value or type is invalid, for example if the value could not be parsed to an `Integer` + value or the passed variable type is not supported or a new transient variable has the name that is + already persisted. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "The variable name is `null`, or the Task id is `null` or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..abc0c855a6cc333ac6078729f37fb5ad0ec26c95 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/put.ftl @@ -0,0 +1,64 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "updateTask" + tag = "Task" + summary = "Update" + desc = "Updates a task." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to be updated."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "TaskDto" + examples = ['"example-1": { + "summary": "PUT /task/aTaskId/ Response", + "value": { + "name": "My Task", + "description": "This have to be done very urgent", + "priority" : 30, + "assignee" : "peter", + "owner" : "mary", + "delegationState" : "PENDING", + "due" : "2014-08-30T10:00:00.000+0200", + "followUp" : "2014-08-25T10:00:00.000+0200", + "parentTaskId" : "aParentTaskId", + "caseInstanceId" : "aCaseInstanceId", + "tenantId" : "tenantId" + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if a not valid `delegationState` is supplied. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "If the corresponding task cannot be found." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/rendered-form/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/rendered-form/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a187938569671358aae6f4ca53533d0333c1f6bd --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/rendered-form/get.ftl @@ -0,0 +1,61 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getRenderedForm" + tag = "Task" + summary = "Get Rendered Form" + desc = "Retrieves the rendered form for a task. This method can be used to get the HTML + rendering of a + [Generated Task Form](${docsUrl}/user-guide/task-forms/#generated-task-forms)." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to get the rendered form for."/> + + ], + + "responses" : { + + <@lib.response + code = "200" + mediaType = "application/xhtml+xml" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "A `/task/anId/rendered-form` HTML GET response body providing the rendered (generated) form content.", + "value": "
+
+ +
+ +
+
+
+ +
+ +
+
+
" + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "The task with the given id does not exist or has no form field metadata defined for + this task. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/resolve/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/resolve/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ec2d01424dabcb315533aeac36befedc458441ed --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/resolve/post.ftl @@ -0,0 +1,73 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "resolve" + tag = "Task" + summary = "Resolve" + desc = "Resolves a task and updates execution variables. + + Resolving a task marks that the assignee is done with the task delegated to them, and + that it can be sent back to the owner. Can only be executed when the task has been + delegated. The assignee will be set to the owner, who performed the delegation." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to resolve."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "CompleteTaskDto" + examples = ['"example-1": { + "summary": "Request Body", + "description": "POST `/task/anId/resolve`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + } + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable value or type is invalid, for example if the value could not be parsed + to an Integer value or the passed variable type is not supported. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "If the task does not exist or the corresponding process instance could not be + resumed successfully. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/submit-form/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/submit-form/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d4241a21339ca61ab732fce28b670083dbf41cef --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/submit-form/post.ftl @@ -0,0 +1,133 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "submit" + tag = "Task" + summary = "Submit Form" + desc = "Completes a task and updates process variables using a form submit. There are two + difference between this method and the `complete` method: + + * If the task is in state `PENDING` - i.e., has been delegated before, it is not + completed but resolved. Otherwise it will be completed. + * If the task has Form Field Metadata defined, the process engine will perform backend + validation for any form fields which have validators defined. + See the + [Generated Task Forms](${docsUrl}/user-guide/task-forms/_index/#generated-task-forms) + section of the [User Guide](${docsUrl}/user-guide/) for more information." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to submit the form for."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "CompleteTaskDto" + examples = ['"example-1": { + "summary": "Request Body 1", + "description": "POST `/task/anId/submit-form`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + }, + "aFileVariable": { + "value": "TG9yZW0gaXBzdW0=", + "type": "File", + "valueInfo": { + "filename": "myFile.txt" + } + } + } + } + }', + '"example-2": { + "summary": "Request Body 2", + "description": "POST `/task/anId/complete`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + }, + "withVariablesInReturn": true + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "200" + additionalProperties = true + dto = "VariableValueDto" + desc = "Request successful. The response contains the process variables." + examples = ['"example-1": { + "summary": "Response Body", + "description": "Response of a submitted task form with variables in return", + "value": { + "aVariable": { + "value": "aStringValue", + "type": "String", + "valueInfo": {} + }, + "anotherVariable": { + "value": 42, + "type": "Integer", + "valueInfo": {} + }, + "aThirdVariable": { + "value": true, + "type": "Boolean", + "valueInfo": {} + } + } + }' + ]/> + + <@lib.response + code = "204" + desc = "Request successful. The response contains no variables." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable value or type is invalid, for example if the value could not be parsed to an Integer value + or the passed variable type is not supported. + + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for + the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "If the task does not exist or the corresponding process instance could not be resumed successfully. + + See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) for + the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/unclaim/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/unclaim/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..54a6c64e180d3eb6597cbc193aaa8f224618c865 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/unclaim/post.ftl @@ -0,0 +1,42 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "unclaim" + tag = "Task" + summary = "Unclaim" + desc = "Resets a task's assignee. If successful, the task is not assigned to a user." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to unclaim."/> + + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." + examples = ['"example-1": { + "value": "POST `/task/anId/unclaim`" + }']/> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "The Task with the given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7a8f9d00fef89bb893b3801a707a3e04e06b89be --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/get.ftl @@ -0,0 +1,90 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getTaskVariables" + tag = "Task Variable" + summary = "Get Task Variables" + desc = "Retrieves all variables visible from the task. A variable is visible from the task if it is a local task + variable or declared in a parent scope of the task. See documentation on + [visiblity of variables](${docsUrl}/user-guide/process-engine/variables/)." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to retrieve the variables from."/> + + <@lib.parameter + name = "deserializeValues" + location = "query" + type = "boolean" + defaultValue = "true" + last = true + desc = "Determines whether serializable variable values (typically variables that store custom Java objects) + should be deserialized on the server side (default `true`). + If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON + using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. + Note that this requires the Java classes of the variable value to be on the REST API's classpath. + + If set to `false`, a serializable variable will be returned in its serialized format. + For example, a variable that is serialized as XML will be returned as a JSON string containing XML. + + Note: While `true` is the default value for reasons of backward compatibility, we recommend setting this + parameter to `false` when developing web applications that are independent of the Java process + applications deployed to the engine." /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "VariableValueDto" + additionalProperties = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/task/aTaskId/variables`", + "value": { + "aVariableKey": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }', + '"example-2": { + "summary": "GET `/task/aTaskId/variables?deserializeValue=false`", + "value": { + "aVariableKey": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }' + ] /> + + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Task id is `null` or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..4455ab4fab0dbeb277c77127bb000216bcd8e966 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/post.ftl @@ -0,0 +1,74 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "modifyTaskVariables" + tag = "Task Variable" + summary = "Update/Delete Task Variables" + desc = "Updates or deletes the variables visible from the task. Updates precede deletions. So, if a variable is + updated AND deleted, the deletion overrides the update. A variable is visible from the task if it is a + local task variable or declared in a parent scope of the task. See documentation on + [visiblity of variables](${docsUrl}/user-guide/process-engine/variables/)." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the task to set variables for."/> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "PatchVariablesDto" + examples = ['"example-1": { + "summary": "POST `/task/aTaskId/variables`", + "description": "Status 204 Response: No content.", + "value": { + "modifications": { + "aVariable": { + "value": "aValue", + "type": "String" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + }, + "deletions": [ + "aThirdVariable", + "FourthVariable" + ] + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable value or type is invalid. For example the value could not be parsed to an `Integer` value + or the passed variable type is not supported. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Update or delete could not be executed because the task is `null` or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/data/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/data/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e019b32e4109271fd27ee3dc3e84442c26d60544 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/data/get.ftl @@ -0,0 +1,86 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getTaskVariableBinary" + tag = "Task Variable" + summary = "Get Task Variable (Binary)" + desc = "Retrieves a binary variable from the context of a given task. Applicable for byte array and file + variables. The variable must be visible from the task. It is visible from the task if it is a local task + variable or declared in a parent scope of the task. See documentation on + [visiblity of variables](${docsUrl}/user-guide/process-engine/variables/)." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to retrieve the variable for."/> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + last = true + desc = "The name of the variable to retrieve."/> + + ], + + "responses": { + "200": { + "description": "Request successful. + For binary variables or files without any MIME type information, a byte stream is returned. + File variables with MIME type information are returned as the saved type. + Additionally, for file variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/variables/aVarName/data", + "value": "binary variable: Status 200. Content-Type: application/octet-stream" + } + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type. + Additionally, for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/variables/aVarName/data", + "value": "file variable: Status 200. Content-Type: text/plain; charset=UTF-8. Content-Disposition: attachment; filename=\"someFile.txt\"" + } + } + } + } + }, + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Variable with given id exists but is not a binary variable.See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Variable with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/data/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/data/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ad65135b80060befff2b48fb34742a1946a32f99 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/data/post.ftl @@ -0,0 +1,125 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "setBinaryTaskVariable" + tag = "Task Variable" + summary = "Update Task Variable (Binary)" + desc = "Sets the serialized value for a binary variable or the binary value for a file variable visible from the + task. A variable is visible from the task if it is a local task variable or declared in a parent scope of + the task. See documentation on + [visiblity of variables](${docsUrl}/user-guide/process-engine/variables/)." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to retrieve the variable for."/> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + last = true + desc = "The name of the variable to retrieve."/> + + ], + + <@lib.requestBody + mediaType = "multipart/form-data" + dto = "MultiFormVariableBinaryDto" + requestDesc = "For binary variables a multipart form submit with the following parts:" + examples = [ '"example-1": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (1)", + "description": "Post binary content of a byte array variable.", + "value": " + ``` + ------------------------------354ddb6baeff + Content-Disposition: form-data; name=\\"data\\"; filename=\\"image.png\\" + Content-Type: application/octet-stream + Content-Transfer-Encoding: binary + + <> + ------------------------------354ddb6baeff + Content-Disposition: form-data; name=\\"valueType\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + Bytes + ------------------------------1e838f8f632a-- + ``` + " + }', + '"example-2": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (2)", + "description": "Post the JSON serialization of a Java Class (**deprecated**).", + "value": " + ``` + ------------------------------1e838f8f632a + Content-Disposition: form-data; name=\\"type\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + java.util.ArrayList + ------------------------------1e838f8f632a + Content-Disposition: form-data; name=\\"data\\" + Content-Type: application/json; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + [\\"foo\\",\\"bar\\"] + ------------------------------1e838f8f632a-- + ``` + " + }', + '"example-3": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (3)", + "description": "Post a text file.", + "value": " + ``` + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y + Content-Disposition: form-data; name=\\"data\\"; filename=\\"myFile.txt\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: binary + + <> + ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y + Content-Disposition: form-data; name=\\"valueType\\" + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 8bit + + File + ------------------------------1e838f8f632a-- + ``` + " + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable value or type is invalid, for example if no filename is set. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Variable name is `null`, or the Task id is `null` or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..aa9b2ce5019f235244804789aada659ff480c42c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/delete.ftl @@ -0,0 +1,48 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "deleteTaskVariable" + tag = "Task Variable" + summary = "Delete Task Variable" + desc = "Removes a variable that is visible to a task. A variable is visible to a task if it is a local task + variable or declared in a parent scope of the task. See documentation on + [visiblity of variables](${docsUrl}/user-guide/process-engine/variables/)." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to delete the variable from."/> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + last = true + desc = "The name of the variable to be removed."/> + + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Task id is null or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..3423be4932f2488c856314459a6f76e5db6f5d3f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/get.ftl @@ -0,0 +1,101 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getTaskVariable" + tag = "Task Variable" + summary = "Get Task Variable" + desc = "Retrieves a variable from the context of a given task. + The variable must be visible from the task. It is visible from the task if it is a local task variable or + declared in a parent scope of the task. See documentation on + [visiblity of variables](${docsUrl}/user-guide/process-engine/variables/)." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to retrieve the variable from."/> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + desc = "The name of the variable to get."/> + + <@lib.parameter + name = "deserializeValue" + location = "query" + type = "boolean" + defaultValue = "true" + last = true + desc = "Determines whether serializable variable values (typically variables that store custom Java objects) + should be deserialized on the server side (default `true`). + + If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON + using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. + Note that this requires the Java classes of the variable value to be on the REST API's classpath. + + If set to `false`, a serializable variable will be returned in its serialized format. + For example, a variable that is serialized as XML will be returned as a JSON string containing XML. + + Note: While `true` is the default value for reasons of backward compatibility, we recommend setting this + parameter to `false` when developing web applications that are independent of the Java process + applications deployed to the engine."/> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "VariableValueDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/task/aTaskId/variables/myObject123`", + "value": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }', + '"example-2": { + "summary": "GET `/task/aTaskId/variables/myObject123?deserializeValue=false`", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }' + ] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Variable with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "Task id is `null` or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..e70affd07186ab2e9920188646d1f3a0bf2a7c50 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/variables/{varName}/put.ftl @@ -0,0 +1,84 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "putTaskVariable" + tag = "Task Variable" + summary = "Update Task Variable" + desc = "Updates a process variable that is visible from the Task scope. A variable is visible from the task if it + is a local task variable, or declared in a parent scope of the task. See the documentation on + [variable scopes and visibility](${docsUrl}/user-guide/process-engine/variables#variable-scopes-and-variable-visibility). + + **Note**: If a variable doesn't exist, the variable is created in the top-most scope + visible from the task." /> + + "parameters": [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the task to set the variable for." /> + + <@lib.parameter + name = "varName" + location = "path" + type = "string" + required = true + last = true + desc = "The name of the variable to set." /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "VariableValueDto" + examples = [ '"example-1": { + "summary": "PUT /task/aTaskId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "someValue", + "type": "String" + } + }', + '"example-2": { + "summary": "PUT /task/aTaskId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }' + ] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "The variable name, value or type is invalid, for example if the value could not be parsed to an `Integer` + value or the passed variable type is not supported or a new transient variable has the name that is + already persisted. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + last = true + desc = "The variable name is `null`, or the Task id is `null` or does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/telemetry/configuration/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/telemetry/configuration/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..997792abe56598dafaab1c92325f61c13ce9324d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/telemetry/configuration/get.ftl @@ -0,0 +1,35 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getTelemetryConfiguration" + tag = "Telemetry" + summary = "Fetch Telemetry Configuration" + desc = "Fetches Telemetry Configuration." /> + + "parameters" : [], + + "responses" : { + + <@lib.response + code = "200" + dto = "TelemetryConfigurationDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": { + "enableTelemetry": true + } + }'] /> + + <@lib.response + code = "401" + dto = "ExceptionDto" + last = true + desc = "If the user who perform the operation is not a camunda-admin user." /> + + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/telemetry/configuration/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/telemetry/configuration/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f90024201574a88d4bb12907a5568e971a01b121 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/telemetry/configuration/post.ftl @@ -0,0 +1,37 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "configureTelemetry" + tag = "Telemetry" + deprecated = true + summary = "Configure Telemetry" + desc = "Deprecated: The sending telemetry feature is removed. Please remove the endpoint usages as they are no longer needed." /> + + "parameters" : [], + + <@lib.requestBody + mediaType = "application/json" + dto = "TelemetryConfigurationDto" + examples = ['"examle-1": { + "summary": "POST /telemetry/configuration", + "description": "The content of the Request Body", + "value": { + "enableTelemetry": true + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "401" + dto = "ExceptionDto" + last = true + desc = "If the user who perform the operation is not a camunda-admin user." /> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/telemetry/data/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/telemetry/data/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..42e706a35f83eaf526a7ba45a59772309b761a90 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/telemetry/data/get.ftl @@ -0,0 +1,78 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getTelemetryData" + tag = "Telemetry" + deprecated = true + summary = "Fetch Telemetry Data" + desc = "Deprecated: Always returns false. The sending telemetry feature is removed. Please remove the endpoint usages as they are no longer needed." /> + + "parameters" : [], + + "responses" : { + + <@lib.response + code = "200" + dto = "TelemetryDataDto" + desc = "Request successful." + last = true + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": { + "installation": "8343cc7a-8ad1-42d4-97d2-43452c0bdfa3", + "product": { + "name": "Camunda BPM Runtime", + "version": "7.14.0", + "edition": "enterprise", + "internals": { + "database": { + "vendor": "h2", + "version": "1.4.190 (2015-10-11)" + }, + "application-server": { + "vendor": "Wildfly", + "version": "WildFly Full 19.0.0.Final (WildFly Core 11.0.0.Final) - 2.0.30.Final" + }, + "jdk": { + "version": "14.0.2", + "vendor": "Oracle Corporation" + }, + "commands": { + "StartProcessInstanceCmd": {"count": 40}, + "FetchExternalTasksCmd": {"count": 100} + }, + "metrics": { + "process-instances": { "count": 936 }, + "flow-node-instances": { "count": 6125 }, + "decision-instances": { "count": 140 }, + "executed-decision-elements": { "count": 732 } + }, + "data-collection-start-date": "2022-11-320T15:53:20.386+0100", + "camunda-integration": [ + "spring-boot-starter", + "camunda-bpm-run" + ], + "license-key": { + "customer": "customer name", + "type": "UNIFIED", + "valid-until": "2022-09-30", + "unlimited": false, + "features": { + "camundaBPM": "true" + }, + "raw": "customer=customer name;expiryDate=2022-09-30;camundaBPM=true;optimize=false;cawemo=false" + }, + "webapps": [ + "cockpit", + "admin" + ] + } + } + } + }'] /> + + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..767d048e30b0baa57bac4a121f6b622e998d3f88 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/count/get.ftl @@ -0,0 +1,48 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/get-query-count/index.html --> +{ + <@lib.endpointInfo + id = "getTenantCount" + tag = "Tenant" + summary = "Get Tenant Count" + desc = "Query for tenants using a list of parameters and retrieves the count." + /> + + "parameters" : [ + + <#include "/lib/commons/tenant-query-params.ftl" > + + <@lib.parameters + object = params + last = true + /> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/tenant/count?name=tenantOne`", + "value": { + "count": 1 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/create/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/create/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a9d5eb8c93a8df371861aa0be227ad658e78e33e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/create/post.ftl @@ -0,0 +1,48 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/post-create/index.html --> +{ + <@lib.endpointInfo + id = "createTenant" + tag = "Tenant" + summary = "Create Tenant" + desc = "Create a new tenant." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "TenantDto" + examples = ['"example-1": { + "summary": "POST `/tenant/create`", + "value": { + "id": "tenantOne", + "name": "Tenant One" + } + }'] + /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "Identity service is read-only." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The tenant could not be created due to an internal server error. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..91afc9f15adca77ef74dae99c033be495587d319 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/get.ftl @@ -0,0 +1,61 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/get-query/index.html --> +{ + <@lib.endpointInfo + id = "queryTenants" + tag = "Tenant" + summary = "Get Tenants" + desc = "Query for a list of tenants using a list of parameters. The size of the result set + can be retrieved by using the [Get Tenant + Count](${docsUrl}/reference/rest/tenant/get-query-count/) method." + /> + + "parameters" : [ + + <#include "/lib/commons/tenant-query-params.ftl" > + + <#assign last = false > + + <#include "/lib/commons/sort-params.ftl" > + + <#include "/lib/commons/pagination-params.ftl" > + + <@lib.parameters + object = params + last = true + /> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "TenantDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/tenant?name=tenantOne`", + "value": [ + { + "id": "tenantOne", + "name": "Tenant One" + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy` is specified. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/options.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/options.ftl new file mode 100644 index 0000000000000000000000000000000000000000..2c3135cb81e8ec3a282ad92e0c1a06246276557c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/options.ftl @@ -0,0 +1,52 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/options/index.html --> +{ + <@lib.endpointInfo + id = "availableTenantResourceOperations" + tag = "Tenant" + summary = "Tenant Resource Options" + desc = "The `/tenant` resource supports two custom OPTIONS requests, this one for the resource + as such and one for individual tenant instances. The OPTIONS request + allows checking for the set of available operations that the currently + authenticated user can perform on the `/tenant` resource. If the user + can perform an operation or not may depend on various things, + including the users authorizations to interact with this resource and + the internal configuration of the process engine." + /> + + "responses" : { + + <@lib.response + code = "200" + dto = "ResourceOptionsDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/tenant`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/tenant", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/tenant/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/tenant/create", + "rel": "create" + } + ] + } + }'] + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..64b53a25d6b6d199669ebfb5fc5a3bd849c51840 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/delete.ftl @@ -0,0 +1,49 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/delete/index.html --> +{ + <@lib.endpointInfo + id = "deleteTenant" + tag = "Tenant" + summary = "Delete Tenant" + desc = "Deletes a tenant by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant to be deleted." + last = true + /> + + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "Identity service is read-only." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Tenant cannot be found. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a6149456f74059668dbbc8a46713700675d9530a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/get.ftl @@ -0,0 +1,52 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/get/index.html --> +{ + <@lib.endpointInfo + id = "getTenant" + tag = "Tenant" + summary = "Get Tenant" + desc = "Retrieves a tenant." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant to be retrieved." + last = true + /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "TenantDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/tenant/tenantOne`", + "value": { + "id": "tenantOne", + "name": "Tenant One" + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Tenant with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/group-members/options.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/group-members/options.ftl new file mode 100644 index 0000000000000000000000000000000000000000..511cfca6d6c82bd71d879c6c07f0ef9d09129f71 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/group-members/options.ftl @@ -0,0 +1,58 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/group-members/options/index.html --> +{ + <@lib.endpointInfo + id = "availableTenantGroupMembersOperations" + tag = "Tenant" + summary = "Tenant Group Membership Resource Options" + desc = "The OPTIONS request allows checking for the set of available operations that the + currently authenticated user can perform on the resource. If the user + can perform an operation or not may depend on various things, + including the users authorizations to interact with this resource and + the internal configuration of the process engine." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant" + last = true + /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ResourceOptionsDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/tenant/tenantOne/group-members`", + "value": { + "links": [ + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne/group-members", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne/group-members", + "rel": "create" + } + ] + } + }'] + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/group-members/{groupId}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/group-members/{groupId}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7e0fcf7206b3aacf67fc8a04458a7a312bab509c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/group-members/{groupId}/delete.ftl @@ -0,0 +1,58 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/group-members/put/index.html --> +{ + <@lib.endpointInfo + id = "deleteGroupMembership" + tag = "Tenant" + summary = "Create Tenant Group Membership" + desc = "Creates a membership between a tenant and a group." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant." + /> + + <@lib.parameter + name = "groupId" + location = "path" + type = "string" + required = true + desc = "The id of the group." + last = true + /> + + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "Identity service is read-only." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "In case an internal error occurs. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/group-members/{groupId}/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/group-members/{groupId}/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..21a2a8c6a7dd2fa1d18879ede911aff53b69b534 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/group-members/{groupId}/put.ftl @@ -0,0 +1,58 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/group-members/put/index.html --> +{ + <@lib.endpointInfo + id = "createGroupMembership" + tag = "Tenant" + summary = "Create Tenant Group Membership" + desc = "Creates a membership between a tenant and a group." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant." + /> + + <@lib.parameter + name = "groupId" + location = "path" + type = "string" + required = true + desc = "The id of the group." + last = true + /> + + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "Identity service is read-only." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "In case an internal error occurs. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/options.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/options.ftl new file mode 100644 index 0000000000000000000000000000000000000000..61835b76edb87120c0680ec2b08fd183d3f95d63 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/options.ftl @@ -0,0 +1,63 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/options/index.html --> +{ + <@lib.endpointInfo + id = "availableTenantInstanceOperations" + tag = "Tenant" + summary = "Tenant Resource Options" + desc = "The `/tenant` resource supports two custom OPTIONS requests, one for the resource as such and this one for + individual tenant instances. The OPTIONS request allows checking for the set of available operations that + the currently authenticated user can perform on the `/tenant/{id}` resource. If the user can perform an + operation or not may depend on various things, including the users authorizations to interact with this + resource and the internal configuration of the process engine." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant" + last = true + /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ResourceOptionsDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/tenant/tenantOne`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne", + "rel": "self" + }, + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne", + "rel": "update" + } + ] + } + }'] + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..60659ad81fb7cd3659390da8c87e8a09c16493aa --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/put.ftl @@ -0,0 +1,67 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/put-update/index.html --> +{ + <@lib.endpointInfo + id = "updateTenant" + tag = "Tenant" + summary = "Update Tenant" + desc = "Updates a given tenant." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "TenantDto" + examples = ['"example-1": { + "summary": "PUT `/tenant/tenantOne`", + "value": { + "id": "tenantOne", + "name": "Tenant One" + } + }'] + /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "Identity service is read-only." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "If the tenant with the requested Id cannot be found." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The tenant could not be updated due to an internal server error. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/user-members/options.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/user-members/options.ftl new file mode 100644 index 0000000000000000000000000000000000000000..ae0648460fc43dcd2619acc80782effa24798e98 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/user-members/options.ftl @@ -0,0 +1,58 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/user-members/options/index.html --> +{ + <@lib.endpointInfo + id = "availableTenantUserMembersOperations" + tag = "Tenant" + summary = "Tenant User Membership Resource Options" + desc = "The OPTIONS request allows checking for the set of available operations that the + currently authenticated user can perform on the resource. If the user + can perform an operation or not may depend on various things, + including the users authorizations to interact with this resource and + the internal configuration of the process engine." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant" + last = true + /> + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "ResourceOptionsDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/tenant/tenantOne/user-members`", + "value": { + "links": [ + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne/user-members", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne/user-members", + "rel": "create" + } + ] + } + }'] + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/user-members/{userId}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/user-members/{userId}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..eb9abf5b9d58328fba641aecf926ad72e7c887d0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/user-members/{userId}/delete.ftl @@ -0,0 +1,57 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/user-members/delete/index.html --> +{ + <@lib.endpointInfo + id = "deleteUserMembership" + tag = "Tenant" + summary = "Delete a Tenant User Membership" + desc = "Deletes a membership between a tenant and an user." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant." + /> + + <@lib.parameter + name = "userId" + location = "path" + type = "string" + required = true + desc = "The id of the user." + last = true + /> + + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "Identity service is read-only." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "In case an error occurs. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/user-members/{userId}/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/user-members/{userId}/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..95dbef721b728ea0b7f7ae9a2e528603df2960c7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/tenant/{id}/user-members/{userId}/put.ftl @@ -0,0 +1,57 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/tenant/user-members/put/index.html --> +{ + <@lib.endpointInfo + id = "createUserMembership" + tag = "Tenant" + summary = "Create Tenant User Membership" + desc = "Creates a membership between a tenant and an user." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the tenant." + /> + + <@lib.parameter + name = "userId" + location = "path" + type = "string" + required = true + desc = "The id of the user." + last = true + /> + + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "Identity service is read-only." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "In case an internal error occurs. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..0742d6e2bda47fbf2cf7f063db08d6548a2dd99e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/count/get.ftl @@ -0,0 +1,40 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getUserCount" + tag = "User" + summary = "Get List Count" + desc = "Queries for the number of deployments that fulfill given parameters. Takes the same parameters as the + [Get Users](${docsUrl}/reference/rest/user/get-query/) method." /> + + "parameters" : [ + + <#assign last = true > + <#include "/lib/commons/user-query-params.ftl" > + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/user/count?firstName=John`", + "value": { + "count": 2 + } + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, for example, if an invalid operator for variable + comparison is used. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/create/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/create/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..bae302589852ec626f968c5bef634d68df864921 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/create/post.ftl @@ -0,0 +1,36 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "createUser" + tag = "User" + summary = "Create" + desc = "Create a new user." /> + + <@lib.requestBody + mediaType = "application/json" + dto = "UserDto" + examples = ['"example-1": { + "summary": "POST /user/create", + "value": { + "profile": { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "anEmailAddress" + }, + "credentials": { + "password": "s3cret" + } + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + last = true + desc = "Request successful." /> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..28cf733ea17ec90a4441317c27edc3f98a288dd4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/get.ftl @@ -0,0 +1,61 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getUsers" + tag = "User" + summary = "Get List" + desc = "Query for a list of users using a list of parameters. + The size of the result set can be retrieved by using the Get User Count method. + [Get User Count](${docsUrl}/reference/rest/user/get-query-count/) method." /> + + "parameters" : [ + + <#assign last = false > + <#include "/lib/commons/user-query-params.ftl" > + + <#assign sortByValues = [ '"userId"', '"firstName"', '"lastName"', '"email"' ] > + <#include "/lib/commons/sort-params.ftl" > + + <#assign last = true > + <#include "/lib/commons/pagination-params.ftl" > + + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "UserProfileDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/user?firstName=John`", + "value": [ + { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "anEmailAddress" + }, + { + "id": "jonny2", + "firstName": "John", + "lastName": "Smoe", + "email": "anotherEmailAddress" + } + ] + }'] /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + last = true + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, + but no `sortBy`, or if an invalid operator for variable comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/options.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/options.ftl new file mode 100644 index 0000000000000000000000000000000000000000..befc0fde4bbbd98e2577d893e22951114b44f0ea --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/options.ftl @@ -0,0 +1,47 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "availableOperations" + tag = "User" + summary = "Options" + desc = "The `/user` resource supports two custom `OPTIONS` requests, one for the resource as such + and one for individual user instances. The `OPTIONS` request allows checking for the set of + available operations that the currently authenticated user can perform on the /user resource. + If the user can perform an operation or not may depend on various things, including the user's + authorizations to interact with this resource and the internal configuration of the process + engine. `OPTIONS /user` returns available interactions on the resource."/> + + "responses" : { + + <@lib.response + mediaType = "application/json" + code = "200" + dto = "ResourceOptionsDto" + last = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/user`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/user", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/user/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/user/create", + "rel": "create" + } + ] + } + }'] /> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/credentials/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/credentials/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..357973f6b4fe83512326905f93558a22f75580aa --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/credentials/put.ftl @@ -0,0 +1,67 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "updateCredentials" + tag = "User" + summary = "Update Credentials" + desc = "Updates a user's credentials (password)" /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the user to be updated." /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "UserCredentialsDto" + examples = ['"example-1": { + "summary": "PUT /user/jonny1/credentials", + "value": { + "password": "s3cr3t", + "authenticatedUserPassword" : "demo" + } + }'] /> + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." /> + + <@lib.response + code = "403" + mediaType = "application/json" + dto = "ExceptionDto" + desc = "Identity service is read-only (Cannot modify users / groups / memberships)." /> + + <@lib.response + code = "400" + mediaType = "application/json" + dto = "ExceptionDto" + desc = "The authenticated user password does not match" /> + + <@lib.response + code = "404" + mediaType = "application/json" + dto = "ExceptionDto" + desc = "If the corresponding user cannot be found" /> + + <@lib.response + code = "500" + mediaType = "application/json" + dto = "ExceptionDto" + last = true + desc = "The user could not be updated due to an internal server error. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/delete.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/delete.ftl new file mode 100644 index 0000000000000000000000000000000000000000..d58518e2ba5572c3885fbfa321bfb48a1e2643d0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/delete.ftl @@ -0,0 +1,41 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "deleteUser" + tag = "User" + summary = "Delete" + desc = "Deletes a user by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the user to be deleted." /> + ], + + "responses" : { + + <@lib.response + code = "204" + desc = "Request successful." /> + + <@lib.response + code = "403" + desc = "Identity service is read-only (Cannot modify users / groups / memberships)." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "A Deployment with the provided id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/options.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/options.ftl new file mode 100644 index 0000000000000000000000000000000000000000..71aada3aeea9b11d15dd9371e5896504d16437ff --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/options.ftl @@ -0,0 +1,47 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "availableUserOperations" + tag = "User" + summary = "Options" + desc = "The `/user` resource supports two custom `OPTIONS` requests, one for the resource as such + and one for individual user instances. The `OPTIONS` request allows checking for the set of + available operations that the currently authenticated user can perform on the /user resource. + If the user can perform an operation or not may depend on various things, including the user's + authorizations to interact with this resource and the internal configuration of the process + engine. `OPTIONS /user/{id}` returns available interactions on a resource instance." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the user to be deleted." /> + ], + + "responses" : { + + <@lib.response + mediaType = "application/json" + code = "200" + dto = "ResourceOptionsDto" + last = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/user/peter`", + "value": { + "links":[ + {"method":"GET","href":"http://localhost:8080/engine-rest/user/peter/profile","rel":"self"}, + {"method":"DELETE","href":"http://localhost:8080/engine-rest/user/peter","rel":"delete"}, + {"method":"PUT","href":"http://localhost:8080/engine-rest/user/peter/profile","rel":"update"} + ] + } + }'] /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/profile/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/profile/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..734883cfa2f038d8338a61feed9de0d376508e00 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/profile/get.ftl @@ -0,0 +1,48 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "getUserProfile" + tag = "User" + summary = "Get Profile" + desc = "Retrieves a user's profile." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the user to retrieve."/> + ], + + "responses" : { + + <@lib.response + code = "200" + dto = "UserProfileDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "GET `/user/jonny1/profile", + "value": + { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "anEmailAddress" + } + }'] /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + last = true + desc = "Execution with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/profile/put.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/profile/put.ftl new file mode 100644 index 0000000000000000000000000000000000000000..f71dd90c1624bc9d76666b4787e0a7cdd5b0ea79 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/profile/put.ftl @@ -0,0 +1,69 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/user/put-update-profile/index.html --> +{ + <@lib.endpointInfo + id = "updateProfile" + tag = "User" + summary = "Update User Profile" + desc = "Updates the profile information of an already existing user." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the user." + last = true + /> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "UserProfileDto" + examples = ['"example-1": { + "summary": "PUT `/user/jonny1/profile`", + "value": { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "aNewEmailAddress" + } + }'] + /> + + "responses": { + + <@lib.response + code = "204" + desc = "Request successful. This method returns no content." + /> + + <@lib.response + code = "403" + dto = "ExceptionDto" + desc = "Identity service is read-only (Cannot modify users / groups / memberships)." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "If the user with the requested Id cannot be found." + /> + + <@lib.response + code = "500" + dto = "ExceptionDto" + desc = "The user could not be updated due to an internal server error. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/unlock/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/unlock/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..7bf4ce78aed498f68c10dea51f905154f6bfa983 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/user/{id}/unlock/post.ftl @@ -0,0 +1,43 @@ +<#macro endpoint_macro docsUrl=""> +{ + + <@lib.endpointInfo + id = "unlockUser" + tag = "User" + summary = "Unlock User" + desc = "Unlocks a user by id." /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + last = true + desc = "The id of the user to be unlocked." /> + ], + + "responses" : { + + <@lib.response + code = "204" + mediaType = "application/json" + desc = "Request successful." /> + + <@lib.response + code = "403" + mediaType = "application/json" + desc = "The user who performed the operation is not a Camunda admin user." /> + + <@lib.response + code = "404" + mediaType = "application/json" + dto = "ExceptionDto" + last = true + desc = "User cannot be found. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." /> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/count/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/count/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..fa85fcf3dec8804fd1d55a7024aee13da374a692 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/count/get.ftl @@ -0,0 +1,55 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/variable-instance/get-query-count/index.html --> +{ + <@lib.endpointInfo + id = "getVariableInstancesCount" + tag = "Variable Instance" + summary = "Get Variable Instance Count" + desc = "Query for the number of variable instances that fulfill given parameters. Takes the + same parameters as the [Get Variable + Instances](${docsUrl}/reference/rest/variable-instance/get-query/) + method." + /> + + "parameters" : [ + + <#assign requestMethod="GET"/> + <#assign last = false > + <#include "/lib/commons/variable-instance-query-params.ftl" > + <#assign last = true > + <@lib.parameters + object = params + last = last + /> + + ], + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "description": "GET `/variable-instance/count?processInstanceIdIn=aProcessInstanceId,anotherProcessInstanceId&variableValues=amount_gteq_5,amount_lteq_200`", + "value": { + "count": 3 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if an invalid operator for variable + comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/count/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/count/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9a6153a801cc45a3f2e3f1d583b9b50bdc8cfa26 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/count/post.ftl @@ -0,0 +1,71 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/variable-instance/post-query-count/index.html --> +{ + <@lib.endpointInfo + id = "queryVariableInstancesCount" + tag = "Variable Instance" + summary = "Get Variable Instance Count (POST)" + desc = "Query for the number of variable instances that fulfill given parameters. This + method takes the same message body as the + [Get Variable Instances POST](${docsUrl}/reference/rest/variable- + instance/post-query/) method and therefore it is slightly more + powerful than the [Get Variable Instance + Count](${docsUrl}/reference/rest/variable-instance/get-query-count/) + method." + /> + + <@lib.requestBody + mediaType = "application/json" + dto = "VariableInstanceQueryDto" + examples = ['"example-1": { + "summary": "POST `/variable-instance/count`", + "value": { + "variableValues": [ + { + "name": "amount", + "operator": "gteq", + "value": "5" + }, + { + "name": "amount", + "operator": "lteq", + "value": 200 + } + ], + "processInstanceIdIn": [ + "aProcessInstanceId", + "anotherProcessInstanceId" + ] + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "CountResultDto" + desc = "Request successful." + examples = ['"example-1": { + "description": "POST `/variable-instance/count`", + "value": { + "count": 3 + } + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if an invalid operator for variable + comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..5f42e816e900e099a48db6da8c965376ed7026d2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/get.ftl @@ -0,0 +1,111 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/variable-instance/get-query/index.html --> +{ + <@lib.endpointInfo + id = "getVariableInstances" + tag = "Variable Instance" + summary = "Get Variable Instances" + desc = "Query for variable instances that fulfill given parameters. Parameters may be the + properties of variable instances, such as the name or type. The size + of the result set can be retrieved by using the [Get Variable Instance + Count](${docsUrl}/reference/rest/variable-instance/get-query-count/) + method." + /> + + "parameters" : [ + + <#assign requestMethod="GET"/> + <#include "/lib/commons/variable-instance-query-params.ftl" > + <#assign last = false > + + <@lib.parameters + object = params + /> + + <#include "/lib/commons/sort-params.ftl" > + + <#include "/lib/commons/pagination-params.ftl" > + <#assign last = true > + + <#include "/lib/commons/deserialize-values-parameter.ftl"> + +], + + "responses": { + + <@lib.response + code = "200" + dto = "VariableInstanceDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "description": "GET `/variable-instance?processInstanceIdIn=aProcessInstanceId,anotherProcessInstanceId&variableValues=amount_gteq_5,amount_lteq_200`", + "value": [ + { + "id": "someId", + "name": "amount", + "type": "Integer", + "value": 5, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "b68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseExecutionId": null, + "caseInstanceId": null, + "errorMessage": null, + "tenantId": null + }, + { + "id": "someOtherId", + "name": "amount", + "type": "Integer", + "value": 15, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseExecutionId": null, + "caseInstanceId": null, + "errorMessage": null, + "tenantId": null + }, + { + "id": "yetAnotherId", + "name": "amount", + "type": "Integer", + "value": 150, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "anotherProcessInstanceId", + "executionId": "68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_2:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseExecutionId": null, + "caseInstanceId": null, + "errorMessage": null, + "tenantId": null + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`, or if an invalid operator + for variable comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/post.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/post.ftl new file mode 100644 index 0000000000000000000000000000000000000000..926a111d28ed2ab077d94796a9e0ee18a8df9a27 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/post.ftl @@ -0,0 +1,128 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/variable-instance/post-query/index.html --> +{ + <@lib.endpointInfo + id = "queryVariableInstances" + tag = "Variable Instance" + summary = "Get Variable Instances (POST)" + desc = "Query for variable instances that fulfill given parameters through a JSON object. + This method is slightly more powerful than the + [Get Variable Instances](${docsUrl}/reference/rest/variable- + instance/get-query/) method because it allows filtering by multiple + variable instances of types `String`, `Number` or `Boolean`." + /> + + "parameters" : [ + + <#assign requestMethod="POST"/> + <#assign last = false > + <#include "/lib/commons/pagination-params.ftl" > + <#assign last = true > + <#include "/lib/commons/deserialize-values-parameter.ftl"> + + ], + + <@lib.requestBody + mediaType = "application/json" + dto = "VariableInstanceQueryDto" + examples = ['"example-1": { + "summary": "POST `/variable-instance`", + "value": { + "variableValues": [ + { + "name": "amount", + "operator": "gteq", + "value": 5 + }, + { + "name": "amount", + "operator": "lteq", + "value": 200 + } + ], + "processInstanceIdIn": [ + "aProcessInstanceId", + "anotherProcessInstanceId" + ], + "sorting": [ + { + "sortBy": "variableType", + "sortOrder": "asc" + } + ] + } + }'] + /> + + "responses": { + + <@lib.response + code = "200" + dto = "VariableInstanceDto" + array = true + desc = "Request successful." + examples = ['"example-1": { + "description": "POST `/variable-instance`", + "value": [ + { + "id": "someId", + "name": "amount", + "type": "Integer", + "value": 5, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "b68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "errorMessage": null, + "tenantId": null + }, + { + "id": "someOtherId", + "name": "amount", + "type": "Integer", + "value": 15, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "errorMessage": null, + "tenantId": null + }, + { + "id": "yetAnotherId", + "name": "amount", + "type": "Integer", + "value": 150, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "anotherProcessInstanceId", + "executionId": "68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_2:b68b71ca-e310-11e2-beb0-f0def1557726", + "errorMessage": null, + "tenantId": null + } + ] + }'] + /> + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Returned if some of the query parameters are invalid, for example if a `sortOrder` + parameter is supplied, but no `sortBy`, or if an invalid operator + for variable comparison is used. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/{id}/data/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/{id}/data/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..a3942572266ac679ea53274f8eda4e67a29e293d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/{id}/data/get.ftl @@ -0,0 +1,71 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/variable-instance/get-binary/index.html --> +{ + <@lib.endpointInfo + id = "getVariableInstanceBinary" + tag = "Variable Instance" + summary = "Get Variable Instance (Binary)" + desc = "Retrieves the content of a variable by id. Applicable for byte array and file + variables." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the variable instance." + last = true + /> + + ], + + "responses": { + + "200": { + "description": "Request successful. For binary variables or files without any MIME type information, a byte stream is returned. + File variables with MIME type information are returned as the saved type. Additionally, for file + variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For files without any MIME type information, a byte stream is returned." + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information are returned as the saved type. Additionally, for file + responses, the Content-Disposition header will be set." + } + } + } + }, + + + <@lib.response + code = "400" + dto = "ExceptionDto" + desc = "Variable with given id exists but does not serialize as binary data. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Variable with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/{id}/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/{id}/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..486049863ae4c7e99bbf4fac145639580bc951eb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/variable-instance/{id}/get.ftl @@ -0,0 +1,82 @@ +<#macro endpoint_macro docsUrl=""> +<#-- Generated From File: camunda-docs-manual/public/reference/rest/variable-instance/get/index.html --> +{ + <@lib.endpointInfo + id = "getVariableInstance" + tag = "Variable Instance" + summary = "Get Variable Instance" + desc = "Retrieves a variable by id." + /> + + "parameters" : [ + + <@lib.parameter + name = "id" + location = "path" + type = "string" + required = true + desc = "The id of the variable instance." + /> + + <@lib.parameter + name = "deserializeValue" + location = "query" + type = "boolean" + desc = "Determines whether serializable variable values (typically variables that store custom Java objects) + should be deserialized on server side (default `true`). + + If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON + using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. + Note that this requires the Java classes of the variable value to be on the REST API's classpath. + + If set to `false`, a serializable variable will be returned in its serialized format. + For example, a variable that is serialized as XML will be returned as a JSON string containing XML. + + **Note:** While `true` is the default value for reasons of backward compatibility, we recommend setting this + parameter to `false` when developing web applications that are independent of the Java process + applications deployed to the engine." + last = true + /> + ], + + "responses": { + + <@lib.response + code = "200" + dto = "VariableInstanceDto" + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200.", + "description": "GET `/variable-instance/someId`", + "value": { + "id": "someId", + "name": "amount", + "type": "Integer", + "value": 5, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "b68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseExecutionId": null, + "caseInstanceId": null, + "tenantId": null, + "errorMessage": null + } + }'] + /> + + <@lib.response + code = "404" + dto = "ExceptionDto" + desc = "Variable with given id does not exist. See the + [Introduction](${docsUrl}/reference/rest/overview/#error-handling) + for the error response format." + last = true + /> + + } + +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/version/get.ftl b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/version/get.ftl new file mode 100644 index 0000000000000000000000000000000000000000..bea8dea81353c9ba8a25151d14b02a6f6984c1ae --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/main/templates/paths/version/get.ftl @@ -0,0 +1,24 @@ +<#macro endpoint_macro docsUrl=""> +{ + <@lib.endpointInfo + id = "getRestAPIVersion" + tag = "Version" + summary = "Get Rest API version" + desc = "Retrieves the version of the Rest API." /> + + "responses" : { + <@lib.response + code = "200" + dto = "VersionDto" + last = true + desc = "Request successful." + examples = ['"example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": { + "version": "7.13.0" + } + }'] /> + } +} + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/test/java/org/camunda/bpm/engine/rest/openapi/client/BasicAuthenticationTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/test/java/org/camunda/bpm/engine/rest/openapi/client/BasicAuthenticationTest.java new file mode 100644 index 0000000000000000000000000000000000000000..9fbfc40fd3c4cb38cc3c0bbaa2b3979a08fc4c8f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/test/java/org/camunda/bpm/engine/rest/openapi/client/BasicAuthenticationTest.java @@ -0,0 +1,74 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.openapi.client; + +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; +import static com.github.tomakehurst.wiremock.client.WireMock.get; +import static com.github.tomakehurst.wiremock.client.WireMock.getRequestedFor; +import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; +import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; +import static com.github.tomakehurst.wiremock.client.WireMock.verify; +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.api.ProcessInstanceApi; +import org.openapitools.client.model.ProcessInstanceDto; + +import com.github.tomakehurst.wiremock.junit.WireMockRule; + +public class BasicAuthenticationTest { + + private static final String ENGINE_REST_PROCESS_INSTANCE = "/engine-rest/process-instance"; + + private static final String USERNAME = "mike"; + private static final String PASSWORD = "secret"; + + ProcessInstanceApi api; + + @Rule + public WireMockRule wireMockRule = new WireMockRule(8080); + + @Before + public void clientWithValidCredentials() { + ApiClient apiClient = new ApiClient(); + + apiClient.setUsername(USERNAME); + apiClient.setPassword(PASSWORD); + + api = new ProcessInstanceApi(apiClient); + } + + @Test + public void shouldUseBasicAuth() throws ApiException { + // given + stubFor(get(urlEqualTo(ENGINE_REST_PROCESS_INSTANCE + "/1")) + .willReturn(aResponse().withStatus(200).withBody("{ \"id\": 1 }"))); + + // when + ProcessInstanceDto processInstance = api.getProcessInstance("1"); + + // then + assertThat(processInstance.getId()).isEqualTo("1"); + verify(getRequestedFor(urlEqualTo(ENGINE_REST_PROCESS_INSTANCE + "/1")).withHeader("Authorization", + equalTo("Basic bWlrZTpzZWNyZXQ="))); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/test/java/org/camunda/bpm/engine/rest/openapi/client/DeploymentTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/test/java/org/camunda/bpm/engine/rest/openapi/client/DeploymentTest.java new file mode 100644 index 0000000000000000000000000000000000000000..c3eab5f72d4e9cdcc66b6f7a39b0d2905b08c0a6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/test/java/org/camunda/bpm/engine/rest/openapi/client/DeploymentTest.java @@ -0,0 +1,113 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.openapi.client; + +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.containing; +import static com.github.tomakehurst.wiremock.client.WireMock.post; +import static com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor; +import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; +import static com.github.tomakehurst.wiremock.client.WireMock.verify; +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.File; + +import org.junit.Rule; +import org.junit.Test; +import org.openapitools.client.ApiException; +import org.openapitools.client.api.DeploymentApi; +import org.openapitools.client.model.DeploymentWithDefinitionsDto; + +import com.github.tomakehurst.wiremock.junit.WireMockRule; + +public class DeploymentTest { + + private static final String ENGINE_REST_DEPLOYMENT = "/engine-rest/deployment"; + + final DeploymentApi api = new DeploymentApi(); + + @Rule + public WireMockRule wireMockRule = new WireMockRule(8080); + + @Test + public void shouldCreateDeployment() throws ApiException { + // given + String deploymentSource = "test-source"; + String deploymentName = "deployment-test-name"; + wireMockRule.stubFor( + post(urlEqualTo(ENGINE_REST_DEPLOYMENT + "/create")) + .willReturn(aResponse() + .withStatus(200) + .withBody("{" + + " \"links\": [" + + " {" + + " \"method\": \"GET\"," + + " \"href\": \"http://localhost:8080/rest-test/deployment/aDeploymentId\"," + + " \"rel\": \"self\"" + + " }" + + " ]," + + " \"id\": \"aDeploymentId\"," + + " \"name\": \"" + deploymentName + "\"," + + " \"source\": \"" + deploymentSource + "\"," + + " \"deploymentTime\": \"2013-01-23T13:59:43.000+0200\"," + + " \"tenantId\": null," + + " \"deployedProcessDefinitions\": {" + + " \"aProcDefId\": {" + + " \"id\": \"aProcDefId\"," + + " \"key\": \"aKey\"," + + " \"category\": \"aCategory\"," + + " \"description\": \"aDescription\"," + + " \"name\": \"aName\"," + + " \"version\": 42," + + " \"resource\": \"aResourceName\"," + + " \"deploymentId\": \"aDeploymentId\"," + + " \"diagram\": \"aResourceName.png\"," + + " \"suspended\": true," + + " \"tenantId\": null," + + " \"versionTag\": null" + + " }" + + " }," + + " \"deployedCaseDefinitions\": null," + + " \"deployedDecisionDefinitions\": null," + + " \"deployedDecisionRequirementsDefinitions\": null" + + "}")) + ); + + // when + DeploymentWithDefinitionsDto deployment = api.createDeployment(null, deploymentSource, false, false, deploymentName, null, new File("src/test/resources/one.bpmn")); + + // then + assertThat(deployment.getId()).isEqualTo("aDeploymentId"); + assertThat(deployment.getName()).isEqualTo(deploymentName); + assertThat(deployment.getSource()).isEqualTo(deploymentSource); + assertThat(deployment.getDeployedProcessDefinitions()).containsKey("aProcDefId"); + assertThat(deployment.getDeployedProcessDefinitions().get("aProcDefId").getId()).isEqualTo("aProcDefId"); + assertThat(deployment.getDeployedProcessDefinitions().get("aProcDefId").getKey()).isEqualTo("aKey"); + assertThat(deployment.getDeployedProcessDefinitions().get("aProcDefId").getName()).isEqualTo("aName"); + + verify(postRequestedFor(urlEqualTo(ENGINE_REST_DEPLOYMENT + "/create")) + .withRequestBody(containing("Content-Disposition: form-data; name=\"deployment-name\"")) + .withRequestBody(containing("deployment-test-name")) + .withRequestBody(containing("Content-Disposition: form-data; name=\"deployment-source\"")) + .withRequestBody(containing("test-source")) + .withRequestBody(containing("Content-Disposition: form-data; name=\"data\"; filename=\"one.bpmn\"")) + .withRequestBody(containing("Content-Type: application/octet-stream")) + .withHeader("Content-Type", containing("multipart/form-data")) + ); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/test/java/org/camunda/bpm/engine/rest/openapi/client/ProcessInstanceTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/test/java/org/camunda/bpm/engine/rest/openapi/client/ProcessInstanceTest.java new file mode 100644 index 0000000000000000000000000000000000000000..9040736fa92759a5324c2e8760f7c1090d44c289 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/test/java/org/camunda/bpm/engine/rest/openapi/client/ProcessInstanceTest.java @@ -0,0 +1,94 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.openapi.client; + +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; +import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson; +import static com.github.tomakehurst.wiremock.client.WireMock.post; +import static com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor; +import static com.github.tomakehurst.wiremock.client.WireMock.put; +import static com.github.tomakehurst.wiremock.client.WireMock.putRequestedFor; +import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; +import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; +import static com.github.tomakehurst.wiremock.client.WireMock.verify; +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.Rule; +import org.junit.Test; +import org.openapitools.client.ApiException; +import org.openapitools.client.api.ProcessInstanceApi; +import org.openapitools.client.model.CountResultDto; +import org.openapitools.client.model.ProcessInstanceQueryDto; +import org.openapitools.client.model.SuspensionStateDto; + +import com.github.tomakehurst.wiremock.junit.WireMockRule; + +public class ProcessInstanceTest { + + private static final String ENGINE_REST_PROCESS_INSTANCE = "/engine-rest/process-instance"; + + final ProcessInstanceApi api = new ProcessInstanceApi(); + + @Rule + public WireMockRule wireMockRule = new WireMockRule(8080); + + @Test + public void shouldQueryProcessInstancesCount() throws ApiException { + // given + stubFor( + post(urlEqualTo(ENGINE_REST_PROCESS_INSTANCE + "/count")) + .willReturn(aResponse() + .withStatus(200) + .withBody("{ \"count\": 3 }")) + ); + + // when + ProcessInstanceQueryDto processInstanceQueryDto = new ProcessInstanceQueryDto(); + processInstanceQueryDto.setActive(true); + CountResultDto count = api.queryProcessInstancesCount(processInstanceQueryDto); + + // then + assertThat(count.getCount()).isEqualTo(3); + verify(postRequestedFor(urlEqualTo(ENGINE_REST_PROCESS_INSTANCE + "/count")) + .withRequestBody(equalToJson("{ \"active\": true }")) + .withHeader("Content-Type", equalTo("application/json; charset=UTF-8")) + ); + + } + + @Test + public void shouldUpdateSuspensionStateById() throws ApiException { + // given + String id = "anProcessInstanceId"; + stubFor( + put(urlEqualTo(ENGINE_REST_PROCESS_INSTANCE + "/" + id + "/suspended")) + .willReturn(aResponse().withStatus(204)) + ); + + // when + SuspensionStateDto dto = new SuspensionStateDto(); + dto.setSuspended(true); + api.updateSuspensionStateById(id, dto); + + // then no error + verify(putRequestedFor(urlEqualTo(ENGINE_REST_PROCESS_INSTANCE + "/" + id + "/suspended")) + .withRequestBody(equalToJson("{ \"suspended\": true }")) + ); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/test/resources/one.bpmn b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest-openapi/src/test/resources/one.bpmn new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-jersey2/org/camunda/bpm/engine/rest/util/container/JerseyServerBootstrap.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-jersey2/org/camunda/bpm/engine/rest/util/container/JerseyServerBootstrap.java new file mode 100644 index 0000000000000000000000000000000000000000..bf48fc45fec60d29cd0c42794603fd9032d0a08a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-jersey2/org/camunda/bpm/engine/rest/util/container/JerseyServerBootstrap.java @@ -0,0 +1,71 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import java.net.URI; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import javax.ws.rs.core.Application; +import javax.ws.rs.core.UriBuilder; +import org.glassfish.grizzly.http.server.HttpServer; +import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory; +import org.glassfish.jersey.server.ResourceConfig; +import org.glassfish.jersey.server.ServerProperties; + +public class JerseyServerBootstrap extends EmbeddedServerBootstrap { + + protected HttpServer server; + + public JerseyServerBootstrap() { + super(new JaxrsApplication()); + } + + public JerseyServerBootstrap(Application application) { + super(application); + } + + @Override + public void stop() { + server.shutdownNow(); + } + + @Override + protected void startServerInternal() throws Exception { + server.start(); + } + + @Override + protected void setupServer(Application application) { + ResourceConfig rc = ResourceConfig.forApplication(application); + + Map properties = new HashMap(); + properties.put(ServerProperties.TRACING, "ALL"); + rc.addProperties(properties); + + Properties serverProperties = readProperties(); + int port = Integer.parseInt(serverProperties.getProperty(PORT_PROPERTY)); + URI serverUri = UriBuilder.fromPath(ROOT_RESOURCE_PATH).scheme("http").host("localhost").port(port).build(); + try { + server = GrizzlyHttpServerFactory.createHttpServer(serverUri, rc, false); + } catch (IllegalArgumentException e) { + throw new ServerBootstrapException(e); + } catch (NullPointerException e) { + throw new ServerBootstrapException(e); + } + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-jersey2/org/camunda/bpm/engine/rest/util/container/JerseySpecifics.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-jersey2/org/camunda/bpm/engine/rest/util/container/JerseySpecifics.java new file mode 100644 index 0000000000000000000000000000000000000000..cc7f760e1a1b0fcbbb119586831e1d3ed5e0592c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-jersey2/org/camunda/bpm/engine/rest/util/container/JerseySpecifics.java @@ -0,0 +1,117 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import java.util.HashMap; +import java.util.Map; + +import javax.ws.rs.core.Application; + +import org.camunda.bpm.engine.rest.CustomJacksonDateFormatTest; +import org.camunda.bpm.engine.rest.ExceptionHandlerTest; +import org.camunda.bpm.engine.rest.application.TestCustomResourceApplication; +import org.junit.rules.ExternalResource; +import org.junit.rules.RuleChain; +import org.junit.rules.TemporaryFolder; +import org.junit.rules.TestRule; + +/** + * @author Thorben Lindhauer + * + */ +public class JerseySpecifics implements ContainerSpecifics { + + protected static final TestRuleFactory DEFAULT_RULE_FACTORY = + new EmbeddedServerRuleFactory(new JaxrsApplication()); + + protected static final Map, TestRuleFactory> TEST_RULE_FACTORIES = + new HashMap, TestRuleFactory>(); + + static { + TEST_RULE_FACTORIES.put(ExceptionHandlerTest.class, new EmbeddedServerRuleFactory(new TestCustomResourceApplication())); + TEST_RULE_FACTORIES.put(CustomJacksonDateFormatTest.class, new ServletContainerRuleFactory("custom-date-format-web.xml")); + } + + public TestRule getTestRule(Class testClass) { + TestRuleFactory ruleFactory = DEFAULT_RULE_FACTORY; + + if (TEST_RULE_FACTORIES.containsKey(testClass)) { + ruleFactory = TEST_RULE_FACTORIES.get(testClass); + } + + return ruleFactory.createTestRule(); + } + + public static class EmbeddedServerRuleFactory implements TestRuleFactory { + + protected Application jaxRsApplication; + + public EmbeddedServerRuleFactory(Application jaxRsApplication) { + this.jaxRsApplication = jaxRsApplication; + } + + public TestRule createTestRule() { + return new ExternalResource() { + + JerseyServerBootstrap bootstrap = new JerseyServerBootstrap(jaxRsApplication); + + protected void before() throws Throwable { + bootstrap.start(); + } + + protected void after() { + bootstrap.stop(); + } + }; + } + } + + public TestRule getTestRule(String webXmlResource) { + throw new UnsupportedOperationException(); + } + + public static class ServletContainerRuleFactory implements TestRuleFactory { + + protected String webXmlResource; + + public ServletContainerRuleFactory(String webXmlResource) { + this.webXmlResource = webXmlResource; + } + + public TestRule createTestRule() { + final TemporaryFolder tempFolder = new TemporaryFolder(); + + return RuleChain + .outerRule(tempFolder) + .around(new ExternalResource() { + + TomcatServerBootstrap bootstrap = new JerseyTomcatServerBootstrap(webXmlResource); + + protected void before() throws Throwable { + bootstrap.setWorkingDir(tempFolder.getRoot().getAbsolutePath()); + bootstrap.start(); + } + + protected void after() { + bootstrap.stop(); + } + }); + } + + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-jersey2/org/camunda/bpm/engine/rest/util/container/JerseyTomcatServerBootstrap.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-jersey2/org/camunda/bpm/engine/rest/util/container/JerseyTomcatServerBootstrap.java new file mode 100644 index 0000000000000000000000000000000000000000..1e91decb4f6cd0e1b0ccae2f187c480ae39791f3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-jersey2/org/camunda/bpm/engine/rest/util/container/JerseyTomcatServerBootstrap.java @@ -0,0 +1,31 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; + +public class JerseyTomcatServerBootstrap extends TomcatServerBootstrap { + + public JerseyTomcatServerBootstrap(String webXmlPath) { + super(webXmlPath); + } + + protected void addRuntimeSpecificLibraries(WebArchive wa, PomEquippedResolveStage resolver) { + wa.addAsLibraries(resolver.resolve("org.glassfish.jersey.containers:jersey-container-servlet:2.25.1").withTransitivity().asFile()); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasyServerBootstrap.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasyServerBootstrap.java new file mode 100644 index 0000000000000000000000000000000000000000..3d13a2df78ea55f078f6ee6260a17dad12618385 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasyServerBootstrap.java @@ -0,0 +1,53 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import java.util.Properties; +import javax.ws.rs.core.Application; +import org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer; + +public class ResteasyServerBootstrap extends EmbeddedServerBootstrap { + + protected NettyJaxrsServer server; + + public ResteasyServerBootstrap(Application application) { + super(application); + } + + @Override + public void stop() { + server.stop(); + } + + @Override + protected void startServerInternal() { + server.start(); + } + + @Override + protected void setupServer(Application application) { + Properties serverProperties = readProperties(); + int port = Integer.parseInt(serverProperties.getProperty(PORT_PROPERTY)); + + server = new NettyJaxrsServer(); + server.setRootResourcePath(ROOT_RESOURCE_PATH); + server.setPort(port); + + server.getDeployment().setApplication(application); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasySpecifics.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasySpecifics.java new file mode 100644 index 0000000000000000000000000000000000000000..5279bf641bf5971a0ce35352331dcf7f86902c02 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasySpecifics.java @@ -0,0 +1,122 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import java.util.HashMap; +import java.util.Map; + +import javax.ws.rs.core.Application; + +import org.camunda.bpm.engine.rest.CustomJacksonDateFormatTest; +import org.camunda.bpm.engine.rest.ExceptionHandlerTest; +import org.camunda.bpm.engine.rest.application.TestCustomResourceApplication; +import org.camunda.bpm.engine.rest.standalone.NoServletAuthenticationFilterTest; +import org.camunda.bpm.engine.rest.standalone.NoServletEmptyBodyFilterTest; +import org.camunda.bpm.engine.rest.standalone.ServletAuthenticationFilterTest; +import org.camunda.bpm.engine.rest.standalone.ServletEmptyBodyFilterTest; +import org.junit.rules.ExternalResource; +import org.junit.rules.RuleChain; +import org.junit.rules.TemporaryFolder; +import org.junit.rules.TestRule; + +/** + * @author Thorben Lindhauer + * + */ +public class ResteasySpecifics implements ContainerSpecifics { + + protected static final TestRuleFactory DEFAULT_RULE_FACTORY = + new EmbeddedServerRuleFactory(new JaxrsApplication()); + + protected static final Map, TestRuleFactory> TEST_RULE_FACTORIES = + new HashMap, TestRuleFactory>(); + + static { + TEST_RULE_FACTORIES.put(ExceptionHandlerTest.class, new EmbeddedServerRuleFactory(new TestCustomResourceApplication())); + TEST_RULE_FACTORIES.put(ServletAuthenticationFilterTest.class, new ServletContainerRuleFactory("auth-filter-servlet-web.xml")); + TEST_RULE_FACTORIES.put(NoServletAuthenticationFilterTest.class, new ServletContainerRuleFactory("auth-filter-no-servlet-web.xml")); + TEST_RULE_FACTORIES.put(ServletEmptyBodyFilterTest.class, new ServletContainerRuleFactory("empty-body-filter-servlet-web.xml")); + TEST_RULE_FACTORIES.put(NoServletEmptyBodyFilterTest.class, new ServletContainerRuleFactory("empty-body-filter-no-servlet-web.xml")); + TEST_RULE_FACTORIES.put(CustomJacksonDateFormatTest.class, new ServletContainerRuleFactory("custom-date-format-web.xml")); + } + + public TestRule getTestRule(Class testClass) { + TestRuleFactory ruleFactory = DEFAULT_RULE_FACTORY; + + if (TEST_RULE_FACTORIES.containsKey(testClass)) { + ruleFactory = TEST_RULE_FACTORIES.get(testClass); + } + + return ruleFactory.createTestRule(); + } + + public static class EmbeddedServerRuleFactory implements TestRuleFactory { + + protected Application jaxRsApplication; + + public EmbeddedServerRuleFactory(Application jaxRsApplication) { + this.jaxRsApplication = jaxRsApplication; + } + + public TestRule createTestRule() { + return new ExternalResource() { + + ResteasyServerBootstrap bootstrap = new ResteasyServerBootstrap(jaxRsApplication); + + protected void before() throws Throwable { + bootstrap.start(); + } + + protected void after() { + bootstrap.stop(); + } + }; + } + } + + public static class ServletContainerRuleFactory implements TestRuleFactory { + + protected String webXmlResource; + + public ServletContainerRuleFactory(String webXmlResource) { + this.webXmlResource = webXmlResource; + } + + public TestRule createTestRule() { + final TemporaryFolder tempFolder = new TemporaryFolder(); + + return RuleChain + .outerRule(tempFolder) + .around(new ExternalResource() { + + ResteasyTomcatServerBootstrap bootstrap = new ResteasyTomcatServerBootstrap(webXmlResource); + + protected void before() throws Throwable { + bootstrap.setWorkingDir(tempFolder.getRoot().getAbsolutePath()); + bootstrap.start(); + } + + protected void after() { + bootstrap.stop(); + } + }); + } + + } + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasyTomcatServerBootstrap.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasyTomcatServerBootstrap.java new file mode 100644 index 0000000000000000000000000000000000000000..e955c4c0766f2f4bc1a231faf689c0ccc0a2f98b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-resteasy/org/camunda/bpm/engine/rest/util/container/ResteasyTomcatServerBootstrap.java @@ -0,0 +1,42 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; +import org.jboss.shrinkwrap.resolver.api.maven.ScopeType; +import org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenDependencies; + + +public class ResteasyTomcatServerBootstrap extends TomcatServerBootstrap { + + public ResteasyTomcatServerBootstrap(String webXmlPath) { + super(webXmlPath); + } + + @Override + protected void addRuntimeSpecificLibraries(WebArchive wa, PomEquippedResolveStage resolver) { + // inject rest easy version to differentiate between resteasy and wildfly-compatibility profile + String restEasyVersion = System.getProperty("restEasyVersion"); + + wa.addAsLibraries(resolver.addDependencies( + MavenDependencies.createDependency("org.jboss.resteasy:resteasy-jaxrs:" + restEasyVersion, ScopeType.TEST, false, + MavenDependencies.createExclusion("org.apache.httpcomponents:httpclient"))).resolve() + .withTransitivity().asFile()); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-wink/org/camunda/bpm/engine/rest/util/container/WinkSpecifics.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-wink/org/camunda/bpm/engine/rest/util/container/WinkSpecifics.java new file mode 100644 index 0000000000000000000000000000000000000000..94d35160fea97f5b457f3ad0d50a736e9ce0a098 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-wink/org/camunda/bpm/engine/rest/util/container/WinkSpecifics.java @@ -0,0 +1,87 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import java.util.HashMap; +import java.util.Map; + +import org.camunda.bpm.engine.rest.CustomJacksonDateFormatTest; +import org.camunda.bpm.engine.rest.ExceptionHandlerTest; +import org.junit.rules.ExternalResource; +import org.junit.rules.RuleChain; +import org.junit.rules.TemporaryFolder; +import org.junit.rules.TestRule; + +/** + * @author Thorben Lindhauer + * + */ +public class WinkSpecifics implements ContainerSpecifics { + + protected static final TestRuleFactory DEFAULT_RULE_FACTORY = + new ServletContainerRuleFactory("default-application-web.xml"); + + protected static final Map, TestRuleFactory> TEST_RULE_FACTORIES = + new HashMap, TestRuleFactory>(); + + static { + TEST_RULE_FACTORIES.put(ExceptionHandlerTest.class, new ServletContainerRuleFactory("custom-application-web.xml")); + TEST_RULE_FACTORIES.put(CustomJacksonDateFormatTest.class, new ServletContainerRuleFactory("custom-date-format-web.xml")); + } + + public TestRule getTestRule(Class testClass) { + TestRuleFactory ruleFactory = DEFAULT_RULE_FACTORY; + + if (TEST_RULE_FACTORIES.containsKey(testClass)) { + ruleFactory = TEST_RULE_FACTORIES.get(testClass); + } + + return ruleFactory.createTestRule(); + } + + public static class ServletContainerRuleFactory implements TestRuleFactory { + + protected String webXmlResource; + + public ServletContainerRuleFactory(String webXmlResource) { + this.webXmlResource = webXmlResource; + } + + public TestRule createTestRule() { + final TemporaryFolder tempFolder = new TemporaryFolder(); + + return RuleChain + .outerRule(tempFolder) + .around(new ExternalResource() { + + WinkTomcatServerBootstrap bootstrap = new WinkTomcatServerBootstrap(webXmlResource); + + protected void before() throws Throwable { + bootstrap.setWorkingDir(tempFolder.getRoot().getAbsolutePath()); + bootstrap.start(); + } + + protected void after() { + bootstrap.stop(); + } + }); + } + + } + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-wink/org/camunda/bpm/engine/rest/util/container/WinkTomcatServerBootstrap.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-wink/org/camunda/bpm/engine/rest/util/container/WinkTomcatServerBootstrap.java new file mode 100644 index 0000000000000000000000000000000000000000..6046ca6a9bb7d7dc8b481a1eee07af1ba218bffb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java-wink/org/camunda/bpm/engine/rest/util/container/WinkTomcatServerBootstrap.java @@ -0,0 +1,33 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; + +public class WinkTomcatServerBootstrap extends TomcatServerBootstrap { + + public WinkTomcatServerBootstrap(String webXmlPath) { + super(webXmlPath); + } + + @Override + protected void addRuntimeSpecificLibraries(WebArchive wa, + PomEquippedResolveStage resolver) { + wa.addAsLibraries(resolver.resolve("org.apache.wink:wink-server:1.1.1-incubating").withTransitivity().asFile()); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/mapper/RetriesDtoObjectMapperTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/mapper/RetriesDtoObjectMapperTest.java new file mode 100644 index 0000000000000000000000000000000000000000..2c7f5946497ad41959d1911eb889e533c7405f12 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/mapper/RetriesDtoObjectMapperTest.java @@ -0,0 +1,192 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.mapper; + +import static org.assertj.core.api.Assertions.assertThat; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.ArrayList; +import java.util.Date; +import org.camunda.bpm.engine.rest.dto.history.HistoricProcessInstanceQueryDto; +import org.camunda.bpm.engine.rest.dto.runtime.JobQueryDto; +import org.camunda.bpm.engine.rest.dto.runtime.ProcessInstanceQueryDto; +import org.camunda.bpm.engine.rest.dto.runtime.RetriesDto; +import org.camunda.bpm.engine.rest.dto.runtime.SetJobRetriesByProcessDto; +import org.camunda.bpm.engine.rest.dto.runtime.SetJobRetriesDto; +import org.junit.Test; + +public class RetriesDtoObjectMapperTest { + + @Test + public void shouldExcludeDueDateSetPropertyRetriesDto() throws JsonProcessingException { + // given + RetriesDto dto = new RetriesDto(); + dto.setRetries(4); + dto.setDueDate(new Date(1675752840000L)); + + ObjectMapper mapper = new ObjectMapper(); + + // when + String json = mapper.writeValueAsString(dto); + + // then + assertThat(json).doesNotContain("dueDateSet"); + } + + @Test + public void shouldIncludeDueDateSetPropertyRetriesDto() throws JsonProcessingException { + // given + String json = "{" + + "\"retries\":4," + + "\"dueDate\":1675752840000" + + "}"; + + ObjectMapper mapper = new ObjectMapper(); + + // when + RetriesDto dto = mapper.readValue(json, RetriesDto.class); + + // then + assertThat(dto.isDueDateSet()).isTrue(); + } + + @Test + public void shouldIgnoreDueDateSetPropertyRetriesDto() throws JsonProcessingException { + // given + String json = "{" + + "\"retries\":4" + + "}"; + + ObjectMapper mapper = new ObjectMapper(); + + // when + RetriesDto dto = mapper.readValue(json, RetriesDto.class); + + // then + assertThat(dto.isDueDateSet()).isFalse(); + } + + @Test + public void shouldExcludeDueDateSetPropertySetJobRetriesDto() throws JsonProcessingException { + // given + SetJobRetriesDto dto = new SetJobRetriesDto(); + dto.setRetries(4); + dto.setDueDate(new Date(1675752840000L)); + dto.setJobIds(new ArrayList<>()); + dto.setJobQuery(new JobQueryDto()); + + ObjectMapper mapper = new ObjectMapper(); + + // when + String json = mapper.writeValueAsString(dto); + + // then + assertThat(json).doesNotContain("dueDateSet"); + } + + @Test + public void shouldIncludeDueDateSetPropertySetJobRetriesDto() throws JsonProcessingException { + // given + String json = "{" + + "\"retries\":4," + + "\"dueDate\":1675752840000," + + "\"jobIds\":[]," + + "\"jobQuery\":{\"sorting\":null}" + + "}"; + + ObjectMapper mapper = new ObjectMapper(); + + // when + SetJobRetriesDto dto = mapper.readValue(json, SetJobRetriesDto.class); + + // then + assertThat(dto.isDueDateSet()).isTrue(); + } + + @Test + public void shouldIgnoreDueDateSetPropertySetJobRetriesDto() throws JsonProcessingException { + // given + String json = "{" + + "\"retries\":4," + + "\"jobIds\":[]," + + "\"jobQuery\":{\"sorting\":null}" + + "}"; + + ObjectMapper mapper = new ObjectMapper(); + + // when + SetJobRetriesDto dto = mapper.readValue(json, SetJobRetriesDto.class); + + // then + assertThat(dto.isDueDateSet()).isFalse(); + } + + @Test + public void shouldExcludeDueDateSetPropertySetJobRetriesByProcessDto() throws JsonProcessingException { + // given + SetJobRetriesByProcessDto dto = new SetJobRetriesByProcessDto(); + dto.setRetries(4); + dto.setDueDate(new Date(1675752840000L)); + dto.setHistoricProcessInstanceQuery(new HistoricProcessInstanceQueryDto()); + dto.setProcessInstanceQuery(new ProcessInstanceQueryDto()); + dto.setProcessInstances(new ArrayList<>()); + + ObjectMapper mapper = new ObjectMapper(); + + // when + String json = mapper.writeValueAsString(dto); + + // then + assertThat(json).doesNotContain("dueDateSet"); + } + + @Test + public void shouldIncludeDueDateSetPropertySetJobRetriesByProcessDto() throws JsonProcessingException { + // given + String json = "{" + + "\"retries\":4," + + "\"dueDate\":1675752840000," + + "\"jobIds\":null," + + "\"jobQuery\":null," + + "\"processInstances\":[]," + + "\"historicProcessInstanceQuery\":{\"processDefinitionId\":null,\"incidentType\":null,\"orQueries\":null,\"sorting\":null}" + + "}"; + + ObjectMapper mapper = new ObjectMapper(); + + // when + SetJobRetriesByProcessDto dto = mapper.readValue(json, SetJobRetriesByProcessDto.class); + + // then + assertThat(dto.isDueDateSet()).isTrue(); + } + + @Test + public void shouldIgnoreDueDateSetPropertySetJobRetriesByProcessDto() throws JsonProcessingException { + // given + String json = "{\"retries\":4,\"jobIds\":null,\"jobQuery\":null,\"processInstances\":[],\"processInstanceQuery\":{\"deploymentId\":null,\"processDefinitionKey\":null,\"processDefinitionKeys\":null,\"processDefinitionKeyNotIn\":null,\"businessKey\":null,\"businessKeyLike\":null,\"caseInstanceId\":null,\"processDefinitionId\":null,\"superProcessInstance\":null,\"subProcessInstance\":null,\"superCaseInstance\":null,\"subCaseInstance\":null,\"active\":null,\"suspended\":null,\"processInstanceIds\":null,\"withIncident\":null,\"incidentId\":null,\"incidentType\":null,\"incidentMessage\":null,\"incidentMessageLike\":null,\"withoutTenantId\":null,\"activityIds\":null,\"rootProcessInstances\":null,\"leafProcessInstances\":null,\"variableNamesIgnoreCase\":null,\"variableValuesIgnoreCase\":null,\"variables\":null,\"orQueries\":null,\"processDefinitionWithoutTenantId\":null,\"tenantIdIn\":null,\"sorting\":null},\"historicProcessInstanceQuery\":{\"processDefinitionId\":null,\"incidentType\":null,\"orQueries\":null,\"sorting\":null}}"; + + ObjectMapper mapper = new ObjectMapper(); + + // when + SetJobRetriesByProcessDto dto = mapper.readValue(json, SetJobRetriesByProcessDto.class); + + // then + assertThat(dto.isDueDateSet()).isFalse(); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeCompletedActivityInstanceRestServiceTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeCompletedActivityInstanceRestServiceTest.java new file mode 100644 index 0000000000000000000000000000000000000000..89c49d88b84594c76056738239fa60061bb0d8e3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeCompletedActivityInstanceRestServiceTest.java @@ -0,0 +1,168 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.optimize; + +import io.restassured.response.Response; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.OptimizeService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.persistence.entity.HistoricActivityInstanceEntity; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.Assert; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response.Status; +import java.util.Collections; +import java.util.Date; + +import static io.restassured.RestAssured.given; +import static io.restassured.path.json.JsonPath.from; +import static org.camunda.bpm.engine.rest.util.DateTimeUtils.DATE_FORMAT_WITH_TIMEZONE; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + + +public class OptimizeCompletedActivityInstanceRestServiceTest extends AbstractRestServiceTest { + + public static final String OPTIMIZE_COMPLETED_ACTIVITY_INSTANCE_PATH = + TEST_RESOURCE_ROOT_PATH + "/optimize/activity-instance/completed"; + + protected OptimizeService mockedOptimizeService; + protected ProcessEngine namedProcessEngine; + + @ClassRule + public static TestContainerRule rule = new TestContainerRule(); + + @Before + public void setUpRuntimeData() { + mockedOptimizeService = mock(OptimizeService.class); + ProcessEngineConfigurationImpl mockedConfig = mock(ProcessEngineConfigurationImpl.class); + + + namedProcessEngine = getProcessEngine(MockProvider.EXAMPLE_PROCESS_ENGINE_NAME); + when(namedProcessEngine.getProcessEngineConfiguration()).thenReturn(mockedConfig); + when(mockedConfig.getOptimizeService()).thenReturn(mockedOptimizeService); + } + + @Test + public void testNoQueryParameters() { + given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_ACTIVITY_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricActivityInstances(null, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testFinishedAfterQueryParameter() { + Date now = new Date(); + given() + .queryParam("finishedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_ACTIVITY_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricActivityInstances(now, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testFinishedAtQueryParameter() { + Date now = new Date(); + given() + .queryParam("finishedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_ACTIVITY_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricActivityInstances(null, now, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testMaxResultsQueryParameter() { + given() + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_ACTIVITY_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricActivityInstances(null, null, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testQueryParameterCombination() { + Date now = new Date(); + given() + .queryParam("finishedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("finishedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_ACTIVITY_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricActivityInstances(now, now, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testPresenceOfSequenceCounterProperty() { + final HistoricActivityInstanceEntity mock = mock(HistoricActivityInstanceEntity.class); + when(mock.getSequenceCounter()).thenReturn(MockProvider.EXAMPLE_HISTORIC_ACTIVITY_SEQUENCE_COUNTER); + when(mockedOptimizeService.getCompletedHistoricActivityInstances(null, null, Integer.MAX_VALUE)) + .thenReturn(Collections.singletonList(mock)); + + final Response response = given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_ACTIVITY_INSTANCE_PATH); + + String content = response.asString(); + long sequenceCounter = from(content).getLong("[0].sequenceCounter"); + + Assert.assertEquals(MockProvider.EXAMPLE_HISTORIC_ACTIVITY_SEQUENCE_COUNTER, sequenceCounter); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeCompletedHistoricIncidentRestServiceTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeCompletedHistoricIncidentRestServiceTest.java new file mode 100644 index 0000000000000000000000000000000000000000..a60a243494062175edf4ba6a2973eabf441d261b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeCompletedHistoricIncidentRestServiceTest.java @@ -0,0 +1,166 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.optimize; + +import io.restassured.response.Response; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.OptimizeService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.persistence.entity.HistoricIncidentEntity; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response.Status; +import java.util.Collections; +import java.util.Date; + +import static io.restassured.RestAssured.given; +import static io.restassured.path.json.JsonPath.from; +import static org.camunda.bpm.engine.rest.util.DateTimeUtils.DATE_FORMAT_WITH_TIMEZONE; +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + +public class OptimizeCompletedHistoricIncidentRestServiceTest extends AbstractRestServiceTest { + + public static final String OPTIMIZE_COMPLETED_HISTORIC_INCIDENT_PATH = + TEST_RESOURCE_ROOT_PATH + "/optimize/incident/completed"; + + protected OptimizeService mockedOptimizeService; + protected ProcessEngine namedProcessEngine; + + @ClassRule + public static TestContainerRule rule = new TestContainerRule(); + + @Before + public void setUpRuntimeData() { + mockedOptimizeService = mock(OptimizeService.class); + ProcessEngineConfigurationImpl mockedConfig = mock(ProcessEngineConfigurationImpl.class); + + namedProcessEngine = getProcessEngine(MockProvider.EXAMPLE_PROCESS_ENGINE_NAME); + when(namedProcessEngine.getProcessEngineConfiguration()).thenReturn(mockedConfig); + when(mockedConfig.getOptimizeService()).thenReturn(mockedOptimizeService); + } + + @Test + public void testNoQueryParameters() { + given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_HISTORIC_INCIDENT_PATH); + + verify(mockedOptimizeService).getCompletedHistoricIncidents(null, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testFinishedAfterQueryParameter() { + Date now = new Date(); + given() + .queryParam("finishedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_HISTORIC_INCIDENT_PATH); + + verify(mockedOptimizeService).getCompletedHistoricIncidents(now, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testFinishedAtQueryParameter() { + Date now = new Date(); + given() + .queryParam("finishedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_HISTORIC_INCIDENT_PATH); + + verify(mockedOptimizeService).getCompletedHistoricIncidents(null, now, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testMaxResultsQueryParameter() { + given() + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_HISTORIC_INCIDENT_PATH); + + verify(mockedOptimizeService).getCompletedHistoricIncidents(null, null, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testQueryParameterCombination() { + Date now = new Date(); + given() + .queryParam("finishedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("finishedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_HISTORIC_INCIDENT_PATH); + + verify(mockedOptimizeService).getCompletedHistoricIncidents(now, now, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testPresenceOfProcessInstanceIdProperty() { + final HistoricIncidentEntity mock = mock(HistoricIncidentEntity.class); + when(mock.getProcessInstanceId()).thenReturn(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID); + when(mockedOptimizeService.getCompletedHistoricIncidents(null, null, Integer.MAX_VALUE)) + .thenReturn(Collections.singletonList(mock)); + + final Response response = given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_HISTORIC_INCIDENT_PATH); + + String content = response.asString(); + String processInstanceId = from(content).getString("[0].processInstanceId"); + + assertEquals(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID, processInstanceId); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeCompletedProcessInstanceRestServiceTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeCompletedProcessInstanceRestServiceTest.java new file mode 100644 index 0000000000000000000000000000000000000000..c354842af74acc549334a47eb9ebadc1b98d561c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeCompletedProcessInstanceRestServiceTest.java @@ -0,0 +1,142 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.optimize; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.OptimizeService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response.Status; +import java.util.Date; + +import static io.restassured.RestAssured.given; +import static org.camunda.bpm.engine.rest.util.DateTimeUtils.DATE_FORMAT_WITH_TIMEZONE; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + + +public class OptimizeCompletedProcessInstanceRestServiceTest extends AbstractRestServiceTest { + + public static final String OPTIMIZE_COMPLETED_PROCESS_INSTANCE_PATH = + TEST_RESOURCE_ROOT_PATH + "/optimize/process-instance/completed"; + + protected OptimizeService mockedOptimizeService; + protected ProcessEngine namedProcessEngine; + + @ClassRule + public static TestContainerRule rule = new TestContainerRule(); + + @Before + public void setUpRuntimeData() { + mockedOptimizeService = mock(OptimizeService.class); + ProcessEngineConfigurationImpl mockedConfig = mock(ProcessEngineConfigurationImpl.class); + + + namedProcessEngine = getProcessEngine(MockProvider.EXAMPLE_PROCESS_ENGINE_NAME); + when(namedProcessEngine.getProcessEngineConfiguration()).thenReturn(mockedConfig); + when(mockedConfig.getOptimizeService()).thenReturn(mockedOptimizeService); + } + + @Test + public void testNoQueryParameters() { + given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_PROCESS_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricProcessInstances(null, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testFinishedAfterQueryParameter() { + Date now = new Date(); + given() + .queryParam("finishedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_PROCESS_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricProcessInstances(now, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testFinishedAtQueryParameter() { + Date now = new Date(); + given() + .queryParam("finishedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_PROCESS_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricProcessInstances(null, now, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testMaxResultsQueryParameter() { + given() + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_PROCESS_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricProcessInstances(null, null, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testQueryParameterCombination() { + Date now = new Date(); + given() + .queryParam("finishedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("finishedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_PROCESS_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricProcessInstances(now, now, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeCompletedTaskInstanceRestServiceTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeCompletedTaskInstanceRestServiceTest.java new file mode 100644 index 0000000000000000000000000000000000000000..b676a86baa63531fa5dedda9a583e0f3080081fe --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeCompletedTaskInstanceRestServiceTest.java @@ -0,0 +1,142 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.optimize; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.OptimizeService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response.Status; +import java.util.Date; + +import static io.restassured.RestAssured.given; +import static org.camunda.bpm.engine.rest.util.DateTimeUtils.DATE_FORMAT_WITH_TIMEZONE; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + + +public class OptimizeCompletedTaskInstanceRestServiceTest extends AbstractRestServiceTest { + + public static final String OPTIMIZE_COMPLETED_TASK_INSTANCE_PATH = + TEST_RESOURCE_ROOT_PATH + "/optimize/task-instance/completed"; + + protected OptimizeService mockedOptimizeService; + protected ProcessEngine namedProcessEngine; + + @ClassRule + public static TestContainerRule rule = new TestContainerRule(); + + @Before + public void setUpRuntimeData() { + mockedOptimizeService = mock(OptimizeService.class); + ProcessEngineConfigurationImpl mockedConfig = mock(ProcessEngineConfigurationImpl.class); + + + namedProcessEngine = getProcessEngine(MockProvider.EXAMPLE_PROCESS_ENGINE_NAME); + when(namedProcessEngine.getProcessEngineConfiguration()).thenReturn(mockedConfig); + when(mockedConfig.getOptimizeService()).thenReturn(mockedOptimizeService); + } + + @Test + public void testNoQueryParameters() { + given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_TASK_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricTaskInstances(null, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testFinishedAfterQueryParameter() { + Date now = new Date(); + given() + .queryParam("finishedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_TASK_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricTaskInstances(now, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testFinishedAtQueryParameter() { + Date now = new Date(); + given() + .queryParam("finishedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_TASK_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricTaskInstances(null, now, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testMaxResultsQueryParameter() { + given() + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_TASK_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricTaskInstances(null, null, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testQueryParameterCombination() { + Date now = new Date(); + given() + .queryParam("finishedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("finishedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_COMPLETED_TASK_INSTANCE_PATH); + + verify(mockedOptimizeService).getCompletedHistoricTaskInstances(now, now, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeDecisionInstanceRestServiceTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeDecisionInstanceRestServiceTest.java new file mode 100644 index 0000000000000000000000000000000000000000..70f096e1b34c4f3ea5607e41d4d6605fe2af8197 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeDecisionInstanceRestServiceTest.java @@ -0,0 +1,142 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.optimize; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.OptimizeService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response.Status; +import java.util.Date; + +import static io.restassured.RestAssured.given; +import static org.camunda.bpm.engine.rest.util.DateTimeUtils.DATE_FORMAT_WITH_TIMEZONE; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + + +public class OptimizeDecisionInstanceRestServiceTest extends AbstractRestServiceTest { + + public static final String OPTIMIZE_DECISION_INSTANCE_PATH = + TEST_RESOURCE_ROOT_PATH + "/optimize/decision-instance"; + + protected OptimizeService mockedOptimizeService; + protected ProcessEngine namedProcessEngine; + + @ClassRule + public static TestContainerRule rule = new TestContainerRule(); + + @Before + public void setUpRuntimeData() { + mockedOptimizeService = mock(OptimizeService.class); + ProcessEngineConfigurationImpl mockedConfig = mock(ProcessEngineConfigurationImpl.class); + + + namedProcessEngine = getProcessEngine(MockProvider.EXAMPLE_PROCESS_ENGINE_NAME); + when(namedProcessEngine.getProcessEngineConfiguration()).thenReturn(mockedConfig); + when(mockedConfig.getOptimizeService()).thenReturn(mockedOptimizeService); + } + + @Test + public void testNoQueryParameters() { + given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_DECISION_INSTANCE_PATH); + + verify(mockedOptimizeService).getHistoricDecisionInstances(null, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testFinishedAfterQueryParameter() { + Date now = new Date(); + given() + .queryParam("evaluatedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_DECISION_INSTANCE_PATH); + + verify(mockedOptimizeService).getHistoricDecisionInstances(now, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testFinishedAtQueryParameter() { + Date now = new Date(); + given() + .queryParam("evaluatedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_DECISION_INSTANCE_PATH); + + verify(mockedOptimizeService).getHistoricDecisionInstances(null, now, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testMaxResultsQueryParameter() { + given() + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_DECISION_INSTANCE_PATH); + + verify(mockedOptimizeService).getHistoricDecisionInstances(null, null, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testQueryParameterCombination() { + Date now = new Date(); + given() + .queryParam("evaluatedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("evaluatedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_DECISION_INSTANCE_PATH); + + verify(mockedOptimizeService).getHistoricDecisionInstances(now, now, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeHistoricIdentityLinkLogRestServiceTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeHistoricIdentityLinkLogRestServiceTest.java new file mode 100644 index 0000000000000000000000000000000000000000..b151d232e8b8300e082d54642eb4a918d811bc91 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeHistoricIdentityLinkLogRestServiceTest.java @@ -0,0 +1,167 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.optimize; + +import io.restassured.response.Response; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.OptimizeService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.persistence.entity.optimize.OptimizeHistoricIdentityLinkLogEntity; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.Assert; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response.Status; +import java.util.Collections; +import java.util.Date; + +import static io.restassured.RestAssured.given; +import static io.restassured.path.json.JsonPath.from; +import static org.camunda.bpm.engine.rest.util.DateTimeUtils.DATE_FORMAT_WITH_TIMEZONE; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + +public class OptimizeHistoricIdentityLinkLogRestServiceTest extends AbstractRestServiceTest { + + public static final String OPTIMIZE_HISTORIC_IDENTITY_LINK_LOG_PATH = + TEST_RESOURCE_ROOT_PATH + "/optimize/identity-link-log"; + + protected OptimizeService mockedOptimizeService; + protected ProcessEngine namedProcessEngine; + + @ClassRule + public static TestContainerRule rule = new TestContainerRule(); + + @Before + public void setUpRuntimeData() { + mockedOptimizeService = mock(OptimizeService.class); + ProcessEngineConfigurationImpl mockedConfig = mock(ProcessEngineConfigurationImpl.class); + + + namedProcessEngine = getProcessEngine(MockProvider.EXAMPLE_PROCESS_ENGINE_NAME); + when(namedProcessEngine.getProcessEngineConfiguration()).thenReturn(mockedConfig); + when(mockedConfig.getOptimizeService()).thenReturn(mockedOptimizeService); + } + + @Test + public void testNoQueryParameters() { + given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_HISTORIC_IDENTITY_LINK_LOG_PATH); + + verify(mockedOptimizeService).getHistoricIdentityLinkLogs(null, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testOccurredAfterQueryParameter() { + Date now = new Date(); + given() + .queryParam("occurredAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_HISTORIC_IDENTITY_LINK_LOG_PATH); + + verify(mockedOptimizeService).getHistoricIdentityLinkLogs(now, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testOccurredAtQueryParameter() { + Date now = new Date(); + given() + .queryParam("occurredAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_HISTORIC_IDENTITY_LINK_LOG_PATH); + + verify(mockedOptimizeService).getHistoricIdentityLinkLogs(null, now, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testMaxResultsQueryParameter() { + given() + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_HISTORIC_IDENTITY_LINK_LOG_PATH); + + verify(mockedOptimizeService).getHistoricIdentityLinkLogs(null, null, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testQueryParameterCombination() { + Date now = new Date(); + given() + .queryParam("occurredAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("occurredAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_HISTORIC_IDENTITY_LINK_LOG_PATH); + + verify(mockedOptimizeService).getHistoricIdentityLinkLogs(now, now, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testPresenceOfProcessInstanceIdProperty() { + final OptimizeHistoricIdentityLinkLogEntity mock = mock(OptimizeHistoricIdentityLinkLogEntity.class); + when(mock.getProcessInstanceId()).thenReturn(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID); + when(mockedOptimizeService.getHistoricIdentityLinkLogs(null, null, Integer.MAX_VALUE)) + .thenReturn(Collections.singletonList(mock)); + + final Response response = given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_HISTORIC_IDENTITY_LINK_LOG_PATH); + + String content = response.asString(); + String processInstanceId = from(content).getString("[0].processInstanceId"); + + Assert.assertEquals(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID, processInstanceId); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeOpenHistoricIncidentRestServiceTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeOpenHistoricIncidentRestServiceTest.java new file mode 100644 index 0000000000000000000000000000000000000000..dde854119eed5e6b8dc6230a74f70c2edfe0f1bc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeOpenHistoricIncidentRestServiceTest.java @@ -0,0 +1,166 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.optimize; + +import io.restassured.response.Response; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.OptimizeService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.persistence.entity.HistoricIncidentEntity; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response.Status; +import java.util.Collections; +import java.util.Date; + +import static io.restassured.RestAssured.given; +import static io.restassured.path.json.JsonPath.from; +import static org.camunda.bpm.engine.rest.util.DateTimeUtils.DATE_FORMAT_WITH_TIMEZONE; +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + +public class OptimizeOpenHistoricIncidentRestServiceTest extends AbstractRestServiceTest { + + private static final String OPTIMIZE_OPEN_HISTORIC_INCIDENT_PATH = + TEST_RESOURCE_ROOT_PATH + "/optimize/incident/open"; + + protected OptimizeService mockedOptimizeService; + protected ProcessEngine namedProcessEngine; + + @ClassRule + public static TestContainerRule rule = new TestContainerRule(); + + @Before + public void setUpRuntimeData() { + mockedOptimizeService = mock(OptimizeService.class); + ProcessEngineConfigurationImpl mockedConfig = mock(ProcessEngineConfigurationImpl.class); + + namedProcessEngine = getProcessEngine(MockProvider.EXAMPLE_PROCESS_ENGINE_NAME); + when(namedProcessEngine.getProcessEngineConfiguration()).thenReturn(mockedConfig); + when(mockedConfig.getOptimizeService()).thenReturn(mockedOptimizeService); + } + + @Test + public void testNoQueryParameters() { + given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_OPEN_HISTORIC_INCIDENT_PATH); + + verify(mockedOptimizeService).getOpenHistoricIncidents(null, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testCreatedAfterQueryParameter() { + Date now = new Date(); + given() + .queryParam("createdAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_OPEN_HISTORIC_INCIDENT_PATH); + + verify(mockedOptimizeService).getOpenHistoricIncidents(now, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testCreatedAtQueryParameter() { + Date now = new Date(); + given() + .queryParam("createdAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_OPEN_HISTORIC_INCIDENT_PATH); + + verify(mockedOptimizeService).getOpenHistoricIncidents(null, now, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testMaxResultsQueryParameter() { + given() + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_OPEN_HISTORIC_INCIDENT_PATH); + + verify(mockedOptimizeService).getOpenHistoricIncidents(null, null, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testQueryParameterCombination() { + Date now = new Date(); + given() + .queryParam("createdAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("createdAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_OPEN_HISTORIC_INCIDENT_PATH); + + verify(mockedOptimizeService).getOpenHistoricIncidents(now, now, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testPresenceOfProcessInstanceIdProperty() { + final HistoricIncidentEntity mock = mock(HistoricIncidentEntity.class); + when(mock.getProcessInstanceId()).thenReturn(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID); + when(mockedOptimizeService.getOpenHistoricIncidents(null, null, Integer.MAX_VALUE)) + .thenReturn(Collections.singletonList(mock)); + + final Response response = given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_OPEN_HISTORIC_INCIDENT_PATH); + + String content = response.asString(); + String processInstanceId = from(content).getString("[0].processInstanceId"); + + assertEquals(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID, processInstanceId); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeRunningActivityInstanceRestServiceTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeRunningActivityInstanceRestServiceTest.java new file mode 100644 index 0000000000000000000000000000000000000000..c0e392f74a32195061ad8a59c069b0ea54aa687a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeRunningActivityInstanceRestServiceTest.java @@ -0,0 +1,168 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.optimize; + +import io.restassured.response.Response; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.OptimizeService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.persistence.entity.HistoricActivityInstanceEntity; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.Assert; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response.Status; +import java.util.Collections; +import java.util.Date; + +import static io.restassured.RestAssured.given; +import static io.restassured.path.json.JsonPath.from; +import static org.camunda.bpm.engine.rest.util.DateTimeUtils.DATE_FORMAT_WITH_TIMEZONE; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + + +public class OptimizeRunningActivityInstanceRestServiceTest extends AbstractRestServiceTest { + + public static final String OPTIMIZE_RUNNING_ACTIVITY_INSTANCE_PATH = + TEST_RESOURCE_ROOT_PATH + "/optimize/activity-instance/running"; + + protected OptimizeService mockedOptimizeService; + protected ProcessEngine namedProcessEngine; + + @ClassRule + public static TestContainerRule rule = new TestContainerRule(); + + @Before + public void setUpRuntimeData() { + mockedOptimizeService = mock(OptimizeService.class); + ProcessEngineConfigurationImpl mockedConfig = mock(ProcessEngineConfigurationImpl.class); + + + namedProcessEngine = getProcessEngine(MockProvider.EXAMPLE_PROCESS_ENGINE_NAME); + when(namedProcessEngine.getProcessEngineConfiguration()).thenReturn(mockedConfig); + when(mockedConfig.getOptimizeService()).thenReturn(mockedOptimizeService); + } + + @Test + public void testNoQueryParameters() { + given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_ACTIVITY_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricActivityInstances(null, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testStartedAfterQueryParameter() { + Date now = new Date(); + given() + .queryParam("startedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_ACTIVITY_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricActivityInstances(now, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testStartedAtQueryParameter() { + Date now = new Date(); + given() + .queryParam("startedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_ACTIVITY_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricActivityInstances(null, now, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testMaxResultsQueryParameter() { + given() + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_ACTIVITY_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricActivityInstances(null, null, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testQueryParameterCombination() { + Date now = new Date(); + given() + .queryParam("startedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("startedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_ACTIVITY_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricActivityInstances(now, now, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testPresenceOfSequenceCounterProperty() { + final HistoricActivityInstanceEntity mock = mock(HistoricActivityInstanceEntity.class); + when(mock.getSequenceCounter()).thenReturn(MockProvider.EXAMPLE_HISTORIC_ACTIVITY_SEQUENCE_COUNTER); + when(mockedOptimizeService.getRunningHistoricActivityInstances(null, null, Integer.MAX_VALUE)) + .thenReturn(Collections.singletonList(mock)); + + final Response response = given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_ACTIVITY_INSTANCE_PATH); + + String content = response.asString(); + long sequenceCounter = from(content).getLong("[0].sequenceCounter"); + + Assert.assertEquals(MockProvider.EXAMPLE_HISTORIC_ACTIVITY_SEQUENCE_COUNTER, sequenceCounter); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeRunningProcessInstanceRestServiceTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeRunningProcessInstanceRestServiceTest.java new file mode 100644 index 0000000000000000000000000000000000000000..c24013b6783a9af8e9b083dff4670320f849df4b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeRunningProcessInstanceRestServiceTest.java @@ -0,0 +1,142 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.optimize; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.OptimizeService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response.Status; +import java.util.Date; + +import static io.restassured.RestAssured.given; +import static org.camunda.bpm.engine.rest.util.DateTimeUtils.DATE_FORMAT_WITH_TIMEZONE; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + + +public class OptimizeRunningProcessInstanceRestServiceTest extends AbstractRestServiceTest { + + public static final String OPTIMIZE_RUNNING_PROCESS_INSTANCE_PATH = + TEST_RESOURCE_ROOT_PATH + "/optimize/process-instance/running"; + + protected OptimizeService mockedOptimizeService; + protected ProcessEngine namedProcessEngine; + + @ClassRule + public static TestContainerRule rule = new TestContainerRule(); + + @Before + public void setUpRuntimeData() { + mockedOptimizeService = mock(OptimizeService.class); + ProcessEngineConfigurationImpl mockedConfig = mock(ProcessEngineConfigurationImpl.class); + + + namedProcessEngine = getProcessEngine(MockProvider.EXAMPLE_PROCESS_ENGINE_NAME); + when(namedProcessEngine.getProcessEngineConfiguration()).thenReturn(mockedConfig); + when(mockedConfig.getOptimizeService()).thenReturn(mockedOptimizeService); + } + + @Test + public void testNoQueryParameters() { + given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_PROCESS_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricProcessInstances(null, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testStartedAfterQueryParameter() { + Date now = new Date(); + given() + .queryParam("startedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_PROCESS_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricProcessInstances(now, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testStartedAtQueryParameter() { + Date now = new Date(); + given() + .queryParam("startedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_PROCESS_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricProcessInstances(null, now, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testMaxResultsQueryParameter() { + given() + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_PROCESS_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricProcessInstances(null, null, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testQueryParameterCombination() { + Date now = new Date(); + given() + .queryParam("startedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("startedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_PROCESS_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricProcessInstances(now, now, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeRunningTaskInstanceRestServiceTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeRunningTaskInstanceRestServiceTest.java new file mode 100644 index 0000000000000000000000000000000000000000..1697e167e14cc8fc2071653799de268c66828c49 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeRunningTaskInstanceRestServiceTest.java @@ -0,0 +1,142 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.optimize; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.OptimizeService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response.Status; +import java.util.Date; + +import static io.restassured.RestAssured.given; +import static org.camunda.bpm.engine.rest.util.DateTimeUtils.DATE_FORMAT_WITH_TIMEZONE; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + + +public class OptimizeRunningTaskInstanceRestServiceTest extends AbstractRestServiceTest { + + public static final String OPTIMIZE_RUNNING_TASK_INSTANCE_PATH = + TEST_RESOURCE_ROOT_PATH + "/optimize/task-instance/running"; + + protected OptimizeService mockedOptimizeService; + protected ProcessEngine namedProcessEngine; + + @ClassRule + public static TestContainerRule rule = new TestContainerRule(); + + @Before + public void setUpRuntimeData() { + mockedOptimizeService = mock(OptimizeService.class); + ProcessEngineConfigurationImpl mockedConfig = mock(ProcessEngineConfigurationImpl.class); + + + namedProcessEngine = getProcessEngine(MockProvider.EXAMPLE_PROCESS_ENGINE_NAME); + when(namedProcessEngine.getProcessEngineConfiguration()).thenReturn(mockedConfig); + when(mockedConfig.getOptimizeService()).thenReturn(mockedOptimizeService); + } + + @Test + public void testNoQueryParameters() { + given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_TASK_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricTaskInstances(null, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testStartedAfterQueryParameter() { + Date now = new Date(); + given() + .queryParam("startedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_TASK_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricTaskInstances(now, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testStartedAtQueryParameter() { + Date now = new Date(); + given() + .queryParam("startedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_TASK_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricTaskInstances(null, now, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testMaxResultsQueryParameter() { + given() + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_TASK_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricTaskInstances(null, null, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testQueryParameterCombination() { + Date now = new Date(); + given() + .queryParam("startedAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("startedAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_RUNNING_TASK_INSTANCE_PATH); + + verify(mockedOptimizeService).getRunningHistoricTaskInstances(now, now, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeUserOperationLogRestServiceTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeUserOperationLogRestServiceTest.java new file mode 100644 index 0000000000000000000000000000000000000000..5b3ee8fbb82a4a9838fce4305d18e5318735344b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeUserOperationLogRestServiceTest.java @@ -0,0 +1,141 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.optimize; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.OptimizeService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response.Status; +import java.util.Date; + +import static io.restassured.RestAssured.given; +import static org.camunda.bpm.engine.rest.util.DateTimeUtils.DATE_FORMAT_WITH_TIMEZONE; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + +public class OptimizeUserOperationLogRestServiceTest extends AbstractRestServiceTest { + + public static final String OPTIMIZE_USER_OPERATION_LOG_PATH = + TEST_RESOURCE_ROOT_PATH + "/optimize/user-operation"; + + protected OptimizeService mockedOptimizeService; + protected ProcessEngine namedProcessEngine; + + @ClassRule + public static TestContainerRule rule = new TestContainerRule(); + + @Before + public void setUpRuntimeData() { + mockedOptimizeService = mock(OptimizeService.class); + ProcessEngineConfigurationImpl mockedConfig = mock(ProcessEngineConfigurationImpl.class); + + + namedProcessEngine = getProcessEngine(MockProvider.EXAMPLE_PROCESS_ENGINE_NAME); + when(namedProcessEngine.getProcessEngineConfiguration()).thenReturn(mockedConfig); + when(mockedConfig.getOptimizeService()).thenReturn(mockedOptimizeService); + } + + @Test + public void testNoQueryParameters() { + given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_USER_OPERATION_LOG_PATH); + + verify(mockedOptimizeService).getHistoricUserOperationLogs(null, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testOccurredAfterQueryParameter() { + Date now = new Date(); + given() + .queryParam("occurredAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_USER_OPERATION_LOG_PATH); + + verify(mockedOptimizeService).getHistoricUserOperationLogs(now, null, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testOccurredAtQueryParameter() { + Date now = new Date(); + given() + .queryParam("occurredAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_USER_OPERATION_LOG_PATH); + + verify(mockedOptimizeService).getHistoricUserOperationLogs(null, now, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testMaxResultsQueryParameter() { + given() + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_USER_OPERATION_LOG_PATH); + + verify(mockedOptimizeService).getHistoricUserOperationLogs(null, null, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testQueryParameterCombination() { + Date now = new Date(); + given() + .queryParam("occurredAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("occurredAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_USER_OPERATION_LOG_PATH); + + verify(mockedOptimizeService).getHistoricUserOperationLogs(now, now, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeVariableUpdateRestServiceTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeVariableUpdateRestServiceTest.java new file mode 100644 index 0000000000000000000000000000000000000000..89d7941b04341401d0f4b6a40142bd542d43ee35 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/optimize/OptimizeVariableUpdateRestServiceTest.java @@ -0,0 +1,215 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.optimize; + +import io.restassured.response.Response; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.history.HistoricVariableUpdate; +import org.camunda.bpm.engine.impl.OptimizeService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.persistence.entity.HistoricDetailVariableInstanceUpdateEntity; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockHistoricVariableUpdateBuilder; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.Assert; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response.Status; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; + +import static io.restassured.RestAssured.given; +import static io.restassured.path.json.JsonPath.from; +import static org.camunda.bpm.engine.rest.helper.MockProvider.EXAMPLE_PRIMITIVE_VARIABLE_VALUE; +import static org.camunda.bpm.engine.rest.util.DateTimeUtils.DATE_FORMAT_WITH_TIMEZONE; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.anyBoolean; +import static org.mockito.Mockito.anyInt; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + +public class OptimizeVariableUpdateRestServiceTest extends AbstractRestServiceTest { + + public static final String OPTIMIZE_VARIABLE_UPDATE_PATH = + TEST_RESOURCE_ROOT_PATH + "/optimize/variable-update"; + + protected OptimizeService mockedOptimizeService; + protected ProcessEngine namedProcessEngine; + + protected HistoricVariableUpdate historicUpdateMock; + protected MockHistoricVariableUpdateBuilder historicUpdateBuilder; + + @ClassRule + public static TestContainerRule rule = new TestContainerRule(); + + @Before + public void setUpRuntimeData() { + historicUpdateBuilder = MockProvider.mockHistoricVariableUpdate(); + historicUpdateMock = historicUpdateBuilder.build(); + + mockedOptimizeService = mock(OptimizeService.class); + ProcessEngineConfigurationImpl mockedConfig = mock(ProcessEngineConfigurationImpl.class); + + when(mockedOptimizeService.getHistoricVariableUpdates(any(Date.class), any(Date.class), anyBoolean(), anyInt())).thenReturn(Arrays.asList(historicUpdateMock)); + + namedProcessEngine = getProcessEngine(MockProvider.EXAMPLE_PROCESS_ENGINE_NAME); + when(namedProcessEngine.getProcessEngineConfiguration()).thenReturn(mockedConfig); + when(mockedConfig.getOptimizeService()).thenReturn(mockedOptimizeService); + } + + @Test + public void testNoQueryParameters() { + given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_VARIABLE_UPDATE_PATH); + + verify(mockedOptimizeService).getHistoricVariableUpdates(null, null, false, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testOccurredAfterQueryParameter() { + Date now = new Date(); + given() + .queryParam("occurredAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_VARIABLE_UPDATE_PATH); + + verify(mockedOptimizeService).getHistoricVariableUpdates(now, null, false, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testOccurredAtQueryParameter() { + Date now = new Date(); + given() + .queryParam("occurredAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_VARIABLE_UPDATE_PATH); + + verify(mockedOptimizeService).getHistoricVariableUpdates(null, now, false, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testExcludeObjectValuesQueryParameter() { + given() + .queryParam("excludeObjectValues", true) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_VARIABLE_UPDATE_PATH); + + verify(mockedOptimizeService).getHistoricVariableUpdates(null, null, true, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testMaxResultsQueryParameter() { + given() + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_VARIABLE_UPDATE_PATH); + + verify(mockedOptimizeService).getHistoricVariableUpdates(null, null, false, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testQueryParameterCombination() { + Date now = new Date(); + given() + .queryParam("occurredAfter", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("occurredAt", DATE_FORMAT_WITH_TIMEZONE.format(now)) + .queryParam("excludeObjectValues", true) + .queryParam("maxResults", 10) + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_VARIABLE_UPDATE_PATH); + + verify(mockedOptimizeService).getHistoricVariableUpdates(now, now, true, 10); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testQueryWhenFileWasDeleted() { + doThrow(new IllegalArgumentException("Parameter 'filename' is null")).when(historicUpdateMock).getTypedValue(); + + given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_VARIABLE_UPDATE_PATH); + + verify(mockedOptimizeService).getHistoricVariableUpdates(null, null, false, Integer.MAX_VALUE); + verifyNoMoreInteractions(mockedOptimizeService); + } + + @Test + public void testPresenceOfSequenceCounterProperty() { + final HistoricDetailVariableInstanceUpdateEntity mock = mock(HistoricDetailVariableInstanceUpdateEntity.class); + when(mock.getSequenceCounter()).thenReturn(MockProvider.EXAMPLE_HISTORIC_ACTIVITY_SEQUENCE_COUNTER); + when(mock.getTypedValue()).thenReturn(EXAMPLE_PRIMITIVE_VARIABLE_VALUE); + when(mockedOptimizeService.getHistoricVariableUpdates(null, null, false, Integer.MAX_VALUE)) + .thenReturn(Collections.singletonList(mock)); + + final Response response = given() + .then() + .expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when() + .get(OPTIMIZE_VARIABLE_UPDATE_PATH); + + String content = response.asString(); + long sequenceCounter = from(content).getLong("[0].sequenceCounter"); + + Assert.assertEquals(MockProvider.EXAMPLE_HISTORIC_ACTIVITY_SEQUENCE_COUNTER, sequenceCounter); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/spi/impl/MockedProcessEngineProvider.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/spi/impl/MockedProcessEngineProvider.java new file mode 100644 index 0000000000000000000000000000000000000000..975977ffdd5231da6541731488d5360293e8de7f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/spi/impl/MockedProcessEngineProvider.java @@ -0,0 +1,133 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.spi.impl; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import org.camunda.bpm.engine.CaseService; +import org.camunda.bpm.engine.ExternalTaskService; +import org.camunda.bpm.engine.FilterService; +import org.camunda.bpm.engine.FormService; +import org.camunda.bpm.engine.HistoryService; +import org.camunda.bpm.engine.IdentityService; +import org.camunda.bpm.engine.ManagementService; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.ProcessEngineConfiguration; +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.TaskService; +import org.camunda.bpm.engine.impl.variable.ValueTypeResolverImpl; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.spi.ProcessEngineProvider; +import org.camunda.bpm.engine.variable.type.ValueTypeResolver; + +public class MockedProcessEngineProvider implements ProcessEngineProvider { + + private static ProcessEngine cachedDefaultProcessEngine; + private static Map cachedEngines = new HashMap(); + + public void resetEngines() { + cachedDefaultProcessEngine = null; + cachedEngines = new HashMap(); + } + + private ProcessEngine mockProcessEngine(String engineName) { + ProcessEngine engine = mock(ProcessEngine.class); + when(engine.getName()).thenReturn(engineName); + mockServices(engine); + mockProcessEngineConfiguration(engine); + return engine; + } + + private void mockServices(ProcessEngine engine) { + RepositoryService repoService = mock(RepositoryService.class); + IdentityService identityService = mock(IdentityService.class); + TaskService taskService = mock(TaskService.class); + RuntimeService runtimeService = mock(RuntimeService.class); + FormService formService = mock(FormService.class); + HistoryService historyService = mock(HistoryService.class); + ManagementService managementService = mock(ManagementService.class); + CaseService caseService = mock(CaseService.class); + FilterService filterService = mock(FilterService.class); + ExternalTaskService externalTaskService = mock(ExternalTaskService.class); + + when(engine.getRepositoryService()).thenReturn(repoService); + when(engine.getIdentityService()).thenReturn(identityService); + when(engine.getTaskService()).thenReturn(taskService); + when(engine.getRuntimeService()).thenReturn(runtimeService); + when(engine.getFormService()).thenReturn(formService); + when(engine.getHistoryService()).thenReturn(historyService); + when(engine.getManagementService()).thenReturn(managementService); + when(engine.getCaseService()).thenReturn(caseService); + when(engine.getFilterService()).thenReturn(filterService); + when(engine.getExternalTaskService()).thenReturn(externalTaskService); + } + + protected void mockProcessEngineConfiguration(ProcessEngine engine) { + ProcessEngineConfiguration configuration = mock(ProcessEngineConfiguration.class); + when(configuration.getValueTypeResolver()).thenReturn(mockValueTypeResolver()); + when(engine.getProcessEngineConfiguration()).thenReturn(configuration); + } + + protected ValueTypeResolver mockValueTypeResolver() { + // no true mock here, but the impl class is a simple container and should be safe to use + return new ValueTypeResolverImpl(); + } + + @Override + public ProcessEngine getDefaultProcessEngine() { + if (cachedDefaultProcessEngine == null) { + cachedDefaultProcessEngine = mockProcessEngine("default"); + } + + return cachedDefaultProcessEngine; + } + + @Override + public ProcessEngine getProcessEngine(String name) { + if (name.equals(MockProvider.NON_EXISTING_PROCESS_ENGINE_NAME)) { + return null; + } + + if (name.equals("default")) { + return getDefaultProcessEngine(); + } + + if (cachedEngines.get(name) == null) { + ProcessEngine mock = mockProcessEngine(name); + cachedEngines.put(name, mock); + } + + return cachedEngines.get(name); + } + + @Override + public Set getProcessEngineNames() { + Set result = new HashSet(); + result.add(MockProvider.EXAMPLE_PROCESS_ENGINE_NAME); + result.add(MockProvider.ANOTHER_EXAMPLE_PROCESS_ENGINE_NAME); + return result; + } + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/AbstractAuthenticationFilterTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/AbstractAuthenticationFilterTest.java new file mode 100644 index 0000000000000000000000000000000000000000..89321992a0233eaf93a12c0bd4f91dce98c24f47 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/AbstractAuthenticationFilterTest.java @@ -0,0 +1,211 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.standalone; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.Matchers.equalTo; +import static org.mockito.Mockito.anyBoolean; +import static org.mockito.Mockito.anyString; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response.Status; + +import org.camunda.bpm.engine.AuthorizationService; +import org.camunda.bpm.engine.IdentityService; +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.identity.Group; +import org.camunda.bpm.engine.identity.GroupQuery; +import org.camunda.bpm.engine.identity.Tenant; +import org.camunda.bpm.engine.identity.TenantQuery; +import org.camunda.bpm.engine.identity.User; +import org.camunda.bpm.engine.impl.AuthorizationServiceImpl; +import org.camunda.bpm.engine.impl.IdentityServiceImpl; +import org.camunda.bpm.engine.impl.digest._apacheCommonsCodec.Base64; +import org.camunda.bpm.engine.repository.ProcessDefinition; +import org.camunda.bpm.engine.repository.ProcessDefinitionQuery; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.ProcessDefinitionRestService; +import org.camunda.bpm.engine.rest.exception.InvalidRequestException; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.impl.NamedProcessEngineRestServiceImpl; +import org.junit.Before; +import org.junit.Test; + +import io.restassured.http.ContentType; + +public abstract class AbstractAuthenticationFilterTest extends AbstractRestServiceTest { + + protected static final String SERVLET_PATH = "/rest"; + protected static final String SERVICE_PATH = TEST_RESOURCE_ROOT_PATH + SERVLET_PATH + NamedProcessEngineRestServiceImpl.PATH + "/{name}"+ ProcessDefinitionRestService.PATH; + + protected AuthorizationService authorizationServiceMock; + protected IdentityService identityServiceMock; + protected RepositoryService repositoryServiceMock; + + protected User userMock; + protected List groupIds; + protected List tenantIds; + + @Before + public void setup() { + authorizationServiceMock = mock(AuthorizationServiceImpl.class); + identityServiceMock = mock(IdentityServiceImpl.class); + repositoryServiceMock = mock(RepositoryService.class); + + when(processEngine.getAuthorizationService()).thenReturn(authorizationServiceMock); + when(processEngine.getIdentityService()).thenReturn(identityServiceMock); + when(processEngine.getRepositoryService()).thenReturn(repositoryServiceMock); + + // for authentication + userMock = MockProvider.createMockUser(); + + List groupMocks = MockProvider.createMockGroups(); + groupIds = setupGroupQueryMock(groupMocks); + + List tenantMocks = Collections.singletonList(MockProvider.createMockTenant()); + tenantIds = setupTenantQueryMock(tenantMocks); + + // example method + ProcessDefinition mockDefinition = MockProvider.createMockDefinition(); + List mockDefinitions = Arrays.asList(mockDefinition); + ProcessDefinitionQuery mockQuery = mock(ProcessDefinitionQuery.class); + when(repositoryServiceMock.createProcessDefinitionQuery()).thenReturn(mockQuery); + when(mockQuery.list()).thenReturn(mockDefinitions); + } + + protected List setupGroupQueryMock(List groups) { + GroupQuery mockGroupQuery = mock(GroupQuery.class); + + when(identityServiceMock.createGroupQuery()).thenReturn(mockGroupQuery); + when(mockGroupQuery.groupMember(anyString())).thenReturn(mockGroupQuery); + when(mockGroupQuery.list()).thenReturn(groups); + + List groupIds = new ArrayList(); + for (Group groupMock : groups) { + groupIds.add(groupMock.getId()); + } + return groupIds; + } + + protected List setupTenantQueryMock(List tenants) { + TenantQuery mockTenantQuery = mock(TenantQuery.class); + + when(identityServiceMock.createTenantQuery()).thenReturn(mockTenantQuery); + when(mockTenantQuery.userMember(anyString())).thenReturn(mockTenantQuery); + when(mockTenantQuery.includingGroupsOfUser(anyBoolean())).thenReturn(mockTenantQuery); + when(mockTenantQuery.list()).thenReturn(tenants); + + List tenantIds = new ArrayList(); + for(Tenant tenant: tenants) { + tenantIds.add(tenant.getId()); + } + return tenantIds; + } + + @Test + public void testHttpBasicAuthenticationCheck() { + when(identityServiceMock.checkPassword(MockProvider.EXAMPLE_USER_ID, MockProvider.EXAMPLE_USER_PASSWORD)).thenReturn(true); + + given() + .auth().basic(MockProvider.EXAMPLE_USER_ID, MockProvider.EXAMPLE_USER_PASSWORD) + .pathParam("name", "default") + .then().expect() + .statusCode(Status.OK.getStatusCode()) + .contentType(MediaType.APPLICATION_JSON) + .when().get(SERVICE_PATH); + + verify(identityServiceMock).setAuthentication(MockProvider.EXAMPLE_USER_ID, groupIds, tenantIds); + } + + @Test + public void testFailingAuthenticationCheck() { + when(identityServiceMock.checkPassword(MockProvider.EXAMPLE_USER_ID, MockProvider.EXAMPLE_USER_PASSWORD)).thenReturn(false); + + given() + .auth().basic(MockProvider.EXAMPLE_USER_ID, MockProvider.EXAMPLE_USER_PASSWORD) + .pathParam("name", "default") + .then().expect() + .statusCode(Status.UNAUTHORIZED.getStatusCode()) + .header(HttpHeaders.WWW_AUTHENTICATE, "Basic realm=\"default\"") + .when().get(SERVICE_PATH); + } + + @Test + public void testMissingAuthHeader() { + given() + .pathParam("name", "someengine") + .then().expect() + .statusCode(Status.UNAUTHORIZED.getStatusCode()) + .header(HttpHeaders.WWW_AUTHENTICATE, "Basic realm=\"someengine\"") + .when().get(SERVICE_PATH); + } + + @Test + public void testUnexpectedAuthHeaderFormat() { + given() + .header(HttpHeaders.AUTHORIZATION, "Digest somevalues, and, some, more") + .pathParam("name", "someengine") + .then().expect() + .statusCode(Status.UNAUTHORIZED.getStatusCode()) + .header(HttpHeaders.WWW_AUTHENTICATE, "Basic realm=\"someengine\"") + .when().get(SERVICE_PATH); + } + + @Test + public void testMalformedCredentials() { + given() + .header(HttpHeaders.AUTHORIZATION, "Basic " + new String(Base64.encodeBase64("this is not a valid format".getBytes()))) + .pathParam("name", "default") + .then().expect() + .statusCode(Status.UNAUTHORIZED.getStatusCode()) + .header(HttpHeaders.WWW_AUTHENTICATE, "Basic realm=\"default\"") + .when().get(SERVICE_PATH); + } + + @Test + public void testNonExistingEngineAuthentication() { + given() + .auth().basic(MockProvider.EXAMPLE_USER_ID, MockProvider.EXAMPLE_USER_PASSWORD) + .pathParam("name", MockProvider.NON_EXISTING_PROCESS_ENGINE_NAME) + .then().expect() + .statusCode(Status.NOT_FOUND.getStatusCode()).contentType(ContentType.JSON) + .body("type", equalTo(InvalidRequestException.class.getSimpleName())) + .body("message", equalTo("Process engine " + MockProvider.NON_EXISTING_PROCESS_ENGINE_NAME + " not available")) + .when().get(SERVICE_PATH); + } + + @Test + public void testMalformedBase64Value() { + given() + .header(HttpHeaders.AUTHORIZATION, "Basic someNonBase64Characters!(#") + .pathParam("name", "default") + .then().expect() + .statusCode(Status.UNAUTHORIZED.getStatusCode()) + .header(HttpHeaders.WWW_AUTHENTICATE, "Basic realm=\"default\"") + .when().get(SERVICE_PATH); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/AbstractEmptyBodyFilterTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/AbstractEmptyBodyFilterTest.java new file mode 100644 index 0000000000000000000000000000000000000000..1eece3b7640081e3190a6074dab3e4555d8a16bb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/AbstractEmptyBodyFilterTest.java @@ -0,0 +1,151 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.standalone; + +import org.apache.http.HttpEntity; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ByteArrayEntity; +import org.apache.http.entity.ContentType; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.util.EntityUtils; +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.repository.ProcessDefinition; +import org.camunda.bpm.engine.repository.ProcessDefinitionQuery; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.camunda.bpm.engine.runtime.ProcessInstanceWithVariables; +import org.camunda.bpm.engine.runtime.ProcessInstantiationBuilder; +import org.junit.After; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; +import java.io.IOException; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.anyBoolean; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +/** + * @author Tassilo Weidner + */ +public abstract class AbstractEmptyBodyFilterTest extends AbstractRestServiceTest { + + protected static final String TEST_RESOURCE_ROOT_PATH = "/rest-test/rest"; + protected static final String PROCESS_DEFINITION_URL = TEST_RESOURCE_ROOT_PATH + "/process-definition"; + protected static final String SINGLE_PROCESS_DEFINITION_BY_KEY_URL = PROCESS_DEFINITION_URL + "/key/" + MockProvider.EXAMPLE_PROCESS_DEFINITION_KEY; + protected static final String START_PROCESS_INSTANCE_BY_KEY_URL = SINGLE_PROCESS_DEFINITION_BY_KEY_URL + "/start"; + + protected ProcessInstantiationBuilder mockInstantiationBuilder; + protected RuntimeService runtimeServiceMock; + + protected CloseableHttpClient client; + protected RequestConfig reqConfig; + + @Before + public void setUpHttpClientAndRuntimeData() { + client = HttpClients.createDefault(); + reqConfig = RequestConfig.custom().setConnectTimeout(3 * 60 * 1000).setSocketTimeout(10 * 60 * 1000).build(); + + ProcessDefinition mockDefinition = MockProvider.createMockDefinition(); + + runtimeServiceMock = mock(RuntimeService.class); + when(processEngine.getRuntimeService()).thenReturn(runtimeServiceMock); + + mockInstantiationBuilder = mock(ProcessInstantiationBuilder.class); + when(mockInstantiationBuilder.setVariables(any())).thenReturn(mockInstantiationBuilder); + when(mockInstantiationBuilder.businessKey(any())).thenReturn(mockInstantiationBuilder); + when(mockInstantiationBuilder.caseInstanceId(any())).thenReturn(mockInstantiationBuilder); + when(runtimeServiceMock.createProcessInstanceById(any())).thenReturn(mockInstantiationBuilder); + + ProcessInstanceWithVariables resultInstanceWithVariables = MockProvider.createMockInstanceWithVariables(); + when(mockInstantiationBuilder.executeWithVariablesInReturn(anyBoolean(), anyBoolean())).thenReturn(resultInstanceWithVariables); + + ProcessDefinitionQuery processDefinitionQueryMock = mock(ProcessDefinitionQuery.class); + when(processDefinitionQueryMock.processDefinitionKey(MockProvider.EXAMPLE_PROCESS_DEFINITION_KEY)).thenReturn(processDefinitionQueryMock); + when(processDefinitionQueryMock.withoutTenantId()).thenReturn(processDefinitionQueryMock); + when(processDefinitionQueryMock.latestVersion()).thenReturn(processDefinitionQueryMock); + when(processDefinitionQueryMock.singleResult()).thenReturn(mockDefinition); + + RepositoryService repositoryServiceMock = mock(RepositoryService.class); + when(processEngine.getRepositoryService()).thenReturn(repositoryServiceMock); + when(repositoryServiceMock.createProcessDefinitionQuery()).thenReturn(processDefinitionQueryMock); + } + + @After + public void tearDown() throws IOException { + client.close(); + } + + @Test + public void testBodyIsEmpty() throws IOException { + evaluatePostRequest(new ByteArrayEntity("".getBytes("UTF-8")), ContentType.create(MediaType.APPLICATION_JSON).toString(), 200, true); + } + + @Test + public void testBodyIsNull() throws IOException { + evaluatePostRequest(null, ContentType.create(MediaType.APPLICATION_JSON).toString(), 200, true); + } + + @Test + public void testBodyIsNullAndContentTypeIsNull() throws IOException { + evaluatePostRequest(null, null, 415, false); + } + + @Test + public void testBodyIsNullAndContentTypeHasISOCharset() throws IOException { + evaluatePostRequest(null, ContentType.create(MediaType.APPLICATION_JSON, "iso-8859-1").toString(), 200, true); + } + + @Test + public void testBodyIsEmptyJSONObject() throws IOException { + evaluatePostRequest(new ByteArrayEntity(EMPTY_JSON_OBJECT.getBytes("UTF-8")), ContentType.create(MediaType.APPLICATION_JSON).toString(), 200, true); + } + + private void evaluatePostRequest(HttpEntity reqBody, String reqContentType, int expectedStatusCode, boolean assertResponseBody) throws IOException { + HttpPost post = new HttpPost("http://localhost:" + PORT + START_PROCESS_INSTANCE_BY_KEY_URL); + post.setConfig(reqConfig); + + if(reqContentType != null) { + post.setHeader(HttpHeaders.CONTENT_TYPE, reqContentType); + } + + post.setEntity(reqBody); + + CloseableHttpResponse response = client.execute(post); + + assertEquals(expectedStatusCode, response.getStatusLine().getStatusCode()); + + if(assertResponseBody) { + assertThat(EntityUtils.toString(response.getEntity(), "UTF-8"), containsString(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID)); + } + + response.close(); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/AuthenticationFilterPathMatchingTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/AuthenticationFilterPathMatchingTest.java new file mode 100644 index 0000000000000000000000000000000000000000..a3056b3f4451494ccae0478e0cb73977e9bf8b53 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/AuthenticationFilterPathMatchingTest.java @@ -0,0 +1,220 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.standalone; + +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.anyBoolean; +import static org.mockito.Mockito.anyList; +import static org.mockito.Mockito.anyString; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.ws.rs.core.Response.Status; + +import org.camunda.bpm.engine.AuthorizationService; +import org.camunda.bpm.engine.IdentityService; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.identity.Group; +import org.camunda.bpm.engine.identity.GroupQuery; +import org.camunda.bpm.engine.identity.Tenant; +import org.camunda.bpm.engine.identity.TenantQuery; +import org.camunda.bpm.engine.identity.User; +import org.camunda.bpm.engine.impl.AuthorizationServiceImpl; +import org.camunda.bpm.engine.impl.IdentityServiceImpl; +import org.camunda.bpm.engine.impl.digest._apacheCommonsCodec.Base64; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.helper.MockProvider; +import org.camunda.bpm.engine.rest.security.auth.ProcessEngineAuthenticationFilter; +import org.camunda.bpm.engine.rest.security.auth.impl.HttpBasicAuthenticationProvider; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; +import org.springframework.mock.web.MockFilterChain; +import org.springframework.mock.web.MockFilterConfig; +import org.springframework.mock.web.MockHttpServletRequest; +import org.springframework.mock.web.MockHttpServletResponse; + +@RunWith(Parameterized.class) +public class AuthenticationFilterPathMatchingTest extends AbstractRestServiceTest { + + protected static final String SERVICE_PATH = TEST_RESOURCE_ROOT_PATH; + + protected AuthorizationService authorizationServiceMock; + protected IdentityService identityServiceMock; + protected RepositoryService repositoryServiceMock; + + protected User userMock; + protected List groupIds; + protected List tenantIds; + + protected Filter authenticationFilter; + + protected String servletPath; + protected String requestUrl; + protected String engineName; + protected boolean authenticationExpected; + + protected ProcessEngine currentEngine; + + /** + * Makes a request against the url SERVICE_PATH + 'servletPath' + 'requestUrl' and depending on the 'authenticationExpected' value, + * asserts that authentication was carried out (or not) against the engine named 'engineName' + */ + public AuthenticationFilterPathMatchingTest(String servletPath, String requestUrl, String engineName, boolean authenticationExpected) { + this.servletPath = servletPath; + this.requestUrl = requestUrl; + this.engineName = engineName; + if (engineName == null) { + this.engineName = "default"; + } + this.authenticationExpected = authenticationExpected; + } + + @Parameters + public static Collection getRequestUrls() { + return Arrays.asList(new Object[][]{ + {"", "/engine/default/process-definition/and/a/longer/path", "default", true}, + {"", "/engine/default/process-definition/and/a/longer/path", "default", true}, + {"", "/engine/default/process-definition", "default", true}, + {"", "/engine/someOtherEngine/process-definition", "someOtherEngine", true}, + {"", "/engine/default/", "default", true}, + {"", "/engine/default", "default", true}, + {"", "/process-definition", "default", true}, + {"", "/engine", null, false}, + {"", "/engine/", null, false}, + {"", "/", "default", true}, + {"", "", "default", true}, + {"/someservlet", "/engine/someengine/process-definition", "someengine", true} + }); + } + + @Before + public void setup() throws ServletException { + currentEngine = getProcessEngine(engineName); + + authorizationServiceMock = mock(AuthorizationServiceImpl.class); + identityServiceMock = mock(IdentityServiceImpl.class); + repositoryServiceMock = mock(RepositoryService.class); + + when(currentEngine.getAuthorizationService()).thenReturn(authorizationServiceMock); + when(currentEngine.getIdentityService()).thenReturn(identityServiceMock); + + // for authentication + userMock = MockProvider.createMockUser(); + + List groupMocks = MockProvider.createMockGroups(); + groupIds = setupGroupQueryMock(groupMocks); + + List tenantMocks = Collections.singletonList(MockProvider.createMockTenant()); + tenantIds = setupTenantQueryMock(tenantMocks); + + GroupQuery mockGroupQuery = mock(GroupQuery.class); + + when(identityServiceMock.createGroupQuery()).thenReturn(mockGroupQuery); + when(mockGroupQuery.groupMember(anyString())).thenReturn(mockGroupQuery); + when(mockGroupQuery.list()).thenReturn(groupMocks); + + setupFilter(); + } + + protected List setupGroupQueryMock(List groups) { + GroupQuery mockGroupQuery = mock(GroupQuery.class); + + when(identityServiceMock.createGroupQuery()).thenReturn(mockGroupQuery); + when(mockGroupQuery.groupMember(anyString())).thenReturn(mockGroupQuery); + when(mockGroupQuery.list()).thenReturn(groups); + + List groupIds = new ArrayList(); + for (Group groupMock : groups) { + groupIds.add(groupMock.getId()); + } + return groupIds; + } + + protected List setupTenantQueryMock(List tenants) { + TenantQuery mockTenantQuery = mock(TenantQuery.class); + + when(identityServiceMock.createTenantQuery()).thenReturn(mockTenantQuery); + when(mockTenantQuery.userMember(anyString())).thenReturn(mockTenantQuery); + when(mockTenantQuery.includingGroupsOfUser(anyBoolean())).thenReturn(mockTenantQuery); + when(mockTenantQuery.list()).thenReturn(tenants); + + List tenantIds = new ArrayList(); + for(Tenant tenant: tenants) { + tenantIds.add(tenant.getId()); + } + return tenantIds; + } + + protected void setupFilter() throws ServletException { + MockFilterConfig config = new MockFilterConfig(); + config.addInitParameter(ProcessEngineAuthenticationFilter.AUTHENTICATION_PROVIDER_PARAM, HttpBasicAuthenticationProvider.class.getName()); + authenticationFilter = new ProcessEngineAuthenticationFilter(); + authenticationFilter.init(config); + } + + protected void applyFilter(MockHttpServletRequest request, MockHttpServletResponse response, String username, String password) throws IOException, ServletException { + String credentials = username + ":" + password; + request.addHeader("Authorization", "Basic " + new String(Base64.encodeBase64(credentials.getBytes()))); + FilterChain filterChain = new MockFilterChain(); + + authenticationFilter.doFilter(request, response, filterChain); + } + + @Test + public void testHttpBasicAuthenticationCheck() throws IOException, ServletException { + if (authenticationExpected) { + when(identityServiceMock.checkPassword(MockProvider.EXAMPLE_USER_ID, MockProvider.EXAMPLE_USER_PASSWORD)).thenReturn(true); + } + + MockHttpServletResponse response = new MockHttpServletResponse(); + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setRequestURI(SERVICE_PATH + servletPath + requestUrl); + request.setContextPath(SERVICE_PATH); + request.setServletPath(servletPath); + applyFilter(request, response, MockProvider.EXAMPLE_USER_ID, MockProvider.EXAMPLE_USER_PASSWORD); + + Assert.assertEquals(Status.OK.getStatusCode(), response.getStatus()); + + if (authenticationExpected) { + verify(identityServiceMock).setAuthentication(MockProvider.EXAMPLE_USER_ID, groupIds, tenantIds); + verify(identityServiceMock).clearAuthentication(); + + } else { + verify(identityServiceMock, never()).setAuthentication(any(String.class), anyList(), anyList()); + verify(identityServiceMock, never()).clearAuthentication(); + } + } + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/EqualsListTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/EqualsListTest.java new file mode 100644 index 0000000000000000000000000000000000000000..ab565b4512c80cff6cdb431aeac14f702c9297be --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/EqualsListTest.java @@ -0,0 +1,73 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.standalone; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.List; + +import org.camunda.bpm.engine.rest.helper.EqualsList; +import org.junit.Before; +import org.junit.Test; + +/** + * @author Thorben Lindhauer + * + */ +public class EqualsListTest { + + protected List list1; + protected List list2; + + @Before + public void setUp() { + list1 = new ArrayList(); + list2 = new ArrayList(); + } + + @Test + public void testListsSame() { + assertTrue(new EqualsList(list1).matches(list1)); + } + + @Test + public void testListsEqual() { + list1.add("aString"); + list2.add("aString"); + + assertTrue(new EqualsList(list1).matches(list2)); + assertTrue(new EqualsList(list2).matches(list1)); + } + + @Test + public void testListsNotEqual() { + list1.add("aString"); + + assertFalse(new EqualsList(list1).matches(list2)); + assertFalse(new EqualsList(list2).matches(list1)); + } + + @Test + public void testListsNull() { + assertFalse(new EqualsList(null).matches(list1)); + assertFalse(new EqualsList(list1).matches(null)); + assertTrue(new EqualsList(null).matches(null)); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/EqualsMapTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/EqualsMapTest.java new file mode 100644 index 0000000000000000000000000000000000000000..0dfe2dcf8310aba5131d59180a62421f87e80395 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/EqualsMapTest.java @@ -0,0 +1,73 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.standalone; + +import java.util.HashMap; +import java.util.Map; + +import org.camunda.bpm.engine.rest.helper.EqualsMap; +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +/** + * @author Thorben Lindhauer + * + */ +public class EqualsMapTest { + + protected Map map1; + protected Map map2; + + @Before + public void setUp() { + map1 = new HashMap(); + map2 = new HashMap(); + } + + @Test + public void testMapsSame() { + assertTrue(new EqualsMap(map1).matches(map1)); + } + + @Test + public void testMapsEqual() { + map1.put("aKey", "aValue"); + map2.put("aKey", "aValue"); + + assertTrue(new EqualsMap(map1).matches(map2)); + assertTrue(new EqualsMap(map2).matches(map1)); + } + + @Test + public void testMapsNotEqual() { + map1.put("aKey", "aValue"); + + assertFalse(new EqualsMap(map1).matches(map2)); + assertFalse(new EqualsMap(map2).matches(map1)); + } + + @Test + public void testMapsNull() { + assertFalse(new EqualsMap(null).matches(map1)); + assertFalse(new EqualsMap(map1).matches(null)); + assertTrue(new EqualsMap(null).matches(null)); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/HalResourceCacheTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/HalResourceCacheTest.java new file mode 100644 index 0000000000000000000000000000000000000000..f9f9ffd75e6fb9bcdf2795631c516c4883753e78 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/HalResourceCacheTest.java @@ -0,0 +1,292 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.standalone; + +import static org.camunda.bpm.engine.rest.hal.cache.HalRelationCacheConfiguration.CONFIG_CACHES; +import static org.camunda.bpm.engine.rest.hal.cache.HalRelationCacheConfiguration.CONFIG_CACHE_IMPLEMENTATION; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import static org.mockito.Mockito.anyInt; +import static org.mockito.Mockito.anyString; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.io.IOException; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.camunda.bpm.engine.identity.User; +import org.camunda.bpm.engine.identity.UserQuery; +import org.camunda.bpm.engine.impl.util.ClockUtil; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; +import org.camunda.bpm.engine.rest.IdentityRestService; +import org.camunda.bpm.engine.rest.UserRestService; +import org.camunda.bpm.engine.rest.cache.Cache; +import org.camunda.bpm.engine.rest.hal.Hal; +import org.camunda.bpm.engine.rest.hal.HalLinkResolver; +import org.camunda.bpm.engine.rest.hal.HalResource; +import org.camunda.bpm.engine.rest.hal.cache.DefaultHalResourceCache; +import org.camunda.bpm.engine.rest.hal.cache.HalRelationCacheBootstrap; +import org.camunda.bpm.engine.rest.hal.cache.HalRelationCacheConfiguration; +import org.camunda.bpm.engine.rest.hal.cache.HalRelationCacheConfigurationException; +import org.camunda.bpm.engine.rest.hal.identitylink.HalIdentityLink; +import org.camunda.bpm.engine.rest.hal.user.HalUser; +import org.camunda.bpm.engine.task.IdentityLink; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; + +public class HalResourceCacheTest extends AbstractRestServiceTest { + + protected DefaultHalResourceCache cache; + protected HalRelationCacheBootstrap contextListener; + + @Before + public void createCache() { + cache = new DefaultHalResourceCache(100, 100); + contextListener = new HalRelationCacheBootstrap(); + } + + @After + public void destroy() { + contextListener.contextDestroyed(null); + } + + @Test + public void testResourceRetrieval() { + cache.put("hello", "world"); + + assertNull(cache.get(null)); + assertNull(cache.get("unknown")); + assertEquals("world", cache.get("hello")); + } + + @Test + public void testCacheCapacity() { + assertEquals(0, cache.size()); + + cache.put("a", "a"); + cache.put("b", "b"); + cache.put("c", "c"); + assertEquals(3, cache.size()); + + forwardTime(100); + + for (int i = 0; i < 2 * cache.getCapacity(); i++) { + cache.put("id" + i, i); + } + assertTrue(cache.size() <= cache.getCapacity()); + + // old entries should be removed + assertNull(cache.get("a")); + assertNull(cache.get("b")); + assertNull(cache.get("c")); + } + + @Test + public void testEntryExpiration() { + cache.put("hello", "world"); + + assertEquals("world", cache.get("hello")); + assertEquals(1, cache.size()); + + forwardTime(cache.getSecondsToLive() + 1); + + assertNull(cache.get("hello")); + assertEquals(0, cache.size()); + } + + @Test + public void testInvalidConfigurationFormat() { + try { + contextListener.configureCaches(""); + fail("Exception expected"); + } + catch (HalRelationCacheConfigurationException e) { + assertTrue(e.getCause() instanceof IOException); + } + } + + @Test + public void testUnknownCacheImplementationClass() { + try { + contextListener.configureCaches("{\"" + CONFIG_CACHE_IMPLEMENTATION +"\": \"org.camunda.bpm.UnknownCache\" }"); + fail("Exception expected"); + } + catch (HalRelationCacheConfigurationException e) { + assertTrue(e.getCause() instanceof ClassNotFoundException); + } + } + + @Test + public void testCacheImplementationNotImplementingCache() { + try { + contextListener.configureCaches("{\"" + CONFIG_CACHE_IMPLEMENTATION +"\": \"" + getClass().getName() + "\" }"); + fail("Exception expected"); + } + catch (HalRelationCacheConfigurationException e) { + assertTrue(e.getMessage().contains(Cache.class.getName())); + } + } + + @Test + public void testCacheCreation() { + String contextParameter = "{" + + "\"" + CONFIG_CACHE_IMPLEMENTATION + "\": \"" + DefaultHalResourceCache.class.getName() + "\"," + + "\"" + CONFIG_CACHES + "\": {" + + "\"" + HalUser.class.getName() + "\": {" + + "\"capacity\": 123, \"secondsToLive\": 123" + + "}" + + "}" + + "}"; + + contextListener.configureCaches(contextParameter); + + Cache cache = Hal.getInstance().getHalRelationCache(HalUser.class); + assertNotNull(cache); + assertEquals(123, ((DefaultHalResourceCache) cache).getCapacity()); + assertEquals(123, ((DefaultHalResourceCache) cache).getSecondsToLive()); + } + + @Test + public void testCacheInvalidParameterName() { + HalRelationCacheConfiguration configuration = new HalRelationCacheConfiguration(); + configuration.setCacheImplementationClass(DefaultHalResourceCache.class); + configuration.addCacheConfiguration(HalUser.class, Collections.singletonMap("unknown", "property")); + + try { + contextListener.configureCaches(configuration); + fail("Exception expected"); + } + catch (HalRelationCacheConfigurationException e) { + assertTrue(e.getMessage().contains("setter")); + } + } + + @Test + public void testEntityCaching() { + String[] userIds = new String[]{"test"}; + // mock user and query + User user = mock(User.class); + when(user.getId()).thenReturn(userIds[0]); + when(user.getFirstName()).thenReturn("kermit"); + UserQuery userQuery = mock(UserQuery.class); + when(userQuery.userIdIn(Mockito.any())).thenReturn(userQuery); + when(userQuery.listPage(anyInt(), anyInt())).thenReturn(Arrays.asList(user)); + when(processEngine.getIdentityService().createUserQuery()).thenReturn(userQuery); + + // configure cache + HalRelationCacheConfiguration configuration = new HalRelationCacheConfiguration(); + configuration.setCacheImplementationClass(DefaultHalResourceCache.class); + Map halUserConfig = new HashMap(); + halUserConfig.put("capacity", 100); + halUserConfig.put("secondsToLive", 10000); + configuration.addCacheConfiguration(HalUser.class, halUserConfig); + + contextListener.configureCaches(configuration); + + // cache exists and is empty + DefaultHalResourceCache cache = (DefaultHalResourceCache) Hal.getInstance().getHalRelationCache(HalUser.class); + assertNotNull(cache); + assertEquals(0, cache.size()); + + // get link resolver and resolve user + HalLinkResolver linkResolver = Hal.getInstance().getLinkResolver(UserRestService.class); + List> halUsers = linkResolver.resolveLinks(userIds, processEngine); + + // mocked user was resolved + assertNotNull(halUsers); + assertEquals(1, halUsers.size()); + HalUser halUser = (HalUser) halUsers.get(0); + assertEquals("kermit", halUser.getFirstName()); + + // cache contains user + assertEquals(1, cache.size()); + + // change user mock + when(user.getFirstName()).thenReturn("fritz"); + + // resolve users again + halUsers = linkResolver.resolveLinks(userIds, processEngine); + + // cached mocked user was resolved with old name + assertNotNull(halUsers); + assertEquals(1, halUsers.size()); + halUser = (HalUser) halUsers.get(0); + assertEquals("kermit", halUser.getFirstName()); + + forwardTime(cache.getSecondsToLive() * 3); + + // resolve users again + halUsers = linkResolver.resolveLinks(userIds, processEngine); + + // new mocked user was resolved with old name + assertNotNull(halUsers); + assertEquals(1, halUsers.size()); + halUser = (HalUser) halUsers.get(0); + assertEquals("fritz", halUser.getFirstName()); + } + + @Test + public void testIdentityLinkCaching() { + String[] taskIds = new String[]{"test"}; + // mock identityLinks and query + IdentityLink link1 = mock(IdentityLink.class); + when(link1.getTaskId()).thenReturn(taskIds[0]); + IdentityLink link2 = mock(IdentityLink.class); + when(link2.getTaskId()).thenReturn(taskIds[0]); + when(processEngine.getTaskService().getIdentityLinksForTask(anyString())).thenReturn(Arrays.asList(link1, link2)); + + // configure cache + HalRelationCacheConfiguration configuration = new HalRelationCacheConfiguration(); + configuration.setCacheImplementationClass(DefaultHalResourceCache.class); + Map halIdentityLinkConfig = new HashMap(); + halIdentityLinkConfig.put("capacity", 100); + halIdentityLinkConfig.put("secondsToLive", 10000); + configuration.addCacheConfiguration(HalIdentityLink.class, halIdentityLinkConfig); + + contextListener.configureCaches(configuration); + + // cache exists and is empty + DefaultHalResourceCache cache = (DefaultHalResourceCache) Hal.getInstance().getHalRelationCache(HalIdentityLink.class); + assertNotNull(cache); + assertEquals(0, cache.size()); + + // get link resolver and resolve identity link + HalLinkResolver linkResolver = Hal.getInstance().getLinkResolver(IdentityRestService.class); + List> halIdentityLinks = linkResolver.resolveLinks(taskIds, processEngine); + + assertEquals(2, halIdentityLinks.size()); + assertEquals(1, cache.size()); + + assertEquals(halIdentityLinks, cache.get(taskIds[0])); + } + + protected void forwardTime(long seconds) { + Date later = new Date(ClockUtil.getCurrentTime().getTime() + seconds * 1000); + ClockUtil.setCurrentTime(later); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/NoServletAuthenticationFilterTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/NoServletAuthenticationFilterTest.java new file mode 100644 index 0000000000000000000000000000000000000000..422ab6ea9a31dd859ffba586d9e9860f3f1fff00 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/NoServletAuthenticationFilterTest.java @@ -0,0 +1,27 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.standalone; + +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.ClassRule; + +public class NoServletAuthenticationFilterTest extends AbstractAuthenticationFilterTest { + + @ClassRule + public static TestContainerRule testContainer = new TestContainerRule(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/NoServletEmptyBodyFilterTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/NoServletEmptyBodyFilterTest.java new file mode 100644 index 0000000000000000000000000000000000000000..1ab9183b0c13d32e6933a1b693842ce5540fc551 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/NoServletEmptyBodyFilterTest.java @@ -0,0 +1,30 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.standalone; + +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.ClassRule; + +/** + * @author Tassilo Weidner + */ +public class NoServletEmptyBodyFilterTest extends AbstractEmptyBodyFilterTest { + + @ClassRule + public static TestContainerRule testContainer = new TestContainerRule(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/ServletAuthenticationFilterTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/ServletAuthenticationFilterTest.java new file mode 100644 index 0000000000000000000000000000000000000000..6bb2737d06b2e357f5354099fa47e1626eb9dad2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/ServletAuthenticationFilterTest.java @@ -0,0 +1,27 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.standalone; + +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.ClassRule; + +public class ServletAuthenticationFilterTest extends AbstractAuthenticationFilterTest { + + @ClassRule + public static TestContainerRule testContainer = new TestContainerRule(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/ServletEmptyBodyFilterTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/ServletEmptyBodyFilterTest.java new file mode 100644 index 0000000000000000000000000000000000000000..68364df0f87a1bc30d119e6513f5407f72ec589c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/standalone/ServletEmptyBodyFilterTest.java @@ -0,0 +1,30 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.standalone; + +import org.camunda.bpm.engine.rest.util.container.TestContainerRule; +import org.junit.ClassRule; + +/** + * @author Tassilo Weidner + */ +public class ServletEmptyBodyFilterTest extends AbstractEmptyBodyFilterTest { + + @ClassRule + public static TestContainerRule testContainer = new TestContainerRule(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/sub/impl/VariableDeserializationTypeValidationTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/sub/impl/VariableDeserializationTypeValidationTest.java new file mode 100644 index 0000000000000000000000000000000000000000..711ba4255c822aa0a7807deea4ac0bd0df54f4b1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/sub/impl/VariableDeserializationTypeValidationTest.java @@ -0,0 +1,295 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.sub.impl; + +import static org.mockito.Mockito.times; + +import java.util.List; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.ProcessEngineConfiguration; +import org.camunda.bpm.engine.runtime.DeserializationTypeValidator; +import org.camunda.bpm.engine.variable.VariableMap; +import org.camunda.bpm.engine.variable.value.TypedValue; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.mockito.Mockito; + +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.type.TypeFactory; + +public class VariableDeserializationTypeValidationTest { + + @Rule + public ExpectedException thrown = ExpectedException.none(); + + protected AbstractVariablesResource variablesResourceSpy; + protected DeserializationTypeValidator validator; + + @Before + public void setUpMocks() { + validator = Mockito.mock(DeserializationTypeValidator.class); + + ProcessEngineConfiguration configurationMock = Mockito.mock(ProcessEngineConfiguration.class); + Mockito.when(configurationMock.isDeserializationTypeValidationEnabled()).thenReturn(true); + Mockito.when(configurationMock.getDeserializationTypeValidator()).thenReturn(validator); + + variablesResourceSpy = createVariablesResourceSpy(); + Mockito.when(variablesResourceSpy.getProcessEngineConfiguration()).thenReturn(configurationMock); + } + + @Test + public void shouldValidateNothingForPrimitiveClass() { + // given + JavaType type = TypeFactory.defaultInstance().constructType(int.class); + setValidatorMockResult(true); + + // when + variablesResourceSpy.validateType(type); + + // then + Mockito.verifyNoInteractions(validator); + } + + @Test + public void shouldValidateBaseTypeOnlyForSimpleClass() { + // given + JavaType type = TypeFactory.defaultInstance().constructType(String.class); + setValidatorMockResult(true); + + // when + variablesResourceSpy.validateType(type); + + // then + Mockito.verify(validator).validate("java.lang.String"); + Mockito.verifyNoMoreInteractions(validator); + } + + @Test + public void shouldValidateBaseTypeOnlyForComplexClass() { + // given + JavaType type = TypeFactory.defaultInstance().constructType(Complex.class); + setValidatorMockResult(true); + + // when + variablesResourceSpy.validateType(type); + + // then + Mockito.verify(validator).validate("org.camunda.bpm.engine.rest.sub.impl.VariableDeserializationTypeValidationTest$Complex"); + Mockito.verifyNoMoreInteractions(validator); + } + + @Test + public void shouldValidateContentTypeOnlyForArrayClass() { + // given + JavaType type = TypeFactory.defaultInstance().constructType(Integer[].class); + setValidatorMockResult(true); + + // when + variablesResourceSpy.validateType(type); + + // then + Mockito.verify(validator).validate("java.lang.Integer"); + Mockito.verifyNoMoreInteractions(validator); + } + + @Test + public void shouldValidateCollectionAndContentTypeForCollectionClass() { + // given + JavaType type = TypeFactory.defaultInstance().constructFromCanonical("java.util.ArrayList"); + setValidatorMockResult(true); + + // when + variablesResourceSpy.validateType(type); + + // then + Mockito.verify(validator).validate("java.util.ArrayList"); + Mockito.verify(validator).validate("java.lang.String"); + Mockito.verifyNoMoreInteractions(validator); + } + + @Test + public void shouldValidateCollectionAndContentTypeForNestedCollectionClass() { + // given + JavaType type = TypeFactory.defaultInstance().constructFromCanonical("java.util.ArrayList>"); + setValidatorMockResult(true); + + // when + variablesResourceSpy.validateType(type); + + // then + Mockito.verify(validator, times(2)).validate("java.util.ArrayList"); + Mockito.verify(validator).validate("java.lang.String"); + Mockito.verifyNoMoreInteractions(validator); + } + + @Test + public void shouldValidateMapAndKeyAndContentTypeForMapClass() { + // given + JavaType type = TypeFactory.defaultInstance().constructFromCanonical("java.util.HashMap"); + setValidatorMockResult(true); + + // when + variablesResourceSpy.validateType(type); + + // then + Mockito.verify(validator).validate("java.util.HashMap"); + Mockito.verify(validator).validate("java.lang.String"); + Mockito.verify(validator).validate("java.lang.Integer"); + Mockito.verifyNoMoreInteractions(validator); + } + + @Test + public void shouldFailForSimpleClass() { + // given + JavaType type = TypeFactory.defaultInstance().constructType(String.class); + setValidatorMockResult(false); + + // then + thrown.expect(IllegalArgumentException.class); + thrown.expectMessage("[java.lang.String]"); + + // when + variablesResourceSpy.validateType(type); + } + + @Test + public void shouldFailForComplexClass() { + // given + JavaType type = TypeFactory.defaultInstance().constructType(Complex.class); + setValidatorMockResult(false); + + // then + thrown.expect(IllegalArgumentException.class); + thrown.expectMessage("[org.camunda.bpm.engine.rest.sub.impl.VariableDeserializationTypeValidationTest$Complex]"); + + // when + variablesResourceSpy.validateType(type); + } + + @Test + public void shouldFailForArrayClass() { + // given + JavaType type = TypeFactory.defaultInstance().constructType(Integer[].class); + setValidatorMockResult(false); + + // then + thrown.expect(IllegalArgumentException.class); + thrown.expectMessage("[java.lang.Integer]"); + + // when + variablesResourceSpy.validateType(type); + } + + @Test + public void shouldFailForCollectionClass() { + // given + JavaType type = TypeFactory.defaultInstance().constructFromCanonical("java.util.ArrayList"); + setValidatorMockResult(false); + + // then + thrown.expect(IllegalArgumentException.class); + thrown.expectMessage("[java.util.ArrayList, java.lang.String]"); + + // when + variablesResourceSpy.validateType(type); + } + + @Test + public void shouldFailForMapClass() { + // given + JavaType type = TypeFactory.defaultInstance().constructFromCanonical("java.util.HashMap"); + setValidatorMockResult(false); + + // then + thrown.expect(IllegalArgumentException.class); + thrown.expectMessage("[java.util.HashMap, java.lang.String, java.lang.Integer]"); + + // when + variablesResourceSpy.validateType(type); + } + + @Test + public void shouldFailOnceForMapClass() { + // given + JavaType type = TypeFactory.defaultInstance().constructFromCanonical("java.util.HashMap"); + setValidatorMockResult(false); + + // then + thrown.expect(IllegalArgumentException.class); + thrown.expectMessage("[java.util.HashMap, java.lang.String]"); + + // when + variablesResourceSpy.validateType(type); + } + + public static class Complex { + private Nested nested; + + public Nested getNested() { + return nested; + } + } + + public static class Nested { + private int testInt; + + public int getTestInt() { + return testInt; + } + } + + protected void setValidatorMockResult(boolean result) { + Mockito.when(validator.validate(Mockito.anyString())).thenReturn(result); + } + + protected AbstractVariablesResource createVariablesResourceSpy() { + return Mockito.spy(new AbstractVariablesResource(Mockito.mock(ProcessEngine.class), "test", Mockito.mock(ObjectMapper.class)) { + + @Override + protected void updateVariableEntities(VariableMap variables, List deletions) { + } + + @Override + protected void setVariableEntity(String variableKey, TypedValue variableValue) { + } + + @Override + protected void removeVariableEntity(String variableKey) { + } + + @Override + protected TypedValue getVariableEntity(String variableKey, boolean deserializeValue) { + return null; + } + + @Override + protected VariableMap getVariableEntities(boolean deserializeValues) { + return null; + } + + @Override + protected String getResourceTypeName() { + return null; + } + }); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/DateTimeUtils.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/DateTimeUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..2f68bd5bfd9e1f200c1d32cd5213b1a3cfeafd60 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/DateTimeUtils.java @@ -0,0 +1,68 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + +public abstract class DateTimeUtils { + + public static final SimpleDateFormat DATE_FORMAT_WITHOUT_TIMEZONE = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); + public static final SimpleDateFormat DATE_FORMAT_WITH_TIMEZONE = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); + + /** + * Converts date string without timezone to the one with timezone. + * @param dateString + * @return + */ + public static String withTimezone(String dateString) { + final Date parse; + try { + parse = DATE_FORMAT_WITHOUT_TIMEZONE.parse(dateString); + return withTimezone(parse); + } catch (ParseException e) { + throw new RuntimeException(e); + } + } + + public static String withTimezone(Date date) { + return DATE_FORMAT_WITH_TIMEZONE.format(date); + } + + public static Date updateTime(Date now, Date newTime) { + Calendar c = Calendar.getInstance(); + c.setTime(now); + Calendar newTimeCalendar = Calendar.getInstance(); + newTimeCalendar.setTime(newTime); + c.set(Calendar.ZONE_OFFSET, newTimeCalendar.get(Calendar.ZONE_OFFSET)); + c.set(Calendar.DST_OFFSET, newTimeCalendar.get(Calendar.DST_OFFSET)); + c.set(Calendar.HOUR_OF_DAY, newTimeCalendar.get(Calendar.HOUR_OF_DAY)); + c.set(Calendar.MINUTE, newTimeCalendar.get(Calendar.MINUTE)); + c.set(Calendar.SECOND, newTimeCalendar.get(Calendar.SECOND)); + c.set(Calendar.MILLISECOND, newTimeCalendar.get(Calendar.MILLISECOND)); + return c.getTime(); + } + + public static Date addDays(Date date, int amount) { + Calendar c = Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.DATE, amount); + return c.getTime(); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/JsonPathUtil.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/JsonPathUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..a62b715e981419ab997fcabbe4a75764043d284d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/JsonPathUtil.java @@ -0,0 +1,35 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util; + +import org.camunda.bpm.engine.rest.mapper.JacksonConfigurator; + +import com.fasterxml.jackson.databind.ObjectMapper; +import io.restassured.path.json.mapper.factory.DefaultJackson2ObjectMapperFactory; +import io.restassured.path.json.JsonPath; + +public final class JsonPathUtil { + + public static JsonPath from(String json) { + return JsonPath.from(json).using(new DefaultJackson2ObjectMapperFactory() { + public ObjectMapper create(Class cls, String charset) { + return JacksonConfigurator.configureObjectMapper(super.create(cls, charset)); + } + }); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/ModificationInstructionBuilder.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/ModificationInstructionBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..ca0198cd3bb63d9616c4614f389c2dff1ecd7f9e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/ModificationInstructionBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author Thorben Lindhauer + * + */ +public class ModificationInstructionBuilder { + + public ModificationInstructionBuilder(String type) { + this.type = type; + } + + protected Map variables; + + protected String type; + protected String activityId; + protected String activityInstanceId; + protected String transitionInstanceId; + protected String ancestorActivityInstanceId; + protected String transitionId; + protected boolean isFlagSet; + protected boolean cancelCurrentActiveActivityInstances; + + public static ModificationInstructionBuilder cancellation() { + return new ModificationInstructionBuilder("cancel"); + } + + public static ModificationInstructionBuilder startBefore() { + return new ModificationInstructionBuilder("startBeforeActivity"); + } + + public static ModificationInstructionBuilder startAfter() { + return new ModificationInstructionBuilder("startAfterActivity"); + } + + public static ModificationInstructionBuilder startTransition() { + return new ModificationInstructionBuilder("startTransition"); + } + + public ModificationInstructionBuilder variables(Map variables) { + this.variables = variables; + return this; + } + + public ModificationInstructionBuilder activityId(String activityId) { + this.activityId = activityId; + return this; + } + + public ModificationInstructionBuilder activityInstanceId(String activityInstanceId) { + this.activityInstanceId = activityInstanceId; + return this; + } + + public ModificationInstructionBuilder transitionInstanceId(String transitionInstanceId) { + this.transitionInstanceId = transitionInstanceId; + return this; + } + + public ModificationInstructionBuilder ancestorActivityInstanceId(String ancestorActivityInstanceId) { + this.ancestorActivityInstanceId = ancestorActivityInstanceId; + return this; + } + + public ModificationInstructionBuilder transitionId(String transitionId) { + this.transitionId = transitionId; + return this; + } + + public ModificationInstructionBuilder cancelCurrentActiveActivityInstances( + boolean cancelCurrentActiveActivityInstances) { + isFlagSet = true; + this.cancelCurrentActiveActivityInstances = cancelCurrentActiveActivityInstances; + return this; + } + + public Map getJson() { + Map json = new HashMap(); + + json.put("type", type); + json.put("activityId", activityId); + json.put("activityInstanceId", activityInstanceId); + json.put("transitionInstanceId", transitionInstanceId); + json.put("ancestorActivityInstanceId", ancestorActivityInstanceId); + json.put("variables", variables); + json.put("transitionId", transitionId); + + if (type.equals("cancel") && isFlagSet) { + json.put("cancelCurrentActiveActivityInstances", cancelCurrentActiveActivityInstances); + } + return json; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/NoIntermediaryInvocationTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/NoIntermediaryInvocationTest.java new file mode 100644 index 0000000000000000000000000000000000000000..aa5a0eaac747ea430a3287990d78002dd434f6b8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/NoIntermediaryInvocationTest.java @@ -0,0 +1,140 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util; + +import static org.camunda.bpm.engine.rest.helper.NoIntermediaryInvocation.immediatelyAfter; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.mockito.InOrder; +import org.mockito.Mockito; +import org.mockito.exceptions.base.MockitoAssertionError; + +/** + * @author Thorben Lindhauer + */ +public class NoIntermediaryInvocationTest { + + protected Foo foo; + + @Before + public void setUp() { + foo = Mockito.mock(Foo.class); + } + + @Test + public void testSucceess() { + + // given + foo.getFoo(); + foo.getBar(); + + // when + InOrder inOrder = Mockito.inOrder(foo); + inOrder.verify(foo).getFoo(); + + // then + inOrder.verify(foo, immediatelyAfter()).getBar(); + + } + + @Test + public void testFailureWhenInvocationNotPresent() { + // given + foo.getFoo(); + foo.getBaz(); + + // when + InOrder inOrder = Mockito.inOrder(foo); + inOrder.verify(foo).getFoo(); + + // then + try { + inOrder.verify(foo, immediatelyAfter()).getBar(); + Assert.fail("should not verify"); + } catch (MockitoAssertionError e) { + // happy path + } + } + + @Test + public void testFailureWhenInvocationNotPresentCase2() { + // given + foo.getFoo(); + + // when + InOrder inOrder = Mockito.inOrder(foo); + inOrder.verify(foo).getFoo(); + + // then + try { + inOrder.verify(foo, immediatelyAfter()).getBar(); + Assert.fail("should not verify"); + } catch (MockitoAssertionError e) { + // happy path + } + } + + @Test + public void testFailureOnWrongInvocationOrder() { + // given + foo.getBar(); + foo.getFoo(); + + // when + InOrder inOrder = Mockito.inOrder(foo); + inOrder.verify(foo).getFoo(); + + // then + try { + inOrder.verify(foo, immediatelyAfter()).getBar(); + Assert.fail("should not verify"); + } catch (MockitoAssertionError e) { + // happy path + } + } + + @Test + public void testFailureWithIntermittentInvocations() { + // given + foo.getFoo(); + foo.getBaz(); + foo.getBar(); + + // when + InOrder inOrder = Mockito.inOrder(foo); + inOrder.verify(foo).getFoo(); + + // then + try { + inOrder.verify(foo, immediatelyAfter()).getBar(); + Assert.fail("should not verify"); + } catch (MockitoAssertionError e) { + // happy path + } + } + + public static interface Foo { + + String getFoo(); + + String getBar(); + + String getBaz(); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/OrderingBuilder.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/OrderingBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..8835d6866d92e9907b035cf96a315fd1c5cb44a2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/OrderingBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Thorben Lindhauer + * + */ +public class OrderingBuilder { + + protected List> orderings = new ArrayList>(); + protected Map currentOrdering; + + public static OrderingBuilder create() { + return new OrderingBuilder(); + } + + public OrderingBuilder orderBy(String property) { + currentOrdering = new HashMap(); + orderings.add(currentOrdering); + currentOrdering.put("sortBy", property); + return this; + } + + public OrderingBuilder desc() { + currentOrdering.put("sortOrder", "desc"); + return this; + } + + public OrderingBuilder asc() { + currentOrdering.put("sortOrder", "asc"); + return this; + } + + @SuppressWarnings("unchecked") + public OrderingBuilder parameter(String key, Object value) { + Map parameters = (Map) currentOrdering.get("parameters"); + + if (parameters == null) { + parameters = new HashMap(); + currentOrdering.put("parameters", parameters); + } + + parameters.put(key, value); + return this; + } + + public List> getJson() { + return orderings; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/QueryParamUtils.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/QueryParamUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..4c61f5d73a79561695fbabb0817067347acd95f5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/QueryParamUtils.java @@ -0,0 +1,33 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util; + +/** + * @author Daniel Meyer + * + */ +public class QueryParamUtils { + + public static String arrayAsCommaSeperatedList(String... items) { + String result = items[0]; + for (int i = 1; i < items.length; i++) { + result += ","+items[i]; + } + return result; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/VariablesBuilder.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/VariablesBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..12960a6bc60906086e32c2e43cb1ea753127b101 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/VariablesBuilder.java @@ -0,0 +1,138 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util; + +import java.util.HashMap; +import java.util.Map; + +import org.camunda.bpm.engine.variable.type.SerializableValueType; + +/** + *

Builds maps that fulfill the camunda variable json format.

+ *

+ * For example, if VariablesBuilder.variable("aKey", "aValue").variable("anotherKey", "anotherValue", "String").getVariables() + * a map is returned that is supposed to be mapped to JSON by rest-assured as follows: + *

+ * + * { + * "aKey" : {"value" : "aValue"}, + * "anotherKey" : {"value" : "anotherValue", "type" : "String"} + * } + * + * + * @author Thorben Lindhauer + * + */ +public class VariablesBuilder { + + private Map variables; + + private VariablesBuilder() { + variables = new HashMap(); + } + + public static VariablesBuilder create() { + VariablesBuilder builder = new VariablesBuilder(); + return builder; + } + + public VariablesBuilder variable(String name, Object value, String type) { + Map variableValue = getVariableValueMap(value, type); + variables.put(name, variableValue); + return this; + } + + public VariablesBuilder variable(String name, Object value, String type, boolean local) { + Map variableValue = getVariableValueMap(value, type, local); + variables.put(name, variableValue); + return this; + } + + public VariablesBuilder variable(String name, Object value) { + return variable(name, value, null); + } + + public VariablesBuilder variable(String name, Object value, boolean local) { + return variable(name, value, null, local); + } + + public VariablesBuilder variable(String name, String type, Object value, String serializationFormat, String objectType) { + Map variableValue = getObjectValueMap(value, type, serializationFormat, objectType); + variables.put(name, variableValue); + return this; + } + + public Map getVariables() { + return variables; + } + + public static Map getVariableValueMap(Object value) { + return getVariableValueMap(value, null); + } + + public static Map getVariableValueMap(Object value, boolean local) { + return getVariableValueMap(value, null, local); + } + + public static Map getVariableValueMap(Object value, String type) { + return getVariableValueMap(value, type, false); + } + + public static Map getVariableValueMap(Object value, String type, boolean local) { + Map variable = new HashMap(); + if (value != null) { + variable.put("value", value); + } + if (type != null) { + variable.put("type", type); + } + + variable.put("local", local); + + return variable; + } + + public static Map getObjectValueMap(Object value, String variableType, String serializationFormat, String objectTypeName) { + Map serializedVariable = new HashMap(); + + if (value != null) { + serializedVariable.put("value", value); + } + + if (variableType != null) { + serializedVariable.put("type", variableType); + } + + Map typeInfo = new HashMap(); + typeInfo.put(SerializableValueType.VALUE_INFO_SERIALIZATION_DATA_FORMAT, serializationFormat); + typeInfo.put(SerializableValueType.VALUE_INFO_OBJECT_TYPE_NAME, objectTypeName); + + serializedVariable.put("valueInfo", typeInfo); + + return serializedVariable; + } + + public VariablesBuilder variableTransient(String name, String value, String type) { + Map valueMap = getVariableValueMap(value, type); + Map valueInfo = new HashMap(); + valueInfo.put("transient", true); + valueMap.put("valueInfo", valueInfo); + variables.put(name, valueMap); + return this; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/AbstractServerBootstrap.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/AbstractServerBootstrap.java new file mode 100644 index 0000000000000000000000000000000000000000..6b92ba3bba170513f58a701eac6eb47db98e4524 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/AbstractServerBootstrap.java @@ -0,0 +1,59 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; +import org.camunda.bpm.engine.rest.AbstractRestServiceTest; + +public abstract class AbstractServerBootstrap { + + protected static final String PORT_PROPERTY = "rest.http.port"; + protected static final String ROOT_RESOURCE_PATH = "/rest-test"; + protected static final String PROPERTIES_FILE = "/testconfig.properties"; + + protected static final int STARTUP_RETRIES = 3; + + public abstract void stop(); + + public void start() { + startServer(STARTUP_RETRIES); + } + + protected abstract void startServer(int startUpRetries); + + protected Properties readProperties() { + InputStream propStream = null; + Properties properties = new Properties(); + + try { + propStream = AbstractRestServiceTest.class.getResourceAsStream(PROPERTIES_FILE); + properties.load(propStream); + } catch (IOException e) { + throw new ServerBootstrapException(e); + } finally { + try { + propStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + return properties; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/ContainerSpecifics.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/ContainerSpecifics.java new file mode 100644 index 0000000000000000000000000000000000000000..e8451900343420ef13b3a2bb89ef551c11b042d3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/ContainerSpecifics.java @@ -0,0 +1,33 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import org.junit.rules.TestRule; + +/** + * @author Thorben Lindhauer + * + */ +public interface ContainerSpecifics { + + /** + * Returns a test rule that is able to setup and tear down + * a container for running the REST API tests + */ + TestRule getTestRule(Class testClass); + +} \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/EmbeddedServerBootstrap.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/EmbeddedServerBootstrap.java new file mode 100644 index 0000000000000000000000000000000000000000..74aeea816f4d71b3404b9e662814f69a3ca9049a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/EmbeddedServerBootstrap.java @@ -0,0 +1,52 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import java.net.BindException; +import javax.ws.rs.core.Application; + +public abstract class EmbeddedServerBootstrap extends AbstractServerBootstrap { + + protected Application application; + + protected abstract void setupServer(Application application); + protected abstract void startServerInternal() throws Exception; + + public EmbeddedServerBootstrap(Application application) { + this.application = application; + setupServer(application); + } + + @Override + protected void startServer(int startUpRetries) { + try { + startServerInternal(); + } catch (Exception e) { + if ((e instanceof BindException || e.getCause() instanceof BindException) && startUpRetries > 0) { + stop(); + try { + Thread.sleep(500L); + } catch (Exception ex) { + } + setupServer(application); + startServer(--startUpRetries); + } else { + throw new ServerBootstrapException(e); + } + } + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/JaxrsApplication.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/JaxrsApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..7d495aba41714bc64e19b7042e791ef329855d18 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/JaxrsApplication.java @@ -0,0 +1,44 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import java.util.HashSet; +import java.util.Set; + +import javax.ws.rs.ApplicationPath; +import javax.ws.rs.core.Application; + +import org.camunda.bpm.engine.rest.impl.CamundaRestResources; + +/** + * @author Thorben Lindhauer + * + */ +@ApplicationPath("/") +public class JaxrsApplication extends Application { + + @Override + public Set> getClasses() { + Set> classes = new HashSet>(); + + classes.addAll(CamundaRestResources.getResourceClasses()); + classes.addAll(CamundaRestResources.getConfigurationClasses()); + + return classes; + } + +} \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/ServerBootstrapException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/ServerBootstrapException.java new file mode 100644 index 0000000000000000000000000000000000000000..3349947feaba06ed24ea6fc9caa34ea6b9d44f01 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/ServerBootstrapException.java @@ -0,0 +1,25 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +public class ServerBootstrapException extends RuntimeException { + + public ServerBootstrapException(Exception cause) { + super("Unable to bootstrap server: " + cause.getMessage(), cause); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/TestContainerRule.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/TestContainerRule.java new file mode 100644 index 0000000000000000000000000000000000000000..987e2bb2f3e1edb46d4d3363aa776fccd438c40f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/TestContainerRule.java @@ -0,0 +1,67 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import java.util.Iterator; +import java.util.ServiceLoader; +import java.util.logging.Logger; + +import org.junit.rules.TestRule; +import org.junit.runner.Description; +import org.junit.runners.model.Statement; + +/** + * @author Thorben Lindhauer + * + */ +public class TestContainerRule implements TestRule { + + private static final Logger LOGGER = Logger.getLogger(TestContainerRule.class.getSimpleName()); + + protected ContainerSpecifics containerSpecifics; + + public Statement apply(Statement base, Description description) { + + lookUpContainerSpecifics(); + TestRule containerSpecificRule = containerSpecifics.getTestRule(description.getTestClass()); + return containerSpecificRule.apply(base, description); + } + + protected void lookUpContainerSpecifics() { + + if (this.containerSpecifics == null) { + ServiceLoader serviceLoader = ServiceLoader.load(ContainerSpecifics.class); + Iterator it = serviceLoader.iterator(); + + if (it.hasNext()) { + ContainerSpecifics containerSpecifics = it.next(); + + this.containerSpecifics = containerSpecifics; + + if (it.hasNext()) { + LOGGER.warning("There is more than one test runtime container implementation present on the classpath. " + + "Using " + containerSpecifics.getClass().getName()); + } + } + else { + throw new RuntimeException("Could not find container provider SPI that implements " + ContainerSpecifics.class.getName()); + } + } + + } +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/TestRuleFactory.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/TestRuleFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..4af8fa4ac8a807126f7ff6e3a4ce2467d7f4e64c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/TestRuleFactory.java @@ -0,0 +1,28 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import org.junit.rules.TestRule; + +/** + * @author Thorben Lindhauer + * + */ +public interface TestRuleFactory { + + TestRule createTestRule(); +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/TomcatServerBootstrap.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/TomcatServerBootstrap.java new file mode 100644 index 0000000000000000000000000000000000000000..348856e1330dd139d46e15aee7688a2de059ba14 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/container/TomcatServerBootstrap.java @@ -0,0 +1,167 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.container; + +import java.io.File; +import java.util.Properties; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.apache.catalina.LifecycleException; +import org.apache.catalina.LifecycleState; +import org.apache.catalina.startup.Tomcat; +import org.camunda.bpm.engine.rest.spi.ProcessEngineProvider; +import org.camunda.bpm.engine.rest.spi.impl.MockedProcessEngineProvider; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.asset.ClassLoaderAsset; +import org.jboss.shrinkwrap.api.exporter.ZipExporter; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.jboss.shrinkwrap.resolver.api.maven.Maven; +import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; +import org.jboss.shrinkwrap.resolver.api.maven.ScopeType; +import org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenDependencies; + + +public abstract class TomcatServerBootstrap extends AbstractServerBootstrap { + + private Tomcat tomcat; + private String workingDir; + private String webXmlPath; + + public TomcatServerBootstrap(String webXmlPath) { + this.webXmlPath = webXmlPath; + } + + @Override + public void stop() { + try { + try { + tomcat.stop(); + } catch (Exception e) { + Logger.getLogger(getClass().getName()).log(Level.WARNING, "Failed to stop tomcat instance", e); + } + + try { + tomcat.destroy(); + } catch (Exception e) { + Logger.getLogger(getClass().getName()).log(Level.WARNING, "Failed to destroy instance", e); + } + + tomcat = null; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + @Override + protected void startServer(int startUpRetries) { + Properties serverProperties = readProperties(); + int port = Integer.parseInt(serverProperties.getProperty(PORT_PROPERTY)); + + tomcat = new Tomcat(); + tomcat.setPort(port); + tomcat.setBaseDir(getWorkingDir()); + + tomcat.getHost().setAppBase(getWorkingDir()); + tomcat.getHost().setAutoDeploy(true); + tomcat.getHost().setDeployOnStartup(true); + + String contextPath = "/" + getContextPath(); + + // 1) Must not use shrinkwrap offline mode (see longer explanation at the end of the file) + // 2) Must use configuration via Shrinkwrap Maven plugin (see pom.xml for plugin definition); + // This forwards things like the location of the settings.xml file to Shrinkwrap. We need + // that for our CI where settings.xml is not in the default location. + PomEquippedResolveStage resolver = Maven.configureResolver() + .useLegacyLocalRepo(true).configureViaPlugin(); + + WebArchive wa = ShrinkWrap.create(WebArchive.class, "rest-test.war").setWebXML(webXmlPath) + .addAsLibraries(resolver.addDependencies( + MavenDependencies.createDependency("org.mockito:mockito-core", ScopeType.TEST, false, + MavenDependencies.createExclusion("org.hamcrest:hamcrest-core"))).resolve() + .withTransitivity().asFile()) + + .addAsServiceProvider(ProcessEngineProvider.class, MockedProcessEngineProvider.class) + .add(new ClassLoaderAsset("runtime/tomcat/context.xml"), "META-INF/context.xml") + .addPackages(true, "org.camunda.bpm.engine.rest"); + + addRuntimeSpecificLibraries(wa, resolver); + wa.setWebXML(webXmlPath); + + String webAppPath = getWorkingDir() + "/" + getContextPath() + ".war"; + + wa.as(ZipExporter.class).exportTo(new File(webAppPath), true); + + tomcat.addWebapp(tomcat.getHost(), contextPath, webAppPath); + + try { + tomcat.start(); + if (LifecycleState.FAILED.equals(tomcat.getConnector().getState())) { + stop(); + try { + Thread.sleep(1500L); + } catch (Exception ex) { + } + startServer(--startUpRetries); + } + } catch (LifecycleException e) { + throw new RuntimeException(e); + } + } + + protected abstract void addRuntimeSpecificLibraries(WebArchive wa, PomEquippedResolveStage resolver); + + protected String getContextPath() { + return "rest-test"; + } + + protected String getWorkingDir() { + if (workingDir == null) { + workingDir = System.getProperty("java.io.tmpdir"); + } + return workingDir; + } + + protected void setWorkingDir(String workingDir) { + this.workingDir = workingDir; + } + + /* + * Must not use Shrinkwrap offline mode or else some Maven builds can fail. In particular, a + * Maven build will fail with offline mode in the following circumstances: + * + * - The BOM is part of the Maven reactor (e.g. if we build the root pom) + * - The Maven build does not install its modules (e.g. we run mvn clean verify) + * - There is no BOM snapshot in the local repository yet (this is mostly the case in CI) + * + * Why? + * + * - The BOM is imported in the dependencyManagement section of this pom (via camunda-parent) + * - As the BOM is part of the reactor, it will not be fetched from remote by the Maven build + * - As we do not run "install", Maven does not put the BOM into the local repository + * - Shrinkwrap will not be able to resolve the BOM then; note: this is different if a pom is referenced + * as a parent; in that case, Shrinkwrap will navigate the relativePaths towards the local pom + * + * Impact + * + * - By enabling remote fetching in Shrinkwrap, a remote snapshot BOM will be fetched in this case + * - While counter-intuitive, we consider this an ok solution; other solution options were disallowing + * "mvn clean verify" in these circumstances (and changing CI builds accordingly), or reverting the + * changes made in CAM-11345. + * + * This change was made with CAM-11345. See the discussion there for more details. + */ +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/migration/MigrationExecutionDtoBuilder.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/migration/MigrationExecutionDtoBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..17cead6c34ab40688d2e5bfed302ced1fde2788a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/migration/MigrationExecutionDtoBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.migration; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.camunda.bpm.engine.rest.dto.runtime.ProcessInstanceQueryDto; + +public class MigrationExecutionDtoBuilder { + + public static final String PROP_PROCESS_INSTANCE_IDS = "processInstanceIds"; + public static final String PROP_PROCESS_INSTANCE_QUERY = "processInstanceQuery"; + public static final String PROP_MIGRATION_PLAN = "migrationPlan"; + public static final String PROP_SKIP_CUSTOM_LISTENERS = "skipCustomListeners"; + public static final String PROP_SKIP_IO_MAPPINGS = "skipIoMappings"; + + protected final Map migrationExecution; + + public MigrationExecutionDtoBuilder() { + migrationExecution = new HashMap(); + } + + public MigrationExecutionDtoBuilder processInstances(String... processInstanceIds) { + migrationExecution.put(PROP_PROCESS_INSTANCE_IDS, Arrays.asList(processInstanceIds)); + return this; + } + + public MigrationExecutionDtoBuilder processInstanceQuery(ProcessInstanceQueryDto processInstanceQuery) { + migrationExecution.put(PROP_PROCESS_INSTANCE_QUERY, processInstanceQuery); + return this; + } + + public MigrationPlanExecutionDtoBuilder migrationPlan(String sourceProcessDefinitionId, String targetProcessDefinitionId) { + return new MigrationPlanExecutionDtoBuilder(this, sourceProcessDefinitionId, targetProcessDefinitionId); + } + + public MigrationExecutionDtoBuilder migrationPlan(Map migrationPlan) { + migrationExecution.put(PROP_MIGRATION_PLAN, migrationPlan); + return this; + } + + public MigrationExecutionDtoBuilder skipCustomListeners(boolean skipCustomListeners) { + migrationExecution.put(PROP_SKIP_CUSTOM_LISTENERS, skipCustomListeners); + return this; + } + + public MigrationExecutionDtoBuilder skipIoMappings(boolean skipIoMappings) { + migrationExecution.put(PROP_SKIP_IO_MAPPINGS, skipIoMappings); + return this; + } + + public Map build() { + return migrationExecution; + } + + public class MigrationPlanExecutionDtoBuilder extends MigrationPlanDtoBuilder { + + protected final MigrationExecutionDtoBuilder migrationExecutionDtoBuilder; + + public MigrationPlanExecutionDtoBuilder(MigrationExecutionDtoBuilder migrationExecutionDtoBuilder, String sourceProcessDefinitionId, String targetProcessDefinitionId) { + super(sourceProcessDefinitionId, targetProcessDefinitionId); + this.migrationExecutionDtoBuilder = migrationExecutionDtoBuilder; + } + + @Override + public MigrationPlanExecutionDtoBuilder instruction(String sourceActivityId, String targetActivityId) { + super.instruction(sourceActivityId, targetActivityId); + return this; + } + + @Override + public MigrationPlanExecutionDtoBuilder instruction(String sourceActivityId, String targetActivityId, Boolean updateEventTrigger) { + super.instruction(sourceActivityId, targetActivityId, updateEventTrigger); + return this; + } + + @Override + public MigrationPlanExecutionDtoBuilder instructions(List> instructions) { + super.instructions(instructions); + return this; + } + + @Override + public Map build() { + throw new UnsupportedOperationException("Please use the done() method to finish the migration plan building"); + } + + public MigrationExecutionDtoBuilder done() { + Map migrationPlan = super.build(); + return migrationExecutionDtoBuilder.migrationPlan(migrationPlan); + } + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/migration/MigrationInstructionDtoBuilder.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/migration/MigrationInstructionDtoBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..0275b2ec629e805edc126f5910f18d31edbe6b87 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/migration/MigrationInstructionDtoBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.migration; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +public class MigrationInstructionDtoBuilder { + + public static final String PROP_SOURCE_ACTIVITY_IDS = "sourceActivityIds"; + public static final String PROP_TARGET_ACTIVITY_IDS = "targetActivityIds"; + public static final String PROP_UPDATE_EVENT_TRIGGER = "updateEventTrigger"; + + protected final Map migrationInstruction; + + public MigrationInstructionDtoBuilder() { + migrationInstruction = new HashMap(); + } + + public MigrationInstructionDtoBuilder migrate(String sourceActivityId, String targetActivityId) { + return migrate(Collections.singletonList(sourceActivityId), Collections.singletonList(targetActivityId), null); + } + + public MigrationInstructionDtoBuilder migrate(String sourceActivityId, String targetActivityId, Boolean updateEventTrigger) { + return migrate(Collections.singletonList(sourceActivityId), Collections.singletonList(targetActivityId), updateEventTrigger); + } + + public MigrationInstructionDtoBuilder migrate(List sourceActivityId, List targetActivityId, Boolean updateEventTrigger) { + migrationInstruction.put(PROP_SOURCE_ACTIVITY_IDS, sourceActivityId); + migrationInstruction.put(PROP_TARGET_ACTIVITY_IDS, targetActivityId); + migrationInstruction.put(PROP_UPDATE_EVENT_TRIGGER, updateEventTrigger); + + return this; + } + + public Map build() { + return migrationInstruction; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/migration/MigrationPlanDtoBuilder.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/migration/MigrationPlanDtoBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..a960feafbb63588e910fe4a4b5c0ce290b3f59d2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/util/migration/MigrationPlanDtoBuilder.java @@ -0,0 +1,66 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.rest.util.migration; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +public class MigrationPlanDtoBuilder { + + public static final String PROP_SOURCE_PROCESS_DEFINITION_ID = "sourceProcessDefinitionId"; + public static final String PROP_TARGET_PROCESS_DEFINITION_ID = "targetProcessDefinitionId"; + public static final String PROP_INSTRUCTIONS = "instructions"; + + protected final Map migrationPlan; + + public MigrationPlanDtoBuilder(String sourceProcessDefinitionId, String targetProcessDefinitionId) { + migrationPlan = new HashMap(); + migrationPlan.put(PROP_SOURCE_PROCESS_DEFINITION_ID, sourceProcessDefinitionId); + migrationPlan.put(PROP_TARGET_PROCESS_DEFINITION_ID, targetProcessDefinitionId); + } + + public MigrationPlanDtoBuilder instructions(List> instructions) { + migrationPlan.put(PROP_INSTRUCTIONS, instructions); + return this; + } + + public MigrationPlanDtoBuilder instruction(String sourceActivityId, String targetActivityId) { + return instruction(sourceActivityId, targetActivityId, null); + } + + public MigrationPlanDtoBuilder instruction(String sourceActivityId, String targetActivityId, Boolean updateEventTrigger) { + List> instructions = (List>) migrationPlan.get(PROP_INSTRUCTIONS); + if (instructions == null) { + instructions = new ArrayList>(); + migrationPlan.put(PROP_INSTRUCTIONS, instructions); + } + + Map migrationInstruction = new MigrationInstructionDtoBuilder() + .migrate(sourceActivityId, targetActivityId, updateEventTrigger) + .build(); + + instructions.add(migrationInstruction); + return this; + } + + public Map build() { + return migrationPlan; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-jersey2/META-INF/services/org.camunda.bpm.engine.rest.util.container.ContainerSpecifics b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-jersey2/META-INF/services/org.camunda.bpm.engine.rest.util.container.ContainerSpecifics new file mode 100644 index 0000000000000000000000000000000000000000..89e50c049a4f479b13cb9db92bf70c05b9feb794 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-jersey2/META-INF/services/org.camunda.bpm.engine.rest.util.container.ContainerSpecifics @@ -0,0 +1 @@ +org.camunda.bpm.engine.rest.util.container.JerseySpecifics \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-jersey2/custom-date-format-web.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-jersey2/custom-date-format-web.xml new file mode 100644 index 0000000000000000000000000000000000000000..68747a16c79d017400db66fa3a058fd843aaf0ae --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-jersey2/custom-date-format-web.xml @@ -0,0 +1,31 @@ + + + + camunda rest api + + + Engine Api + org.glassfish.jersey.servlet.ServletContainer + + javax.ws.rs.Application + org.camunda.bpm.engine.rest.util.container.JaxrsApplication + + + + + Engine Api + /* + + + + org.camunda.bpm.engine.rest.CustomJacksonDateFormatListener + + + + org.camunda.bpm.engine.rest.jackson.dateFormat + yyyy-MM-dd'T'HH:mm:ss + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/META-INF/services/org.camunda.bpm.engine.rest.util.container.ContainerSpecifics b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/META-INF/services/org.camunda.bpm.engine.rest.util.container.ContainerSpecifics new file mode 100644 index 0000000000000000000000000000000000000000..d803dabb98758a011efef99f10497b3fbb4fc247 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/META-INF/services/org.camunda.bpm.engine.rest.util.container.ContainerSpecifics @@ -0,0 +1 @@ +org.camunda.bpm.engine.rest.util.container.ResteasySpecifics \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/auth-filter-no-servlet-web.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/auth-filter-no-servlet-web.xml new file mode 100644 index 0000000000000000000000000000000000000000..b9ebe8f3c50dbe13a5fc20d19961e317e444a20c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/auth-filter-no-servlet-web.xml @@ -0,0 +1,49 @@ + + + + camunda rest api + + + resteasy.servlet.mapping.prefix + /rest + + + + camunda-auth + + org.camunda.bpm.engine.rest.security.auth.ProcessEngineAuthenticationFilter + + + authentication-provider + org.camunda.bpm.engine.rest.security.auth.impl.HttpBasicAuthenticationProvider + + + rest-url-pattern-prefix + /rest + + + + + camunda-auth + /rest/* + + + + Resteasy + + org.jboss.resteasy.plugins.server.servlet.FilterDispatcher + + + javax.ws.rs.Application + org.camunda.bpm.engine.rest.util.container.JaxrsApplication + + + + + Resteasy + /rest/* + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/auth-filter-servlet-web.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/auth-filter-servlet-web.xml new file mode 100644 index 0000000000000000000000000000000000000000..abd7bad464c3695dbc39793aa492ff9e4957e909 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/auth-filter-servlet-web.xml @@ -0,0 +1,43 @@ + + + + camunda rest api + + + resteasy.servlet.mapping.prefix + /rest + + + + Resteasy + org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher + + javax.ws.rs.Application + org.camunda.bpm.engine.rest.util.container.JaxrsApplication + + + + + Resteasy + /rest/* + + + + camunda-auth + + org.camunda.bpm.engine.rest.security.auth.ProcessEngineAuthenticationFilter + + + authentication-provider + org.camunda.bpm.engine.rest.security.auth.impl.HttpBasicAuthenticationProvider + + + + + camunda-auth + /rest/* + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/custom-date-format-web.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/custom-date-format-web.xml new file mode 100644 index 0000000000000000000000000000000000000000..b53398269bfcbd50af04d28dd45288e3c0ee0489 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/custom-date-format-web.xml @@ -0,0 +1,31 @@ + + + + camunda rest api + + + Engine Api + org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher + + javax.ws.rs.Application + org.camunda.bpm.engine.rest.util.container.JaxrsApplication + + + + + Engine Api + /* + + + + org.camunda.bpm.engine.rest.CustomJacksonDateFormatListener + + + + org.camunda.bpm.engine.rest.jackson.dateFormat + yyyy-MM-dd'T'HH:mm:ss + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/empty-body-filter-no-servlet-web.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/empty-body-filter-no-servlet-web.xml new file mode 100644 index 0000000000000000000000000000000000000000..9ba16ed891a10a39ccf9006e472908ede7849d0c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/empty-body-filter-no-servlet-web.xml @@ -0,0 +1,38 @@ + + + + camunda rest api + + + resteasy.servlet.mapping.prefix + /rest + + + + EmptyBodyFilter + org.camunda.bpm.engine.rest.filter.EmptyBodyFilter + + + EmptyBodyFilter + /rest/* + + + + Resteasy + + org.jboss.resteasy.plugins.server.servlet.FilterDispatcher + + + javax.ws.rs.Application + org.camunda.bpm.engine.rest.util.container.JaxrsApplication + + + + + Resteasy + /rest/* + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/empty-body-filter-servlet-web.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/empty-body-filter-servlet-web.xml new file mode 100644 index 0000000000000000000000000000000000000000..8cb36a6a5f9321e584f8b40ec68945b4d2d1c2ce --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-resteasy/empty-body-filter-servlet-web.xml @@ -0,0 +1,36 @@ + + + + camunda rest api + + + resteasy.servlet.mapping.prefix + /rest + + + + Resteasy + org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher + + javax.ws.rs.Application + org.camunda.bpm.engine.rest.util.container.JaxrsApplication + + + + + Resteasy + /rest/* + + + + EmptyBodyFilter + org.camunda.bpm.engine.rest.filter.EmptyBodyFilter + + + EmptyBodyFilter + /rest/* + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-wink/META-INF/services/org.camunda.bpm.engine.rest.util.container.ContainerSpecifics b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-wink/META-INF/services/org.camunda.bpm.engine.rest.util.container.ContainerSpecifics new file mode 100644 index 0000000000000000000000000000000000000000..a461b3c9fdf59f7b2b66f0e2b7d004546b1f68fb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-wink/META-INF/services/org.camunda.bpm.engine.rest.util.container.ContainerSpecifics @@ -0,0 +1 @@ +org.camunda.bpm.engine.rest.util.container.WinkSpecifics \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-wink/custom-application-web.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-wink/custom-application-web.xml new file mode 100644 index 0000000000000000000000000000000000000000..c17aa98bc32a753e5f04ddc8e6463deac3e00e86 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-wink/custom-application-web.xml @@ -0,0 +1,22 @@ + + + + custom rest resource application + + + Engine Api + org.apache.wink.server.internal.servlet.RestServlet + + javax.ws.rs.Application + org.camunda.bpm.engine.rest.application.TestCustomResourceApplication + + + + + Engine Api + /* + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-wink/custom-date-format-web.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-wink/custom-date-format-web.xml new file mode 100644 index 0000000000000000000000000000000000000000..2a0e30aa640e7cb1d19f51949154b0b07c7ccb09 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-wink/custom-date-format-web.xml @@ -0,0 +1,31 @@ + + + + camunda rest api + + + Engine Api + org.apache.wink.server.internal.servlet.RestServlet + + javax.ws.rs.Application + org.camunda.bpm.engine.rest.util.container.JaxrsApplication + + + + + Engine Api + /* + + + + org.camunda.bpm.engine.rest.CustomJacksonDateFormatListener + + + + org.camunda.bpm.engine.rest.jackson.dateFormat + yyyy-MM-dd'T'HH:mm:ss + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-wink/default-application-web.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-wink/default-application-web.xml new file mode 100644 index 0000000000000000000000000000000000000000..c50164103ca8d1201a5f88bd62215316cf122358 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources-wink/default-application-web.xml @@ -0,0 +1,22 @@ + + + + camunda rest api + + + Engine Api + org.apache.wink.server.internal.servlet.RestServlet + + javax.ws.rs.Application + org.camunda.bpm.engine.rest.util.container.JaxrsApplication + + + + + Engine Api + /* + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/META-INF/services/org.camunda.bpm.engine.rest.spi.ProcessEngineProvider b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/META-INF/services/org.camunda.bpm.engine.rest.spi.ProcessEngineProvider new file mode 100644 index 0000000000000000000000000000000000000000..7710b5d5d9e72fe41e6e3c15b51e6dfafaad59eb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/META-INF/services/org.camunda.bpm.engine.rest.spi.ProcessEngineProvider @@ -0,0 +1 @@ +org.camunda.bpm.engine.rest.spi.impl.MockedProcessEngineProvider \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/cases/case-model.cmmn b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/cases/case-model.cmmn new file mode 100644 index 0000000000000000000000000000000000000000..64e2b6626dab7b44859ce23c63e9b9bad1c4c863 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/cases/case-model.cmmn @@ -0,0 +1,14 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/decisions/decision-model.dmn b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/decisions/decision-model.dmn new file mode 100644 index 0000000000000000000000000000000000000000..8a1906b5763124eb875ba72767f51e96aa365238 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/decisions/decision-model.dmn @@ -0,0 +1,39 @@ + + + + + + + status + + + "a","b" + + + + + "ok","notok" + + + + + a + + + notok + + + + + b + + + ok + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/decisions/decision-requirements-diagram.png b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/decisions/decision-requirements-diagram.png new file mode 100644 index 0000000000000000000000000000000000000000..1ff0f4a03c3d921fb960f7a83f40604abda6cebd --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/decisions/decision-requirements-diagram.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72e540359c2965afefdd21cadde8eec16d399d93cac2f337ece9d4673d202f92 +size 258472 diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/decisions/decision-requirements-model.dmn b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/decisions/decision-requirements-model.dmn new file mode 100644 index 0000000000000000000000000000000000000000..82503c2a1e1d96c69bd981ecde070919804c5ec4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/decisions/decision-requirements-model.dmn @@ -0,0 +1,55 @@ + + + + + + + + + + status + + + + + + + a + + + notok + + + + + + + + + result + + + + + + + 75 + + + a + + + + + 50 + + + b + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/logback-test.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/logback-test.xml new file mode 100644 index 0000000000000000000000000000000000000000..23b08a905b46548e5ed2323146eac528ab9ee09a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/logback-test.xml @@ -0,0 +1,15 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/logging.properties b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/logging.properties new file mode 100644 index 0000000000000000000000000000000000000000..4941c55971f365781be2c0903a6f00af84a1a74f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/logging.properties @@ -0,0 +1,2 @@ +#register SLF4JBridgeHandler as handler for the j.u.l. root logger +handlers = org.slf4j.bridge.SLF4JBridgeHandler diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/diagram.svg b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/diagram.svg new file mode 100644 index 0000000000000000000000000000000000000000..466c53bc3da5b681225158ee2f41b1310689c360 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/diagram.svg @@ -0,0 +1,4 @@ + + + +hunger noticedchoose recipedesired dish? \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/fox-invoice_en.bpmn b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/fox-invoice_en.bpmn new file mode 100644 index 0000000000000000000000000000000000000000..9a86f39ce82ed0bda84ad87161cb0ba182a10bbb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/fox-invoice_en.bpmn @@ -0,0 +1,191 @@ + + + + + + + + + + + + + approveInvoice + invoice_approved + + + invoiceReceived + reviewInvoice + reviewSuccessful_gw + invoiceNotProcessed + assignApprover + + + saveInvoiceToSVN + prepareBankTransfer + invoiceProcessed + + + + sequenceFlow_178 + reviewSuccessful + sequenceFlow_180 + + + sequenceFlow_180 + invoiceNotApproved + invoiceApproved + + + sequenceFlow_187 + + + + invoiceNotApproved + sequenceFlow_183 + + + sequenceFlow_183 + reviewNotSuccessful + reviewSuccessful + + + reviewNotSuccessful + + + sequenceFlow_179 + SequenceFlow_1 + + + invoiceApproved + sequenceFlow_179 + + + ${!approved} + + + + + + + ${approved} + + + ${clarified.equals('no')} + + + + ${clarified.equals('yes')} + + + + SequenceFlow_1 + + + sequenceFlow_187 + sequenceFlow_178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/fox-invoice_en_long_id.bpmn b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/fox-invoice_en_long_id.bpmn new file mode 100644 index 0000000000000000000000000000000000000000..be6a487342b9fb15bda5f8d3f1668c17928a3394 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/fox-invoice_en_long_id.bpmn @@ -0,0 +1,191 @@ + + + + + + + + + + + + + approveInvoice + invoice_approved + + + invoiceReceived + reviewInvoice + reviewSuccessful_gw + invoiceNotProcessed + assignApprover + + + saveInvoiceToSVN + prepareBankTransfer + invoiceProcessed + + + + sequenceFlow_178 + reviewSuccessful + sequenceFlow_180 + + + sequenceFlow_180 + invoiceNotApproved + invoiceApproved + + + sequenceFlow_187 + + + + invoiceNotApproved + sequenceFlow_183 + + + sequenceFlow_183 + reviewNotSuccessful + reviewSuccessful + + + reviewNotSuccessful + + + sequenceFlow_179 + SequenceFlow_1 + + + invoiceApproved + sequenceFlow_179 + + + ${!approved} + + + + + + + ${approved} + + + ${clarified.equals('no')} + + + + ${clarified.equals('yes')} + + + + SequenceFlow_1 + + + sequenceFlow_187 + sequenceFlow_178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/fox-invoice_en_long_id_non_executable.bpmn b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/fox-invoice_en_long_id_non_executable.bpmn new file mode 100644 index 0000000000000000000000000000000000000000..e15c6dcc0d17743f6e0d0233ddf356491d4315b8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/fox-invoice_en_long_id_non_executable.bpmn @@ -0,0 +1,191 @@ + + + + + + + + + + + + + approveInvoice + invoice_approved + + + invoiceReceived + reviewInvoice + reviewSuccessful_gw + invoiceNotProcessed + assignApprover + + + saveInvoiceToSVN + prepareBankTransfer + invoiceProcessed + + + + sequenceFlow_178 + reviewSuccessful + sequenceFlow_180 + + + sequenceFlow_180 + invoiceNotApproved + invoiceApproved + + + sequenceFlow_187 + + + + invoiceNotApproved + sequenceFlow_183 + + + sequenceFlow_183 + reviewNotSuccessful + reviewSuccessful + + + reviewNotSuccessful + + + sequenceFlow_179 + SequenceFlow_1 + + + invoiceApproved + sequenceFlow_179 + + + ${!approved} + + + + + + + ${approved} + + + ${clarified.equals('no')} + + + + ${clarified.equals('yes')} + + + + SequenceFlow_1 + + + sequenceFlow_187 + sequenceFlow_178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/todo-process.png b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/todo-process.png new file mode 100644 index 0000000000000000000000000000000000000000..2c30d16876b80e739b2f53dfb5c0b6920ed8b14e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/processes/todo-process.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bac34b3fcb538cbe6490423c84e2f727381e360b793aa2ddeeb2a716da286427 +size 1328 diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/runtime/tomcat/context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/runtime/tomcat/context.xml new file mode 100644 index 0000000000000000000000000000000000000000..b437ab953691be57f9f295a0d930c624d7e3c074 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/runtime/tomcat/context.xml @@ -0,0 +1,4 @@ + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/testconfig.properties b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/testconfig.properties new file mode 100644 index 0000000000000000000000000000000000000000..aab5ac32255bc09f1b3a38bfbb19efb7242ba2b4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/engine-rest/src/test/resources/testconfig.properties @@ -0,0 +1 @@ +rest.http.port=${rest.http.port} \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..42fc8266de68201b21ff0946c312142fde88e5d9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-rest/pom.xml @@ -0,0 +1,86 @@ + + 4.0.0 + + + org.camunda.bpm + camunda-database-settings + ../database + 7.24.0-SNAPSHOT + + + camunda-engine-rest-root + + pom + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + Camunda Platform - engine - REST - Root + + + 4.5.0 + + 3.0.9 + 4.4.5 + 1.15 + + + + + + + org.codehaus.groovy + groovy-bom + ${version.groovy} + import + pom + + + org.camunda.bpm + camunda-core-internal-dependencies + ${project.version} + import + pom + + + com.sun.xml.bind + jaxb-impl + ${version.xml.jaxb-impl} + + + io.rest-assured + rest-assured + ${version.rest-assured} + + + com.fasterxml.jackson + jackson-bom + ${version.jackson} + import + pom + + + org.apache.httpcomponents + httpcore + ${version.apache.httpcore} + + + commons-codec + commons-codec + ${version.commons-codec} + + + + + + engine-rest + engine-rest-jakarta + engine-rest-openapi + engine-rest-openapi-generator + assembly + assembly-jakarta + docs + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core-6/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core-6/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..bd3ab9c89b5c6164fa1fb360a1cec3b55ac1d1bb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core-6/pom.xml @@ -0,0 +1,415 @@ + + 4.0.0 + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + + Camunda Platform - engine - Spring 6 + camunda-engine-spring-6 + + + org.camunda.bpm + camunda-database-settings + ../../database + 7.24.0-SNAPSHOT + + + + + + + org.camunda.bpm + camunda-core-internal-dependencies + ${project.version} + import + pom + + + + jakarta.platform + jakarta.jakartaee-bom + ${version.jakarta-ee-spec} + pom + import + + + + org.springframework + spring-framework-bom + ${version.spring.framework6} + pom + import + + + + + + + + org.camunda.bpm + camunda-engine + + + org.springframework + spring-context + provided + + + org.springframework + spring-jdbc + provided + + + org.springframework + spring-tx + provided + + + org.springframework + spring-orm + provided + + + org.springframework + spring-web + + provided + + + + + jakarta.servlet + jakarta.servlet-api + provided + + + + org.springframework + spring-test + test + + + junit + junit + test + + + cglib + cglib + test + + + org.apache.groovy + groovy-jsr223 + test + + + org.python + jython + test + + + org.graalvm.js + js + test + + + org.graalvm.js + js-scriptengine + test + + + com.h2database + h2 + test + + + org.mockito + mockito-core + test + + + org.assertj + assertj-core + test + + + org.hibernate + hibernate-core-jakarta + 5.6.15.Final + test + + + + org.slf4j + slf4j-api + + + + + ch.qos.logback + logback-classic + test + + + org.slf4j + jcl-over-slf4j + test + + + org.slf4j + jul-to-slf4j + test + + + + org.camunda.bpm + camunda-bpm-archunit + ${project.version} + test + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + sources + generate-sources + + copy-resources + + + ${project.build.directory}/generated-sources/java + + + ${basedir}/../core/src/main/java + false + + + + + + resources + generate-resources + + copy-resources + + + ${project.build.directory}/generated-resources/java + + + ${basedir}/../core/src/main/resources + false + + + + + + test-sources + generate-test-sources + + copy-resources + + + ${project.build.directory}/generated-test-sources/java + + + ${basedir}/../core/src/test/java + false + + **/*NashornTest.java + + + + + + test-resources + generate-test-resources + + copy-resources + + + ${project.build.directory}/generated-test-resources/java + + + ${basedir}/../core/src/test/resources + false + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + initialize + + properties + + + + + + org.eclipse.transformer + transformer-maven-plugin + + + transform-java-sources + generate-sources + + transform + + + ${project.build.directory}/generated-sources/java + + + + transform-resources + generate-resources + + transform + + + ${project.build.directory}/generated-resources/java + + + + transform-java-test-sources + generate-test-sources + + transform + + + ${project.build.directory}/generated-test-sources/java + + + + transform-test-resources + generate-test-resources + + transform + + + ${project.build.directory}/generated-test-resources/java + + + + + + maven-surefire-plugin + + true + + org.camunda.bpm:camunda-bpm-archunit + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.2.0 + + + add-java-source + generate-sources + + add-source + + + + ${basedir}/target/generated-sources/java + + + + + add-resources + generate-resources + + add-resource + + + + ${basedir}/target/generated-resources/java + + + + + add-java-test-source + generate-test-sources + + add-test-source + + + + ${basedir}/target/generated-test-sources/java + + + + + add-test-resources + generate-test-resources + + add-test-resource + + + + ${basedir}/target/generated-test-resources/java + + + + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + package + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-java + + enforce + + + + + [17,) + + ***************************************************************************************************** + * * + * You must use at least JDK 17 to build Proces Engine Spring 6 integration!!! * + * * + ***************************************************************************************************** + + + + true + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..4657d1991f1d00c85c3229647eeb25733882502f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/pom.xml @@ -0,0 +1,227 @@ + + 4.0.0 + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + + Camunda Platform - engine - Spring + camunda-engine-spring + + + org.camunda.bpm + camunda-database-settings + ../../database + 7.24.0-SNAPSHOT + + + + + + + org.camunda.bpm + camunda-core-internal-dependencies + ${project.version} + import + pom + + + + org.springframework + spring-framework-bom + ${version.spring.framework} + pom + import + + + + + + + + org.camunda.bpm + camunda-engine + + + org.springframework + spring-context + provided + + + org.springframework + spring-jdbc + provided + + + org.springframework + spring-tx + provided + + + org.springframework + spring-orm + provided + + + org.springframework + spring-web + + provided + + + + + org.jboss.spec.javax.servlet + jboss-servlet-api_3.0_spec + provided + + + + org.springframework + spring-test + test + + + junit + junit + test + + + cglib + cglib + test + + + org.apache.groovy + groovy-jsr223 + test + + + org.python + jython + test + + + org.graalvm.js + js + test + + + org.graalvm.js + js-scriptengine + test + + + com.h2database + h2 + test + + + org.mockito + mockito-core + test + + + org.assertj + assertj-core + test + + + org.hibernate + hibernate-core + ${version.hibernate} + test + + + + org.slf4j + slf4j-api + + + + + ch.qos.logback + logback-classic + test + + + org.slf4j + jcl-over-slf4j + test + + + org.slf4j + jul-to-slf4j + test + + + + org.camunda.bpm + camunda-bpm-archunit + ${project.version} + test + + + + + + + + maven-surefire-plugin + + true + + org.camunda.bpm:camunda-bpm-archunit + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + create-test-jar + package + + test-jar + + + true + + + META-INF/services/org.camunda.bpm.engine.spring.test.SpringTestHelper + + + + + + + + + + + exclude-post-jdk15-tests + + [15,) + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + **/*NashornTest.java + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/ApplicationContextElResolver.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/ApplicationContextElResolver.java new file mode 100644 index 0000000000000000000000000000000000000000..e9fd946fb6fe82696e6fae323291ae284bd253af --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/ApplicationContextElResolver.java @@ -0,0 +1,83 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring; + +import java.beans.FeatureDescriptor; +import java.util.Iterator; +import org.camunda.bpm.engine.ProcessEngineException; +import org.camunda.bpm.impl.juel.jakarta.el.ELContext; +import org.camunda.bpm.impl.juel.jakarta.el.ELResolver; +import org.springframework.context.ApplicationContext; + +/** + * @author Tom Baeyens + * @author Frederik Heremans + */ +public class ApplicationContextElResolver extends ELResolver { + + protected ApplicationContext applicationContext; + + public ApplicationContextElResolver(ApplicationContext applicationContext) { + this.applicationContext = applicationContext; + } + + @Override + public Object getValue(ELContext context, Object base, Object property) { + if (base == null) { + // according to javadoc, can only be a String + String key = (String) property; + + if (applicationContext.containsBean(key)) { + context.setPropertyResolved(true); + return applicationContext.getBean(key); + } + } + + return null; + } + + @Override + public boolean isReadOnly(ELContext context, Object base, Object property) { + return true; + } + + @Override + public void setValue(ELContext context, Object base, Object property, Object value) { + if(base == null) { + String key = (String) property; + if (applicationContext.containsBean(key)) { + throw new ProcessEngineException("Cannot set value of '" + property + + "', it resolves to a bean defined in the Spring application-context."); + } + } + } + + @Override + public Class< ? > getCommonPropertyType(ELContext context, Object arg) { + return Object.class; + } + + @Override + public Iterator getFeatureDescriptors(ELContext context, Object arg) { + return null; + } + + @Override + public Class< ? > getType(ELContext context, Object arg1, Object arg2) { + return Object.class; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/ProcessEngineFactoryBean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/ProcessEngineFactoryBean.java new file mode 100644 index 0000000000000000000000000000000000000000..48c84535ce3f127973420fb17c7a3c50f129795e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/ProcessEngineFactoryBean.java @@ -0,0 +1,95 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.ProcessEngineImpl; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.DisposableBean; +import org.springframework.beans.factory.FactoryBean; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +/** + * @author Dave Syer + * @author Christian Stettler + * @author Tom Baeyens + * @author Joram Barrez + */ +public class ProcessEngineFactoryBean implements FactoryBean, DisposableBean, ApplicationContextAware { + + protected ProcessEngineConfigurationImpl processEngineConfiguration; + protected ApplicationContext applicationContext; + protected ProcessEngineImpl processEngine; + + public void destroy() throws Exception { + if (processEngine != null) { + processEngine.close(); + } + } + + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.applicationContext = applicationContext; + } + + public ProcessEngine getObject() throws Exception { + if (processEngine == null) { + initializeExpressionManager(); + initializeTransactionExternallyManaged(); + + processEngine = (ProcessEngineImpl) processEngineConfiguration.buildProcessEngine(); + } + + return processEngine; + } + + protected void initializeExpressionManager() { + if (processEngineConfiguration.getExpressionManager() == null && applicationContext != null) { + processEngineConfiguration.setExpressionManager( + new SpringExpressionManager(applicationContext, processEngineConfiguration.getBeans())); + } + } + + protected void initializeTransactionExternallyManaged() { + if (processEngineConfiguration instanceof SpringProcessEngineConfiguration) { // remark: any config can be injected, so we cannot have SpringConfiguration as member + SpringProcessEngineConfiguration engineConfiguration = (SpringProcessEngineConfiguration) processEngineConfiguration; + if (engineConfiguration.getTransactionManager() != null) { + processEngineConfiguration.setTransactionsExternallyManaged(true); + } + } + } + + public Class getObjectType() { + return ProcessEngine.class; + } + + public boolean isSingleton() { + return true; + } + + // getters and setters ////////////////////////////////////////////////////// + + public ProcessEngineConfigurationImpl getProcessEngineConfiguration() { + return processEngineConfiguration; + } + + + public void setProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration) { + this.processEngineConfiguration = processEngineConfiguration; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringArtifactFactory.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringArtifactFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..d3f6a0714d6e458c25fe2f8a153237d67551e853 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringArtifactFactory.java @@ -0,0 +1,51 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring; + +import org.camunda.bpm.engine.ArtifactFactory; +import org.camunda.bpm.engine.impl.DefaultArtifactFactory; +import org.springframework.beans.factory.NoSuchBeanDefinitionException; +import org.springframework.context.ApplicationContext; + +/** + * + * @author Svetlana Dorokhova + */ +public class SpringArtifactFactory implements ArtifactFactory { + + private ArtifactFactory defaultArtifactFactory = new DefaultArtifactFactory(); + + private ApplicationContext applicationContext; + + public SpringArtifactFactory(ApplicationContext applicationContext) { + this.applicationContext = applicationContext; + } + + @Override + public T getArtifact(Class clazz) { + T instance; + + try { + instance = applicationContext.getBean(clazz); + } catch (NoSuchBeanDefinitionException ex) { + // fall back to using newInstance() + instance = defaultArtifactFactory.getArtifact(clazz); + } + + return instance; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringBeansResolverFactory.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringBeansResolverFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..27a4c2b78a582dc3deee7666c419c5cc9551abfe --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringBeansResolverFactory.java @@ -0,0 +1,99 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; +import java.util.logging.Logger; + +import org.camunda.bpm.engine.delegate.VariableScope; +import org.camunda.bpm.engine.impl.scripting.engine.Resolver; +import org.camunda.bpm.engine.impl.scripting.engine.ResolverFactory; +import org.springframework.beans.factory.BeanCreationException; +import org.springframework.context.ApplicationContext; + +/** + *

+ * {@link ResolverFactory} and {@link Resolver} classes to make the beans + * managed by the Spring container available in scripting + *

+ * + *

+ * {@see org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration#initScripting()} + *

+ * + */ +public class SpringBeansResolverFactory implements ResolverFactory, Resolver { + + protected static Logger LOG = Logger.getLogger(SpringBeansResolverFactory.class.getName()); + + protected static String SCOPE_NOT_ACTIVE_EXCEPTION = "org.springframework.beans.factory.support.ScopeNotActiveException"; + + private ApplicationContext applicationContext; + private Set keySet; + + public SpringBeansResolverFactory(ApplicationContext applicationContext) { + this.applicationContext = applicationContext; + + String[] beannames = applicationContext.getBeanDefinitionNames(); + this.keySet = new HashSet<>(Arrays.asList(beannames)); + } + + @Override + public Resolver createResolver(VariableScope variableScope) { + return this; + } + + @Override + public boolean containsKey(Object key) { + if (key instanceof String) { + return keySet.contains((String) key); + } else { + return false; + } + } + + @Override + public Object get(Object key) { + if (key instanceof String) { + try { + return applicationContext.getBean((String) key); + } catch (BeanCreationException ex) { + // Only swallow exceptions for beans with inactive scope. + // Unfortunately, we cannot use ScopeNotActiveException directly as + // it is only available starting with Spring 5.3, but we still support Spring 4. + if (SCOPE_NOT_ACTIVE_EXCEPTION.equals(ex.getClass().getName())) { + LOG.info("Bean '" + key + "' cannot be accessed since scope is not active. Instead, null is returned. " + + "Full exception message: " + ex.getMessage()); + return null; + + } else { + throw ex; + + } + } + } else { + return null; + } + } + + @Override + public Set keySet() { + return keySet; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringConfigurationHelper.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringConfigurationHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..2c6438438edf84a50851321991a27aa458ad82d7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringConfigurationHelper.java @@ -0,0 +1,55 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring; + +import java.net.URL; +import java.util.Map; +import java.util.logging.Logger; + +import org.camunda.bpm.engine.ProcessEngineException; +import org.camunda.bpm.engine.ProcessEngine; +import org.springframework.context.ApplicationContext; +import org.springframework.context.support.GenericXmlApplicationContext; +import org.springframework.core.io.UrlResource; + + +/** + * @author Tom Baeyens + */ +public class SpringConfigurationHelper { + + private static Logger log = Logger.getLogger(SpringConfigurationHelper.class.getName()); + + public static ProcessEngine buildProcessEngine(URL resource) { + log.fine("==== BUILDING SPRING APPLICATION CONTEXT AND PROCESS ENGINE ========================================="); + + ApplicationContext applicationContext = new GenericXmlApplicationContext(new UrlResource(resource)); + Map beansOfType = applicationContext.getBeansOfType(ProcessEngine.class); + if ( (beansOfType==null) + || (beansOfType.isEmpty()) + ) { + throw new ProcessEngineException("no "+ProcessEngine.class.getName()+" defined in the application context "+resource.toString()); + } + + ProcessEngine processEngine = beansOfType.values().iterator().next(); + + log.fine("==== SPRING PROCESS ENGINE CREATED =================================================================="); + return processEngine; + } + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringExpressionManager.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringExpressionManager.java new file mode 100644 index 0000000000000000000000000000000000000000..9ee76baabd9d0774aefb2277622bb944435ffd97 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringExpressionManager.java @@ -0,0 +1,91 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring; + +import java.util.Map; +import org.camunda.bpm.engine.impl.el.ExpressionManager; +import org.camunda.bpm.engine.impl.el.JuelExpressionManager; +import org.camunda.bpm.engine.impl.el.ReadOnlyMapELResolver; +import org.camunda.bpm.engine.impl.el.VariableContextElResolver; +import org.camunda.bpm.engine.impl.el.VariableScopeElResolver; +import org.camunda.bpm.engine.test.mock.MockElResolver; +import org.camunda.bpm.impl.juel.jakarta.el.ArrayELResolver; +import org.camunda.bpm.impl.juel.jakarta.el.BeanELResolver; +import org.camunda.bpm.impl.juel.jakarta.el.CompositeELResolver; +import org.camunda.bpm.impl.juel.jakarta.el.ELResolver; +import org.camunda.bpm.impl.juel.jakarta.el.ListELResolver; +import org.camunda.bpm.impl.juel.jakarta.el.MapELResolver; +import org.springframework.context.ApplicationContext; + + +/** + * {@link ExpressionManager} that exposes the full application-context or a limited set + * of beans in expressions. + * + * @author Tom Baeyens + */ +public class SpringExpressionManager extends JuelExpressionManager { + + protected ApplicationContext applicationContext; + + /** + * @param applicationContext + * the applicationContext to use. Ignored when 'beans' parameter is + * not null. + * @param beans + * a map of custom beans to expose. If null, all beans in the + * application-context will be exposed. + */ + public SpringExpressionManager(ApplicationContext applicationContext, Map beans) { + super(beans); + this.applicationContext = applicationContext; + } + + /** + * @param applicationContext + * the applicationContext to use. + * @see #SpringExpressionManager(ApplicationContext, Map) + */ + public SpringExpressionManager(ApplicationContext applicationContext) { + this(applicationContext, null); + } + + @Override + protected ELResolver createElResolver() { + CompositeELResolver compositeElResolver = new CompositeELResolver(); + compositeElResolver.add(new VariableScopeElResolver()); + compositeElResolver.add(new VariableContextElResolver()); + compositeElResolver.add(new MockElResolver()); + + if(beans != null) { + // Only expose limited set of beans in expressions + compositeElResolver.add(new ReadOnlyMapELResolver(beans)); + } else { + // Expose full application-context in expressions + compositeElResolver.add(new ApplicationContextElResolver(applicationContext)); + } + + compositeElResolver.add(new ArrayELResolver()); + compositeElResolver.add(new ListELResolver()); + compositeElResolver.add(new MapELResolver()); + compositeElResolver.add(new BeanELResolver()); + + return compositeElResolver; + } + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringProcessEngineConfiguration.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringProcessEngineConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..5558b83388d43a06bbbdbda13b7ece83f09b5bb5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringProcessEngineConfiguration.java @@ -0,0 +1,51 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring; + +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +/** + * @author Svetlana Dorokhova + */ +public class SpringProcessEngineConfiguration extends SpringTransactionsProcessEngineConfiguration + implements ApplicationContextAware { + + protected ApplicationContext applicationContext; + + @Override + protected void initArtifactFactory() { + if (artifactFactory == null && applicationContext != null) { + artifactFactory = new SpringArtifactFactory(applicationContext); + } + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.applicationContext = applicationContext; + } + + @Override + protected void initScripting() { + super.initScripting(); + if (beans == null || beans == DEFAULT_BEANS_MAP) { + // no custom beans defined, make Spring context beans available for scripting + this.getResolverFactories().add(new SpringBeansResolverFactory(applicationContext)); + } + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringProcessEnginePlugin.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringProcessEnginePlugin.java new file mode 100644 index 0000000000000000000000000000000000000000..80c3c1036f0673e784cf113376e128d43685c147 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringProcessEnginePlugin.java @@ -0,0 +1,39 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring; + +import org.camunda.bpm.engine.impl.cfg.AbstractProcessEnginePlugin; +import org.springframework.beans.factory.BeanNameAware; + +/** + * This is bean-name-aware extension of the {@link AbstractProcessEnginePlugin} allowing anonymous + * classes get logged correctly when processed. + */ +public class SpringProcessEnginePlugin extends AbstractProcessEnginePlugin implements BeanNameAware { + + protected String beanName; + + @Override + public void setBeanName(String beanName) { + this.beanName = beanName; + } + + @Override + public String toString() { + return beanName; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringProcessEngineServicesConfiguration.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringProcessEngineServicesConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..75578733ccc48094ea1a49be21b7729b2aeb531d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringProcessEngineServicesConfiguration.java @@ -0,0 +1,120 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring; + +import org.camunda.bpm.engine.AuthorizationService; +import org.camunda.bpm.engine.CaseService; +import org.camunda.bpm.engine.DecisionService; +import org.camunda.bpm.engine.ExternalTaskService; +import org.camunda.bpm.engine.FilterService; +import org.camunda.bpm.engine.FormService; +import org.camunda.bpm.engine.HistoryService; +import org.camunda.bpm.engine.IdentityService; +import org.camunda.bpm.engine.ManagementService; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.ProcessEngineServices; +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.TaskService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Exposes all camunda process engine services as beans. + * + * @author Jan Galinski + */ +@Configuration +public class SpringProcessEngineServicesConfiguration implements ProcessEngineServices { + + @Autowired + private ProcessEngine processEngine; + + @Bean(name = "runtimeService") + @Override + public RuntimeService getRuntimeService() { + return processEngine.getRuntimeService(); + } + + @Bean(name = "repositoryService") + @Override + public RepositoryService getRepositoryService() { + return processEngine.getRepositoryService(); + } + + @Bean(name = "formService") + @Override + public FormService getFormService() { + return processEngine.getFormService(); + } + + @Bean(name = "taskService") + @Override + public TaskService getTaskService() { + return processEngine.getTaskService(); + } + + @Bean(name = "historyService") + @Override + public HistoryService getHistoryService() { + return processEngine.getHistoryService(); + } + + @Bean(name = "identityService") + @Override + public IdentityService getIdentityService() { + return processEngine.getIdentityService(); + } + + @Bean(name = "managementService") + @Override + public ManagementService getManagementService() { + return processEngine.getManagementService(); + } + + @Bean(name = "authorizationService") + @Override + public AuthorizationService getAuthorizationService() { + return processEngine.getAuthorizationService(); + } + + @Bean(name = "caseService") + @Override + public CaseService getCaseService() { + return processEngine.getCaseService(); + } + + @Bean(name = "filterService") + @Override + public FilterService getFilterService() { + return processEngine.getFilterService(); + } + + @Bean(name = "externalTaskService") + @Override + public ExternalTaskService getExternalTaskService() { + return processEngine.getExternalTaskService(); + } + + @Bean(name = "decisionService") + @Override + public DecisionService getDecisionService() { + return processEngine.getDecisionService(); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringTransactionContext.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringTransactionContext.java new file mode 100644 index 0000000000000000000000000000000000000000..2dc804fe9e26c8803f74194324e60c966a6df361 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringTransactionContext.java @@ -0,0 +1,148 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring; + + +import org.camunda.bpm.engine.impl.cfg.TransactionContext; +import org.camunda.bpm.engine.impl.cfg.TransactionListener; +import org.camunda.bpm.engine.impl.cfg.TransactionState; +import org.camunda.bpm.engine.impl.interceptor.CommandContext; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.support.TransactionSynchronization; +import org.springframework.transaction.support.TransactionSynchronizationManager; + + +/** + * @author Frederik Heremans + * @author Joram Barrez + */ +public class SpringTransactionContext implements TransactionContext { + + protected PlatformTransactionManager transactionManager; + protected CommandContext commandContext; + protected TransactionState lastTransactionState = null; + + public SpringTransactionContext(PlatformTransactionManager transactionManager, CommandContext commandContext) { + this.transactionManager = transactionManager; + this.commandContext = commandContext; + TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() { + @Override + public void beforeCommit(boolean readOnly) { + lastTransactionState = TransactionState.COMMITTING; + } + @Override + public void afterCommit() { + lastTransactionState = TransactionState.COMMITTED; + } + @Override + public void beforeCompletion() { + lastTransactionState = TransactionState.ROLLINGBACK; + } + @Override + public void afterCompletion(int status) { + if(TransactionSynchronization.STATUS_ROLLED_BACK == status) { + lastTransactionState = TransactionState.ROLLED_BACK; + } + } + }); + } + + public void commit() { + // Do nothing, transaction is managed by spring + } + + public void rollback() { + // Just in case the rollback isn't triggered by an + // exception, we mark the current transaction rollBackOnly. + transactionManager.getTransaction(null).setRollbackOnly(); + } + + public void addTransactionListener(final TransactionState transactionState, final TransactionListener transactionListener) { + if (transactionState.equals(TransactionState.COMMITTING)) { + + TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() { + @Override + public void beforeCommit(boolean readOnly) { + transactionListener.execute(commandContext); + } + }); + + } else if (transactionState.equals(TransactionState.COMMITTED)) { + + TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() { + @Override + public void afterCommit() { + transactionListener.execute(commandContext); + } + }); + + } else if (transactionState.equals(TransactionState.ROLLINGBACK)) { + + TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() { + @Override + public void beforeCompletion() { + transactionListener.execute(commandContext); + } + }); + + } else if (transactionState.equals(TransactionState.ROLLED_BACK)) { + + TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() { + @Override + public void afterCompletion(int status) { + if(TransactionSynchronization.STATUS_ROLLED_BACK == status) { + transactionListener.execute(commandContext); + } + } + }); + + } + + } + + public boolean isTransactionActive() { + return TransactionSynchronizationManager.isActualTransactionActive() && + !TransactionState.ROLLED_BACK.equals(lastTransactionState) && + !TransactionState.ROLLINGBACK.equals(lastTransactionState); + } + + protected abstract class TransactionSynchronizationAdapter implements TransactionSynchronization { + + public void suspend() { + } + + public void resume() { + } + + public void flush() { + } + + public void beforeCommit(boolean readOnly) { + } + + public void beforeCompletion() { + } + + public void afterCommit() { + } + + public void afterCompletion(int status) { + } + + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringTransactionContextFactory.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringTransactionContextFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..5a0bf22c6a204dba453bfe01d7cc622034a6d6a6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringTransactionContextFactory.java @@ -0,0 +1,40 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring; + +import org.camunda.bpm.engine.impl.cfg.TransactionContext; +import org.camunda.bpm.engine.impl.cfg.TransactionContextFactory; +import org.camunda.bpm.engine.impl.interceptor.CommandContext; +import org.springframework.transaction.PlatformTransactionManager; + + +/** + * @author Frederik Heremans + */ +public class SpringTransactionContextFactory implements TransactionContextFactory { + + protected PlatformTransactionManager transactionManager; + + public SpringTransactionContextFactory(PlatformTransactionManager transactionManager) { + this.transactionManager = transactionManager; + } + + public TransactionContext openTransactionContext(CommandContext commandContext) { + return new SpringTransactionContext(transactionManager, commandContext); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringTransactionInterceptor.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringTransactionInterceptor.java new file mode 100644 index 0000000000000000000000000000000000000000..e480d244d849386f5a3e80e9081b8b62c72d062e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringTransactionInterceptor.java @@ -0,0 +1,67 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring; + +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.interceptor.Command; +import org.camunda.bpm.engine.impl.interceptor.CommandInterceptor; +import org.camunda.bpm.engine.impl.util.ExceptionUtil; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.TransactionSystemException; +import org.springframework.transaction.support.TransactionCallback; +import org.springframework.transaction.support.TransactionTemplate; + +/** + * @author Dave Syer + * @author Tom Baeyens + */ +public class SpringTransactionInterceptor extends CommandInterceptor { + + protected PlatformTransactionManager transactionManager; + protected int transactionPropagation; + protected ProcessEngineConfigurationImpl processEngineConfiguration; + + /** + * @deprecated use the {@link #SpringTransactionInterceptor(PlatformTransactionManager, int, ProcessEngineConfigurationImpl)} + * constructor to ensure that concurrency conflicts that occur on + * transaction commit are detected and handled in all cases + */ + @Deprecated + public SpringTransactionInterceptor(PlatformTransactionManager transactionManager, int transactionPropagation) { + this(transactionManager, transactionPropagation, null); + } + + public SpringTransactionInterceptor(PlatformTransactionManager transactionManager, + int transactionPropagation, + ProcessEngineConfigurationImpl processEngineConfiguration) { + this.transactionManager = transactionManager; + this.transactionPropagation = transactionPropagation; + this.processEngineConfiguration = processEngineConfiguration; + } + + @SuppressWarnings("unchecked") + public T execute(final Command command) { + TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager); + transactionTemplate.setPropagationBehavior(transactionPropagation); + try { + // don't use lambdas here => CAM-12810 + return (T) transactionTemplate.execute((TransactionCallback) status -> next.execute(command)); + } catch (TransactionSystemException ex) { + throw ExceptionUtil.wrapPersistenceException(ex); + } + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringTransactionsProcessEngineConfiguration.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringTransactionsProcessEngineConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..09c2153fd06c5000cd5ac245467de7f4f59ac9c4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/SpringTransactionsProcessEngineConfiguration.java @@ -0,0 +1,208 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring; + +import javax.sql.DataSource; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.zip.ZipInputStream; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.ProcessEngineException; +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration; +import org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor; +import org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor; +import org.camunda.bpm.engine.impl.interceptor.CommandInterceptor; +import org.camunda.bpm.engine.impl.interceptor.LogInterceptor; +import org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor; +import org.camunda.bpm.engine.repository.DeploymentBuilder; +import org.springframework.core.io.ByteArrayResource; +import org.springframework.core.io.ContextResource; +import org.springframework.core.io.Resource; +import org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.support.TransactionTemplate; + +/** + * @author Tom Baeyens + * @author David Syer + * @author Joram Barrez + * @author Daniel Meyer + */ +public class SpringTransactionsProcessEngineConfiguration extends ProcessEngineConfigurationImpl { + + protected PlatformTransactionManager transactionManager; + protected String deploymentName = "SpringAutoDeployment"; + protected Resource[] deploymentResources = new Resource[0]; + protected String deploymentTenantId; + protected boolean deployChangedOnly; + + public SpringTransactionsProcessEngineConfiguration() { + transactionsExternallyManaged = true; + } + + @Override + public ProcessEngine buildProcessEngine() { + ProcessEngine processEngine = super.buildProcessEngine(); + autoDeployResources(processEngine); + return processEngine; + } + + protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() { + if (transactionManager==null) { + throw new ProcessEngineException("transactionManager is required property for SpringProcessEngineConfiguration, use "+StandaloneProcessEngineConfiguration.class.getName()+" otherwise"); + } + + List defaultCommandInterceptorsTxRequired = new ArrayList(); + if (!isDisableExceptionCode()) { + defaultCommandInterceptorsTxRequired.add(getExceptionCodeInterceptor()); + } + defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); + defaultCommandInterceptorsTxRequired.add(new CommandCounterInterceptor(this)); + defaultCommandInterceptorsTxRequired.add(new ProcessApplicationContextInterceptor(this)); + defaultCommandInterceptorsTxRequired.add(new SpringTransactionInterceptor(transactionManager, TransactionTemplate.PROPAGATION_REQUIRED, this)); + CommandContextInterceptor commandContextInterceptor = new CommandContextInterceptor(commandContextFactory, this); + defaultCommandInterceptorsTxRequired.add(commandContextInterceptor); + return defaultCommandInterceptorsTxRequired; + } + + protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequiresNew() { + List defaultCommandInterceptorsTxRequiresNew = new ArrayList(); + if (!isDisableExceptionCode()) { + defaultCommandInterceptorsTxRequiresNew.add(getExceptionCodeInterceptor()); + } + defaultCommandInterceptorsTxRequiresNew.add(new LogInterceptor()); + defaultCommandInterceptorsTxRequiresNew.add(new CommandCounterInterceptor(this)); + defaultCommandInterceptorsTxRequiresNew.add(new ProcessApplicationContextInterceptor(this)); + defaultCommandInterceptorsTxRequiresNew.add(new SpringTransactionInterceptor(transactionManager, TransactionTemplate.PROPAGATION_REQUIRES_NEW, this)); + CommandContextInterceptor commandContextInterceptor = new CommandContextInterceptor(commandContextFactory, this, true); + defaultCommandInterceptorsTxRequiresNew.add(commandContextInterceptor); + return defaultCommandInterceptorsTxRequiresNew; + } + + @Override + protected void initTransactionContextFactory() { + if(transactionContextFactory == null && transactionManager != null) { + transactionContextFactory = new SpringTransactionContextFactory(transactionManager); + } + } + + protected void autoDeployResources(ProcessEngine processEngine) { + if (deploymentResources!=null && deploymentResources.length>0) { + RepositoryService repositoryService = processEngine.getRepositoryService(); + + DeploymentBuilder deploymentBuilder = repositoryService + .createDeployment() + .enableDuplicateFiltering(deployChangedOnly) + .name(deploymentName) + .tenantId(deploymentTenantId); + + for (Resource resource : deploymentResources) { + String resourceName = null; + + if (resource instanceof ContextResource) { + resourceName = ((ContextResource) resource).getPathWithinContext(); + + } else if (resource instanceof ByteArrayResource) { + resourceName = resource.getDescription(); + + } else { + resourceName = getFileResourceName(resource); + } + + try { + if ( resourceName.endsWith(".bar") + || resourceName.endsWith(".zip") + || resourceName.endsWith(".jar") ) { + deploymentBuilder.addZipInputStream(new ZipInputStream(resource.getInputStream())); + } else { + deploymentBuilder.addInputStream(resourceName, resource.getInputStream()); + } + } catch (IOException e) { + throw new ProcessEngineException("couldn't auto deploy resource '"+resource+"': "+e.getMessage(), e); + } + } + + deploymentBuilder.deploy(); + } + } + + protected String getFileResourceName(Resource resource) { + try { + return resource.getFile().getAbsolutePath(); + } catch (IOException e) { + return resource.getFilename(); + } + } + + @Override + public ProcessEngineConfigurationImpl setDataSource(DataSource dataSource) { + if(dataSource instanceof TransactionAwareDataSourceProxy) { + return super.setDataSource(dataSource); + } else { + // Wrap datasource in Transaction-aware proxy + DataSource proxiedDataSource = new TransactionAwareDataSourceProxy(dataSource); + return super.setDataSource(proxiedDataSource); + } + } + + public PlatformTransactionManager getTransactionManager() { + return transactionManager; + } + + public void setTransactionManager(PlatformTransactionManager transactionManager) { + this.transactionManager = transactionManager; + } + + public String getDeploymentName() { + return deploymentName; + } + + public void setDeploymentName(String deploymentName) { + this.deploymentName = deploymentName; + } + + public Resource[] getDeploymentResources() { + return deploymentResources; + } + + public void setDeploymentResources(Resource[] deploymentResources) { + this.deploymentResources = deploymentResources; + } + + public String getDeploymentTenantId() { + return deploymentTenantId; + } + + public void setDeploymentTenantId(String deploymentTenantId) { + this.deploymentTenantId = deploymentTenantId; + } + + public boolean isDeployChangedOnly() { + return deployChangedOnly; + } + + public void setDeployChangedOnly(boolean deployChangedOnly) { + this.deployChangedOnly = deployChangedOnly; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/BusinessKey.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/BusinessKey.java new file mode 100644 index 0000000000000000000000000000000000000000..aff735b27a9dc26a611d943cc3c8d79f7e666873 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/BusinessKey.java @@ -0,0 +1,30 @@ +/* + * Copyright 2011 the original author or authors + * + * 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.camunda.bpm.engine.spring.annotations; + +import java.lang.annotation.*; + +/** + * + * Inspired by the CDI implemenation + * + * @author Josh Long + */ +@Target({ElementType.PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface BusinessKey { +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/ProcessEngineComponent.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/ProcessEngineComponent.java new file mode 100644 index 0000000000000000000000000000000000000000..d6815bdb5d4697e871b211fce182eef9247582c7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/ProcessEngineComponent.java @@ -0,0 +1,55 @@ +/* + * Copyright 2011 the original author or authors + * + * 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.camunda.bpm.engine.spring.annotations; + + +import java.lang.annotation.*; + +/** + * Indicates that the given bean is an process engine handler. A process engine handler is a bean + * that is so annotated to respond to events ("states") in a Camunda Platform process. + * Generically, it is a class that has been adapted to be usable in a Camunda Platform process. + * + *

+ * For example, suppose we have registered a BPMN process that has + * the following declaration: + *

+ * + * <service-task camunda:expression = "myBean" id = "confirm-receipt" /> + * + *

+ * This is a state that will be entered from Camunda Platform and execution will flow through to the bean + * registered in the context as "myBean." To subscribe to that, a POJO need only implement + * (optionally) {@link ProcessEngineComponent} and, on a method, add + * {@link State} to indicate that the method in particular is + * tasked with responding to a state. If applied to a bean and there are no {@link org.camunda.bpm.engine.annotations.ProcessEngineComponent} + * annotations present, then one option might be to automatically enlist all public methods + * as handlers for states whose IDs or names are inferred from the method name: + *

+ * public void confirmReceipt(..) would be treated the same as + *

+ * @State( "confirm-receipt") public void confirmReceipt (..), + * + * @author Josh Long + * @since 1.0 + */ +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +//@Component +public @interface ProcessEngineComponent { + String processKey() default ""; +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/ProcessId.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/ProcessId.java new file mode 100644 index 0000000000000000000000000000000000000000..df43252a834b0f6853955fbefcfd26b5f43eb62c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/ProcessId.java @@ -0,0 +1,31 @@ +/* + * Copyright 2011 the original author or authors + * + * 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.camunda.bpm.engine.spring.annotations; + +import java.lang.annotation.*; + +/** + * when used on a method parameter, this triggers the injection of the current processId. + * + * @author Josh Long + * @since 5.1 + */ + +@Target({ElementType.PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ProcessId { +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/ProcessVariable.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/ProcessVariable.java new file mode 100644 index 0000000000000000000000000000000000000000..3453cdfbb5d1dae709aeb494255c0a28b8ea96c7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/ProcessVariable.java @@ -0,0 +1,35 @@ +/* + * Copyright 2011 the original author or authors + * + * 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.camunda.bpm.engine.spring.annotations; + +import java.lang.annotation.*; + +/** + * Annotation used on method signatures to tell the runtime to + * inject the current process' process variables as a {@link java.util.Map}. + * + * @author Josh Long + * @since 1.0 + */ +@Target({ElementType.PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ProcessVariable { + /** + * Expression for matching against nested properties of the payload. + */ + String value() default ""; +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/ProcessVariables.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/ProcessVariables.java new file mode 100644 index 0000000000000000000000000000000000000000..b3d54fb6b09776e461f0d960278268c08ce44c96 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/ProcessVariables.java @@ -0,0 +1,30 @@ +/* + * Copyright 2011 the original author or authors + * + * 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.camunda.bpm.engine.spring.annotations; + +import java.lang.annotation.*; + +/** + * Annotation used on method signatures to tell the runtime to inject the current process' process variables as a {@link java.util.Map}. + * + * @author Josh Long + * @since 1.0 + */ +@Target({ElementType.PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ProcessVariables { +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/StartProcess.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/StartProcess.java new file mode 100644 index 0000000000000000000000000000000000000000..55276aed4f49620bc7dfba3a7199cfde190e02ed --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/StartProcess.java @@ -0,0 +1,48 @@ +/* + * Copyright 2011 the original author or authors + * + * 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.camunda.bpm.engine.spring.annotations; + +import java.lang.annotation.*; + +/** + * this annotation instructs the component model to start an Activiti business process on + * sucessful invocation of a method that's annotated with it. + * + * @author Josh Long + * @since 1.0 + */ +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface StartProcess { + /** + * the name of the business process to start (by key) + */ + String processKey() ; + + /** + * returns the ID of the {@link org.camunda.bpm.engine.runtime.ProcessInstance}. If specified, it'll only work if + * the return type of the invocation is compatabile with a {@link org.camunda.bpm.engine.runtime.ProcessInstance}'s ID + * (which is a String, at the moment) + * + * @return whether to return the process instance ID + */ + boolean returnProcessInstanceId() default false; + + + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/StartTask.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/StartTask.java new file mode 100644 index 0000000000000000000000000000000000000000..c2dc6233e83302de168b25cfe33fba29d366f572 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/StartTask.java @@ -0,0 +1,35 @@ +/* + * Copyright 2011 the original author or authors + * + * 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.camunda.bpm.engine.spring.annotations; + +import java.lang.annotation.*; + +//todo +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface StartTask { + + String userId() default ""; + + String taskId() ; + + /** + * the name of the task to start work on + * @return the name of the task + */ + String value() ; +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/State.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/State.java new file mode 100644 index 0000000000000000000000000000000000000000..db49463546f9970925e7878104c65545372a275a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/State.java @@ -0,0 +1,44 @@ +/* + * Copyright 2011 the original author or authors + * + * 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.camunda.bpm.engine.spring.annotations; +import java.lang.annotation.*; + +/** + * indicates that a method is to be enlisted as a handler for a given BPMN state + * + * @author Josh Long + * @since 1.0 + */ +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface State { + + /** + * the business process name + */ + String process () default ""; + + /** + * the state that the component responds to, + */ + String state () default ""; + + /** + * by default, this will be the #stateName + */ + String value() default ""; +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/StopTask.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/StopTask.java new file mode 100644 index 0000000000000000000000000000000000000000..803f646142f0c9f6e8c0b6ed1ca27ffb6c1c5e9c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/StopTask.java @@ -0,0 +1,27 @@ +/* + * Copyright 2011 the original author or authors + * + * 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.camunda.bpm.engine.spring.annotations; + +import java.lang.annotation.*; + +//todo +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface StopTask { + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/TaskId.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/TaskId.java new file mode 100644 index 0000000000000000000000000000000000000000..6dd5eee1aafe956be66dd68010fe589a36c2d2d2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/TaskId.java @@ -0,0 +1,30 @@ +/* + * Copyright 2011 the original author or authors + * + * 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.camunda.bpm.engine.spring.annotations; + +import java.lang.annotation.*; + +/** + * specifies which parameter is a task id + */ +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface TaskId { + String value() default ""; + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/UserId.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/UserId.java new file mode 100644 index 0000000000000000000000000000000000000000..8ec2e818689d045aedcfa8017496ef8d11b1ac8c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/annotations/UserId.java @@ -0,0 +1,28 @@ +/* + * Copyright 2011 the original author or authors + * + * 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.camunda.bpm.engine.spring.annotations; + +import java.lang.annotation.*; + +/** + * specifies which parameter is a user id + */ +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface UserId { + String value() ; +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/application/SpringProcessApplication.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/application/SpringProcessApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..764d688bfed60e2efbd6e4d4c17b3fd3e6daddb2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/application/SpringProcessApplication.java @@ -0,0 +1,127 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.application; + +import java.util.HashMap; +import java.util.Map; + +import org.camunda.bpm.application.AbstractProcessApplication; +import org.camunda.bpm.application.ProcessApplicationReference; +import org.camunda.bpm.application.impl.ProcessApplicationReferenceImpl; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.BeanNameAware; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.ApplicationListener; +import org.springframework.context.event.ApplicationContextEvent; +import org.springframework.context.event.ContextClosedEvent; +import org.springframework.context.event.ContextRefreshedEvent; + +/** + *

Process Application implementation to be used in a Spring Application.

+ * + *

This implementation is meant to be bootstrapped by a Spring Application Context. + * You can either reference the bean in a Spring application-context XML file or use + * spring annotation-based bootstrapping from a subclass.

+ * + *

HINT: If your application is a Web Application, consider using the + * {@link SpringServletProcessApplication}

+ * + *

The SpringProcessApplication will use the Bean Name assigned to the bean in the spring + * application context (see {@link BeanNameAware}). You should always assign a unique bean name + * to a process application bean. That is, the bean name must be unique accross all applications + * deployed to the Camunda Platform.

+ * + * @author Daniel Meyer + * + */ +public class SpringProcessApplication extends AbstractProcessApplication implements ApplicationContextAware, BeanNameAware, ApplicationListener { + + protected Map properties = new HashMap(); + protected ApplicationContext applicationContext; + protected String beanName; + + @Override + protected String autodetectProcessApplicationName() { + return beanName; + } + + public ProcessApplicationReference getReference() { + return new ProcessApplicationReferenceImpl(this); + } + + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.applicationContext = applicationContext; + } + + public void setBeanName(String name) { + this.beanName = name; + } + + @Override + public Map getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } + + public ApplicationContext getApplicationContext() { + return applicationContext; + } + + @Override + public void onApplicationEvent(ApplicationContextEvent event) { + try { + // we only want to listen for context events of the main application + // context, not its children + if (event.getSource().equals(applicationContext)) { + if (event instanceof ContextRefreshedEvent && !isDeployed) { + // deploy the process application + afterPropertiesSet(); + } else if (event instanceof ContextClosedEvent) { + // undeploy the process application + destroy(); + } else { + // ignore + } + } + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + public void start() { + deploy(); + } + + public void stop() { + undeploy(); + } + + public void afterPropertiesSet() throws Exception { + // for backwards compatibility + start(); + } + + public void destroy() throws Exception { + // for backwards compatibility + stop(); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/application/SpringProcessApplicationElResolver.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/application/SpringProcessApplicationElResolver.java new file mode 100644 index 0000000000000000000000000000000000000000..c8648e9403ca0133b587101ce72f0d86f0d2454a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/application/SpringProcessApplicationElResolver.java @@ -0,0 +1,86 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.application; + +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletContext; +import org.camunda.bpm.application.AbstractProcessApplication; +import org.camunda.bpm.application.ProcessApplicationElResolver; +import org.camunda.bpm.application.impl.EjbProcessApplication; +import org.camunda.bpm.engine.spring.ApplicationContextElResolver; +import org.camunda.bpm.impl.juel.jakarta.el.ELResolver; +import org.springframework.util.ClassUtils; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +/** + *

ProcessApplicationElResolver implementation providing support for the Spring Framework.

+ * + *

This implementation supports the following environments: + *

    + *
  • Bootstrapping through {@link SpringProcessApplication}. In this case the spring application context + * is retrieved from the {@link SpringProcessApplication} class.
  • + *
  • Bootstrapping through {@link org.camunda.bpm.application.impl.ServletProcessApplication}. In this case we have access to the {@link ServletContext} + * which allows accessing the web application's application context through the WebApplicationContextUtils class.
  • + * + *
+ *

+ * + *

Limitation: The {@link EjbProcessApplication} is currently unsupported.

+ * + * @author Daniel Meyer + * + */ +public class SpringProcessApplicationElResolver implements ProcessApplicationElResolver { + + private final static Logger LOGGER = Logger.getLogger(SpringProcessApplicationElResolver.class.getName()); + + @Override + public Integer getPrecedence() { + return ProcessApplicationElResolver.SPRING_RESOLVER; + } + + @Override + public ELResolver getElResolver(AbstractProcessApplication processApplication) { + + if (processApplication instanceof SpringProcessApplication) { + SpringProcessApplication springProcessApplication = (SpringProcessApplication) processApplication; + return new ApplicationContextElResolver(springProcessApplication.getApplicationContext()); + + } else if (processApplication instanceof org.camunda.bpm.application.impl.ServletProcessApplication) { + // Using fully-qualified class name instead of import statement to allow for automatic transformation + org.camunda.bpm.application.impl.ServletProcessApplication servletProcessApplication = (org.camunda.bpm.application.impl.ServletProcessApplication) processApplication; + + if(!ClassUtils.isPresent("org.springframework.web.context.support.WebApplicationContextUtils", processApplication.getProcessApplicationClassloader())) { + LOGGER.log(Level.FINE, "WebApplicationContextUtils must be present for SpringProcessApplicationElResolver to work"); + return null; + } + + ServletContext servletContext = servletProcessApplication.getServletContext(); + WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext); + if(applicationContext != null) { + return new ApplicationContextElResolver(applicationContext); + } + + } + + LOGGER.log(Level.FINE, "Process application class {0} unsupported by SpringProcessApplicationElResolver", processApplication); + return null; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/application/SpringServletProcessApplication.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/application/SpringServletProcessApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..9ef55650feb485c7854c98370149376dea22e8ee --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/application/SpringServletProcessApplication.java @@ -0,0 +1,59 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.application; + +import javax.servlet.ServletContext; + +import org.camunda.bpm.application.ProcessApplication; +import org.camunda.bpm.application.ProcessApplicationInfo; +import org.springframework.web.context.ServletContextAware; + +/** + *

Process Application to be used in a Spring Web Application.

+ * + *

Requires the spring-web module to be on the classpath

+ * + *

In addition to the services provided by the {@link SpringProcessApplication}, + * this {@link ProcessApplication} exposes the servlet context path of the web application + * which it is a part of (see {@link ProcessApplicationInfo#PROP_SERVLET_CONTEXT_PATH}).

+ * + *

This implementation should be used with Spring Web Applications.

+ * + * @author Daniel Meyer + * + */ +public class SpringServletProcessApplication extends SpringProcessApplication implements ServletContextAware { + + protected ServletContext servletContext; + + public void setServletContext(ServletContext servletContext) { + this.servletContext = servletContext; + } + + @Override + public void start() { + properties.put(ProcessApplicationInfo.PROP_SERVLET_CONTEXT_PATH, servletContext.getContextPath()); + super.start(); + } + + @Override + public void afterPropertiesSet() throws Exception { + // for backwards compatibility + start(); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/ActivitiContextUtils.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/ActivitiContextUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..add4f6174f456a9f04808341c144d7e17356a22c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/ActivitiContextUtils.java @@ -0,0 +1,35 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components; + +import org.camunda.bpm.engine.spring.components.config.xml.StateHandlerAnnotationBeanFactoryPostProcessor; + +/** + * simple place to stash the constants used throughout the code + * + * @author Josh Long + * @since 5.3 + */ +public class ActivitiContextUtils { + + public static final String ANNOTATION_STATE_HANDLER_BEAN_FACTORY_POST_PROCESSOR_BEAN_NAME= StateHandlerAnnotationBeanFactoryPostProcessor.class.getName().toLowerCase(); + /** + * the name of the default registry used to store all state handling components + */ + public final static String ACTIVITI_REGISTRY_BEAN_NAME = "activitiComponentRegistry" ; + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/ActivitiStateAnnotationBeanPostProcessor.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/ActivitiStateAnnotationBeanPostProcessor.java new file mode 100644 index 0000000000000000000000000000000000000000..90907d9f6250a71ef6bb96f5405122697dc0b15d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/ActivitiStateAnnotationBeanPostProcessor.java @@ -0,0 +1,154 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components.aop; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; + +import org.camunda.bpm.engine.spring.annotations.ProcessId; +import org.camunda.bpm.engine.spring.annotations.ProcessVariable; +import org.camunda.bpm.engine.spring.annotations.ProcessVariables; +import org.camunda.bpm.engine.spring.annotations.State; +import org.camunda.bpm.engine.spring.components.registry.ActivitiStateHandlerRegistration; +import org.camunda.bpm.engine.spring.components.registry.ActivitiStateHandlerRegistry; +import org.springframework.aop.support.AopUtils; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.BeanClassLoaderAware; +import org.springframework.beans.factory.BeanFactory; +import org.springframework.beans.factory.BeanFactoryAware; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.config.BeanPostProcessor; +import org.springframework.core.Ordered; +import org.springframework.core.annotation.AnnotationUtils; +import org.springframework.util.Assert; +import org.springframework.util.ClassUtils; +import org.springframework.util.ReflectionUtils; +import org.springframework.util.StringUtils; + + +/** + * the idea is that this bean post processor is responsible for registering all beans + * that have the {@link org.camunda.bpm.engine.annotations.State} annotation. + * + * @author Josh Long + * @since 5.3 + */ +@SuppressWarnings("unused") // registered through XML +public class ActivitiStateAnnotationBeanPostProcessor implements BeanPostProcessor, BeanClassLoaderAware, BeanFactoryAware, InitializingBean, Ordered { + + private volatile ActivitiStateHandlerRegistry registry; + + private volatile int order = Ordered.LOWEST_PRECEDENCE; + + private volatile BeanFactory beanFactory; + + private volatile ClassLoader beanClassLoader = ClassUtils.getDefaultClassLoader(); + + public void setBeanFactory(BeanFactory beanFactory) { + this.beanFactory = beanFactory; + } + + public void setBeanClassLoader(ClassLoader classLoader) { + this.beanClassLoader = classLoader; + } + + public int getOrder() { + return this.order; + } + + public void afterPropertiesSet() { + Assert.notNull(this.beanClassLoader, "beanClassLoader must not be null"); + Assert.notNull(this.beanFactory, "beanFactory must not be null"); + } + + public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { + return bean; + } + + public void setRegistry(ActivitiStateHandlerRegistry registry) { + this.registry = registry; + } + + public Object postProcessAfterInitialization(final Object bean, + final String beanName) throws BeansException { + // first sift through and get all the methods + // then get all the annotations + // then build the metadata and register the metadata + final Class targetClass = AopUtils.getTargetClass(bean); + final org.camunda.bpm.engine.spring.annotations.ProcessEngineComponent component = targetClass.getAnnotation(org.camunda.bpm.engine.spring.annotations.ProcessEngineComponent.class); + + ReflectionUtils.doWithMethods(targetClass, + new ReflectionUtils.MethodCallback() { + @SuppressWarnings("unchecked") + public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { + + State state = AnnotationUtils.getAnnotation(method, State.class); + + String processName = component.processKey(); + + if (StringUtils.hasText(state.process())) { + processName = state.process(); + } + + String stateName = state.state(); + + if (!StringUtils.hasText(stateName)) { + stateName = state.value(); + } + + Assert.notNull(stateName, "You must provide a stateName!"); + + Map vars = new HashMap(); + Annotation[][] paramAnnotationsArray = method.getParameterAnnotations(); + + int ctr = 0; + int pvMapIndex = -1; + int procIdIndex = -1; + + for (Annotation[] paramAnnotations : paramAnnotationsArray) { + ctr += 1; + + for (Annotation pa : paramAnnotations) { + if (pa instanceof ProcessVariable) { + ProcessVariable pv = (ProcessVariable) pa; + String pvName = pv.value(); + vars.put(ctr, pvName); + } else if (pa instanceof ProcessVariables) { + pvMapIndex = ctr; + } else if (pa instanceof ProcessId ) { + procIdIndex = ctr; + } + } + } + + ActivitiStateHandlerRegistration registration = new ActivitiStateHandlerRegistration(vars, + method, bean, stateName, beanName, pvMapIndex, + procIdIndex, processName); + registry.registerActivitiStateHandler(registration); + } + }, + new ReflectionUtils.MethodFilter() { + public boolean matches(Method method) { + return null != AnnotationUtils.getAnnotation(method, + State.class); + } + }); + + return bean; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/ProcessStartAnnotationBeanPostProcessor.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/ProcessStartAnnotationBeanPostProcessor.java new file mode 100644 index 0000000000000000000000000000000000000000..d04d8d6412b2fa2c0a28eb18002a731ef670d402 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/ProcessStartAnnotationBeanPostProcessor.java @@ -0,0 +1,91 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components.aop; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.spring.annotations.ProcessVariable; +import org.camunda.bpm.engine.spring.annotations.StartProcess; +import org.springframework.aop.framework.Advised; +import org.springframework.aop.framework.AopInfrastructureBean; +import org.springframework.aop.framework.ProxyConfig; +import org.springframework.aop.framework.ProxyFactory; +import org.springframework.aop.support.AopUtils; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.config.BeanPostProcessor; +import org.springframework.util.ClassUtils; + +/** + * Proxies beans with methods annotated with {@link StartProcess}. + * If the method is invoked successfully, the process described by the annotaton is created. + * Parameters passed to the method annotated with {@link ProcessVariable} + * are passed to the business process. + * + * @author Josh Long + * @since 5,3 + */ +public class ProcessStartAnnotationBeanPostProcessor extends ProxyConfig implements BeanPostProcessor, InitializingBean { + + private Log log = LogFactory.getLog(getClass()) ; + + /** + * the process engine as created by a {@link org.camunda.bpm.engine.spring.ProcessEngineFactoryBean} + */ + private ProcessEngine processEngine; + + private ProcessStartingPointcutAdvisor advisor; + + private volatile ClassLoader beanClassLoader = ClassUtils.getDefaultClassLoader(); + + public void setProcessEngine(ProcessEngine processEngine) { + this.processEngine = processEngine; + } + + public void afterPropertiesSet() throws Exception { + this.advisor = new ProcessStartingPointcutAdvisor(this.processEngine); + } + + public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { + if (bean instanceof AopInfrastructureBean) { + // Ignore AOP infrastructure such as scoped proxies. + return bean; + } + Class targetClass = AopUtils.getTargetClass(bean); + if (AopUtils.canApply(this.advisor, targetClass)) { + if (bean instanceof Advised) { + ((Advised) bean).addAdvisor(0, this.advisor); + return bean; + } + else { + ProxyFactory proxyFactory = new ProxyFactory(bean); + // Copy our properties (proxyTargetClass etc) inherited from ProxyConfig. + proxyFactory.copyFrom(this); + proxyFactory.addAdvisor(this.advisor); + return proxyFactory.getProxy(this.beanClassLoader); + } + } + else { + // No async proxy needed. + return bean; + } + } + + public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { + return bean; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/ProcessStartingMethodInterceptor.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/ProcessStartingMethodInterceptor.java new file mode 100644 index 0000000000000000000000000000000000000000..cce36a3310065eb9639dd1433d9fce86ad194aef --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/ProcessStartingMethodInterceptor.java @@ -0,0 +1,172 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components.aop; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import java.util.logging.Logger; + +import org.aopalliance.intercept.MethodInterceptor; +import org.aopalliance.intercept.MethodInvocation; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.spring.annotations.BusinessKey; +import org.camunda.bpm.engine.spring.annotations.ProcessVariable; +import org.camunda.bpm.engine.spring.annotations.StartProcess; +import org.springframework.core.annotation.AnnotationUtils; +import org.springframework.scheduling.annotation.AsyncResult; +import org.springframework.util.Assert; +import org.springframework.util.StringUtils; + +/** + * {@link org.aopalliance.intercept.MethodInterceptor} that starts a business process + * as a result of a successful method invocation. + * + * @author Josh Long + */ +public class ProcessStartingMethodInterceptor implements MethodInterceptor { + + private Logger log = Logger.getLogger(getClass().getName()); + + /** + * injected reference - can be obtained via a {@link org.camunda.bpm.engine.spring.ProcessEngineFactoryBean} + */ + protected ProcessEngine processEngine; + + /** + * @param processEngine takes a reference to a {@link org.camunda.bpm.engine.ProcessEngine} + */ + public ProcessStartingMethodInterceptor(ProcessEngine processEngine) { + this.processEngine = processEngine; + } + + boolean shouldReturnProcessInstance(StartProcess startProcess, MethodInvocation methodInvocation, Object result) { + return (result instanceof ProcessInstance || methodInvocation.getMethod().getReturnType().isAssignableFrom(ProcessInstance.class)); + } + + boolean shouldReturnProcessInstanceId(StartProcess startProcess, MethodInvocation methodInvocation, Object result) { + return startProcess.returnProcessInstanceId() && (result instanceof String || methodInvocation.getMethod().getReturnType().isAssignableFrom(String.class)); + } + + @SuppressWarnings("unused") + boolean shouldReturnAsyncResultWithProcessInstance(StartProcess startProcess, MethodInvocation methodInvocation, Object result) { + return (result instanceof Future || methodInvocation.getMethod().getReturnType().isAssignableFrom(Future.class)); + } + + public Object invoke(MethodInvocation invocation) throws Throwable { + + Method method = invocation.getMethod(); + + StartProcess startProcess = AnnotationUtils.getAnnotation(method, StartProcess.class); + + String processKey = startProcess.processKey(); + + Assert.hasText(processKey, "you must provide the name of process to start"); + + Object result; + try { + result = invocation.proceed(); + Map vars = this.processVariablesFromAnnotations(invocation); + + String businessKey = this.processBusinessKey(invocation); + + log.info("variables for the started process: " + vars.toString()); + + RuntimeService runtimeService = this.processEngine.getRuntimeService(); + ProcessInstance pi ; + if (null != businessKey && StringUtils.hasText(businessKey)) { + pi = runtimeService.startProcessInstanceByKey(processKey, businessKey, vars); + log.info("the business key for the started process is '" + businessKey + "' "); + } else { + pi = runtimeService.startProcessInstanceByKey(processKey, vars); + } + + String pId = pi.getId(); + + if (invocation.getMethod().getReturnType().equals(void.class)) + return null; + + if (shouldReturnProcessInstance(startProcess, invocation, result)) + return pi; + + if (shouldReturnProcessInstanceId(startProcess, invocation, result)) + return pId; + + if (shouldReturnAsyncResultWithProcessInstance(startProcess, invocation, result)) { + return new AsyncResult(pi); + } + + } catch (Throwable th) { + throw new RuntimeException(th); + } + return result; + } + + protected String processBusinessKey(MethodInvocation invocation) throws Throwable { + Map businessKeyAnnotations = this.mapOfAnnotationValues( BusinessKey.class ,invocation); + if (businessKeyAnnotations.size() == 1) { + BusinessKey processId = businessKeyAnnotations.keySet().iterator().next(); + return businessKeyAnnotations.get(processId); + } + return null; + } + + @SuppressWarnings("unchecked") + private Map mapOfAnnotationValues(Class annotationType, MethodInvocation invocation) { + Method method = invocation.getMethod(); + Annotation[][] annotations = method.getParameterAnnotations(); + Map vars = new HashMap(); + int paramIndx = 0; + for (Annotation[] annPerParam : annotations) { + for (Annotation annotation : annPerParam) { + if (!annotationType.isAssignableFrom(annotation.getClass())) { + continue; + } + K pv = (K) annotation; + V v = (V) invocation.getArguments()[paramIndx]; + vars.put(pv, v); + + } + paramIndx += 1; + } + return vars; + } + + + /** + * if there any arguments with the {@link org.camunda.bpm.engine.annotations.ProcessVariable} annotation, + * then we feed those parameters into the business process + * + * @param invocation the invocation of the method as passed to the {@link org.aopalliance.intercept.MethodInterceptor#invoke(org.aopalliance.intercept.MethodInvocation)} method + * @return returns the map of process variables extracted from the parameters + * @throws Throwable thrown anything goes wrong + */ + protected Map processVariablesFromAnnotations(MethodInvocation invocation) throws Throwable { + + Map vars = this.mapOfAnnotationValues(ProcessVariable.class, invocation); + + Map varNameToValueMap = new HashMap(); + for (ProcessVariable processVariable : vars.keySet()) { + varNameToValueMap.put(processVariable.value(), vars.get(processVariable)); + } + return varNameToValueMap; + + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/ProcessStartingPointcutAdvisor.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/ProcessStartingPointcutAdvisor.java new file mode 100644 index 0000000000000000000000000000000000000000..60bbdff5f89a62e8f13c70d01ce93a2d468087dc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/ProcessStartingPointcutAdvisor.java @@ -0,0 +1,107 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components.aop; + +import java.io.Serializable; +import java.lang.annotation.Annotation; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +import org.aopalliance.aop.Advice; +import org.aopalliance.intercept.MethodInterceptor; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.spring.annotations.StartProcess; +import org.camunda.bpm.engine.spring.components.aop.util.MetaAnnotationMatchingPointcut; +import org.springframework.aop.Pointcut; +import org.springframework.aop.PointcutAdvisor; +import org.springframework.aop.support.ComposablePointcut; + +/** + * AOP advice for methods annotated with (by default) {@link StartProcess}. + * + * Advised methods start a process after the method executes. + * + * Advised methods can declare a return + * type of {@link org.camunda.bpm.engine.runtime.ProcessInstance} and then subsequently + * return null. The real return ProcessInstance value will be given by the aspect. + * + * + * @author Josh Long + * @since 5.3 + */ +public class ProcessStartingPointcutAdvisor implements PointcutAdvisor, Serializable { + + + /** + * annotations that shall be scanned + */ + private Set> annotations = new HashSet>(Arrays.asList(StartProcess.class)); + + /** + * the {@link org.aopalliance.intercept.MethodInterceptor} that handles launching the business process. + */ + protected MethodInterceptor advice; + + /** + * matches any method containing the {@link StartProcess} annotation. + */ + protected Pointcut pointcut; + + /** + * the injected reference to the {@link org.camunda.bpm.engine.ProcessEngine} + */ + protected ProcessEngine processEngine; + + public ProcessStartingPointcutAdvisor(ProcessEngine pe) { + this.processEngine = pe; + this.pointcut = buildPointcut(); + this.advice = buildAdvise(); + + } + + protected MethodInterceptor buildAdvise() { + return new ProcessStartingMethodInterceptor(this.processEngine); + } + + public Pointcut getPointcut() { + return pointcut; + } + + public Advice getAdvice() { + return advice; + } + + public boolean isPerInstance() { + return true; + } + + private Pointcut buildPointcut() { + ComposablePointcut result = null; + for (Class publisherAnnotationType : this.annotations) { + Pointcut mpc = new MetaAnnotationMatchingPointcut(null, publisherAnnotationType); + if (result == null) { + result = new ComposablePointcut(mpc); + } else { + result.union(mpc); + } + } + return result; + } + + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/util/MetaAnnotationMatchingPointcut.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/util/MetaAnnotationMatchingPointcut.java new file mode 100644 index 0000000000000000000000000000000000000000..008dd16e92d4e8402379bc799f8ef328d1a1ee7b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/util/MetaAnnotationMatchingPointcut.java @@ -0,0 +1,89 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components.aop.util; + +import org.springframework.aop.ClassFilter; +import org.springframework.aop.MethodMatcher; +import org.springframework.aop.Pointcut; +import org.springframework.aop.support.annotation.AnnotationClassFilter; +import org.springframework.util.Assert; + +import java.lang.annotation.Annotation; + +/** + * this code is taken almost (99.99%) verbatim from the Spring Integration + * project's source code where it's a static + * private inner class. + * + * @author Mark Fisher + */ +public class MetaAnnotationMatchingPointcut implements Pointcut { + + private final ClassFilter classFilter; + + private final MethodMatcher methodMatcher; + + + /** + * Create a new MetaAnnotationMatchingPointcut for the given annotation type. + * + * @param classAnnotationType the annotation type to look for at the class level + * @param checkInherited whether to explicitly check the superclasses and + * interfaces for the annotation type as well (even if the annotation type + * is not marked as inherited itself) + */ + public MetaAnnotationMatchingPointcut(Class classAnnotationType, boolean checkInherited) { + this.classFilter = new AnnotationClassFilter(classAnnotationType, checkInherited); + this.methodMatcher = MethodMatcher.TRUE; + } + + /** + * Create a new MetaAnnotationMatchingPointcut for the given annotation type. + * + * @param classAnnotationType the annotation type to look for at the class level + * (can be null) + * @param methodAnnotationType the annotation type to look for at the method level + * (can be null) + */ + public MetaAnnotationMatchingPointcut( + Class classAnnotationType, Class methodAnnotationType) { + + Assert.isTrue((classAnnotationType != null || methodAnnotationType != null), + "Either Class annotation type or Method annotation type needs to be specified (or both)"); + + if (classAnnotationType != null) { + this.classFilter = new AnnotationClassFilter(classAnnotationType); + } else { + this.classFilter = ClassFilter.TRUE; + } + + if (methodAnnotationType != null) { + this.methodMatcher = new MetaAnnotationMethodMatcher(methodAnnotationType); + } else { + this.methodMatcher = MethodMatcher.TRUE; + } + } + + + public ClassFilter getClassFilter() { + return this.classFilter; + } + + public MethodMatcher getMethodMatcher() { + return this.methodMatcher; + } +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/util/MetaAnnotationMethodMatcher.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/util/MetaAnnotationMethodMatcher.java new file mode 100644 index 0000000000000000000000000000000000000000..4a18d7efd5bb5a3f2049b42ad3adf3d9cb197dba --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/util/MetaAnnotationMethodMatcher.java @@ -0,0 +1,60 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components.aop.util; + +import org.springframework.aop.support.AopUtils; +import org.springframework.aop.support.annotation.AnnotationMethodMatcher; +import org.springframework.core.annotation.AnnotationUtils; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; + +/** + * this code is taken almost verbatim from the Spring Integration + * project's source code where it's a static + * private inner class. + * + * @author Mark Fisher + * + */ +public class MetaAnnotationMethodMatcher extends AnnotationMethodMatcher { + + private final Class annotationType; + + + /** + * Create a new AnnotationClassFilter for the given annotation type. + * + * @param annotationType the annotation type to look for + */ + public MetaAnnotationMethodMatcher(Class annotationType) { + super(annotationType); + this.annotationType = annotationType; + } + + + @Override + @SuppressWarnings("rawtypes") + public boolean matches(Method method, Class targetClass) { + if (AnnotationUtils.getAnnotation(method, this.annotationType) != null) { + return true; + } + // The method may be on an interface, so let's check on the target class as well. + Method specificMethod = AopUtils.getMostSpecificMethod(method, targetClass); + return (specificMethod != method && + (AnnotationUtils.getAnnotation(specificMethod, this.annotationType) != null)); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/util/Scopifier.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/util/Scopifier.java new file mode 100644 index 0000000000000000000000000000000000000000..0fcd4256139d77af2535d3c5d5e9f87ded7549c7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/aop/util/Scopifier.java @@ -0,0 +1,87 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components.aop.util; + +import org.springframework.aop.scope.ScopedProxyUtils; +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.config.BeanDefinitionHolder; +import org.springframework.beans.factory.config.BeanDefinitionVisitor; +import org.springframework.beans.factory.support.BeanDefinitionReaderUtils; +import org.springframework.beans.factory.support.BeanDefinitionRegistry; +import org.springframework.util.StringValueResolver; + +/** + * this class was copied wholesale from Spring 3.1's RefreshScope, which Dave Syer wrote. + * + * @author Dave Syer + */ +public class Scopifier extends BeanDefinitionVisitor { + + private final boolean proxyTargetClass; + + private final BeanDefinitionRegistry registry; + + private final String scope; + + private final boolean scoped; + + public static BeanDefinitionHolder createScopedProxy(String beanName, BeanDefinition definition, BeanDefinitionRegistry registry, boolean proxyTargetClass) { + BeanDefinitionHolder proxyHolder = ScopedProxyUtils.createScopedProxy(new BeanDefinitionHolder(definition, beanName), registry, proxyTargetClass); + registry.registerBeanDefinition(beanName, proxyHolder.getBeanDefinition()); + return proxyHolder; + } + + public Scopifier(BeanDefinitionRegistry registry, String scope, boolean proxyTargetClass, boolean scoped) { + super(new StringValueResolver() { + public String resolveStringValue(String value) { + return value; + } + }); + this.registry = registry; + this.proxyTargetClass = proxyTargetClass; + this.scope = scope; + this.scoped = scoped; + } + + @Override + protected Object resolveValue(Object value) { + + BeanDefinition definition = null; + String beanName = null; + if (value instanceof BeanDefinition) { + definition = (BeanDefinition) value; + beanName = BeanDefinitionReaderUtils.generateBeanName(definition, registry); + } else if (value instanceof BeanDefinitionHolder) { + BeanDefinitionHolder holder = (BeanDefinitionHolder) value; + definition = holder.getBeanDefinition(); + beanName = holder.getBeanName(); + } + + if (definition != null) { + boolean nestedScoped = scope.equals(definition.getScope()); + boolean scopeChangeRequiresProxy = !scoped && nestedScoped; + if (scopeChangeRequiresProxy) { + // Exit here so that nested inner bean definitions are not + // analysed + return createScopedProxy(beanName, definition, registry, proxyTargetClass); + } + } + + // Nested inner bean definitions are recursively analysed here + value = super.resolveValue(value); + return value; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/config/xml/ActivitiAnnotationDrivenBeanDefinitionParser.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/config/xml/ActivitiAnnotationDrivenBeanDefinitionParser.java new file mode 100644 index 0000000000000000000000000000000000000000..fdbe94adaf484cdac75aa0f6f7cf6403a50537e4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/config/xml/ActivitiAnnotationDrivenBeanDefinitionParser.java @@ -0,0 +1,98 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components.config.xml; + + +import org.camunda.bpm.engine.spring.components.ActivitiContextUtils; +import org.camunda.bpm.engine.spring.components.aop.ProcessStartAnnotationBeanPostProcessor; +import org.camunda.bpm.engine.spring.components.scope.ProcessScope; +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.config.BeanDefinitionHolder; +import org.springframework.beans.factory.config.RuntimeBeanReference; +import org.springframework.beans.factory.support.AbstractBeanDefinition; +import org.springframework.beans.factory.support.BeanDefinitionBuilder; +import org.springframework.beans.factory.support.BeanDefinitionReaderUtils; +import org.springframework.beans.factory.xml.BeanDefinitionParser; +import org.springframework.beans.factory.xml.ParserContext; +import org.springframework.core.Conventions; +import org.springframework.util.StringUtils; +import org.w3c.dom.Element; + +/** + * registers support for handling the annotations in the org.camunda.bpm.engine.annotations package. + *

+ * The first major component is the state handlers. For this to work, a BeanFactoryPostProcessor is registered which in turn registers a + * {@link org.camunda.bpm.engine.test.spring.components.registry.ActivitiStateHandlerRegistry} if none exists. + * + * @author Josh Long + * @since 5.3 + */ +public class ActivitiAnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser { + + private final String processEngineAttribute = "process-engine"; + + public BeanDefinition parse(Element element, ParserContext parserContext) { + registerProcessScope(element, parserContext); + registerStateHandlerAnnotationBeanFactoryPostProcessor(element, parserContext); + registerProcessStartAnnotationBeanPostProcessor(element, parserContext); + return null; + } + + private void configureProcessEngine(AbstractBeanDefinition abstractBeanDefinition, Element element) { + String procEngineRef = element.getAttribute(processEngineAttribute); + if (StringUtils.hasText(procEngineRef)) + abstractBeanDefinition.getPropertyValues().add(Conventions.attributeNameToPropertyName(processEngineAttribute), new RuntimeBeanReference(procEngineRef)); + } + + private void registerStateHandlerAnnotationBeanFactoryPostProcessor(Element element, ParserContext context) { + Class clz = StateHandlerAnnotationBeanFactoryPostProcessor.class; + BeanDefinitionBuilder postProcessorBuilder = BeanDefinitionBuilder.genericBeanDefinition(clz.getName()); + + BeanDefinitionHolder postProcessorHolder = new BeanDefinitionHolder( + postProcessorBuilder.getBeanDefinition(), + ActivitiContextUtils.ANNOTATION_STATE_HANDLER_BEAN_FACTORY_POST_PROCESSOR_BEAN_NAME); + configureProcessEngine(postProcessorBuilder.getBeanDefinition(), element); + BeanDefinitionReaderUtils.registerBeanDefinition(postProcessorHolder, context.getRegistry()); + + } + + private void registerProcessScope(Element element, ParserContext parserContext) { + Class clz = ProcessScope.class; + BeanDefinitionBuilder processScopeBDBuilder = BeanDefinitionBuilder.genericBeanDefinition(clz); + AbstractBeanDefinition scopeBeanDefinition = processScopeBDBuilder.getBeanDefinition(); + scopeBeanDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); + configureProcessEngine(scopeBeanDefinition, element); + String beanName = baseBeanName(clz); + parserContext.getRegistry().registerBeanDefinition(beanName, scopeBeanDefinition); + } + + private void registerProcessStartAnnotationBeanPostProcessor(Element element, ParserContext parserContext) { + Class clz = ProcessStartAnnotationBeanPostProcessor.class; + + BeanDefinitionBuilder beanDefinitionBuilder = BeanDefinitionBuilder.genericBeanDefinition(clz); + AbstractBeanDefinition beanDefinition = beanDefinitionBuilder.getBeanDefinition(); + beanDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); + configureProcessEngine(beanDefinition, element); + + String beanName = baseBeanName(clz); + parserContext.getRegistry().registerBeanDefinition(beanName, beanDefinition); + } + + private String baseBeanName(Class cl) { + return cl.getName().toLowerCase(); + } +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/config/xml/ActivitiNamespaceHandler.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/config/xml/ActivitiNamespaceHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..11d56633933206f7bccf9f2fdefac6b46e24d181 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/config/xml/ActivitiNamespaceHandler.java @@ -0,0 +1,30 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components.config.xml; + +import org.springframework.beans.factory.xml.NamespaceHandlerSupport; + +/** + * responsible for providing support. + * + * @author Josh Long + * @since 5.3 + */ +public class ActivitiNamespaceHandler extends NamespaceHandlerSupport { + public void init() { + registerBeanDefinitionParser("annotation-driven", new ActivitiAnnotationDrivenBeanDefinitionParser()); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/config/xml/StateHandlerAnnotationBeanFactoryPostProcessor.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/config/xml/StateHandlerAnnotationBeanFactoryPostProcessor.java new file mode 100644 index 0000000000000000000000000000000000000000..b30859976993baef11f23d656c3770f7d85db2c0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/config/xml/StateHandlerAnnotationBeanFactoryPostProcessor.java @@ -0,0 +1,88 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components.config.xml; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.spring.components.ActivitiContextUtils; +import org.camunda.bpm.engine.spring.components.registry.ActivitiStateHandlerRegistry; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.config.BeanDefinitionHolder; +import org.springframework.beans.factory.config.BeanFactoryPostProcessor; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; +import org.springframework.beans.factory.support.BeanDefinitionReaderUtils; +import org.springframework.beans.factory.support.BeanDefinitionRegistry; +import org.springframework.beans.factory.support.RootBeanDefinition; + +import java.util.logging.Logger; + +/** + * this class is responsible for registering the other {@link org.springframework.beans.factory.config.BeanFactoryPostProcessor}s + * and {@link BeanFactoryPostProcessor}s. + *

+ * Particularly, this will register the {@link ActivitiStateHandlerRegistry} which is used to react to states. + * + * @author Josh Long + */ +public class StateHandlerAnnotationBeanFactoryPostProcessor implements BeanFactoryPostProcessor { + + private ProcessEngine processEngine ; + private Logger log = Logger.getLogger(getClass().getName()); + + public void setProcessEngine(ProcessEngine processEngine) { + this.processEngine = processEngine; + } + + private void configureDefaultActivitiRegistry(String registryBeanName, BeanDefinitionRegistry registry) { + + + if (!beanAlreadyConfigured(registry, registryBeanName, ActivitiStateHandlerRegistry.class)) { + String registryName =ActivitiStateHandlerRegistry.class.getName(); + log.info( "registering a " + registryName + " instance under bean name "+ ActivitiContextUtils.ACTIVITI_REGISTRY_BEAN_NAME+ "."); + + RootBeanDefinition rootBeanDefinition = new RootBeanDefinition(); + rootBeanDefinition.setBeanClassName( registryName ); + rootBeanDefinition.getPropertyValues().addPropertyValue("processEngine", this.processEngine); + + BeanDefinitionHolder holder = new BeanDefinitionHolder(rootBeanDefinition, registryBeanName); + BeanDefinitionReaderUtils.registerBeanDefinition(holder, registry); + } + } + + public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { + if (beanFactory instanceof BeanDefinitionRegistry) { + BeanDefinitionRegistry registry = (BeanDefinitionRegistry) beanFactory; + configureDefaultActivitiRegistry(ActivitiContextUtils.ACTIVITI_REGISTRY_BEAN_NAME, registry); + + + } else { + log.info("BeanFactory is not a BeanDefinitionRegistry. The default '" + + ActivitiContextUtils.ACTIVITI_REGISTRY_BEAN_NAME + "' cannot be configured."); + } + } + + private boolean beanAlreadyConfigured(BeanDefinitionRegistry registry, String beanName, Class clz) { + if (registry.isBeanNameInUse(beanName)) { + BeanDefinition bDef = registry.getBeanDefinition(beanName); + if (bDef.getBeanClassName().equals(clz.getName())) { + return true; // so the beans already registered, and of the right type. so we assume the user is overriding our configuration + } else { + throw new IllegalStateException("The bean name '" + beanName + "' is reserved."); + } + } + return false; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/jobexecutor/SpringJobExecutor.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/jobexecutor/SpringJobExecutor.java new file mode 100644 index 0000000000000000000000000000000000000000..f4a18643f0f2322008250c6a2f3fc8315c506a49 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/jobexecutor/SpringJobExecutor.java @@ -0,0 +1,83 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.components.jobexecutor; + +import java.util.List; +import java.util.concurrent.RejectedExecutionException; + +import org.camunda.bpm.engine.impl.ProcessEngineImpl; +import org.camunda.bpm.engine.impl.jobexecutor.JobExecutor; +import org.springframework.core.task.TaskExecutor; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; + +/** + * + *

+ * This is a spring based implementation of the {@link JobExecutor} using spring abstraction {@link TaskExecutor} + * for performing background task execution. + *

+ *

+ * The idea behind this implementation is to externalize the configuration of the task executor, so it can leverage to + * Application servers controller thread pools, for example using the commonj API. The use of unmanaged thread in application servers + * is discouraged by the Java EE spec. + *

+ * + * @author Pablo Ganga + */ +public class SpringJobExecutor extends JobExecutor { + + private TaskExecutor taskExecutor; + + public TaskExecutor getTaskExecutor() { + return taskExecutor; + } + + /** + * Required spring injected {@link TaskExecutor}} implementation that will be used to execute runnable jobs. + * + * @param taskExecutor + */ + public void setTaskExecutor(TaskExecutor taskExecutor) { + this.taskExecutor = taskExecutor; + } + + public void executeJobs(List jobIds, ProcessEngineImpl processEngine) { + try { + taskExecutor.execute(getExecuteJobsRunnable(jobIds, processEngine)); + } catch (RejectedExecutionException e) { + logRejectedExecution(processEngine, jobIds.size()); + rejectedJobsHandler.jobsRejected(jobIds, processEngine, this); + } finally { + if (taskExecutor instanceof ThreadPoolTaskExecutor) { + logJobExecutionInfo(processEngine, ((ThreadPoolTaskExecutor) taskExecutor).getQueueSize(), + ((ThreadPoolTaskExecutor) taskExecutor).getQueueCapacity(), + ((ThreadPoolTaskExecutor) taskExecutor).getMaxPoolSize(), + ((ThreadPoolTaskExecutor) taskExecutor).getActiveCount()); + } + } + } + + @Override + protected void startExecutingJobs() { + startJobAcquisitionThread(); + } + + @Override + protected void stopExecutingJobs() { + stopJobAcquisitionThread(); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/registry/ActivitiStateHandlerRegistration.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/registry/ActivitiStateHandlerRegistration.java new file mode 100644 index 0000000000000000000000000000000000000000..577458bb8f9e61a3690b066764380dcaaa00be12 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/registry/ActivitiStateHandlerRegistration.java @@ -0,0 +1,109 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components.registry; + + +import java.lang.reflect.Method; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + + +/** + * an instance of a bean discovered to both have an {@link org.camunda.bpm.engine.ProcessEngineComponent.ActivitiComponent} + * and one or more {@link org.camunda.bpm.engine.ProcessEngineComponent.ActivitiComponent} annotations present. + *

+ * Describes the metadata extracted from the bean at configuration time + * + * @author Josh Long + * @since 1.0 + */ +public class ActivitiStateHandlerRegistration { + private Map processVariablesExpected = new ConcurrentHashMap(); + private Method handlerMethod; + private Object handler; + private String stateName; + private String beanName; + private int processVariablesIndex = -1; + private int processIdIndex = -1; + private String processName; + + public ActivitiStateHandlerRegistration( + Map processVariablesExpected, Method handlerMethod, + Object handler, String stateName, String beanName, + int processVariablesIndex, int processIdIndex, String processName) { + this.processVariablesExpected = processVariablesExpected; + this.handlerMethod = handlerMethod; + this.handler = handler; + this.stateName = stateName; + this.beanName = beanName; + this.processVariablesIndex = processVariablesIndex; + this.processIdIndex = processIdIndex; + this.processName = processName; + } + + public int getProcessVariablesIndex() { + return processVariablesIndex; + } + + public int getProcessIdIndex() { + return processIdIndex; + } + + public boolean requiresProcessId() { + return this.processIdIndex > -1; + } + + public boolean requiresProcessVariablesMap() { + return processVariablesIndex > -1; + } + + public String getBeanName() { + return beanName; + } + + public Map getProcessVariablesExpected() { + return processVariablesExpected; + } + + public Method getHandlerMethod() { + return handlerMethod; + } + + public Object getHandler() { + return handler; + } + + public String getStateName() { + return stateName; + } + + public String getProcessName() { + return processName; + } + + @Override + public String toString() { + return super.toString() + "[" + + "processVariablesExpected=" + processVariablesExpected + ", " + + "handlerMethod=" + handlerMethod + ", " + + "handler=" + handler + ", " + + "stateName=" + stateName + ", " + + "beanName=" + beanName + ", " + + "processVariablesIndex=" + processVariablesIndex + ", " + + "processIdIndex=" + processIdIndex + ", " + + "processName=" + processName + "]"; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/registry/ActivitiStateHandlerRegistry.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/registry/ActivitiStateHandlerRegistry.java new file mode 100644 index 0000000000000000000000000000000000000000..a35dc56e5f62b8b0736d1f9314ce9fce97630dc0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/registry/ActivitiStateHandlerRegistry.java @@ -0,0 +1,167 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components.registry; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.bpmn.behavior.ReceiveTaskActivityBehavior; +import org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior; +import org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.BeanFactory; +import org.springframework.beans.factory.BeanFactoryAware; +import org.springframework.beans.factory.BeanNameAware; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.util.Assert; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.concurrent.ConcurrentHashMap; +import java.util.logging.Logger; + + +/** + * this class records and manages all known {@link org.camunda.bpm.engine.annotations.State} - responding + * beans in the JVM. It should have metadata on all methods, and what + * those methods expect from a given invocation (ie: which process, which process variables). + * + * @author Josh Long + * @since 1.0 + */ +public class ActivitiStateHandlerRegistry extends ReceiveTaskActivityBehavior implements BeanFactoryAware, BeanNameAware, ActivityBehavior, InitializingBean { + + private Logger logger = Logger.getLogger(getClass().getName()); + + private String beanName; + + private BeanFactory beanFactory; + + private volatile ConcurrentHashMap registrations = new ConcurrentHashMap(); + + private ProcessEngine processEngine; + + public void setProcessEngine(ProcessEngine processEngine) { + this.processEngine = processEngine; + } + + @Override + public void execute(ActivityExecution execution) throws Exception { + + } + + @Override + public void signal(ActivityExecution execution, String signalName, Object data) throws Exception { + leave(execution); + } + + protected String registrationKey(String stateName, String processName) { + return (org.camunda.commons.utils.StringUtil.defaultString(processName) + + ":" + org.camunda.commons.utils.StringUtil.defaultString(stateName)).toLowerCase(); + } + + /** + * used at runtime to register state handlers as they are registered with the spring context + * + * @param registration the {@link org.camunda.bpm.engine.test.spring.components.registry.ActivitiStateHandlerRegistration} + */ + public void registerActivitiStateHandler( + ActivitiStateHandlerRegistration registration) { + String regKey = registrationKey(registration.getProcessName(), + registration.getStateName()); + this.registrations.put(regKey, registration); + } + + /** + * this is responsible for looking up components in the registry and returning the appropriate handler based + * on specificity of the {@link org.camunda.bpm.engine.test.spring.components.registry.ActivitiStateHandlerRegistration} + * + * @param processName the process name to look for (optional) + * @param stateName the state name to look for (not optional) + * @return all matching options + */ + public Collection findRegistrationsForProcessAndState( + String processName, String stateName) { + Collection registrationCollection = new ArrayList(); + String regKeyFull = registrationKey(processName, stateName); + String regKeyWithJustState = registrationKey(null, stateName); + + for (String k : this.registrations.keySet()) + if (k.contains(regKeyFull)) { + registrationCollection.add(this.registrations.get(k)); + } + + if (registrationCollection.size() == 0) { + for (String k : this.registrations.keySet()) + if (k.contains(regKeyWithJustState)) { + registrationCollection.add(this.registrations.get(k)); + } + } + + return registrationCollection; + } + + /** + * this scours the registry looking for candidate registrations that match a given process name and/ or state nanme + * + * @param processName the name of the process + * @param stateName the name of the state + * @return an unambiguous {@link org.camunda.bpm.engine.test.spring.components.registry.ActivitiStateHandlerRegistry} or null + */ + public ActivitiStateHandlerRegistration findRegistrationForProcessAndState(String processName, String stateName) { + + ActivitiStateHandlerRegistration r = null; + + String key = registrationKey(processName, stateName); + + Collection rs = this.findRegistrationsForProcessAndState( + processName, stateName); + + for (ActivitiStateHandlerRegistration sr : rs) { + String kName = registrationKey(sr.getProcessName(), sr.getStateName()); + if (key.equalsIgnoreCase(kName)) { + r = sr; + break; + } + } + + for (ActivitiStateHandlerRegistration sr : rs) { + String kName = registrationKey(null, sr.getStateName()); + if (key.equalsIgnoreCase(kName)) { + r = sr; + break; + } + } + + if ((r == null) && (rs.size() > 0)) { + r = rs.iterator().next(); + } + + return r; + } + + public void setBeanFactory(BeanFactory beanFactory) throws BeansException { + this.beanFactory = beanFactory; + } + + public void setBeanName(String name) { + this.beanName = name; + } + + public void afterPropertiesSet() throws Exception { + Assert.notNull(this.processEngine, "the 'processEngine' can't be null"); + logger.info( "this bean contains a processEngine reference. "+ this.processEngine); + logger.info("starting " + getClass().getName()); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/scope/ProcessScope.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/scope/ProcessScope.java new file mode 100644 index 0000000000000000000000000000000000000000..5e76ecce9d836c9c52c544b95cd89d8062003e4e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/components/scope/ProcessScope.java @@ -0,0 +1,240 @@ +/* + * Copyright 2010 the original author or authors + * + * 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.camunda.bpm.engine.spring.components.scope; + +import java.io.Serializable; +import java.lang.reflect.Method; +import java.util.concurrent.ConcurrentHashMap; +import java.util.logging.Logger; + +import org.aopalliance.intercept.MethodInterceptor; +import org.aopalliance.intercept.MethodInvocation; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.impl.context.Context; +import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.spring.components.aop.util.Scopifier; +import org.camunda.commons.utils.StringUtil; +import org.springframework.aop.framework.ProxyFactory; +import org.springframework.aop.scope.ScopedObject; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.DisposableBean; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.ObjectFactory; +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.config.BeanFactoryPostProcessor; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; +import org.springframework.beans.factory.config.Scope; +import org.springframework.beans.factory.support.BeanDefinitionRegistry; +import org.springframework.util.Assert; +import org.springframework.util.ClassUtils; + +/** + * binds variables to a currently executing Activiti business process (a {@link org.camunda.bpm.engine.runtime.ProcessInstance}). + *

+ * Parts of this code are lifted wholesale from Dave Syer's work on the Spring 3.1 RefreshScope. + * + * @author Josh Long + * @since 5.3 + */ +public class ProcessScope implements Scope, InitializingBean, BeanFactoryPostProcessor, DisposableBean { + + /** + * Map of the processVariables. Supports correct, scoped access to process variables so that + * + * + * @Value("#{ processVariables['customerId'] }") long customerId; + * + *

+ * works in any bean - scoped or not + */ + public final static String PROCESS_SCOPE_PROCESS_VARIABLES_SINGLETON = "processVariables"; + public final static String PROCESS_SCOPE_NAME = "process"; + + private ClassLoader classLoader = ClassUtils.getDefaultClassLoader(); + + private boolean proxyTargetClass = true; + + private Logger logger = Logger.getLogger(getClass().getName()); + + private ProcessEngine processEngine; + + private RuntimeService runtimeService; + + // set through Namespace reflection if nothing else + @SuppressWarnings("unused") + public void setProcessEngine(ProcessEngine processEngine) { + this.processEngine = processEngine; + } + + public Object get(String name, ObjectFactory objectFactory) { + + ExecutionEntity executionEntity = null; + try { + logger.fine("returning scoped object having beanName '" + name + "' for conversation ID '" + this.getConversationId() + "'. "); + + ProcessInstance processInstance = Context.getExecutionContext().getProcessInstance(); + executionEntity = (ExecutionEntity) processInstance; + + Object scopedObject = executionEntity.getVariable(name); + if (scopedObject == null) { + scopedObject = objectFactory.getObject(); + if (scopedObject instanceof ScopedObject) { + ScopedObject sc = (ScopedObject) scopedObject; + scopedObject = sc.getTargetObject(); + logger.fine("de-referencing " + ScopedObject.class.getName() + "#targetObject before persisting variable"); + } + persistVariable(name, scopedObject); + } + return createDirtyCheckingProxy(name, scopedObject); + } catch (Throwable th) { + logger.warning("couldn't return value from process scope! " + StringUtil.getStackTrace(th)); + } finally { + if (executionEntity != null) { + logger.fine("set variable '" + name + "' on executionEntity# " + executionEntity.getId()); + } + } + return null; + } + + public void registerDestructionCallback(String name, Runnable callback) { + logger.fine("no support for registering descruction callbacks implemented currently. registerDestructionCallback('" + name + "',callback) will do nothing."); + } + + private String getExecutionId() { + return Context.getExecutionContext().getExecution().getId(); + } + + public Object remove(String name) { + + logger.fine("remove '" + name + "'"); + return runtimeService.getVariable(getExecutionId(), name); + } + + public Object resolveContextualObject(String key) { + + if ("executionId".equalsIgnoreCase(key)) + return Context.getExecutionContext().getExecution().getId(); + + if ("processInstance".equalsIgnoreCase(key)) + return Context.getExecutionContext().getProcessInstance(); + + if ("processInstanceId".equalsIgnoreCase(key)) + return Context.getExecutionContext().getProcessInstance().getId(); + + return null; + } + + /** + * creates a proxy that dispatches invocations to the currently bound {@link ProcessInstance} + * + * @return shareable {@link ProcessInstance} + */ + private Object createSharedProcessInstance() { + ProxyFactory proxyFactoryBean = new ProxyFactory(ProcessInstance.class, new MethodInterceptor() { + public Object invoke(MethodInvocation methodInvocation) throws Throwable { + String methodName = methodInvocation.getMethod().getName() ; + + logger.info("method invocation for " + methodName+ "."); + if(methodName.equals("toString")) + return "SharedProcessInstance"; + + + ProcessInstance processInstance = Context.getExecutionContext().getProcessInstance(); + Method method = methodInvocation.getMethod(); + Object[] args = methodInvocation.getArguments(); + Object result = method.invoke(processInstance, args); + return result; + } + }); + return proxyFactoryBean.getProxy(this.classLoader); + } + + public String getConversationId() { + return getExecutionId(); + } + + private final ConcurrentHashMap processVariablesMap = new ConcurrentHashMap() { + @Override + public java.lang.Object get(java.lang.Object o) { + + Assert.isInstanceOf(String.class, o, "the 'key' must be a String"); + + String varName = (String) o; + + ProcessInstance processInstance = Context.getExecutionContext().getProcessInstance(); + ExecutionEntity executionEntity = (ExecutionEntity) processInstance; + if (executionEntity.getVariableNames().contains(varName)) { + return executionEntity.getVariable(varName); + } + throw new RuntimeException("no processVariable by the name of '" + varName + "' is available!"); + } + }; + + public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { + + beanFactory.registerScope(ProcessScope.PROCESS_SCOPE_NAME, this); + + Assert.isInstanceOf(BeanDefinitionRegistry.class, beanFactory, "BeanFactory was not a BeanDefinitionRegistry, so ProcessScope cannot be used."); + + BeanDefinitionRegistry registry = (BeanDefinitionRegistry) beanFactory; + + for (String beanName : beanFactory.getBeanDefinitionNames()) { + BeanDefinition definition = beanFactory.getBeanDefinition(beanName); + // Replace this or any of its inner beans with scoped proxy if it has this scope + boolean scoped = PROCESS_SCOPE_NAME.equals(definition.getScope()); + Scopifier scopifier = new Scopifier(registry, PROCESS_SCOPE_NAME, proxyTargetClass, scoped); + scopifier.visitBeanDefinition(definition); + if (scoped) { + Scopifier.createScopedProxy(beanName, definition, registry, proxyTargetClass); + } + } + + beanFactory.registerSingleton(ProcessScope.PROCESS_SCOPE_PROCESS_VARIABLES_SINGLETON, this.processVariablesMap); + beanFactory.registerResolvableDependency(ProcessInstance.class, createSharedProcessInstance()); + } + + public void destroy() throws Exception { + logger.info(ProcessScope.class.getName() + "#destroy() called ..."); + } + + public void afterPropertiesSet() throws Exception { + Assert.notNull(this.processEngine, "the 'processEngine' must not be null!"); + this.runtimeService = this.processEngine.getRuntimeService(); + } + + private Object createDirtyCheckingProxy(final String name, final Object scopedObject) throws Throwable { + ProxyFactory proxyFactoryBean = new ProxyFactory(scopedObject); + proxyFactoryBean.setProxyTargetClass(this.proxyTargetClass); + proxyFactoryBean.addAdvice(new MethodInterceptor() { + public Object invoke(MethodInvocation methodInvocation) throws Throwable { + Object result = methodInvocation.proceed(); + persistVariable(name, scopedObject); + return result; + } + }); + return proxyFactoryBean.getProxy(this.classLoader); + } + + private void persistVariable(String variableName, Object scopedObject) { + ProcessInstance processInstance = Context.getExecutionContext().getProcessInstance(); + ExecutionEntity executionEntity = (ExecutionEntity) processInstance; + Assert.isTrue(scopedObject instanceof Serializable, "the scopedObject is not " + Serializable.class.getName() + "!"); + executionEntity.setVariable(variableName, scopedObject); + } +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/container/ManagedProcessEngineFactoryBean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/container/ManagedProcessEngineFactoryBean.java new file mode 100644 index 0000000000000000000000000000000000000000..2730055d737f8e9aa01f0fd08277e20c3191c4a9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/java/org/camunda/bpm/engine/spring/container/ManagedProcessEngineFactoryBean.java @@ -0,0 +1,57 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.container; + +import org.camunda.bpm.BpmPlatform; +import org.camunda.bpm.container.RuntimeContainerDelegate; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.spring.ProcessEngineFactoryBean; + +/** + *

Factory bean registering a spring-managed process engine with the {@link BpmPlatform}.

+ * + *

Replacement for {@link ProcessEngineFactoryBean}. Use this implementation if you want to + * register a process engine configured in a spring application context with the {@link BpmPlatform}.

+ * + * @author Daniel Meyer + * + */ +public class ManagedProcessEngineFactoryBean extends ProcessEngineFactoryBean { + + public ProcessEngine getObject() throws Exception { + ProcessEngine processEngine = super.getObject(); + + RuntimeContainerDelegate runtimeContainerDelegate = getRuntimeContainerDelegate(); + runtimeContainerDelegate.registerProcessEngine(processEngine); + + return processEngine; + } + + protected RuntimeContainerDelegate getRuntimeContainerDelegate() { + return RuntimeContainerDelegate.INSTANCE.get(); + } + + public void destroy() throws Exception { + + if(processEngine != null) { + getRuntimeContainerDelegate().unregisterProcessEngine(processEngine); + } + + super.destroy(); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/resources/META-INF/services/org.camunda.bpm.application.ProcessApplicationElResolver b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/resources/META-INF/services/org.camunda.bpm.application.ProcessApplicationElResolver new file mode 100644 index 0000000000000000000000000000000000000000..e95e6a85890c3aa892fee5bf98d1ab98676442a5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/resources/META-INF/services/org.camunda.bpm.application.ProcessApplicationElResolver @@ -0,0 +1 @@ +org.camunda.bpm.engine.spring.application.SpringProcessApplicationElResolver \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/resources/META-INF/spring.handlers b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/resources/META-INF/spring.handlers new file mode 100644 index 0000000000000000000000000000000000000000..1716b7b3a8001a215bf92b03d8db9a41e73c19c6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/resources/META-INF/spring.handlers @@ -0,0 +1 @@ +http\://www.activiti.org/schema/spring/components=org.camunda.bpm.engine.spring.components.config.xml.ActivitiNamespaceHandler \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/resources/META-INF/spring.schemas b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/resources/META-INF/spring.schemas new file mode 100644 index 0000000000000000000000000000000000000000..c3e9f380966711374185504948f98316cd7aa511 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/resources/META-INF/spring.schemas @@ -0,0 +1,2 @@ +http\://www.activiti.org/schema/spring/components/activiti-5.0.xsd=org/camunda/bpm/engine/spring/components/config/xml/camunda-7.0.xsd +http\://www.activiti.org/schema/spring/components/activiti.xsd=org/camunda/bpm/engine/spring/components/config/xml/camunda-7.0.xsd \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/resources/org/camunda/bpm/engine/spring/components/config/xml/camunda-7.0.xsd b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/resources/org/camunda/bpm/engine/spring/components/config/xml/camunda-7.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ae28180ee281ca9bd5e1e9df9e8cf0a0edca8785 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/main/resources/org/camunda/bpm/engine/spring/components/config/xml/camunda-7.0.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + Enables annotation support + + + + + + + Reference to the ProcessEngine instance + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/ExampleConfiguration.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/ExampleConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..ec282e1a6d31b39157e32c739d210e813fde4c9f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/ExampleConfiguration.java @@ -0,0 +1,47 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test; + +import org.camunda.bpm.engine.ProcessEngineConfiguration; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration; +import org.camunda.bpm.engine.spring.ProcessEngineFactoryBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @author Thorben Lindhauer + * + */ +@Configuration +public class ExampleConfiguration { + + @Bean + public ProcessEngineConfiguration processEngineConfiguration() { + return new StandaloneInMemProcessEngineConfiguration() + .setJobExecutorDeploymentAware(true) + .setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE); + } + + @Bean + public ProcessEngineFactoryBean processEngine() throws Exception { + ProcessEngineFactoryBean engineFactoryBean = new ProcessEngineFactoryBean(); + engineFactoryBean.setProcessEngineConfiguration((ProcessEngineConfigurationImpl) processEngineConfiguration()); + + return engineFactoryBean; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/Spring5TestHelper.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/Spring5TestHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..57c8b930ceb953fff059ce2dd5572a0bd23e5434 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/Spring5TestHelper.java @@ -0,0 +1,52 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test; + +import org.springframework.test.annotation.DirtiesContext.HierarchyMode; +import org.springframework.test.context.TestContext; +import org.springframework.test.context.TestContextManager; +import org.springframework.test.context.TestExecutionListener; + +public class Spring5TestHelper implements SpringTestHelper { + + @Override + public void beforeTestClass(TestContextManager testContextManager) { + testContextManager.registerTestExecutionListeners(new TestExecutionListener() { + + @Override + public void prepareTestInstance(TestContext testContext) throws Exception { + } + + @Override + public void beforeTestMethod(TestContext testContext) throws Exception { + } + + @Override + public void beforeTestClass(TestContext testContext) throws Exception { + } + + @Override + public void afterTestMethod(TestContext testContext) throws Exception { + } + + @Override + public void afterTestClass(TestContext testContext) throws Exception { + testContext.markApplicationContextDirty(HierarchyMode.EXHAUSTIVE); + } + }); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/SpringProcessEngineTestCase.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/SpringProcessEngineTestCase.java new file mode 100644 index 0000000000000000000000000000000000000000..9a522fe7607d2eec4a014789098ba9891fbfd41d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/SpringProcessEngineTestCase.java @@ -0,0 +1,85 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test; + +import java.util.ServiceLoader; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.test.AbstractProcessEngineTestCase; +import org.springframework.beans.CachedIntrospectionResults; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestContextManager; +import org.springframework.test.context.TestExecutionListeners; +import org.springframework.test.context.support.DependencyInjectionTestExecutionListener; + + +/** + * @author Joram Barrez + */ +@TestExecutionListeners(DependencyInjectionTestExecutionListener.class) +public abstract class SpringProcessEngineTestCase extends AbstractProcessEngineTestCase implements ApplicationContextAware { + + protected TestContextManager testContextManager; + + @Autowired + protected ConfigurableApplicationContext applicationContext; + + public SpringProcessEngineTestCase() { + super(); + this.testContextManager = new TestContextManager(getClass()); + + SpringTestHelper testHelper = lookupTestHelper(); + testHelper.beforeTestClass(testContextManager); + } + + protected SpringTestHelper lookupTestHelper() + { + ServiceLoader serviceLoader = ServiceLoader.load(SpringTestHelper.class); + return serviceLoader.iterator().next(); + } + + @Override + public void runBare() throws Throwable { + testContextManager.prepareTestInstance(this); // this will initialize all dependencies + try { + super.runBare(); + } + finally { + testContextManager.afterTestClass(); + applicationContext.close(); + applicationContext = null; + processEngine = null; + testContextManager = null; + CachedIntrospectionResults.clearClassLoader(getClass().getClassLoader()); + } + } + + @Override + protected void initializeProcessEngine() { + ContextConfiguration contextConfiguration = getClass().getAnnotation(ContextConfiguration.class); + processEngine = applicationContext.getBean(ProcessEngine.class); + } + + public void setApplicationContext(ApplicationContext applicationContext) { + this.applicationContext = (ConfigurableApplicationContext) applicationContext; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/SpringProcessEngineTestCaseTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/SpringProcessEngineTestCaseTest.java new file mode 100644 index 0000000000000000000000000000000000000000..f0bca4dc11d44d9ed94f468173024990bf23df42 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/SpringProcessEngineTestCaseTest.java @@ -0,0 +1,34 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test; + +import org.camunda.bpm.engine.impl.ProcessEngineImpl; +import org.springframework.test.context.ContextConfiguration; + +/** + * @author Thorben Lindhauer + * + */ +@ContextConfiguration(classes = ExampleConfiguration.class) +public class SpringProcessEngineTestCaseTest extends SpringProcessEngineTestCase { + + public void testProgrammaticContextConfiguration() { + assertNotNull(processEngine); + assertTrue(((ProcessEngineImpl) processEngine).getProcessEngineConfiguration().isJobExecutorDeploymentAware()); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/SpringTestHelper.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/SpringTestHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..936840469eb2b197f1c332878ac18645da7f64ba --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/SpringTestHelper.java @@ -0,0 +1,27 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test; + +import org.springframework.test.context.TestContextManager; + +/** + * Contains Spring-version-specific test code + */ +public interface SpringTestHelper { + + public void beforeTestClass(TestContextManager testContextManager); +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/application/CustomSpringProcessApplication.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/application/CustomSpringProcessApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..db4cdb71b6de08f18285263104096c7ad3150b9d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/application/CustomSpringProcessApplication.java @@ -0,0 +1,29 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.application; + +import org.camunda.bpm.application.ProcessApplication; +import org.camunda.bpm.engine.spring.application.SpringProcessApplication; + +/** + * @author Daniel Meyer + * + */ +@ProcessApplication(deploymentDescriptors={"org/camunda/bpm/engine/spring/test/application/processes.xml"}) +public class CustomSpringProcessApplication extends SpringProcessApplication { + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/application/PostDeployRegistrationPa.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/application/PostDeployRegistrationPa.java new file mode 100644 index 0000000000000000000000000000000000000000..e566b88daf190948484b17a286a55f685788c499 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/application/PostDeployRegistrationPa.java @@ -0,0 +1,100 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.application; + +import java.util.concurrent.Callable; + +import org.camunda.bpm.application.PostDeploy; +import org.camunda.bpm.application.PreUndeploy; +import org.camunda.bpm.application.ProcessApplicationExecutionException; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.repository.ProcessDefinition; +import org.camunda.bpm.engine.spring.application.SpringProcessApplication; + +/** + * @author Daniel Meyer + * + */ +public class PostDeployRegistrationPa extends SpringProcessApplication { + + protected boolean isPostDeployInvoked = false; + protected boolean isPreUndeployInvoked = false; + protected String deploymentId; + + @PostDeploy + public void registerProcessApplication(ProcessEngine processEngine) { + + // lookup existing deployment + ProcessDefinition processDefinition = processEngine.getRepositoryService() + .createProcessDefinitionQuery() + .processDefinitionKey("startToEnd") + .latestVersion() + .singleResult(); + + deploymentId = processDefinition.getDeploymentId(); + + // register with the process engine + processEngine.getManagementService() + .registerProcessApplication(deploymentId, getReference()); + + + isPostDeployInvoked = true; + } + + @PreUndeploy + public void unregisterProcessApplicaiton(ProcessEngine processEngine) { + + // unregister with the process engine + processEngine.getManagementService() + .unregisterProcessApplication(deploymentId, true); + + isPreUndeployInvoked = true; + + } + + + // customization of Process Application for unit test //////////////////////////// + + protected boolean isInvoked = false; + + @Override + public void start() { + // do not auto-deploy the process application : we want to manually deploy + // from the test-case + } + + /** override execute to intercept calls from process engine and record that we are invoked. */ + @Override + public T execute(Callable callable) throws ProcessApplicationExecutionException { + T result = super.execute(callable); + isInvoked = true; + return result; + } + + public boolean isInvoked() { + return isInvoked; + } + + public boolean isPostDeployInvoked() { + return isPostDeployInvoked; + } + + public boolean isPreUndeployInvoked() { + return isPreUndeployInvoked; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/application/PostDeployWithNestedContext.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/application/PostDeployWithNestedContext.java new file mode 100644 index 0000000000000000000000000000000000000000..5b7f0867dc0d3424131b10f5d6b56c8a676bc31b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/application/PostDeployWithNestedContext.java @@ -0,0 +1,77 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.application; + +import org.camunda.bpm.application.PostDeploy; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.spring.application.SpringProcessApplication; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationEvent; +import org.springframework.context.ApplicationListener; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.support.AbstractApplicationContext; + +public class PostDeployWithNestedContext extends SpringProcessApplication { + + public class MyEvent extends ApplicationEvent { + private static final long serialVersionUID = 1L; + + public MyEvent(Object source) { + super(source); + } + } + + boolean deployCalled = false; + boolean triggered = false; + boolean deployOnChildRefresh; + + @Override + public void setApplicationContext(ApplicationContext mainContext) throws BeansException { + super.setApplicationContext(mainContext); + + AnnotationConfigApplicationContext nestedContext = new AnnotationConfigApplicationContext(); + nestedContext.setParent(mainContext); + + deployCalled = false; + nestedContext.refresh(); + deployOnChildRefresh = deployCalled; + + ((AbstractApplicationContext) mainContext).addApplicationListener(new ApplicationListener() { + + @Override + public void onApplicationEvent(MyEvent event) { + triggered = true; + } + }); + } + + @PostDeploy + public void registerProcessApplication(ProcessEngine processEngine) { + deployCalled = true; + applicationContext.publishEvent(new MyEvent(this)); + } + + public boolean isDeployOnChildRefresh() { + return deployOnChildRefresh; + } + + public boolean isLateEventTriggered() { + return triggered; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/application/SpringProcessApplicationTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/application/SpringProcessApplicationTest.java new file mode 100644 index 0000000000000000000000000000000000000000..ba32f54eec2e431acf19279bc28a3ff933bf7f77 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/application/SpringProcessApplicationTest.java @@ -0,0 +1,147 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.application; + +import org.camunda.bpm.BpmPlatform; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.repository.Deployment; +import org.camunda.bpm.engine.spring.application.SpringProcessApplication; +import org.junit.Assert; +import org.junit.Test; +import org.springframework.context.support.AbstractApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +/** + *

Testcases for {@link SpringProcessApplication}

+ * + * @author Daniel Meyer + * + */ +public class SpringProcessApplicationTest { + + @Test + public void testProcessApplicationDeployment() { + + // initially no applications are deployed: + Assert.assertEquals(0, BpmPlatform.getProcessApplicationService().getProcessApplicationNames().size()); + + // start a spring application context + AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/camunda/bpm/engine/spring/test/application/SpringProcessApplicationDeploymentTest-context.xml"); + applicationContext.start(); + + // assert that there is a process application deployed with the name of the process application bean + Assert.assertNotNull(BpmPlatform.getProcessApplicationService() + .getProcessApplicationInfo("myProcessApplication")); + + // close the spring application context + applicationContext.close(); + + // after closing the application context, the process application is undeployed. + Assert.assertNull(BpmPlatform.getProcessApplicationService() + .getProcessApplicationInfo("myProcessApplication")); + + } + + @Test + public void testDeployProcessArchive() { + + // start a spring application context + AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/camunda/bpm/engine/spring/test/application/SpringProcessArchiveDeploymentTest-context.xml"); + applicationContext.start(); + + // assert the process archive is deployed: + ProcessEngine processEngine = BpmPlatform.getDefaultProcessEngine(); + Assert.assertNotNull(processEngine.getRepositoryService().createDeploymentQuery().deploymentName("pa").singleResult()); + + applicationContext.close(); + + // assert the process is undeployed + Assert.assertNull(processEngine.getRepositoryService().createDeploymentQuery().deploymentName("pa").singleResult()); + + } + + @Test + public void testPostDeployRegistrationPa() { + // this test verifies that a process application is able to register a deployment from the @PostDeploy callback: + + AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/camunda/bpm/engine/spring/test/application/PostDeployRegistrationPaTest-context.xml"); + applicationContext.start(); + + ProcessEngine processEngine = BpmPlatform.getDefaultProcessEngine(); + + // create a manual deployment: + Deployment deployment = processEngine.getRepositoryService() + .createDeployment() + .addClasspathResource("org/camunda/bpm/engine/spring/test/application/process.bpmn20.xml") + .deploy(); + + // lookup the process application spring bean: + PostDeployRegistrationPa processApplication = applicationContext.getBean("customProcessApplicaiton", PostDeployRegistrationPa.class); + + Assert.assertFalse(processApplication.isPostDeployInvoked()); + processApplication.deploy(); + Assert.assertTrue(processApplication.isPostDeployInvoked()); + + // the process application was not invoked + Assert.assertFalse(processApplication.isInvoked()); + + // start process instance: + processEngine.getRuntimeService() + .startProcessInstanceByKey("startToEnd"); + + // now the process application was invoked: + Assert.assertTrue(processApplication.isInvoked()); + + // undeploy PA + Assert.assertFalse(processApplication.isPreUndeployInvoked()); + processApplication.undeploy(); + Assert.assertTrue(processApplication.isPreUndeployInvoked()); + + // manually undeploy the process + processEngine.getRepositoryService() + .deleteDeployment(deployment.getId(), true); + + applicationContext.close(); + + } + + @Test + public void testPostDeployWithNestedContext() { + /* + * This test case checks if the process application deployment is done when + * application context is refreshed, but not when child contexts are + * refreshed. + * + * As a side test it checks if events thrown in the PostDeploy-method are + * catched by the main application context. + */ + + AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext( + "org/camunda/bpm/engine/spring/test/application/PostDeployWithNestedContext-context.xml"); + applicationContext.start(); + + // lookup the process application spring bean: + PostDeployWithNestedContext processApplication = applicationContext.getBean("customProcessApplicaiton", PostDeployWithNestedContext.class); + + Assert.assertFalse(processApplication.isDeployOnChildRefresh()); + Assert.assertTrue(processApplication.isLateEventTriggered()); + + processApplication.undeploy(); + applicationContext.close(); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/autodeployment/CustomNameSpringEngineConfiguration.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/autodeployment/CustomNameSpringEngineConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..d1eecb1bf88bc0971eb1383697949e54719e3198 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/autodeployment/CustomNameSpringEngineConfiguration.java @@ -0,0 +1,31 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.autodeployment; + +import org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration; +import org.springframework.core.io.Resource; + +/** + * @author Tobias Metzke + * + */ +public class CustomNameSpringEngineConfiguration extends SpringProcessEngineConfiguration { + @Override + protected String getFileResourceName(Resource resource) { + return resource.getFilename(); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/autodeployment/DynamicResourceEngineConfiguration.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/autodeployment/DynamicResourceEngineConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..4b1bd6dc51e1c1e12969c945544a8114889a7963 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/autodeployment/DynamicResourceEngineConfiguration.java @@ -0,0 +1,27 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.autodeployment; + +import org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration; + +public class DynamicResourceEngineConfiguration extends SpringProcessEngineConfiguration { + + public DynamicResourceEngineConfiguration() + { + this.deploymentResources = DynamicResourceProducer.getResources(); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/autodeployment/DynamicResourceProducer.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/autodeployment/DynamicResourceProducer.java new file mode 100644 index 0000000000000000000000000000000000000000..dbe2cef909f414171dbe4072d764d5e35018bcd6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/autodeployment/DynamicResourceProducer.java @@ -0,0 +1,66 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.autodeployment; + +import java.io.ByteArrayOutputStream; +import java.util.ArrayList; +import java.util.List; + +import org.camunda.bpm.model.bpmn.Bpmn; +import org.camunda.bpm.model.bpmn.BpmnModelInstance; +import org.springframework.core.io.ByteArrayResource; +import org.springframework.core.io.Resource; + +public class DynamicResourceProducer { + + private static List resources = new ArrayList<>(); + + public static void clearResources() + { + resources.clear(); + } + + public static void addResource(String name, BpmnModelInstance modelInstance) + { + ByteArrayOutputStream outStream = new ByteArrayOutputStream(); + Bpmn.writeModelToStream(outStream, modelInstance); + + resources.add(new NamedByteArrayResource(outStream.toByteArray(), name)); + } + + public static Resource[] getResources() + { + return resources.toArray(new Resource[resources.size()]); + } + + /* + * In Spring 5, #getDescription is implemented differently + */ + public static class NamedByteArrayResource extends ByteArrayResource + { + private String description; + public NamedByteArrayResource(byte[] byteArray, String description) { + super(byteArray, description); + this.description = description; + } + + @Override + public String getDescription() { + return description; + } + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest.java new file mode 100644 index 0000000000000000000000000000000000000000..aa9c420db8d9c7c7deb0887262e8778015febb1b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest.java @@ -0,0 +1,226 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.autodeployment; + +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.impl.test.PvmTestCase; +import org.camunda.bpm.engine.repository.CaseDefinition; +import org.camunda.bpm.engine.repository.Deployment; +import org.camunda.bpm.engine.repository.DeploymentQuery; +import org.camunda.bpm.engine.repository.ProcessDefinition; +import org.camunda.bpm.engine.repository.ProcessDefinitionQuery; +import org.camunda.bpm.model.bpmn.Bpmn; +import org.camunda.bpm.model.bpmn.BpmnModelInstance; +import org.springframework.context.support.AbstractXmlApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * @author Tom Baeyens + * @author Joram Barrez + */ +public class SpringAutoDeployTest extends PvmTestCase { + + protected static final String CTX_PATH + = "org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest-context.xml"; + protected static final String CTX_CREATE_DROP_CLEAN_DB + = "org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest-create-drop-clean-db-context.xml"; + protected static final String CTX_DYNAMIC_DEPLOY_PATH + = "org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest-dynamic-deployment-context.xml"; + + protected static final String CTX_CMMN_PATH + = "org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployCmmnTest-context.xml"; + + protected static final String CTX_CMMN_BPMN_TOGETHER_PATH + = "org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployCmmnBpmnTest-context.xml"; + + protected static final String CTX_DEPLOY_CHANGE_ONLY_PATH + = "org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployDeployChangeOnlyTest-context.xml"; + + protected static final String CTX_TENANT_ID_PATH + = "org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTenantIdTest-context.xml"; + + protected static final String CTX_CUSTOM_NAME_PATH + = "org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployCustomNameTest-context.xml"; + + + protected ClassPathXmlApplicationContext applicationContext; + protected RepositoryService repositoryService; + + protected void createAppContext(String path) { + this.applicationContext = new ClassPathXmlApplicationContext(path); + this.repositoryService = applicationContext.getBean(RepositoryService.class); + } + + protected void tearDown() throws Exception { + DynamicResourceProducer.clearResources(); + removeAllDeployments(); + this.applicationContext.close(); + this.applicationContext = null; + this.repositoryService = null; + super.tearDown(); + } + + public void testBasicActivitiSpringIntegration() { + createAppContext(CTX_PATH); + List processDefinitions = repositoryService + .createProcessDefinitionQuery() + .list(); + + Set processDefinitionKeys = new HashSet<>(); + for (ProcessDefinition processDefinition: processDefinitions) { + processDefinitionKeys.add(processDefinition.getKey()); + } + + Set expectedProcessDefinitionKeys = new HashSet<>(); + expectedProcessDefinitionKeys.add("a"); + expectedProcessDefinitionKeys.add("b"); + expectedProcessDefinitionKeys.add("c"); + + assertEquals(expectedProcessDefinitionKeys, processDefinitionKeys); + } + + public void testNoRedeploymentForSpringContainerRestart() throws Exception { + createAppContext(CTX_PATH); + DeploymentQuery deploymentQuery = repositoryService.createDeploymentQuery(); + assertEquals(1, deploymentQuery.count()); + ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery(); + assertEquals(3, processDefinitionQuery.count()); + + // Creating a new app context with same resources doesn't lead to more deployments + ((AbstractXmlApplicationContext) applicationContext).close(); + applicationContext = new ClassPathXmlApplicationContext(CTX_PATH); + assertEquals(1, deploymentQuery.count()); + assertEquals(3, processDefinitionQuery.count()); + } + + public void testAutoDeployCmmn() { + createAppContext(CTX_CMMN_PATH); + + List definitions = repositoryService.createCaseDefinitionQuery().list(); + + assertEquals(1, definitions.size()); + } + + public void testAutoDeployCmmnAndBpmnTogether() { + createAppContext(CTX_CMMN_BPMN_TOGETHER_PATH); + + long caseDefs = repositoryService.createCaseDefinitionQuery().count(); + long procDefs = repositoryService.createProcessDefinitionQuery().count(); + + assertEquals(1, caseDefs); + assertEquals(3, procDefs); + } + + // when deployChangeOnly=true, new deployment should be created only for the changed resources + public void testDeployChangeOnly() throws Exception { + // given + BpmnModelInstance model1 = Bpmn.createExecutableProcess("model1").startEvent("oldId").endEvent().done(); + BpmnModelInstance model2 = Bpmn.createExecutableProcess("model1").startEvent("newId").endEvent().done(); + BpmnModelInstance model3 = Bpmn.createExecutableProcess("model2").startEvent().endEvent().done(); + + DynamicResourceProducer.addResource("a.bpmn", model1); + DynamicResourceProducer.addResource("b.bpmn", model3); + + createAppContext(CTX_DEPLOY_CHANGE_ONLY_PATH); + + // assume + assertEquals(1, repositoryService.createDeploymentQuery().count()); + + // when + ((AbstractXmlApplicationContext) applicationContext).close(); + + DynamicResourceProducer.clearResources(); + DynamicResourceProducer.addResource("a.bpmn", model2); + DynamicResourceProducer.addResource("b.bpmn", model3); + + applicationContext = new ClassPathXmlApplicationContext(CTX_DEPLOY_CHANGE_ONLY_PATH); + repositoryService = (RepositoryService) applicationContext.getBean("repositoryService"); + + // then + assertEquals(2, repositoryService.createDeploymentQuery().count()); + assertEquals(3, repositoryService.createProcessDefinitionQuery().count()); + } + + // Updating the bpmn20 file should lead to a new deployment when restarting the Spring container + public void testResourceRedeploymentAfterProcessDefinitionChange() throws Exception { + // given + BpmnModelInstance model1 = Bpmn.createExecutableProcess("model1").startEvent("oldId").endEvent().done(); + BpmnModelInstance model2 = Bpmn.createExecutableProcess("model1").startEvent("newId").endEvent().done(); + BpmnModelInstance model3 = Bpmn.createExecutableProcess("model2").startEvent().endEvent().done(); + + DynamicResourceProducer.addResource("a.bpmn", model1); + DynamicResourceProducer.addResource("b.bpmn", model3); + + createAppContext(CTX_DYNAMIC_DEPLOY_PATH); + assertEquals(1, repositoryService.createDeploymentQuery().count()); + ((AbstractXmlApplicationContext)applicationContext).close(); + + // when + DynamicResourceProducer.clearResources(); + DynamicResourceProducer.addResource("a.bpmn", model2); + DynamicResourceProducer.addResource("b.bpmn", model3); + + applicationContext = new ClassPathXmlApplicationContext(CTX_DYNAMIC_DEPLOY_PATH); + repositoryService = (RepositoryService) applicationContext.getBean("repositoryService"); + + // then + // Assertions come AFTER the file write! Otherwise the process file is messed up if the assertions fail. + assertEquals(2, repositoryService.createDeploymentQuery().count()); + assertEquals(4, repositoryService.createProcessDefinitionQuery().count()); + } + + public void testAutoDeployWithCreateDropOnCleanDb() { + createAppContext(CTX_CREATE_DROP_CLEAN_DB); + assertEquals(1, repositoryService.createDeploymentQuery().count()); + assertEquals(3, repositoryService.createProcessDefinitionQuery().count()); + } + + public void testAutoDeployTenantId() { + createAppContext(CTX_TENANT_ID_PATH); + + DeploymentQuery deploymentQuery = repositoryService.createDeploymentQuery(); + + assertEquals(1, deploymentQuery.tenantIdIn("tenant1").count()); + } + + public void testAutoDeployWithoutTenantId() { + createAppContext(CTX_CMMN_BPMN_TOGETHER_PATH); + + DeploymentQuery deploymentQuery = repositoryService.createDeploymentQuery(); + + assertEquals(1, deploymentQuery.withoutTenantId().count()); + } + + public void testAutoDeployCustomName() { + createAppContext(CTX_CUSTOM_NAME_PATH); + + assertEquals(1, repositoryService.createProcessDefinitionQuery().count()); + } + + // --Helper methods ---------------------------------------------------------- + + private void removeAllDeployments() { + for (Deployment deployment : repositoryService.createDeploymentQuery().list()) { + repositoryService.deleteDeployment(deployment.getId(), true); + } + } + +} \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/ProcessInitiatingPojo.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/ProcessInitiatingPojo.java new file mode 100644 index 0000000000000000000000000000000000000000..92aa708f4e6960e5b143baa22a83626fc8702c19 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/ProcessInitiatingPojo.java @@ -0,0 +1,80 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.components; + + +import java.util.logging.Logger; + +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.spring.annotations.BusinessKey; +import org.camunda.bpm.engine.spring.annotations.ProcessVariable; +import org.camunda.bpm.engine.spring.annotations.StartProcess; + +/** + * simple class that demonstrates the annotations to implicitly handle annotation-driven process managment + * + * @author Josh Long + * @since 5.3 + */ +public class ProcessInitiatingPojo { + + private Logger log = Logger.getLogger(getClass().getName()); + + private int methodState = 0; + + public void reset() { + this.methodState = 0; + } + + public void setCustomer(ScopedCustomer customer) { + this.customer = customer; + } + + private ScopedCustomer customer ; + + public void logScopedCustomer( ProcessInstance processInstance ){ + System.out.println( "ProcessInstance ID:" + processInstance.getId() +"; Name: " + this.customer.getName() ) ; + } + + @StartProcess(processKey = "b") + public void startProcess(@ProcessVariable("customerId") long customerId) { + log.info("starting 'b' with customerId # " + customerId); + this.methodState += 1; + log.info("up'd the method state"); + } + + public int getMethodState() { + return methodState; + } + + @StartProcess(processKey = "waiter", returnProcessInstanceId = true) + public String startProcessA(@ProcessVariable("customerId") long cId) { + return null; + } + + @StartProcess(processKey = "waiter") + public ProcessInstance enrollCustomer(@BusinessKey String key, @ProcessVariable("customerId") long customerId) { + return null; + } + + @StartProcess(processKey = "component-waiter") + public void startScopedProcess( @ProcessVariable("customerId") long customerId){ + log.info(" start scoped 'component-waiter' process.") ; + } + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/ProcessStartingBeanPostProcessorTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/ProcessStartingBeanPostProcessorTest.java new file mode 100644 index 0000000000000000000000000000000000000000..a9717b8dfc473508f4c778bf03de9f130ad72d7c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/ProcessStartingBeanPostProcessorTest.java @@ -0,0 +1,112 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.components; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import java.util.logging.Logger; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.repository.Deployment; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +/** + * @author Josh Long + */ +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration("classpath:org/camunda/bpm/engine/spring/test/components/ProcessStartingBeanPostProcessorTest-context.xml") +public class ProcessStartingBeanPostProcessorTest { + + private Logger log = Logger.getLogger(getClass().getName()); + + @Autowired + private ProcessEngine processEngine; + + @Autowired + private ProcessInitiatingPojo processInitiatingPojo; + + @Autowired + private RepositoryService repositoryService; + + @Before + public void before() { + repositoryService.createDeployment() + .addClasspathResource("org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.b.bpmn20.xml") + .addClasspathResource("org/camunda/bpm/engine/spring/test/components/waiter.bpmn20.xml") + .deploy(); + } + + @After + public void after() { + for (Deployment deployment : repositoryService.createDeploymentQuery().list()) { + repositoryService.deleteDeployment(deployment.getId(), true); + } + processEngine.close(); + processEngine = null; + processInitiatingPojo = null; + repositoryService = null; + } + + @Test + public void testReturnedProcessInstance() throws Throwable { + String processInstanceId = this.processInitiatingPojo.startProcessA(22); + assertNotNull("the process instance id should not be null", processInstanceId); + } + + @Test + public void testReflectingSideEffects() throws Throwable { + assertNotNull("the processInitiatingPojo mustn't be null.", this.processInitiatingPojo); + + this.processInitiatingPojo.reset(); + + assertEquals(this.processInitiatingPojo.getMethodState(), 0); + + this.processInitiatingPojo.startProcess(53); + + assertEquals(this.processInitiatingPojo.getMethodState(), 1); + } + + @Test + public void testUsingBusinessKey() throws Throwable { + long id = 5; + String businessKey = "usersKey" + System.currentTimeMillis(); + ProcessInstance pi = processInitiatingPojo.enrollCustomer(businessKey, id); + assertEquals("the business key of the resultant ProcessInstance should match " + + "the one specified through the AOP-intercepted method" ,businessKey, pi.getBusinessKey()); + + } + + @Test + public void testLaunchingProcessInstance() { + long id = 343; + String processInstance = processInitiatingPojo.startProcessA(id); + Long customerId = (Long) processEngine.getRuntimeService().getVariable(processInstance, "customerId"); + assertEquals("the process variable should both exist and be equal to the value given, " + id, customerId, (Long) id); + log.info("the customerId from the ProcessInstance is " + customerId); + assertNotNull("processInstanc can't be null", processInstance); + assertNotNull("the variable should be non-null", customerId); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/ScopedCustomer.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/ScopedCustomer.java new file mode 100644 index 0000000000000000000000000000000000000000..8f0cd0243e34bbd92fdfcee9daa2adef4b988e72 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/ScopedCustomer.java @@ -0,0 +1,48 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.components; + +import org.camunda.bpm.engine.spring.components.scope.ProcessScope; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; + +import java.io.Serializable; + + +@Scope(ProcessScope.PROCESS_SCOPE_NAME) +public class ScopedCustomer implements Serializable, InitializingBean{ + public ScopedCustomer() { + } + public ScopedCustomer(String name) { + this.name = name; + } + + private String name = Thread.currentThread().getId()+":" +System.currentTimeMillis(); + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public void afterPropertiesSet() throws Exception { + System.out.println("starting ..." + this.name) ; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/jobexecutor/ForcedRollbackExecutionListener.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/jobexecutor/ForcedRollbackExecutionListener.java new file mode 100644 index 0000000000000000000000000000000000000000..540af7031ec6306c6945a741be54db2f212385c4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/jobexecutor/ForcedRollbackExecutionListener.java @@ -0,0 +1,32 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.components.jobexecutor; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.ExecutionListener; + +/** + * + * @author Pablo Ganga + */ +public class ForcedRollbackExecutionListener implements ExecutionListener { + + public void notify(DelegateExecution delegateExecution) throws Exception { + throw new RuntimeException("Forcing transaction rollback"); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/jobexecutor/SpringJobExecutorTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/jobexecutor/SpringJobExecutorTest.java new file mode 100644 index 0000000000000000000000000000000000000000..fe976a06e8c21617ac2762508bfdb1bd6a8f24f7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/jobexecutor/SpringJobExecutorTest.java @@ -0,0 +1,66 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.components.jobexecutor; + +import java.util.List; + +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.spring.test.SpringProcessEngineTestCase; +import org.camunda.bpm.engine.task.Task; +import org.camunda.bpm.engine.test.Deployment; +import org.springframework.test.context.ContextConfiguration; + + +/** + * @author Pablo Ganga + */ +@ContextConfiguration("classpath:org/camunda/bpm/engine/spring/test/components/SpringjobExecutorTest-context.xml") +public class SpringJobExecutorTest extends SpringProcessEngineTestCase { + + @Deployment(resources={"org/camunda/bpm/engine/spring/test/components/SpringTimersProcess.bpmn20.xml", + "org/camunda/bpm/engine/spring/test/components/SpringJobExecutorRollBack.bpmn20.xml"}) + public void testHappyJobExecutorPath()throws Exception { + + ProcessInstance instance = runtimeService.startProcessInstanceByKey("process1"); + + assertNotNull(instance); + + waitForJobExecutorToProcessAllJobs(10000); + + List activeTasks = taskService.createTaskQuery().processInstanceId(instance.getId()).list(); + assertTrue(activeTasks.size() == 0); + } + + @Deployment(resources={"org/camunda/bpm/engine/spring/test/components/SpringTimersProcess.bpmn20.xml", + "org/camunda/bpm/engine/spring/test/components/SpringJobExecutorRollBack.bpmn20.xml"}) + public void testRollbackJobExecutorPath()throws Exception { + + // shutdown job executor first, otherwise waitForJobExecutorToProcessAllJobs will not actually start it.... + processEngineConfiguration.getJobExecutor().shutdown(); + + ProcessInstance instance = runtimeService.startProcessInstanceByKey("errorProcess1"); + + assertNotNull(instance); + + waitForJobExecutorToProcessAllJobs(10000); + + List activeTasks = taskService.createTaskQuery().processInstanceId(instance.getId()).list(); + assertTrue(activeTasks.size() == 1); + } + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/registry/ActivitiStateHandlerRegistrationTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/registry/ActivitiStateHandlerRegistrationTest.java new file mode 100644 index 0000000000000000000000000000000000000000..c808a3b00d97808dc7dd721c1460be7848a91a93 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/registry/ActivitiStateHandlerRegistrationTest.java @@ -0,0 +1,81 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.components.registry; + +import static org.junit.Assert.assertEquals; + +import java.lang.reflect.Method; +import java.util.Collections; +import java.util.Map; + +import org.camunda.bpm.engine.spring.components.registry.ActivitiStateHandlerRegistration; +import org.junit.Test; + +/** + * @author Tobias Metzke + * + */ +public class ActivitiStateHandlerRegistrationTest { + + @Test + public void shouldHaveDetailledStringRepresentation() throws Exception { + Map processVariablesExpected = Collections.singletonMap(34, "testValue"); + Method handlerMethod = this.getClass().getMethod("shouldHaveDetailledStringRepresentation"); + Object handler = new Object() { public Integer testValue; {testValue = 76; testValue++; }}; + String stateName = "running"; + String beanName = "testBean"; + int processVariablesIndex = 4; + int processIdIndex = 2; + String processName = "testProcess"; + ActivitiStateHandlerRegistration registration = new ActivitiStateHandlerRegistration(processVariablesExpected, + handlerMethod, handler, stateName, beanName, + processVariablesIndex, processIdIndex, processName); + assertEquals("org.camunda.bpm.engine.spring.components.registry.ActivitiStateHandlerRegistration@" + Integer.toHexString(registration.hashCode()) + "[" + + "processVariablesExpected={34=testValue}, " + + "handlerMethod=public void org.camunda.bpm.engine.spring.test.components.registry.ActivitiStateHandlerRegistrationTest.shouldHaveDetailledStringRepresentation() throws java.lang.Exception, " + + "handler=org.camunda.bpm.engine.spring.test.components.registry.ActivitiStateHandlerRegistrationTest$1@" + Integer.toHexString(handler.hashCode()) + ", " + + "stateName=running, " + + "beanName=testBean, " + + "processVariablesIndex=4, " + + "processIdIndex=2, " + + "processName=testProcess]", registration.toString()); + } + + @Test + public void shouldHaveDetailledStringRepresentationWithNullValues() throws Exception { + Map processVariablesExpected = Collections.singletonMap(34, "testValue"); + Method handlerMethod = null; + Object handler = null; + String stateName = "running"; + String beanName = "testBean"; + int processVariablesIndex = 4; + int processIdIndex = 2; + String processName = "testProcess"; + ActivitiStateHandlerRegistration registration = new ActivitiStateHandlerRegistration(processVariablesExpected, + handlerMethod, handler, stateName, beanName, + processVariablesIndex, processIdIndex, processName); + assertEquals("org.camunda.bpm.engine.spring.components.registry.ActivitiStateHandlerRegistration@" + Integer.toHexString(registration.hashCode()) + "[" + + "processVariablesExpected={34=testValue}, " + + "handlerMethod=null, " + + "handler=null, " + + "stateName=running, " + + "beanName=testBean, " + + "processVariablesIndex=4, " + + "processIdIndex=2, " + + "processName=testProcess]", registration.toString()); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/Delegate1.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/Delegate1.java new file mode 100644 index 0000000000000000000000000000000000000000..a0fb0f32cb6d50d1e98996cea1d9dfb16f0d7114 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/Delegate1.java @@ -0,0 +1,61 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.components.scope; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Assert; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; + +import java.util.UUID; +import java.util.logging.Logger; + +/** + * @author Josh Long + * @since 5,3 + */ + +public class Delegate1 implements JavaDelegate,InitializingBean { + + private Logger log = Logger.getLogger( getClass().getName()); + + @Autowired private ProcessInstance processInstance ; + + @Autowired private StatefulObject statefulObject; + + public void execute(DelegateExecution execution) throws Exception { + + String pid = this.processInstance.getId(); + + log.info("the processInstance#id is "+ pid) ; + + Assert.assertNotNull("the 'scopedCustomer' reference can't be null", statefulObject); + String uuid = UUID.randomUUID().toString(); + statefulObject.setName(uuid); + log.info("the 'uuid' value given to the ScopedCustomer#name property is '" + uuid + "' in " + getClass().getName()); + + this.statefulObject.increment(); + } + + public void afterPropertiesSet() throws Exception { + Assert.assertNotNull("the processInstance must not be null", this.processInstance) ; + + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/Delegate2.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/Delegate2.java new file mode 100644 index 0000000000000000000000000000000000000000..2dc95569e0480d76690570edea5242659ae9976a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/Delegate2.java @@ -0,0 +1,45 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.components.scope; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.junit.Assert; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.logging.Logger; + +/** + * @author Josh Long + * @since 5,3 + */ + +public class Delegate2 implements JavaDelegate { + + private Logger log = Logger.getLogger( getClass().getName()); + + @Autowired private StatefulObject statefulObject; + + public void execute(DelegateExecution execution) throws Exception { + + this.statefulObject.increment(); + + Assert.assertNotNull( "the 'scopedCustomer' reference can't be null", this.statefulObject); + Assert.assertNotNull( "the 'scopedCustomer.name' property should be non-null, since it was set in a previous delegate bound to this very thread", this.statefulObject.getName() ); + log.info( "the 'uuid' value retrieved from the ScopedCustomer#name property is '" + this.statefulObject.getName()+ "' in "+getClass().getName()); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/ProcessScopeTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/ProcessScopeTest.java new file mode 100644 index 0000000000000000000000000000000000000000..830ddedcf3cb38ae3606a9c6dabe81f8b80fad74 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/ProcessScopeTest.java @@ -0,0 +1,65 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.components.scope; + +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.logging.Handler; +import java.util.logging.Logger; +import java.util.logging.SimpleFormatter; +import java.util.logging.StreamHandler; + +import org.camunda.bpm.engine.spring.components.scope.ProcessScope; +import org.junit.Test; + +/** + * @author Tobias Metzke + * + */ +public class ProcessScopeTest { + + @Test + public void shouldLogExceptionStacktrace() throws IOException { + Logger logger = Logger.getLogger(ProcessScope.class.getName()); + try (ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Handler handler = new StreamHandler(out, new SimpleFormatter()); + logger.addHandler(handler); + try { + ProcessScope scope = new ProcessScope(); + Object variable = scope.get("testObject", null); + assertNull(variable); + } finally { + handler.flush(); + handler.close(); + logger.removeHandler(handler); + } + // test for logged exception + String message = new String(out.toByteArray(), StandardCharsets.UTF_8); + assertTrue(!message.isEmpty()); + assertTrue(message.contains("org.camunda.bpm.engine.spring.components.scope.ProcessScope get")); + assertTrue(message.contains("couldn't return value from process scope! java.lang.NullPointerException")); + assertTrue(message.contains("at org.camunda.bpm.engine.spring.components.scope.ProcessScope.getExecutionId(ProcessScope.java:")); + assertTrue(message.contains("at org.camunda.bpm.engine.spring.components.scope.ProcessScope.getConversationId(ProcessScope.java:")); + assertTrue(message.contains("at org.camunda.bpm.engine.spring.components.scope.ProcessScope.get(ProcessScope.java:")); + assertTrue(message.contains("at org.camunda.bpm.engine.spring.test.components.scope.ProcessScopeTest.shouldLogExceptionStacktrace(ProcessScopeTest.java:")); + } + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/ScopingTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/ScopingTest.java new file mode 100644 index 0000000000000000000000000000000000000000..4397d70db4d0989df390e0b744b21d0158d4d531 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/ScopingTest.java @@ -0,0 +1,147 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.components.scope; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.TaskService; +import org.camunda.bpm.engine.repository.Deployment; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.spring.test.components.ProcessInitiatingPojo; +import org.camunda.bpm.engine.task.Task; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.util.StringUtils; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.logging.Logger; + +/** + * tests the scoped beans + * + * @author Josh Long + */ +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration("classpath:org/camunda/bpm/engine/spring/test/components/ScopingTests-context.xml") +public class ScopingTest { + + @Autowired + private ProcessInitiatingPojo processInitiatingPojo; + + private Logger logger = Logger.getLogger(getClass().getName()); + + @Autowired + private ProcessEngine processEngine; + + private RepositoryService repositoryService; + private TaskService taskService; + + @Before + public void before() throws Throwable { + this.repositoryService = this.processEngine.getRepositoryService(); + this.taskService = this.processEngine.getTaskService(); + + repositoryService.createDeployment() + .addClasspathResource("org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.b.bpmn20.xml") + .addClasspathResource("org/camunda/bpm/engine/spring/test/components/waiter.bpmn20.xml") + .addClasspathResource("org/camunda/bpm/engine/spring/test/components/spring-component-waiter.bpmn20.xml") + .deploy(); + } + + @After + public void after() { + for (Deployment deployment : repositoryService.createDeploymentQuery().list()) { + repositoryService.deleteDeployment(deployment.getId(), true); + } + processEngine.close(); + processEngine = null; + repositoryService = null; + taskService = null; + processInitiatingPojo = null; + } + + static public long CUSTOMER_ID_PROC_VAR_VALUE = 343; + + static public String customerIdProcVarName = "customerId"; + + /** + * this code instantiates a business process that in turn delegates to a few Spring beans that in turn inject a process scoped object, {@link StatefulObject}. + * + * @return the StatefulObject that was injected across different components, that all share the same state. + * @throws Throwable if anythign goes wrong + */ + private StatefulObject run() throws Throwable { + logger.info("----------------------------------------------"); + Map vars = new HashMap(); + vars.put(customerIdProcVarName, CUSTOMER_ID_PROC_VAR_VALUE); + ProcessInstance processInstance = processEngine.getRuntimeService().startProcessInstanceByKey("component-waiter", vars); + StatefulObject scopedObject = (StatefulObject) processEngine.getRuntimeService().getVariable(processInstance.getId(), "scopedTarget.c1"); + Assert.assertNotNull("the scopedObject can't be null", scopedObject); + Assert.assertTrue("the 'name' property can't be null.", StringUtils.hasText(scopedObject.getName())); + Assert.assertEquals(scopedObject.getVisitedCount(), 2); + + // the process has paused + String procId = processInstance.getProcessInstanceId(); + + List tasks = taskService.createTaskQuery().executionId(procId).list(); + + Assert.assertEquals("there should be 1 (one) task enqueued at this point.", tasks.size(), 1); + + Task t = tasks.iterator().next(); + + this.taskService.claim(t.getId(), "me"); + + logger.info("sleeping for 10 seconds while a user performs his task. " + + "The first transaction has committed. A new one will start in 10 seconds"); + + Thread.sleep(1000 * 5); + + this.taskService.complete(t.getId()); + + scopedObject = (StatefulObject) processEngine.getRuntimeService().getVariable(processInstance.getId(), "scopedTarget.c1"); + Assert.assertEquals(scopedObject.getVisitedCount(), 3); + + Assert.assertEquals( "the customerId injected should " + + "be what was given as a processVariable parameter." , + ScopingTest.CUSTOMER_ID_PROC_VAR_VALUE, scopedObject.getCustomerId()) ; + return scopedObject; + } + + @Test + public void testUsingAnInjectedScopedProxy() throws Throwable { + logger.info("Running 'component-waiter' process instance with scoped beans."); + StatefulObject one = run(); + StatefulObject two = run(); + Assert.assertNotSame(one.getName(), two.getName()); + Assert.assertEquals(one.getVisitedCount(), two.getVisitedCount()); + } + + @Test + public void testStartingAProcessWithScopedBeans() throws Throwable { + this.processInitiatingPojo.startScopedProcess(3243); + } + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/StatefulObject.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/StatefulObject.java new file mode 100644 index 0000000000000000000000000000000000000000..52d1e08cac6d0c1e7c97b2e6b6cb5e78bfd08b4a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/components/scope/StatefulObject.java @@ -0,0 +1,112 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.components.scope; + +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.util.Assert; + +import java.io.Serializable; +import java.util.logging.Logger; + +/** + * dumb object to demonstrate holding scoped state for the duration of a business process + * + * @author Josh Long + */ +public class StatefulObject implements Serializable,InitializingBean { + + private transient Logger logger = Logger.getLogger(getClass().getName()); + + public static final long serialVersionUID = 1L; + + private String name; + private int visitedCount = 0; + + private long customerId; + + public long getCustomerId() { + return customerId; + } + + @Value("#{processInstance}") transient ProcessInstance processInstance ; + + @Value("#{executionId}") String executionId; + + @Value("#{processVariables['customerId']}") + public void setCustomerId(long customerId) { + + this.customerId = customerId; + + logger.info("setting this " + StatefulObject.class.getName() + " instances 'customerId' to " + + this.customerId +". The current executionId is "+ this.executionId); + + } + + public StatefulObject() { + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + StatefulObject that = (StatefulObject) o; + + if (visitedCount != that.visitedCount) return false; + if (name != null ? !name.equals(that.name) : that.name != null) return false; + + return true; + } + + @Override + public int hashCode() { + int result = name != null ? name.hashCode() : 0; + result = 31 * result + visitedCount; + return result; + } + + @Override + public String toString() { + return "StatefulObject{" + + "name='" + name + '\'' + + ", visitedCount=" + visitedCount + + '}'; + } + + public void increment() { + this.visitedCount += 1; + } + + public int getVisitedCount() { + return this.visitedCount; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public void afterPropertiesSet() throws Exception { + Assert.notNull(this.processInstance, "the processInstance should be equal to the currently active processInstance!"); + logger.info("the 'processInstance' property is non-null: PI ID# "+ this.processInstance.getId()); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/Counter.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/Counter.java new file mode 100644 index 0000000000000000000000000000000000000000..f594a0f565cc9351742d48af0b8fef8ffe58db47 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/Counter.java @@ -0,0 +1,36 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.configuration; + +import java.util.concurrent.atomic.AtomicInteger; + +import org.springframework.stereotype.Component; + +@Component +public class Counter { + + private AtomicInteger counter = new AtomicInteger(0); + + public int getCount() { + return counter.get(); + } + + public void increment() { + counter.getAndIncrement(); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/InMemProcessEngineConfiguration.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/InMemProcessEngineConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..83d0456e1b5603fe2f54babf2238f1d79eff22e1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/InMemProcessEngineConfiguration.java @@ -0,0 +1,78 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.configuration; + +import javax.sql.DataSource; + +import org.camunda.bpm.engine.spring.ProcessEngineFactoryBean; +import org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.jdbc.datasource.DataSourceTransactionManager; +import org.springframework.jdbc.datasource.SimpleDriverDataSource; +import org.springframework.transaction.PlatformTransactionManager; + +/** + * Base Java Config for the process engine that uses In-Memory database. + * + * @author Philipp Ossler + */ +@Configuration +@ComponentScan("org.camunda.bpm.engine.spring.test.configuration") +public class InMemProcessEngineConfiguration { + + @Bean + public DataSource dataSource() { + SimpleDriverDataSource dataSource = new SimpleDriverDataSource(); + dataSource.setDriverClass(org.h2.Driver.class); + dataSource.setUrl("jdbc:h2:mem:camunda-test;DB_CLOSE_DELAY=-1"); + dataSource.setUsername("sa"); + dataSource.setPassword(""); + return dataSource; + } + + @Bean + public PlatformTransactionManager transactionManager() { + return new DataSourceTransactionManager(dataSource()); + } + + @Bean + public SpringProcessEngineConfiguration processEngineConfiguration() { + SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration(); + + config.setDataSource(dataSource()); + config.setDatabaseSchemaUpdate("true"); + + config.setTransactionManager(transactionManager()); + + config.setHistory("audit"); + config.setJobExecutorActivate(false); + config.setDbMetricsReporterActivate(false); + config.setEnforceHistoryTimeToLive(false); + + return config; + } + + @Bean + public ProcessEngineFactoryBean processEngine() { + ProcessEngineFactoryBean factoryBean = new ProcessEngineFactoryBean(); + factoryBean.setProcessEngineConfiguration(processEngineConfiguration()); + return factoryBean; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/IncrementBean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/IncrementBean.java new file mode 100644 index 0000000000000000000000000000000000000000..21737a9179f76ce75da0f74b852c91240a06c746 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/IncrementBean.java @@ -0,0 +1,32 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.configuration; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class IncrementBean { + + @Autowired + private Counter counter; + + public void increment() { + counter.increment(); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/IncrementTask.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/IncrementTask.java new file mode 100644 index 0000000000000000000000000000000000000000..06adf76ea3d14d47e11d5cf9a37b58c582230540 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/IncrementTask.java @@ -0,0 +1,34 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.configuration; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class IncrementTask implements JavaDelegate { + + @Autowired + private Counter counter; + + @Override + public void execute(DelegateExecution execution) throws Exception { + counter.increment(); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/JavaBasedProcessEngineConfigTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/JavaBasedProcessEngineConfigTest.java new file mode 100644 index 0000000000000000000000000000000000000000..66058fb87e556e8f8dcdf6b3055b0dc9e6e5d570 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/JavaBasedProcessEngineConfigTest.java @@ -0,0 +1,63 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.configuration; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.spring.SpringProcessEngineServicesConfiguration; +import org.camunda.bpm.engine.spring.test.SpringProcessEngineTestCase; +import org.camunda.bpm.engine.test.Deployment; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; + +/** + * @author Philipp Ossler + */ +@ContextConfiguration(classes = { InMemProcessEngineConfiguration.class, SpringProcessEngineServicesConfiguration.class }) +public class JavaBasedProcessEngineConfigTest extends SpringProcessEngineTestCase { + + @Autowired + private Counter couter; + + @Autowired + protected RuntimeService runtimeService; + + @Deployment + public void testDelegateExpression() { + runtimeService.startProcessInstanceByKey("SpringProcess"); + + assertThat(couter.getCount(), is(1)); + } + + @Deployment + public void testExpression() { + runtimeService.startProcessInstanceByKey("SpringProcess"); + + assertThat(couter.getCount(), is(1)); + } + + @Deployment + public void testDelegateExpressionWithProcessServices() { + String processInstanceId = runtimeService.startProcessInstanceByKey("SpringProcess").getId(); + + assertThat(couter.getCount(), is(1)); + assertThat((Integer) runtimeService.getVariable(processInstanceId, "count"), is(1)); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/SetCounterVariableTask.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/SetCounterVariableTask.java new file mode 100644 index 0000000000000000000000000000000000000000..e027800ab92818ff3dac757b56e378b43ceb6533 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/SetCounterVariableTask.java @@ -0,0 +1,41 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.configuration; + +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class SetCounterVariableTask implements JavaDelegate { + + @Autowired + private RuntimeService runtimeService; + + @Autowired + private Counter counter; + + @Override + public void execute(DelegateExecution execution) throws Exception { + int count = counter.getCount(); + + runtimeService.setVariable(execution.getId(), "count", count); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/SpringProcessEngineInitializationTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/SpringProcessEngineInitializationTest.java new file mode 100644 index 0000000000000000000000000000000000000000..edfb55d106f83f847701e4152fbc538b7e3891de --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/configuration/SpringProcessEngineInitializationTest.java @@ -0,0 +1,55 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.configuration; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.net.URL; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.ProcessEngines; +import org.camunda.bpm.engine.impl.util.ReflectUtil; +import org.junit.After; +import org.junit.Test; + +public class SpringProcessEngineInitializationTest { + + @After + public void tearDown() { + ProcessEngines.destroy(); + } + + @Test + public void shouldInitializeProcessEngineFromActivitiContext() { + // given + existActivitiContext(); + // when + ProcessEngine processEngine = ProcessEngines.getProcessEngine("activitiContextProcessName"); + // then + assertThat(processEngine).isNotNull(); + assertThat(processEngine.getName()).isEqualTo("activitiContextProcessName"); + } + + private URL existActivitiContext() { + URL resource = ReflectUtil.getClassLoader().getResource("activiti-context.xml"); + assertThat(resource) + .withFailMessage("activiti-context.xml not found on the classpath: " + System.getProperty("java.class.path")) + .isNotNull(); + return resource; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/container/ManagedProcessEngineFactoryBeanTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/container/ManagedProcessEngineFactoryBeanTest.java new file mode 100644 index 0000000000000000000000000000000000000000..db1616976f24f140fb51650b29eede06527122b1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/container/ManagedProcessEngineFactoryBeanTest.java @@ -0,0 +1,57 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.container; + +import org.camunda.bpm.BpmPlatform; +import org.camunda.bpm.engine.spring.container.ManagedProcessEngineFactoryBean; +import org.junit.Assert; +import org.junit.Test; +import org.springframework.context.support.AbstractApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +/** + *

Testcase for {@link ManagedProcessEngineFactoryBean}

+ * + * @author Daniel Meyer + * + */ +public class ManagedProcessEngineFactoryBeanTest { + + @Test + public void testProcessApplicationDeployment() { + + // initially, no process engine is registered: + Assert.assertNull(BpmPlatform.getDefaultProcessEngine()); + Assert.assertEquals(0, BpmPlatform.getProcessEngineService().getProcessEngines().size()); + + // start spring application context + AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/camunda/bpm/engine/spring/test/container/ManagedProcessEngineFactoryBean-context.xml"); + applicationContext.start(); + + // assert that now the process engine is registered: + Assert.assertNotNull(BpmPlatform.getDefaultProcessEngine()); + + // close the spring application context + applicationContext.close(); + + // after closing the application context, the process engine is gone + Assert.assertNull(BpmPlatform.getDefaultProcessEngine()); + Assert.assertEquals(0, BpmPlatform.getProcessEngineService().getProcessEngines().size()); + + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/dmn/DmnJuelTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/dmn/DmnJuelTest.java new file mode 100644 index 0000000000000000000000000000000000000000..cc3f59adfa15813cf6d1857de9861017b9a80bb0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/dmn/DmnJuelTest.java @@ -0,0 +1,70 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.dmn; + +import org.camunda.bpm.dmn.engine.DmnDecisionResult; +import org.camunda.bpm.engine.DecisionService; +import org.camunda.bpm.engine.RepositoryService; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import static org.assertj.core.api.Assertions.assertThat; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { + "classpath:org/camunda/bpm/engine/spring/test/dmn/DmnJuelTest-applicationContext.xml" }) +public class DmnJuelTest { + + @Autowired + protected RepositoryService repositoryService; + + @Autowired + protected DecisionService decisionService; + + protected String deploymentId; + + @Before + public void deploy() { + deploymentId = repositoryService.createDeployment() + .addClasspathResource("org/camunda/bpm/engine/spring/test/dmn/JuelTest.dmn") + .deploy() + .getId(); + } + + @After + public void clean() { + repositoryService.deleteDeployment(deploymentId, true); + } + + @Test + public void shouldResolveBean() { + // given + + // when + DmnDecisionResult result = decisionService.evaluateDecisionByKey("drg-with-bean-expression") + .evaluate(); + + // then + assertThat((String)result.getSingleEntry()).isEqualTo("bar"); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/dmn/Testbean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/dmn/Testbean.java new file mode 100644 index 0000000000000000000000000000000000000000..8dcb0aebe2532c3b4aed38cbfbb9a7733a907232 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/dmn/Testbean.java @@ -0,0 +1,30 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.dmn; + +import org.springframework.stereotype.Component; + +@Component +public class Testbean { + + protected String bar = "baz"; + + public String getBar() { + return bar; + } + +} \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/expression/SpringLimitedExpressionsTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/expression/SpringLimitedExpressionsTest.java new file mode 100644 index 0000000000000000000000000000000000000000..3c594e6f7207beb3447c1385cc381341ac4a7a55 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/expression/SpringLimitedExpressionsTest.java @@ -0,0 +1,56 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.expression; + +import org.camunda.bpm.engine.ProcessEngineException; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.spring.test.SpringProcessEngineTestCase; +import org.camunda.bpm.engine.task.Task; +import org.camunda.bpm.engine.test.Deployment; +import org.springframework.test.context.ContextConfiguration; + + +/** + * Test limiting the exposed beans in expressions. + * + * @author Frederik Heremans + */ +@ContextConfiguration("classpath:org/camunda/bpm/engine/spring/test/expression/expressionLimitedBeans-context.xml") +public class SpringLimitedExpressionsTest extends SpringProcessEngineTestCase { + + @Deployment + public void testLimitedBeansExposed() throws Exception { + // Start process, which has a service-task which calls 'bean1', which is exposed + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("limitedExpressionProcess"); + + String beanOutput = (String) runtimeService.getVariable(processInstance.getId(), "beanOutput"); + assertNotNull(beanOutput); + assertEquals("Activiti BPMN 2.0 process engine", beanOutput); + + // Finish the task, should continue to serviceTask which uses a bean that is present + // in application-context, but not exposed explicitly in "beans", should throw error! + Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); + assertNotNull(task); + + try { + taskService.complete(task.getId()); + fail("Exception should have been thrown"); + } catch(ProcessEngineException ae) { + assertTextPresent("Unknown property used in expression", ae.getMessage()); + } + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/expression/callactivity/CallActivityBasedOnSpringBeansExpressionTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/expression/callactivity/CallActivityBasedOnSpringBeansExpressionTest.java new file mode 100644 index 0000000000000000000000000000000000000000..d460dc1c1ee1f82f5a98d87cd05946cc8b590d0e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/expression/callactivity/CallActivityBasedOnSpringBeansExpressionTest.java @@ -0,0 +1,64 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.expression.callactivity; + +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.spring.test.SpringProcessEngineTestCase; +import org.camunda.bpm.engine.task.Task; +import org.camunda.bpm.engine.task.TaskQuery; +import org.camunda.bpm.engine.test.Deployment; +import org.springframework.test.context.ContextConfiguration; + +/** + * The CallActivityBasedOnSpringBeansExpressionTest is used to test dynamically wiring in the calledElement + * in the callActivity task. This test case helps verify that we do not have to hard code the sub process + * definition key within the process. + * + * @author Sang Venkatraman + */ +@ContextConfiguration("classpath:org/camunda/bpm/engine/spring/test/expression/callactivity/testCallActivityByExpression-context.xml") +public class CallActivityBasedOnSpringBeansExpressionTest extends SpringProcessEngineTestCase { + + @Deployment(resources = { + "org/camunda/bpm/engine/spring/test/expression/callactivity/CallActivityBasedOnSpringBeansExpressionTest.testCallActivityByExpression.bpmn20.xml", + "org/camunda/bpm/engine/spring/test/expression/callactivity/simpleSubProcess.bpmn20.xml" }) + public void testCallActivityByExpression() throws Exception { + // Start process (main) + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testCallActivityByExpression"); + + // one task in the subprocess should be active after starting the process instance + TaskQuery taskQuery = taskService.createTaskQuery(); + Task taskBeforeSubProcess = taskQuery.singleResult(); + assertEquals("Task before subprocess", taskBeforeSubProcess.getName()); + + // Completing the task continues the process which leads to calling the subprocess. The sub process we want to + // call is passed in as a variable into this task + taskService.complete(taskBeforeSubProcess.getId()); + Task taskInSubProcess = taskQuery.singleResult(); + assertEquals("Task in subprocess", taskInSubProcess.getName()); + + // Completing the task in the subprocess, finishes the subprocess + taskService.complete(taskInSubProcess.getId()); + Task taskAfterSubProcess = taskQuery.singleResult(); + assertEquals("Task after subprocess", taskAfterSubProcess.getName()); + + // Completing this task end the process instance + taskService.complete(taskAfterSubProcess.getId()); + assertProcessEnded(processInstance.getId()); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/expression/callactivity/NextProcessExecutionEvaluator.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/expression/callactivity/NextProcessExecutionEvaluator.java new file mode 100644 index 0000000000000000000000000000000000000000..1af039eb7237ba5097ef9f1c091542b44ff0eaa4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/expression/callactivity/NextProcessExecutionEvaluator.java @@ -0,0 +1,34 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.expression.callactivity; + +/** + * The NextProcessExecutionEvaluator class provides the name of the sub process to be executed next. This allows + * us to test dynamically wire in the calledElement in the callActivity task. In an actual implementation there would + * be business logic here to determine which process to execute in the callActivity task. + * + * @author Sang Venkatraman + * + */ +public class NextProcessExecutionEvaluator { + + public String returnProcessDefinitionToCall() { + //some business logic here + return "simpleSubProcess"; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/junit4/SpringJunit4Test.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/junit4/SpringJunit4Test.java new file mode 100644 index 0000000000000000000000000000000000000000..88ca26b802787b65f9b69f39913cd9aa55e94678 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/junit4/SpringJunit4Test.java @@ -0,0 +1,78 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.junit4; + +import static org.junit.Assert.assertEquals; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.TaskService; +import org.camunda.bpm.engine.task.Task; +import org.camunda.bpm.engine.test.ProcessEngineRule; +import org.camunda.bpm.engine.test.Deployment; +import org.junit.After; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + + +/** + * @author Joram Barrez + */ +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration("classpath:org/camunda/bpm/engine/spring/test/junit4/springTypicalUsageTest-context.xml") +public class SpringJunit4Test { + + @Autowired + private ProcessEngine processEngine; + + @Autowired + private RuntimeService runtimeService; + + @Autowired + private TaskService taskService; + + @Autowired + @Rule + public ProcessEngineRule activitiSpringRule; + + @After + public void closeProcessEngine() { + // Required, since all the other tests seem to do a specific drop on the end + processEngine.close(); + processEngine = null; + runtimeService = null; + taskService = null; + activitiSpringRule = null; + } + + @Test + @Deployment + public void simpleProcessTest() { + runtimeService.startProcessInstanceByKey("simpleProcess"); + Task task = taskService.createTaskQuery().singleResult(); + assertEquals("My Task", task.getName()); + + taskService.complete(task.getId()); + assertEquals(0, runtimeService.createProcessInstanceQuery().count()); + + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/plugin/SpringProcessEnginePluginTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/plugin/SpringProcessEnginePluginTest.java new file mode 100644 index 0000000000000000000000000000000000000000..aa36ec4b51395b8b911a6938bde52e6df2870161 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/plugin/SpringProcessEnginePluginTest.java @@ -0,0 +1,47 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.plugin; + +import org.camunda.bpm.engine.spring.SpringProcessEnginePlugin; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = SpringProcessEnginePluginTest.TestConfig.class) +public class SpringProcessEnginePluginTest { + + public static class TestConfig { + + @Bean + public SpringProcessEnginePlugin theBeanName() { + return new SpringProcessEnginePlugin(){}; + } + } + + @Autowired + private SpringProcessEnginePlugin plugin; + + @Test + public void verifyToString() throws Exception { + Assert.assertEquals(plugin.toString(), "theBeanName"); + } +} \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/AbstractScriptTaskTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/AbstractScriptTaskTest.java new file mode 100644 index 0000000000000000000000000000000000000000..d3d93824dc10350db022ec5864f00980bae3fbc3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/AbstractScriptTaskTest.java @@ -0,0 +1,122 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.scripttask; + +import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +import java.util.ArrayList; +import java.util.List; + +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.ScriptEvaluationException; +import org.camunda.bpm.engine.repository.Deployment; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.model.bpmn.Bpmn; +import org.camunda.bpm.model.bpmn.BpmnModelInstance; +import org.junit.After; +import org.springframework.beans.factory.annotation.Autowired; + +public abstract class AbstractScriptTaskTest { + + @Autowired + private RuntimeService runtimeService; + + @Autowired + private RepositoryService repositoryService; + + private static final String TEST_BEAN_NAME = "name property of testbean"; + + private List deploymentIds = new ArrayList<>(); + + @After + public void after() { + for (String deploymentId : deploymentIds) { + repositoryService.deleteDeployment(deploymentId, true); + } + } + + protected void deployProcess(BpmnModelInstance process) { + Deployment deployment = repositoryService.createDeployment().addModelInstance("testProcess.bpmn", process).deploy(); + deploymentIds.add(deployment.getId()); + } + + protected void deployProcess(String scriptFormat, String scriptText) { + BpmnModelInstance process = createProcess(scriptFormat, scriptText); + deployProcess(process); + } + + protected BpmnModelInstance createProcess(String scriptFormat, String scriptText) { + return Bpmn.createExecutableProcess("testProcess") + .startEvent() + .scriptTask() + .scriptFormat(scriptFormat) + .scriptText(scriptText).userTask().endEvent().done(); + } + + /** + * Test if a Spring bean is visible for scripting for the scripftormat + * + * @param scriptFormat + * the scriptformat like 'javascript', 'groovy', etc. + * @param scriptText + * sets execution variable 'foo' to the testbean's name property + */ + protected void testSpringBeanVisibility(String scriptFormat, String scriptText) { + testSpringBeanVisibility(scriptFormat, scriptText, true); + } + + protected void testSpringBeanVisibility(String scriptFormat, String scriptText, boolean visible) { + + // GIVEN + // execution variable 'foo' is set the testbean's name property (by the + // scriptText code) + deployProcess(scriptFormat, scriptText); + + // WHEN + // we start an instance of this process + ProcessInstance pi = runtimeService.startProcessInstanceByKey("testProcess"); + + // THEN + // the script task can be executed without exceptions + // the execution variable is stored and has the correct value + Object variableValue = runtimeService.getVariable(pi.getId(), "foo"); + if (visible) { + assertEquals(TEST_BEAN_NAME, variableValue); + } else { + assertNull(variableValue); + } + } + + protected void testNoSpringBean(String scriptFormat, String scriptText) { + // GIVEN + // accessing a bean that cannot be resolved in a script + deployProcess(scriptFormat, scriptText); + + // THEN + // an exception is thrown + assertThatThrownBy(() -> { + // WHEN + // we start an instance of this process + runtimeService.startProcessInstanceByKey("testProcess");}) + .isInstanceOf(ScriptEvaluationException.class) + .hasMessageContaining("testbean"); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskGraalJsTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskGraalJsTest.java new file mode 100644 index 0000000000000000000000000000000000000000..e51f44d2b53ec5008146b9510addd21e38f02b81 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskGraalJsTest.java @@ -0,0 +1,41 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.scripttask; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { + "classpath:org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskTest-applicationContext.xml" }) +public class ScriptTaskGraalJsTest extends AbstractScriptTaskTest { + + private static final String GRAALJS = "graal.js"; + + @Test + public void shouldFindPublicSpringBeanMethodWithJavascriptGraalJs() { + testSpringBeanVisibility(GRAALJS, "execution.setVariable('foo', testbean.getName());"); + } + + @Test + public void shouldNotFindPrivateSpringBeanAttributeWithJavascriptGraalJs() { + testSpringBeanVisibility(GRAALJS, "execution.setVariable('foo', testbean.name);", false); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskLimitedBeansTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskLimitedBeansTest.java new file mode 100644 index 0000000000000000000000000000000000000000..3fa198ddddeca1244cd92d9d1c7aa8fc773b5ae5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskLimitedBeansTest.java @@ -0,0 +1,53 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.scripttask; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { + "classpath:org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskLimitedBeansTest-applicationContext.xml" }) +public class ScriptTaskLimitedBeansTest extends AbstractScriptTaskTest { + + private static final String JAVASCRIPT = "javascript"; + private static final String PYTHON = "python"; + private static final String GROOVY = "groovy"; + private static final String JUEL = "juel"; + + @Test + public void shouldNotFindGeneralSpringBeanWithJavascript() { + testSpringBeanVisibility(JAVASCRIPT, "execution.setVariable('foo', testbean.getName());", false); + } + + @Test + public void shouldNotFindGeneralSpringBeanWithPython() { + testSpringBeanVisibility(PYTHON, "execution.setVariable('foo', testbean.getName())", false); + } + + @Test + public void shouldNotFindGeneralSpringBeanWithGroovy() { + testSpringBeanVisibility(GROOVY, "execution.setVariable('foo', testbean.getName())", false); + } + + @Test + public void shouldNotFindGeneralSpringBeanWithJuel() { + testSpringBeanVisibility(JUEL, "${execution.setVariable('foo', testbean.getName())}", false); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskNashornTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskNashornTest.java new file mode 100644 index 0000000000000000000000000000000000000000..7ac210f083189a079462eb2c19a4f25611ee2a77 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskNashornTest.java @@ -0,0 +1,41 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.scripttask; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { + "classpath:org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskTest-applicationContext.xml" }) +public class ScriptTaskNashornTest extends AbstractScriptTaskTest { + + private static final String NASHORN = "nashorn"; + + @Test + public void shouldFindPublicSpringBeanMethodWithJavascriptNashorn() { + testSpringBeanVisibility(NASHORN, "execution.setVariable('foo', testbean.getName());"); + } + + @Test + public void shouldFindPrivateSpringBeanAttributeWithJavascriptNashorn() { + testSpringBeanVisibility(NASHORN, "execution.setVariable('foo', testbean.name);"); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskNoBeansTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskNoBeansTest.java new file mode 100644 index 0000000000000000000000000000000000000000..5d4ca09177ceea7b87af8cc2a71e36640d0e2808 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskNoBeansTest.java @@ -0,0 +1,53 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.scripttask; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { + "classpath:org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskNoBeansTest-applicationContext.xml" }) +public class ScriptTaskNoBeansTest extends AbstractScriptTaskTest { + + private static final String JAVASCRIPT = "javascript"; + private static final String PYTHON = "python"; + private static final String GROOVY = "groovy"; + private static final String JUEL = "juel"; + + @Test + public void shouldNotFindGeneralSpringBeanWithJavascript() { + testNoSpringBean(JAVASCRIPT, "execution.setVariable('foo', testbean.getName());"); + } + + @Test + public void shouldNotFindGeneralSpringBeanWithPython() { + testNoSpringBean(PYTHON, "execution.setVariable('foo', testbean.getName())"); + } + + @Test + public void shouldNotFindGeneralSpringBeanWithGroovy() { + testNoSpringBean(GROOVY, "execution.setVariable('foo', testbean.getName())"); + } + + @Test + public void shouldNotFindGeneralSpringBeanWithJuel() { + testNoSpringBean(JUEL, "${execution.setVariable('foo', testbean.getName())}"); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskTest.java new file mode 100644 index 0000000000000000000000000000000000000000..144198fef94832afdcd39a05b8ca35cbec32dd11 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskTest.java @@ -0,0 +1,73 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.scripttask; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { + "classpath:org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskTest-applicationContext.xml" }) +public class ScriptTaskTest extends AbstractScriptTaskTest { + + private static final String JAVASCRIPT = "javascript"; + private static final String PYTHON = "python"; + private static final String GROOVY = "groovy"; + private static final String JUEL = "juel"; + + @Test + public void shouldFindPublicSpringBeanMethodWithJavascriptGraalJs() { + testSpringBeanVisibility(JAVASCRIPT, "execution.setVariable('foo', testbean.getName());"); + } + + @Test + public void shouldFindPublicSpringBeanMethodWithGroovy() { + testSpringBeanVisibility(GROOVY, "execution.setVariable('foo', testbean.getName())\n"); + } + + @Test + public void shouldFindPublicSpringBeanMethodWithPython() { + testSpringBeanVisibility(PYTHON, "execution.setVariable('foo', testbean.getName())\n"); + } + + @Test + public void shouldFindPublicSpringBeanMethodWithJuel() { + testSpringBeanVisibility(JUEL, "${execution.setVariable('foo', testbean.getName())}"); + } + + @Test + public void shouldNotFindPrivateSpringBeanAttributeWithJavascriptGraalJs() { + testSpringBeanVisibility(JAVASCRIPT, "execution.setVariable('foo', testbean.name);", false); + } + + @Test + public void shouldFindPrivateSpringBeanAttributeWithWithGroovy() { + testSpringBeanVisibility(GROOVY, "execution.setVariable('foo', testbean.name)\n"); + } + + @Test + public void shouldFindPrivateSpringBeanAttributeWithPython() { + testSpringBeanVisibility(PYTHON, "execution.setVariable('foo', testbean.name)\n"); + } + + @Test + public void shouldFindPrivateSpringBeanAttributeWithJuel() { + testSpringBeanVisibility(JUEL, "${execution.setVariable('foo', testbean.name)}"); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/Testbean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/Testbean.java new file mode 100644 index 0000000000000000000000000000000000000000..33267311bc6cf4fce0ca19f5e85df1ad349f6ef0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/Testbean.java @@ -0,0 +1,28 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.scripttask; + +import org.springframework.stereotype.Component; + +@Component +public class Testbean { + private String name = "name property of testbean"; + + public String getName() { + return name; + } +} \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/TestbeanNoName.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/TestbeanNoName.java new file mode 100644 index 0000000000000000000000000000000000000000..7f6aaa624f34bac88dc5acf01383af345e1fe8e4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/scripttask/TestbeanNoName.java @@ -0,0 +1,28 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.scripttask; + +import org.springframework.stereotype.Component; + +@Component +public class TestbeanNoName { + private String name = null; + + public String getName() { + return name; + } +} \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/BoundaryErrorEventSpringTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/BoundaryErrorEventSpringTest.java new file mode 100644 index 0000000000000000000000000000000000000000..edb740e5745ee4a6419357ad316658dcde48250c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/BoundaryErrorEventSpringTest.java @@ -0,0 +1,49 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.servicetask; + +import org.camunda.bpm.engine.spring.test.SpringProcessEngineTestCase; +import org.camunda.bpm.engine.task.Task; +import org.camunda.bpm.engine.test.Deployment; +import org.springframework.test.context.ContextConfiguration; + +/** + * @see http://jira.codehaus.org/browse/ACT-1166 + * @author Angel López Cima + * @author Falko Menge + */ +@ContextConfiguration("classpath:org/camunda/bpm/engine/spring/test/servicetask/serviceraskSpringTestCatchError-context.xml") +public class BoundaryErrorEventSpringTest extends SpringProcessEngineTestCase { + + @Deployment + public void testCatchErrorThrownByJavaDelegateOnServiceTask() { + String procId = runtimeService.startProcessInstanceByKey("catchErrorThrownByExpressionDelegateOnServiceTask").getId(); + assertThatErrorHasBeenCaught(procId); + } + + private void assertThatErrorHasBeenCaught(String procId) { + // The service task will throw an error event, + // which is caught on the service task boundary + assertEquals("No tasks found in task list.", 1, taskService.createTaskQuery().count()); + Task task = taskService.createTaskQuery().singleResult(); + assertEquals("Escalated Task", task.getName()); + + // Completing the task will end the process instance + taskService.complete(task.getId()); + assertProcessEnded(procId); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/DelegateClassNotABean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/DelegateClassNotABean.java new file mode 100644 index 0000000000000000000000000000000000000000..f0d7c16903d17e640bb8a0ad5d93c8190876e338 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/DelegateClassNotABean.java @@ -0,0 +1,35 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.servicetask; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; + +public class DelegateClassNotABean implements JavaDelegate { + + private SentenceGenerator sentenceGenerator; + + public void execute(DelegateExecution execution) throws Exception { + execution.setVariable("message", "DelegateClassNotABean was called"); + execution.setVariable("injectedFieldIsNull", sentenceGenerator == null); + } + + public void setSentenceGenerator(SentenceGenerator sentenceGenerator) { + this.sentenceGenerator = sentenceGenerator; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/DelegateExpressionBean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/DelegateExpressionBean.java new file mode 100644 index 0000000000000000000000000000000000000000..cba16267e13687c6efb98552335347c8f4a983a4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/DelegateExpressionBean.java @@ -0,0 +1,52 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.servicetask; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.camunda.bpm.engine.impl.el.FixedValue; + +/** + * @author Joram Barrez + * @author Bernd Ruecker (camunda) + */ +public class DelegateExpressionBean implements JavaDelegate { + + private SentenceGenerator sentenceGenerator; + + private FixedValue someField; + + public void execute(DelegateExecution execution) throws Exception { + execution.setVariable("myVar", sentenceGenerator.getSentence()); + if (someField != null) { + execution.setVariable("fieldInjection", someField.getValue(execution)); + } + } + + public void setSentenceGenerator(SentenceGenerator sentenceGenerator) { + this.sentenceGenerator = sentenceGenerator; + } + + public FixedValue getSomeField() { + return someField; + } + + public void setSomeField(FixedValue someField) { + this.someField = someField; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/MyExecutionListenerBean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/MyExecutionListenerBean.java new file mode 100644 index 0000000000000000000000000000000000000000..b2693a20b87e593490f8562e289d133a3a346702 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/MyExecutionListenerBean.java @@ -0,0 +1,46 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.servicetask; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.ExecutionListener; +import org.camunda.bpm.engine.impl.el.FixedValue; + +/** + * @author Joram Barrez + * @author Bernd Ruecker (camunda) + */ +public class MyExecutionListenerBean implements ExecutionListener { + + private FixedValue someField; + + public void notify(DelegateExecution execution) throws Exception { + execution.setVariable("executionListenerVar", "working"); + if (someField!=null) { + execution.setVariable("executionListenerField", someField.getValue(execution)); + } + } + + public FixedValue getSomeField() { + return someField; + } + + public void setSomeField(FixedValue someField) { + this.someField = someField; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/MyTaskListenerBean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/MyTaskListenerBean.java new file mode 100644 index 0000000000000000000000000000000000000000..fc97ecfbbb644ca0f7586747fbf6a17573a37694 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/MyTaskListenerBean.java @@ -0,0 +1,47 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.servicetask; + +import org.camunda.bpm.engine.delegate.DelegateTask; +import org.camunda.bpm.engine.delegate.TaskListener; +import org.camunda.bpm.engine.impl.el.FixedValue; + + +/** + * @author Joram Barrez + * @author Bernd Ruecker (camunda) + */ +public class MyTaskListenerBean implements TaskListener { + + private FixedValue someField; + + public void notify(DelegateTask delegateTask) { + delegateTask.getExecution().setVariable("taskListenerVar", "working"); + if (someField!=null) { + delegateTask.getExecution().setVariable("taskListenerField", someField.getValue(delegateTask)); + } + } + + public FixedValue getSomeField() { + return someField; + } + + public void setSomeField(FixedValue someField) { + this.someField = someField; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/SentenceGenerator.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/SentenceGenerator.java new file mode 100644 index 0000000000000000000000000000000000000000..1241a8bea5df7ca3a61b75e95dd22b91c261dda4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/SentenceGenerator.java @@ -0,0 +1,29 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.servicetask; + + +/** + * @author Joram Barrez + */ +public class SentenceGenerator { + + public String getSentence() { + return "Activiti BPMN 2.0 process engine"; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/SentenceToUpperCaseBean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/SentenceToUpperCaseBean.java new file mode 100644 index 0000000000000000000000000000000000000000..67d4aa9601ea2764bc2c6e5193882d40c418abcb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/SentenceToUpperCaseBean.java @@ -0,0 +1,37 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.servicetask; + +import org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution; + + +/** + * @author Joram Barrez + */ +public class SentenceToUpperCaseBean { + + protected SentenceGenerator sentenceGenerator; + + public void setSentence(ActivityExecution execution) { + execution.setVariable("myVar", sentenceGenerator.getSentence().toUpperCase()); + } + + public void setSentenceGenerator(SentenceGenerator sentenceGenerator) { + this.sentenceGenerator = sentenceGenerator; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.java new file mode 100644 index 0000000000000000000000000000000000000000..43071aae369ec49954debd87b0d4eb60e8823b91 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.java @@ -0,0 +1,68 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.servicetask; + +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.spring.test.SpringProcessEngineTestCase; +import org.camunda.bpm.engine.test.Deployment; +import org.springframework.test.context.ContextConfiguration; + + +/** + * @author Joram Barrez + */ +@ContextConfiguration("classpath:org/camunda/bpm/engine/spring/test/servicetask/servicetaskSpringTest-context.xml") +public class ServiceTaskSpringDelegationTest extends SpringProcessEngineTestCase { + + @Deployment + public void testDelegateExpression() { + ProcessInstance procInst = runtimeService.startProcessInstanceByKey("delegateExpressionToSpringBean"); + assertEquals("Activiti BPMN 2.0 process engine", runtimeService.getVariable(procInst.getId(), "myVar")); + assertEquals("fieldInjectionWorking", runtimeService.getVariable(procInst.getId(), "fieldInjection")); + } + + @Deployment + public void testDelegateClass() { + ProcessInstance procInst = runtimeService.startProcessInstanceByKey("delegateClassToSpringBean"); + assertEquals("Activiti BPMN 2.0 process engine", runtimeService.getVariable(procInst.getId(), "myVar")); + assertEquals("fieldInjectionWorking", runtimeService.getVariable(procInst.getId(), "fieldInjection")); + } + + @Deployment + public void testDelegateClassNotABean() { + ProcessInstance procInst = runtimeService.startProcessInstanceByKey("delegateClassToSpringBean"); + assertEquals("DelegateClassNotABean was called", runtimeService.getVariable(procInst.getId(), "message")); + assertTrue((Boolean)runtimeService.getVariable(procInst.getId(), "injectedFieldIsNull")); + } + + @Deployment + public void testMethodExpressionOnSpringBean() { + ProcessInstance procInst = runtimeService.startProcessInstanceByKey("methodExpressionOnSpringBean"); + assertEquals("ACTIVITI BPMN 2.0 PROCESS ENGINE", runtimeService.getVariable(procInst.getId(), "myVar")); + } + + @Deployment + public void testExecutionAndTaskListenerDelegationExpression() { + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("executionAndTaskListenerDelegation"); + assertEquals("working", runtimeService.getVariable(processInstance.getId(), "executionListenerVar")); + assertEquals("working", runtimeService.getVariable(processInstance.getId(), "taskListenerVar")); + + assertEquals("executionListenerInjection", runtimeService.getVariable(processInstance.getId(), "executionListenerField")); + assertEquals("taskListenerInjection", runtimeService.getVariable(processInstance.getId(), "taskListenerField")); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/ThrowBpmnErrorDelegate.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/ThrowBpmnErrorDelegate.java new file mode 100644 index 0000000000000000000000000000000000000000..a8ff1eb225ce33220f9a6c21aaa8273e2f7c9b37 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/servicetask/ThrowBpmnErrorDelegate.java @@ -0,0 +1,43 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.servicetask; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; + + +/** + * @author Falko Menge + */ +public class ThrowBpmnErrorDelegate implements JavaDelegate { + + public void execute(DelegateExecution execution) throws Exception { + Integer executionsBeforeError = (Integer) execution.getVariable("executionsBeforeError"); + Integer executions = (Integer) execution.getVariable("executions"); + if (executions == null) { + executions = 0; + } + executions++; + if (executionsBeforeError == null || executionsBeforeError < executions) { + throw new BpmnError("23", "This is a business fault, which can be caught by a BPMN Error Event."); + } else { + execution.setVariable("executions", executions); + } + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/taskListener/MyTaskListener.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/taskListener/MyTaskListener.java new file mode 100644 index 0000000000000000000000000000000000000000..a0a725b4ee268318c97eb5ae0a0d230baf8daac5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/taskListener/MyTaskListener.java @@ -0,0 +1,36 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.taskListener; + +import org.camunda.bpm.engine.delegate.DelegateTask; +import org.camunda.bpm.engine.delegate.TaskListener; + + +/** + * @author Joram Barrez + */ +public class MyTaskListener implements TaskListener { + + public void notify(DelegateTask delegateTask) { + delegateTask.setVariable("calledThroughNotify", delegateTask.getName() + "-notify"); + } + + public void calledInExpression(DelegateTask task, String eventName) { + task.setVariable("calledInExpression", task.getName() + "-" + eventName); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/taskListener/TaskListenerSpringTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/taskListener/TaskListenerSpringTest.java new file mode 100644 index 0000000000000000000000000000000000000000..302a60be6974047035d79822492cdaa745427260 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/taskListener/TaskListenerSpringTest.java @@ -0,0 +1,47 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.taskListener; + +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.spring.test.SpringProcessEngineTestCase; +import org.camunda.bpm.engine.task.Task; +import org.camunda.bpm.engine.test.Deployment; +import org.springframework.test.context.ContextConfiguration; + + +/** + * @author Joram Barrez + */ +@ContextConfiguration("classpath:org/camunda/bpm/engine/spring/test/taskListener/TaskListenerDelegateExpressionTest-context.xml") +public class TaskListenerSpringTest extends SpringProcessEngineTestCase { + + @Deployment + public void testTaskListenerDelegateExpression() { + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("taskListenerDelegateExpression"); + + // Completing first task will set variable on process instance + Task task = taskService.createTaskQuery().singleResult(); + taskService.complete(task.getId()); + assertEquals("task1-complete", runtimeService.getVariable(processInstance.getId(), "calledInExpression")); + + // Completing second task will set variable on process instance + task = taskService.createTaskQuery().singleResult(); + taskService.complete(task.getId()); + assertEquals("task2-notify", runtimeService.getVariable(processInstance.getId(), "calledThroughNotify")); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/taskassignment/CustomTaskAssignmentTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/taskassignment/CustomTaskAssignmentTest.java new file mode 100644 index 0000000000000000000000000000000000000000..c6134dccb16d1a1414309bace6d3d97aef0fcd65 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/taskassignment/CustomTaskAssignmentTest.java @@ -0,0 +1,56 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.taskassignment; + +import org.camunda.bpm.engine.impl.util.CollectionUtil; +import org.camunda.bpm.engine.spring.test.SpringProcessEngineTestCase; +import org.camunda.bpm.engine.test.Deployment; +import org.springframework.test.context.ContextConfiguration; + + +/** + * @author Joram Barrez + */ +@ContextConfiguration("classpath:org/camunda/bpm/engine/spring/test/taskassignment/taskassignment-context.xml") +public class CustomTaskAssignmentTest extends SpringProcessEngineTestCase { + + @Deployment + public void testSetAssigneeThroughSpringService() { + runtimeService.startProcessInstanceByKey("assigneeThroughSpringService", CollectionUtil.singletonMap("emp", "fozzie")); + assertEquals(1, taskService.createTaskQuery().taskAssignee("Kermit The Frog").count()); + } + + @Deployment + public void testSetCandidateUsersThroughSpringService() { + runtimeService.startProcessInstanceByKey("candidateUsersThroughSpringService", CollectionUtil.singletonMap("emp", "fozzie")); + assertEquals(1, taskService.createTaskQuery().taskCandidateUser("kermit").count()); + assertEquals(1, taskService.createTaskQuery().taskCandidateUser("fozzie").count()); + assertEquals(1, taskService.createTaskQuery().taskCandidateUser("gonzo").count()); + assertEquals(0, taskService.createTaskQuery().taskCandidateUser("mispiggy").count()); + } + + + @Deployment + public void testSetCandidateGroupsThroughSpringService() { + runtimeService.startProcessInstanceByKey("candidateUsersThroughSpringService", CollectionUtil.singletonMap("emp", "fozzie")); + assertEquals(1, taskService.createTaskQuery().taskCandidateGroup("management").count()); + assertEquals(1, taskService.createTaskQuery().taskCandidateGroup("directors").count()); + assertEquals(1, taskService.createTaskQuery().taskCandidateGroup("accountancy").count()); + assertEquals(0, taskService.createTaskQuery().taskCandidateGroup("sales").count()); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/taskassignment/FakeLdapService.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/taskassignment/FakeLdapService.java new file mode 100644 index 0000000000000000000000000000000000000000..b5b5bef073b647af538e152f5aac4df1eff1f5d6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/taskassignment/FakeLdapService.java @@ -0,0 +1,51 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.taskassignment; + +import java.util.Arrays; +import java.util.List; + +import org.camunda.bpm.engine.delegate.DelegateExecution; + + +/** + * @author Joram Barrez + */ +public class FakeLdapService { + + public String findManagerForEmployee(String employee) { + // Pretty useless LDAP service ... + return "Kermit The Frog"; + } + + public List findAllSales() { + return Arrays.asList("kermit", "gonzo", "fozzie"); + } + + public List findManagers(DelegateExecution execution, String emp) { + if (execution == null) { + throw new RuntimeException("Execution parameter is null"); + } + + if (emp == null || "".equals(emp)) { + throw new RuntimeException("emp parameter is null or empty"); + } + + return Arrays.asList("management", "directors"); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/BeanWithException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/BeanWithException.java new file mode 100644 index 0000000000000000000000000000000000000000..15cf7ad156d8da25187fcca7778a512b3c74aa31 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/BeanWithException.java @@ -0,0 +1,25 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + + +public class BeanWithException { + + public void doSomething(){ + throw new MyRuntimeException(); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailDeleteDeploymentCommandInterceptor.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailDeleteDeploymentCommandInterceptor.java new file mode 100644 index 0000000000000000000000000000000000000000..e6e4aede39ef61d2f4c6fcb6ef410b85f3fba960 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailDeleteDeploymentCommandInterceptor.java @@ -0,0 +1,40 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + +import org.camunda.bpm.engine.impl.cmd.DeleteDeploymentCmd; +import org.camunda.bpm.engine.impl.interceptor.Command; +import org.camunda.bpm.engine.impl.interceptor.CommandInterceptor; + +/** + * @author Svetlana Dorokhova + * + */ +public class FailDeleteDeploymentCommandInterceptor extends CommandInterceptor { + + @Override + public T execute(Command command) { + + T result = next.execute(command); + + if (command instanceof DeleteDeploymentCmd) { + throw new RuntimeException("roll back transaction"); + } + + return result; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailDeleteDeploymentsPlugin.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailDeleteDeploymentsPlugin.java new file mode 100644 index 0000000000000000000000000000000000000000..982d49e001b8bddaaa52d3d5555274a1445f6c8e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailDeleteDeploymentsPlugin.java @@ -0,0 +1,45 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + +import java.util.Arrays; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin; +import org.camunda.bpm.engine.impl.interceptor.CommandInterceptor; + +/** + * @author Svetlana Dorokhova + * + */ +public class FailDeleteDeploymentsPlugin implements ProcessEnginePlugin { + + @Override + public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) { + processEngineConfiguration.setCustomPostCommandInterceptorsTxRequired(Arrays.asList(new FailDeleteDeploymentCommandInterceptor())); + processEngineConfiguration.setCustomPostCommandInterceptorsTxRequiresNew(Arrays.asList(new FailDeleteDeploymentCommandInterceptor())); + } + + @Override + public void postInit(ProcessEngineConfigurationImpl processEngineConfiguration) { + } + + @Override + public void postProcessEngineBuild(ProcessEngine processEngine) { + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailDeploymentCommandInterceptor.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailDeploymentCommandInterceptor.java new file mode 100644 index 0000000000000000000000000000000000000000..8a501e8939fe2ce7d18c87c4d4bd59a55304e00a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailDeploymentCommandInterceptor.java @@ -0,0 +1,41 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + +import org.camunda.bpm.engine.impl.cmd.DeleteDeploymentCmd; +import org.camunda.bpm.engine.impl.cmd.DeployCmd; +import org.camunda.bpm.engine.impl.interceptor.Command; +import org.camunda.bpm.engine.impl.interceptor.CommandInterceptor; + +/** + * @author Thorben Lindhauer + * + */ +public class FailDeploymentCommandInterceptor extends CommandInterceptor { + + @Override + public T execute(Command command) { + + T result = next.execute(command); + + if (command instanceof DeployCmd) { + throw new RuntimeException("roll back transaction"); + } + + return result; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailDeploymentsPlugin.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailDeploymentsPlugin.java new file mode 100644 index 0000000000000000000000000000000000000000..9edad6451894bde9c13c053f91f4f469d611561a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailDeploymentsPlugin.java @@ -0,0 +1,45 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + +import java.util.Arrays; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin; +import org.camunda.bpm.engine.impl.interceptor.CommandInterceptor; + +/** + * @author Thorben Lindhauer + * + */ +public class FailDeploymentsPlugin implements ProcessEnginePlugin { + + @Override + public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) { + processEngineConfiguration.setCustomPostCommandInterceptorsTxRequired(Arrays.asList(new FailDeploymentCommandInterceptor())); + processEngineConfiguration.setCustomPostCommandInterceptorsTxRequiresNew(Arrays.asList(new FailDeploymentCommandInterceptor())); + } + + @Override + public void postInit(ProcessEngineConfigurationImpl processEngineConfiguration) { + } + + @Override + public void postProcessEngineBuild(ProcessEngine processEngine) { + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailingTransactionListenerDelegate.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailingTransactionListenerDelegate.java new file mode 100644 index 0000000000000000000000000000000000000000..7b53f95cd3031177cf14b89b6f708e69dbb68918 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/FailingTransactionListenerDelegate.java @@ -0,0 +1,40 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.camunda.bpm.engine.impl.cfg.TransactionListener; +import org.camunda.bpm.engine.impl.cfg.TransactionState; +import org.camunda.bpm.engine.impl.context.Context; +import org.camunda.bpm.engine.impl.interceptor.CommandContext; + +public class FailingTransactionListenerDelegate implements JavaDelegate { + + @Override + public void execute(DelegateExecution execution) throws Exception { + + Context.getCommandContext().getTransactionContext().addTransactionListener(TransactionState.COMMITTING, new TransactionListener() { + + @Override + public void execute(CommandContext context) { + throw new RuntimeException("exception in transaction listener"); + } + }); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/MyRuntimeException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/MyRuntimeException.java new file mode 100644 index 0000000000000000000000000000000000000000..294586036c18f8aa09347bc91a62f14a5ee0c1b7 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/MyRuntimeException.java @@ -0,0 +1,27 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + +public class MyRuntimeException extends RuntimeException { + + public MyRuntimeException(){ + super("error"); + } + + private static final long serialVersionUID = 1L; + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/Printer.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/Printer.java new file mode 100644 index 0000000000000000000000000000000000000000..f0b1cd51847c04cb46aecd3a9c1738baa003cc47 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/Printer.java @@ -0,0 +1,30 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + +import org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution; + + +/** + * @author Tom Baeyens + */ +public class Printer { + + public void printMessage(ActivityExecution execution) { + execution.setVariable("myVar", "Hello from Printer!"); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/ServiceTaskBean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/ServiceTaskBean.java new file mode 100644 index 0000000000000000000000000000000000000000..6bb36dfc35b4f950b3d30241c1c9196c57107ad0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/ServiceTaskBean.java @@ -0,0 +1,38 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.springframework.transaction.annotation.Transactional; + + +public class ServiceTaskBean implements JavaDelegate{ + + private BeanWithException beanWithException; + + public void setBeanWithException(BeanWithException bean){ + this.beanWithException = bean; + } + + @Transactional + @Override + public void execute(DelegateExecution execution) throws Exception { + beanWithException.doSomething(); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeleteDeploymentFailTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeleteDeploymentFailTest.java new file mode 100644 index 0000000000000000000000000000000000000000..9abff0b3d097d0ce91f6bb33234cf61adb2fefd6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeleteDeploymentFailTest.java @@ -0,0 +1,71 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + +import org.camunda.bpm.engine.impl.interceptor.Command; +import org.camunda.bpm.engine.impl.interceptor.CommandContext; +import org.camunda.bpm.engine.spring.test.SpringProcessEngineTestCase; +import org.camunda.bpm.model.bpmn.Bpmn; +import org.camunda.bpm.model.bpmn.BpmnModelInstance; +import org.springframework.test.context.ContextConfiguration; + +/** + * @author Svetlana Dorokhova + */ + +@ContextConfiguration("classpath:org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeleteDeploymentFailTest-context.xml") +public class SpringTransactionIntegrationDeleteDeploymentFailTest extends SpringProcessEngineTestCase { + + private String deploymentId; + + @Override + protected void tearDown() throws Exception { + processEngineConfiguration.getCommandExecutorTxRequired().execute(new Command() { + public Void execute(CommandContext commandContext) { + commandContext + .getDeploymentManager() + .deleteDeployment(deploymentId, false, false, false); + return null; + } + }); + + + super.tearDown(); + } + + public void testFailingAfterDeleteDeployment() { + //given + final BpmnModelInstance model = Bpmn.createExecutableProcess().startEvent().userTask().endEvent().done(); + deploymentId = processEngine.getRepositoryService().createDeployment().addModelInstance("model.bpmn", model).deploy().getId(); + + //when + // 1. delete deployment + // 2. it fails in post command interceptor (see FailDeleteDeploymentsPlugin) + // 3. transaction is rolling back + // 4. DeleteDeploymentFailListener is called + try { + processEngine.getRepositoryService().deleteDeployment(deploymentId); + } catch (Exception ex) { + //expected exception + } + + //then + // DeleteDeploymentFailListener succeeded to registered deployments back + assertEquals(1, processEngineConfiguration.getRegisteredDeployments().size()); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeploymentFailTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeploymentFailTest.java new file mode 100644 index 0000000000000000000000000000000000000000..7e473d0635281849a28a2df14de447ee5ec1eb85 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeploymentFailTest.java @@ -0,0 +1,58 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + +import org.camunda.bpm.engine.spring.test.SpringProcessEngineTestCase; +import org.camunda.bpm.model.bpmn.Bpmn; +import org.camunda.bpm.model.bpmn.BpmnModelInstance; +import org.springframework.test.context.ContextConfiguration; + +/** + * @author Svetlana Dorokhova + */ + +@ContextConfiguration("classpath:org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeploymentFailTest-context.xml") +public class SpringTransactionIntegrationDeploymentFailTest extends SpringProcessEngineTestCase { + + @Override + protected void tearDown() throws Exception { + //must not be needed after CAM-4250 is fixed + processEngineConfiguration.getDeploymentCache().discardProcessDefinitionCache(); + super.tearDown(); + } + + public void testFailingAfterDeployment() { +// given + final BpmnModelInstance model = Bpmn.createExecutableProcess().startEvent().userTask().endEvent().done(); + + //when + // 1. deploy the process + // 2. it fails in post command interceptor (see FailDeploymentsPlugin) + // 3. transaction is rolling back + // 4. DeploymentFailListener is called + try { + processEngine.getRepositoryService().createDeployment().addModelInstance("model.bpmn", model).deploy(); + } catch (Exception ex) { + //expected exception + } + + //then + // DeploymentFailListener succeeded to remove registered deployments + assertEquals(0, processEngineConfiguration.getRegisteredDeployments().size()); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.java new file mode 100644 index 0000000000000000000000000000000000000000..c2053e1490fc6c444237188000854e928e74f02d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.java @@ -0,0 +1,154 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +import java.util.concurrent.TimeUnit; + +import javax.sql.DataSource; + +import org.camunda.bpm.engine.runtime.Incident; +import org.camunda.bpm.engine.runtime.Job; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.spring.test.SpringProcessEngineTestCase; +import org.camunda.bpm.engine.test.Deployment; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.test.context.ContextConfiguration; + + +/** + * @author Tom Baeyens + */ +@ContextConfiguration("classpath:org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest-context.xml") +public class SpringTransactionIntegrationTest extends SpringProcessEngineTestCase { + + @Autowired + protected UserBean userBean; + + @Autowired + protected DataSource dataSource; + + private static long WAIT_TIME_MILLIS = TimeUnit.MILLISECONDS.convert(20L, TimeUnit.SECONDS); + + @Deployment + public void testBasicActivitiSpringIntegration() { + userBean.hello(); + + ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().singleResult(); + assertEquals("Hello from Printer!", runtimeService.getVariable(processInstance.getId(), "myVar")); + } + + @Deployment + public void testRollbackTransactionOnActivitiException() { + + // Create a table that the userBean is supposed to fill with some data + JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); + jdbcTemplate.execute("create table MY_TABLE (MY_TEXT varchar);"); + + // The hello() method will start the process. The process will wait in a user task + userBean.hello(); + + jdbcTemplate.update("insert into MY_TABLE values ('test');"); + int results = jdbcTemplate.queryForObject("select count(*) from MY_TABLE", Integer.class); + assertEquals(1, results); + + // The completeTask() method will write a record to the 'MY_TABLE' table and complete the user task + try { + userBean.completeTask(taskService.createTaskQuery().singleResult().getId()); + fail(); + } catch (Exception e) { } + + // Since the service task after the user tasks throws an exception, both + // the record and the process must be rolled back ! + assertEquals("My Task", taskService.createTaskQuery().singleResult().getName()); + results = jdbcTemplate.queryForObject("select count(*) from MY_TABLE", Integer.class); + assertEquals(1, results); + + // Cleanup + jdbcTemplate.execute("drop table MY_TABLE if exists;"); + } + + @Deployment(resources={ + "org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testErrorPropagationOnExceptionInTransaction.bpmn20.xml", + "org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.throwExceptionProcess.bpmn20.xml" + }) + public void testErrorPropagationOnExceptionInTransaction(){ + runtimeService.startProcessInstanceByKey("process"); + waitForJobExecutorToProcessAllJobs(WAIT_TIME_MILLIS); + Incident incident = runtimeService.createIncidentQuery().activityId("servicetask").singleResult(); + assertThat(incident.getIncidentMessage(), is("error")); + } + + @Deployment + public void testTransactionRollbackInServiceTask() throws Exception { + + runtimeService.startProcessInstanceByKey("txRollbackServiceTask"); + + waitForJobExecutorToProcessAllJobs(WAIT_TIME_MILLIS); + + Job job = managementService.createJobQuery().singleResult(); + + assertNotNull(job); + assertEquals(0, job.getRetries()); + assertEquals("Transaction rolled back because it has been marked as rollback-only", job.getExceptionMessage()); + + String stacktrace = managementService.getJobExceptionStacktrace(job.getId()); + assertNotNull(stacktrace); + assertTrue("unexpected stacktrace, was <" + stacktrace + ">", stacktrace.contains("Transaction rolled back because it has been marked as rollback-only")); + } + + @Deployment + public void testTransactionRollbackInServiceTaskWithCustomRetryCycle() throws Exception { + + runtimeService.startProcessInstanceByKey("txRollbackServiceTaskWithCustomRetryCycle"); + + waitForJobExecutorToProcessAllJobs(WAIT_TIME_MILLIS); + + Job job = managementService.createJobQuery().singleResult(); + + assertNotNull(job); + assertEquals(0, job.getRetries()); + assertEquals("Transaction rolled back because it has been marked as rollback-only", job.getExceptionMessage()); + + String stacktrace = managementService.getJobExceptionStacktrace(job.getId()); + assertNotNull(stacktrace); + assertTrue("unexpected stacktrace, was <" + stacktrace + ">", stacktrace.contains("Transaction rolled back because it has been marked as rollback-only")); + } + + @Deployment + public void testFailingTransactionListener() throws Exception { + + runtimeService.startProcessInstanceByKey("failingTransactionListener"); + + waitForJobExecutorToProcessAllJobs(WAIT_TIME_MILLIS); + + Job job = managementService.createJobQuery().singleResult(); + + assertNotNull(job); + assertEquals(0, job.getRetries()); + assertEquals("exception in transaction listener", job.getExceptionMessage()); + + String stacktrace = managementService.getJobExceptionStacktrace(job.getId()); + assertNotNull(stacktrace); + assertTrue("unexpected stacktrace, was <" + stacktrace + ">", stacktrace.contains("java.lang.RuntimeException: exception in transaction listener")); + } + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/TransactionRollbackDelegate.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/TransactionRollbackDelegate.java new file mode 100644 index 0000000000000000000000000000000000000000..172d27ebcfa36907951666ceacd501ff62d6a57d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/TransactionRollbackDelegate.java @@ -0,0 +1,52 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.TransactionStatus; +import org.springframework.transaction.support.TransactionCallback; +import org.springframework.transaction.support.TransactionTemplate; + +public class TransactionRollbackDelegate implements JavaDelegate { + + private PlatformTransactionManager transactionManager; + + @Override + public void execute(DelegateExecution execution) throws Exception { + TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager); + transactionTemplate.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRED); + + transactionTemplate.execute(new TransactionCallback() { + + @Override + public Void doInTransaction(TransactionStatus status) { + + // simulate a failure that triggers the transaction rollback + status.setRollbackOnly(); + + return null; + } + }); + } + + public void setTransactionManager(PlatformTransactionManager transactionManager) { + this.transactionManager = transactionManager; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/UserBean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/UserBean.java new file mode 100644 index 0000000000000000000000000000000000000000..9e967d22b6826902ff96646219be74b85d7c3e07 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/UserBean.java @@ -0,0 +1,85 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction; + +import static org.junit.Assert.assertEquals; + +import javax.sql.DataSource; + +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.TaskService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.transaction.annotation.Transactional; + +/** + * @author Tom Baeyens + */ +public class UserBean { + + /** injected by Spring */ + private RuntimeService runtimeService; + + /** injected by Spring */ + private TaskService taskService; + + /** injected by Spring */ + private DataSource dataSource; + + @Transactional + public void hello() { + // here you can do transactional stuff in your domain model + // and it will be combined in the same transaction as + // the startProcessInstanceByKey to the Activiti RuntimeService + runtimeService.startProcessInstanceByKey("helloProcess"); + } + + @Transactional + public void completeTask(String taskId) { + + // First insert a record in the MY_TABLE table + JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); + int results = jdbcTemplate.queryForObject("select count(*) from MY_TABLE", Integer.class); + assertEquals(1, results); + int nrOfRows = jdbcTemplate.update("insert into MY_TABLE values ('test');"); + if (nrOfRows != 1) { + throw new RuntimeException("Insert into MY_TABLE failed"); + } + + results = jdbcTemplate.queryForObject("select count(*) from MY_TABLE", Integer.class); + assertEquals(2, results); + taskService.complete(taskId); + } + + // getters and setters ////////////////////////////////////////////////////// + + @Autowired + public void setRuntimeService(RuntimeService runtimeService) { + this.runtimeService = runtimeService; + } + + @Autowired + public void setTaskService(TaskService taskService) { + this.taskService = taskService; + } + + @Autowired + public void setDataSource(DataSource dataSource) { + this.dataSource = dataSource; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/inner/rollback/InnerProcessService.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/inner/rollback/InnerProcessService.java new file mode 100644 index 0000000000000000000000000000000000000000..84734e951ee163804228e728d2e68327ebabcf52 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/inner/rollback/InnerProcessService.java @@ -0,0 +1,26 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction.inner.rollback; + +import org.camunda.bpm.engine.delegate.DelegateExecution; + + +public interface InnerProcessService { + + void startInnerProcess(DelegateExecution execution); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/inner/rollback/InnerProcessServiceImpl.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/inner/rollback/InnerProcessServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..dcd9fc5fa0c468f7170889711ccdfecb51d694b1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/inner/rollback/InnerProcessServiceImpl.java @@ -0,0 +1,42 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction.inner.rollback; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.context.ProcessEngineContext; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +@Service +public class InnerProcessServiceImpl implements InnerProcessService { + + @Override + @Transactional(value = "transactionManager", propagation = Propagation.REQUIRES_NEW, rollbackFor = {Throwable.class}) + public void startInnerProcess(DelegateExecution execution) { + + try { + ProcessEngineContext.requiresNew(); + execution.getProcessEngineServices().getRuntimeService() + .startProcessInstanceByKey("InnerTxNestedTransactionTest"); + } finally { + ProcessEngineContext.clear(); + } + + throw new RuntimeException("Inner Transaction Fails and Rolls back error!"); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/inner/rollback/SpringInnerTransactionRollbackTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/inner/rollback/SpringInnerTransactionRollbackTest.java new file mode 100644 index 0000000000000000000000000000000000000000..5d2eaa99187d68fd48984699ececae981c9f7976 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/inner/rollback/SpringInnerTransactionRollbackTest.java @@ -0,0 +1,90 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction.inner.rollback; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.camunda.bpm.engine.HistoryService; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.history.HistoricProcessInstance; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.test.Deployment; +import org.camunda.bpm.engine.test.ProcessEngineRule; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.List; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = {"classpath:org/camunda/bpm/engine/spring/test/transaction/" + + "SpringInnerTransactionRollbackTest-applicationContext.xml"}) +public class SpringInnerTransactionRollbackTest { + + @Rule + @Autowired + public ProcessEngineRule rule; + + @Autowired + public ProcessEngine processEngine; + + @Autowired + RuntimeService runtimeService; + + @Autowired + HistoryService historyService; + + @Test + @Deployment(resources = { + "org/camunda/bpm/engine/spring/test/transaction/" + + "SpringInnerTransactionRollbackTest.shouldRollbackProcessData-outer.bpmn20.xml", + "org/camunda/bpm/engine/spring/test/transaction/" + + "SpringInnerTransactionRollbackTest.shouldRollbackProcessData-inner.bpmn20.xml" + }) + public void shouldRollbackProcessData() { + // given + + // when + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("OuterTxNestedTransactionTest"); + + // then + + // outer process instance should be finished + ProcessInstance outerProcessInstance = runtimeService.createProcessInstanceQuery() + .processInstanceId(processInstance.getId()) + .singleResult(); + assertThat(outerProcessInstance).isNull(); + + // inner process instance shouldn't exist + List innerProcessInstances = runtimeService.createProcessInstanceQuery() + .processDefinitionKey("InnerTxNestedTransactionTest") + .list(); + assertThat(innerProcessInstances).isEmpty(); + + + // historic inner PI shouldn't be available + List innerProcessinstances = historyService + .createHistoricProcessInstanceQuery() + .processDefinitionKey("InnerTxNestedTransactionTest") + .list(); + assertThat(innerProcessinstances).isEmpty(); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/inner/rollback/TransactionTestDelegate.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/inner/rollback/TransactionTestDelegate.java new file mode 100644 index 0000000000000000000000000000000000000000..ee7b12ccf7b500f97a6e627888acd8cfd133590d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/inner/rollback/TransactionTestDelegate.java @@ -0,0 +1,43 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction.inner.rollback; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +@Service("transactionTestDelegate") +@Transactional(value = "transactionManager", propagation = Propagation.REQUIRED) +public class TransactionTestDelegate implements JavaDelegate { + + @Autowired + InnerProcessService innerProcessService; + + @Override + public void execute(DelegateExecution execution) throws Exception { + + try { + innerProcessService.startInnerProcess(execution); + } catch (Exception ex) { + // noop + } + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/modification/CalculateTimerDate.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/modification/CalculateTimerDate.java new file mode 100644 index 0000000000000000000000000000000000000000..f14d47e438a047c0372ea943110f7c923a34afdb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/modification/CalculateTimerDate.java @@ -0,0 +1,35 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction.modification; + +import java.util.Calendar; +import java.util.Date; + +import org.camunda.bpm.engine.delegate.DelegateExecution; + +public class CalculateTimerDate { + + public Date execute(DelegateExecution execution) { + execution.setVariable("createDate", new Date()); + + final Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); + calendar.add(Calendar.DAY_OF_MONTH, 1); + return calendar.getTime(); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/modification/DeleteVariableListener.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/modification/DeleteVariableListener.java new file mode 100644 index 0000000000000000000000000000000000000000..88608093fa6484bffd4d9e433ec4c7633b829b00 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/modification/DeleteVariableListener.java @@ -0,0 +1,26 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction.modification; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.ExecutionListener; + +public class DeleteVariableListener implements ExecutionListener { + public void notify(DelegateExecution delegateExecution) throws Exception { + delegateExecution.removeVariable("createDate"); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/modification/ProcessInstanceModificationInTransactionTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/modification/ProcessInstanceModificationInTransactionTest.java new file mode 100644 index 0000000000000000000000000000000000000000..baa66f9c9a087fb431fdbd970efe7540ae581dcb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/modification/ProcessInstanceModificationInTransactionTest.java @@ -0,0 +1,99 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction.modification; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import org.apache.ibatis.logging.LogFactory; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.history.HistoricVariableInstance; +import org.camunda.bpm.engine.repository.Deployment; +import org.camunda.bpm.engine.repository.DeploymentBuilder; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.runtime.VariableInstance; +import org.camunda.bpm.engine.test.ProcessEngineRule; +import org.camunda.bpm.model.bpmn.Bpmn; +import org.camunda.bpm.model.bpmn.BpmnModelInstance; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = {"classpath:org/camunda/bpm/engine/spring/test/transaction/ProcessInstanceModificationInTransactionTest-applicationContext.xml"}) +public class ProcessInstanceModificationInTransactionTest { + + @Autowired + @Rule + public ProcessEngineRule rule; + + @Autowired + public ProcessEngine processEngine; + + @Autowired + RuntimeService runtimeService; + + @Autowired + RepositoryService repositoryService; + + @Autowired + UserBean userBean; + + @Before + public void init() { + LogFactory.useSlf4jLogging(); + } + + @Test + public void shouldBeAbleToPerformModification() { + + // given + BpmnModelInstance modelInstance = Bpmn.createExecutableProcess("TestProcess") + .startEvent() + .intermediateCatchEvent("TimerEvent") + .timerWithDate("${calculateTimerDate.execute(execution)}") + .camundaExecutionListenerDelegateExpression("end", "${deleteVariableListener}") + .endEvent() + .done(); + + deployModelInstance(modelInstance); + final ProcessInstance procInst = runtimeService.startProcessInstanceByKey("TestProcess"); + + // when + userBean.completeUserTaskAndModifyInstanceInOneTransaction(procInst); + + // then + VariableInstance variable = rule.getRuntimeService().createVariableInstanceQuery().processInstanceIdIn(procInst.getId()).variableName("createDate").singleResult(); + assertNotNull(variable); + HistoricVariableInstance historicVariable = rule.getHistoryService().createHistoricVariableInstanceQuery().singleResult(); + assertEquals(variable.getName(), historicVariable.getName()); + assertEquals(HistoricVariableInstance.STATE_CREATED, historicVariable.getState()); + } + + private void deployModelInstance(BpmnModelInstance modelInstance) { + DeploymentBuilder deploymentbuilder = repositoryService.createDeployment(); + deploymentbuilder.addModelInstance("process0.bpmn", modelInstance); + Deployment deployment = deploymentbuilder.deploy(); + rule.manageDeployment(deployment); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/modification/UserBean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/modification/UserBean.java new file mode 100644 index 0000000000000000000000000000000000000000..c36c924f7263ccc57cd50f9da8864ae5e1e843dd --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/java/org/camunda/bpm/engine/spring/test/transaction/modification/UserBean.java @@ -0,0 +1,52 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.spring.test.transaction.modification; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + +@Component +public class UserBean { + + @Autowired + public ProcessEngine processEngine; + + @Autowired + RuntimeService runtimeService; + + @Autowired + RepositoryService repositoryService; + + @Transactional + public void completeUserTaskAndModifyInstanceInOneTransaction(ProcessInstance procInst) { + // this method assures that the execution the process instance + // modification is done in one transaction. + + // reset the process instance before the timer + runtimeService.createProcessInstanceModification(procInst.getId()) + .cancelAllForActivity("TimerEvent") + .startBeforeActivity("TimerEvent") + .execute(); + } + +} + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/META-INF/services/org.camunda.bpm.engine.spring.test.SpringTestHelper b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/META-INF/services/org.camunda.bpm.engine.spring.test.SpringTestHelper new file mode 100644 index 0000000000000000000000000000000000000000..d444b3582b0588f778d39c2903596b63dfa78370 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/META-INF/services/org.camunda.bpm.engine.spring.test.SpringTestHelper @@ -0,0 +1 @@ +org.camunda.bpm.engine.spring.test.Spring5TestHelper \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/activiti-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/activiti-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..d560b125e59750bcfe5ca958221a805b66c4faca --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/activiti-context.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/camunda.cfg.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/camunda.cfg.xml new file mode 100644 index 0000000000000000000000000000000000000000..9006b545f2701bcdcec6cb8b55fa3a2436d187d1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/camunda.cfg.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/logback-test.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/logback-test.xml new file mode 100644 index 0000000000000000000000000000000000000000..c802227c380dc198a355d164484beaa14b5b6763 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/logback-test.xml @@ -0,0 +1,27 @@ + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/logging.properties b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/logging.properties new file mode 100644 index 0000000000000000000000000000000000000000..4941c55971f365781be2c0903a6f00af84a1a74f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/logging.properties @@ -0,0 +1,2 @@ +#register SLF4JBridgeHandler as handler for the j.u.l. root logger +handlers = org.slf4j.bridge.SLF4JBridgeHandler diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/PostDeployRegistrationPaTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/PostDeployRegistrationPaTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..15fb03bf813468ba085b877522c4783fbd4926c0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/PostDeployRegistrationPaTest-context.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/PostDeployWithNestedContext-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/PostDeployWithNestedContext-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..5d871b25e65521ba41f364d209aa7621b122c9a8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/PostDeployWithNestedContext-context.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/SpringProcessApplicationDeploymentTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/SpringProcessApplicationDeploymentTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..c1a74177861c38a7c964fe2c2a341c68917db68d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/SpringProcessApplicationDeploymentTest-context.xml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/SpringProcessArchiveDeploymentTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/SpringProcessArchiveDeploymentTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..9cfbea1088d604cbc45c54b771d0fab9c5b6ebaa --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/SpringProcessArchiveDeploymentTest-context.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/process.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/process.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..0e0d935fd051f60fc2388f1cd76fe77bbca3edf0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/process.bpmn20.xml @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/processes.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/processes.xml new file mode 100644 index 0000000000000000000000000000000000000000..775579d0e717d7455a608f4bc1be54a5c4c1c922 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/application/processes.xml @@ -0,0 +1,18 @@ + + + + + + org/camunda/bpm/engine/spring/test/application/process.bpmn20.xml + + + false + true + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployCmmnBpmnTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployCmmnBpmnTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..f83d7c3864ba69db21546612d28e84d75f25c51a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployCmmnBpmnTest-context.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + classpath*:/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.*.cmmn + classpath*:/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.*.bpmn20.xml + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployCmmnTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployCmmnTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..3fee2ae3fad310558d536cf8d7c5ea2353ac6896 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployCmmnTest-context.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployCustomNameTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployCustomNameTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..63fbb51c411699cf811c41fcb11c30121770008a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployCustomNameTest-context.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployDeployChangeOnlyTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployDeployChangeOnlyTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..faa0afc11ec455ea22a62dcc7da21bccf6ae0734 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployDeployChangeOnlyTest-context.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTenantIdTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTenantIdTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..0560c74c4dd2d8158abfa3fd1194ae710e511075 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTenantIdTest-context.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + classpath*:/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.*.cmmn + classpath*:/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.*.bpmn20.xml + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..22865d5a4a3efdac0d72eda311f33b9d5da3b629 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest-context.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest-create-drop-clean-db-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest-create-drop-clean-db-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..b0562a824bfb5643273d30b26fb8ed536c40ff34 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest-create-drop-clean-db-context.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest-dynamic-deployment-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest-dynamic-deployment-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..ddc3e758e7e2e3125ebf4213c1b74fe42a0ce111 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/SpringAutoDeployTest-dynamic-deployment-context.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.a.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.a.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..e4b1aec04e219a946589f0920f1e93b1659a6f5a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.a.bpmn20.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.b.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.b.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..d705c8b24779d9625d37a361be28e08a6da874cf --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.b.bpmn20.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.c.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.c.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..12a1e147960b9c80cd574bd4b02602c8022c1f52 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.c.bpmn20.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.d.cmmn b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.d.cmmn new file mode 100644 index 0000000000000000000000000000000000000000..64e2b6626dab7b44859ce23c63e9b9bad1c4c863 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.d.cmmn @@ -0,0 +1,14 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/customName/a/autodeploy.a.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/customName/a/autodeploy.a.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..e4b1aec04e219a946589f0920f1e93b1659a6f5a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/customName/a/autodeploy.a.bpmn20.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/customName/b/autodeploy.a.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/customName/b/autodeploy.a.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..e4b1aec04e219a946589f0920f1e93b1659a6f5a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/autodeployment/customName/b/autodeploy.a.bpmn20.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/ProcessStartingBeanPostProcessorTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/ProcessStartingBeanPostProcessorTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..3611437412b2bc747f17fbe66922733521d91775 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/ProcessStartingBeanPostProcessorTest-context.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/ScopingTests-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/ScopingTests-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..6c5339cb38350144acdb58cf13f3213e3a2a8f40 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/ScopingTests-context.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/SpringJobExecutorRollBack.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/SpringJobExecutorRollBack.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..7d1a528b5d7a9521aa577f43753b2ad14dbe1ca8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/SpringJobExecutorRollBack.bpmn20.xml @@ -0,0 +1,52 @@ + + + + + + + + + PT1S + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/SpringTimersProcess.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/SpringTimersProcess.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..b3c2da518b40404ee8e6177d5aa5e48c11e22560 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/SpringTimersProcess.bpmn20.xml @@ -0,0 +1,45 @@ + + + + + + + + PT0S + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/SpringjobExecutorTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/SpringjobExecutorTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..68998541acad8b2cf4d3df3195133f1b2beab7bc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/SpringjobExecutorTest-context.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/StateHandlerTests-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/StateHandlerTests-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..e1a3cd1aa9690e0ffb3eff6d8df4565b15762790 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/StateHandlerTests-context.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + classpath:/org/camunda/bpm/engine/spring/test/autodeployment/autodeploy.*.bpmn20.xml + classpath:/org/activiti/spring/test/components/waiter.bpmn20.xml + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/spring-component-waiter.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/spring-component-waiter.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..1d215c7376041cca4a6b4d89aeaafcc1759a0d81 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/spring-component-waiter.bpmn20.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/waiter.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/waiter.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..b869177b05cc93bf7c4046ad4e603ebd5a15a91c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/components/waiter.bpmn20.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/configuration/JavaBasedProcessEngineConfigTest.testDelegateExpression.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/configuration/JavaBasedProcessEngineConfigTest.testDelegateExpression.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..ebc4cc8bfcf0f069d28702774fd8e81d8659d351 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/configuration/JavaBasedProcessEngineConfigTest.testDelegateExpression.bpmn20.xml @@ -0,0 +1,47 @@ + + + + + SequenceFlow_1shqv2t + + + + SequenceFlow_1shqv2t + SequenceFlow_0rehehw + + + SequenceFlow_0rehehw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/configuration/JavaBasedProcessEngineConfigTest.testDelegateExpressionWithProcessServices.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/configuration/JavaBasedProcessEngineConfigTest.testDelegateExpressionWithProcessServices.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..5c3e60c7824f82c58bd10e5532fc16e338598e40 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/configuration/JavaBasedProcessEngineConfigTest.testDelegateExpressionWithProcessServices.bpmn20.xml @@ -0,0 +1,62 @@ + + + + + SequenceFlow_1shqv2t + + + + SequenceFlow_1shqv2t + SequenceFlow_0zie8v5 + + + SequenceFlow_00601zm + + + + SequenceFlow_0zie8v5 + SequenceFlow_00601zm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/configuration/JavaBasedProcessEngineConfigTest.testExpression.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/configuration/JavaBasedProcessEngineConfigTest.testExpression.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..3731b53ebbe71d0be8beefadae7fa47e1a5ca183 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/configuration/JavaBasedProcessEngineConfigTest.testExpression.bpmn20.xml @@ -0,0 +1,47 @@ + + + + + SequenceFlow_1shqv2t + + + + SequenceFlow_1shqv2t + SequenceFlow_0rehehw + + + SequenceFlow_0rehehw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/container/ManagedProcessEngineFactoryBean-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/container/ManagedProcessEngineFactoryBean-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..ac6b05f0fb8d0e86d9760a593566c1765715f26f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/container/ManagedProcessEngineFactoryBean-context.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/dmn/DmnJuelTest-applicationContext.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/dmn/DmnJuelTest-applicationContext.xml new file mode 100644 index 0000000000000000000000000000000000000000..04c8c78989081bda86ae5584c9f4e7bea535ce46 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/dmn/DmnJuelTest-applicationContext.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/dmn/JuelTest.dmn b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/dmn/JuelTest.dmn new file mode 100644 index 0000000000000000000000000000000000000000..654773e81e9083cab22ef79526cb5c37059d6666 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/dmn/JuelTest.dmn @@ -0,0 +1,36 @@ + + + + + + + ${testbean.getBar()} + + + + + + "baz" + + + "bar" + + + + + "bar" + + + "foo" + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/SpringLimitedExpressionsTest.testLimitedBeansExposed.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/SpringLimitedExpressionsTest.testLimitedBeansExposed.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..4bebd9fcc75453b4b85b46bf6e4ac45bd7093fab --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/SpringLimitedExpressionsTest.testLimitedBeansExposed.bpmn20.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/callactivity/CallActivityBasedOnSpringBeansExpressionTest.testCallActivityByExpression.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/callactivity/CallActivityBasedOnSpringBeansExpressionTest.testCallActivityByExpression.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..61288e79ad084b143aa07100d2585041bfa2d5b9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/callactivity/CallActivityBasedOnSpringBeansExpressionTest.testCallActivityByExpression.bpmn20.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/callactivity/simpleSubProcess.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/callactivity/simpleSubProcess.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..999ee01d2bab28d5c75a484838df4af3c40b5e7a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/callactivity/simpleSubProcess.bpmn20.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/callactivity/testCallActivityByExpression-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/callactivity/testCallActivityByExpression-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..d3bafee3b3ea6f899e9be4e9184f74f3a20fbbef --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/callactivity/testCallActivityByExpression-context.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/expressionLimitedBeans-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/expressionLimitedBeans-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..cb090fadf0481eed605a61e4827b1c8c562bcb88 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/expression/expressionLimitedBeans-context.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/jpa/custom-persistence.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/jpa/custom-persistence.xml new file mode 100644 index 0000000000000000000000000000000000000000..5d7a28ccc3ae9a8bd1291991ea0a57c2d91e0fe5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/jpa/custom-persistence.xml @@ -0,0 +1,13 @@ + + + org.hibernate.jpa.HibernatePersistenceProvider + true + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/junit4/SpringJunit4Test.simpleProcessTest.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/junit4/SpringJunit4Test.simpleProcessTest.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..014d0142e8839143ea29558c288fceec39ce106d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/junit4/SpringJunit4Test.simpleProcessTest.bpmn20.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/junit4/springTypicalUsageTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/junit4/springTypicalUsageTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..1da45c801ed0cb55354b2009fe0342b42d0e8585 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/junit4/springTypicalUsageTest-context.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskLimitedBeansTest-applicationContext.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskLimitedBeansTest-applicationContext.xml new file mode 100644 index 0000000000000000000000000000000000000000..7593474e10a3e8e0b96ba2a578c9ca33204853f4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskLimitedBeansTest-applicationContext.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskNoBeansTest-applicationContext.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskNoBeansTest-applicationContext.xml new file mode 100644 index 0000000000000000000000000000000000000000..b89de3c5e642e833fb2863449c46a3cf2c57225e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskNoBeansTest-applicationContext.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskTest-applicationContext.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskTest-applicationContext.xml new file mode 100644 index 0000000000000000000000000000000000000000..dfaa6d834792c366d4ecce0fb0aac6a21b60c00d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/scripttask/ScriptTaskTest-applicationContext.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/BoundaryErrorEventSpringTest.testCatchErrorThrownByJavaDelegateOnServiceTask.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/BoundaryErrorEventSpringTest.testCatchErrorThrownByJavaDelegateOnServiceTask.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..09a41a68f3126b7881ba2cc64031cba39b4005ba --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/BoundaryErrorEventSpringTest.testCatchErrorThrownByJavaDelegateOnServiceTask.bpmn20.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testDelegateClass.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testDelegateClass.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..6be7a71b08be8490aacecbf130617311000061dc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testDelegateClass.bpmn20.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testDelegateClassNotABean.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testDelegateClassNotABean.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..e0c34c883418bc7550dad7f5929b41aa93ffb0a4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testDelegateClassNotABean.bpmn20.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testDelegateExpression.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testDelegateExpression.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..a968aea148eaddcf10ebcd9ad9d40b2cbabd7db6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testDelegateExpression.bpmn20.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testExecutionAndTaskListenerDelegationExpression.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testExecutionAndTaskListenerDelegationExpression.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..be253b783ee591935e99ec5763bc8b6cdabb2333 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testExecutionAndTaskListenerDelegationExpression.bpmn20.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testMethodExpressionOnSpringBean.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testMethodExpressionOnSpringBean.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..91db518aaf116d0486366b5e5635281135c40e63 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/ServiceTaskSpringDelegationTest.testMethodExpressionOnSpringBean.bpmn20.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/serviceraskSpringTestCatchError-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/serviceraskSpringTestCatchError-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..0560a2a0f756dca664d15e7746d7aa6794ef262b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/serviceraskSpringTestCatchError-context.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/servicetaskSpringTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/servicetaskSpringTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..9c7542560a99b8bd34f228569b1e8ed80a60b3ad --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/servicetask/servicetaskSpringTest-context.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskListener/TaskListenerDelegateExpressionTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskListener/TaskListenerDelegateExpressionTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..44efd653095ea34aca5f90d1cbeef93e13974f74 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskListener/TaskListenerDelegateExpressionTest-context.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskListener/TaskListenerSpringTest.testTaskListenerDelegateExpression.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskListener/TaskListenerSpringTest.testTaskListenerDelegateExpression.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..e8733b67c703917c9becb6e09fa39c32e7174bd8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskListener/TaskListenerSpringTest.testTaskListenerDelegateExpression.bpmn20.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskassignment/CustomTaskAssignmentTest.testSetAssigneeThroughSpringService.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskassignment/CustomTaskAssignmentTest.testSetAssigneeThroughSpringService.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..338bc9a7bfd345bf3648af71ca858d490f923546 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskassignment/CustomTaskAssignmentTest.testSetAssigneeThroughSpringService.bpmn20.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskassignment/CustomTaskAssignmentTest.testSetCandidateGroupsThroughSpringService.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskassignment/CustomTaskAssignmentTest.testSetCandidateGroupsThroughSpringService.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..74d08421aaaa6dbe02623439fb33ed0d7e552396 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskassignment/CustomTaskAssignmentTest.testSetCandidateGroupsThroughSpringService.bpmn20.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskassignment/CustomTaskAssignmentTest.testSetCandidateUsersThroughSpringService.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskassignment/CustomTaskAssignmentTest.testSetCandidateUsersThroughSpringService.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..e2d904265e6533db2b741a618f232c404e75dd2d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskassignment/CustomTaskAssignmentTest.testSetCandidateUsersThroughSpringService.bpmn20.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskassignment/taskassignment-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskassignment/taskassignment-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..ee596e48d1a6b1c290acb1c5ce5248201f1850ab --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/taskassignment/taskassignment-context.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/ProcessInstanceModificationInTransactionTest-applicationContext.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/ProcessInstanceModificationInTransactionTest-applicationContext.xml new file mode 100644 index 0000000000000000000000000000000000000000..fd55c0bbcd35284b2c211c96f4a39da63c316bac --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/ProcessInstanceModificationInTransactionTest-applicationContext.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringInnerTransactionRollbackTest-applicationContext.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringInnerTransactionRollbackTest-applicationContext.xml new file mode 100644 index 0000000000000000000000000000000000000000..ba8732829e8151585126c7cf87c78b5a1886892f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringInnerTransactionRollbackTest-applicationContext.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + classpath:/org/camunda/bpm/engine/spring/test/jpa/custom-persistence.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringInnerTransactionRollbackTest.shouldRollbackProcessData-inner.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringInnerTransactionRollbackTest.shouldRollbackProcessData-inner.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..d155fd014569e5eba12c16e3befeecfda4effb31 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringInnerTransactionRollbackTest.shouldRollbackProcessData-inner.bpmn20.xml @@ -0,0 +1,44 @@ + + + + + SequenceFlow_0xcnqy3 + + + + SequenceFlow_0q610er + + + + SequenceFlow_0xcnqy3 + SequenceFlow_0q610er + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringInnerTransactionRollbackTest.shouldRollbackProcessData-outer.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringInnerTransactionRollbackTest.shouldRollbackProcessData-outer.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..b5925cbd5a48903f454d8adac61e28981ef68e52 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringInnerTransactionRollbackTest.shouldRollbackProcessData-outer.bpmn20.xml @@ -0,0 +1,44 @@ + + + + + SequenceFlow_1xrn9u3 + + + + SequenceFlow_0n3vfv0 + + + + SequenceFlow_1xrn9u3 + SequenceFlow_0n3vfv0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeleteDeploymentFailTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeleteDeploymentFailTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..7c88841aae34cb6f1e799fd6deb619d7ccc909f8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeleteDeploymentFailTest-context.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeploymentFailTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeploymentFailTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..434a59fd7ba7b021448c2b6b3355b9bcae696105 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationDeploymentFailTest-context.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest-context.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest-context.xml new file mode 100644 index 0000000000000000000000000000000000000000..c72ae11e87ff1a3ae3bd086855935c3c312df846 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest-context.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testBasicActivitiSpringIntegration.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testBasicActivitiSpringIntegration.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..4d0c5fb969e13eaf8940449714b260bc1e2bb141 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testBasicActivitiSpringIntegration.bpmn20.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testErrorPropagationOnExceptionInTransaction.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testErrorPropagationOnExceptionInTransaction.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..80e3e87fba683462986ceef9210c5bf9a5fae59f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testErrorPropagationOnExceptionInTransaction.bpmn20.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testFailingTransactionListener.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testFailingTransactionListener.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..71a3c32c6d67904ab6b2de9fe923348c60393f08 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testFailingTransactionListener.bpmn20.xml @@ -0,0 +1,47 @@ + + + + + SequenceFlow_1j3od4f + + + + SequenceFlow_1j3od4f + SequenceFlow_0zpkb9t + + + SequenceFlow_0zpkb9t + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testRollbackTransactionOnActivitiException.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testRollbackTransactionOnActivitiException.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..35f0cff66df823bac52f35920c077e2f12817bdb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testRollbackTransactionOnActivitiException.bpmn20.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testTransactionRollbackInServiceTask.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testTransactionRollbackInServiceTask.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..b9b7fc80fa099e7766d221a305f7e3db756ff3d4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testTransactionRollbackInServiceTask.bpmn20.xml @@ -0,0 +1,47 @@ + + + + + SequenceFlow_1j3od4f + + + + SequenceFlow_1j3od4f + SequenceFlow_0zpkb9t + + + SequenceFlow_0zpkb9t + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testTransactionRollbackInServiceTaskWithCustomRetryCycle.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testTransactionRollbackInServiceTaskWithCustomRetryCycle.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..bd2f4ed7007ef603ac44731100b5332e73f8b4dd --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.testTransactionRollbackInServiceTaskWithCustomRetryCycle.bpmn20.xml @@ -0,0 +1,50 @@ + + + + + SequenceFlow_1j3od4f + + + + + R5/PT0S + + SequenceFlow_1j3od4f + SequenceFlow_0zpkb9t + + + SequenceFlow_0zpkb9t + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.throwExceptionProcess.bpmn20.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.throwExceptionProcess.bpmn20.xml new file mode 100644 index 0000000000000000000000000000000000000000..d34f15cb85326a001caae2a991b965f5f17150b3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/core/src/test/resources/org/camunda/bpm/engine/spring/test/transaction/SpringTransactionIntegrationTest.throwExceptionProcess.bpmn20.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..0ba338a6b6f79e74fe9c6ba507e7e65cba3ec322 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine-spring/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + + + org.camunda.bpm + camunda-database-settings + ../database + 7.24.0-SNAPSHOT + + + camunda-spring-compatibility-root + + pom + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + Camunda Platform - engine - Spring - Root + + + core + + + + + jdk17 + + [17,) + + + core-6 + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice-jakarta/README.md b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice-jakarta/README.md new file mode 100644 index 0000000000000000000000000000000000000000..37309071daf8e00856a8f33f62041f581baf692b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice-jakarta/README.md @@ -0,0 +1,5 @@ +# The Invoice Jakarta Demo Application + +This is the invoice demo application which is shipped with the full distributions that use the Jakarta namespace. + +> This module copies and transforms the source code of the `camunda-example-invoice` module. diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice-jakarta/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice-jakarta/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..a7e4a4a129085f5195579b6737268f1d3254dc32 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice-jakarta/pom.xml @@ -0,0 +1,226 @@ + + 4.0.0 + + camunda-example-invoice-jakarta + war + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + Camunda Platform - Example - Invoice Jakarta + + + org.camunda.bpm.example + camunda-example-root + ../ + 7.24.0-SNAPSHOT + + + + + + jakarta.platform + jakarta.jakartaee-bom + ${version.jakarta-ee-spec} + pom + import + + + + + + + jakarta.servlet + jakarta.servlet-api + provided + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + initialize + + properties + + + + + + maven-resources-plugin + + + copy-main-sources + generate-sources + + copy-resources + + + ${project.build.directory}/generated-sources/jakarta + + + ${basedir}/../invoice/src/main/java + false + + **/EmptyBodyFilter.java + + + + + + + copy-main-resources + generate-resources + + copy-resources + + + ${project.build.directory}/generated-resources/jakarta + + + ${basedir}/../invoice/src/main/resources + false + + + + + + copy-webapp-resources + generate-resources + + copy-resources + + + ${project.build.directory}/generated-resources/jakarta-webapp + + + ${basedir}/../invoice/src/main/webapp + false + + + + + + copy-test-sources + generate-test-sources + + copy-resources + + + ${project.build.directory}/generated-test-sources/jakarta + + + ${basedir}/../invoice/src/test/java + false + + + + + + copy-test-resources + generate-test-resources + + copy-resources + + + ${project.build.directory}/generated-test-resources/jakarta + + + ${basedir}/../invoice/src/test/resources + true + + + + + + + + org.eclipse.transformer + transformer-maven-plugin + + + transform-jakarta-sources + generate-sources + + transform + + + ${project.build.directory}/generated-sources/jakarta + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-jakarta-source + generate-sources + + add-source + + + + ${project.build.directory}/generated-sources/jakarta + + + + + add-jakarta-resource + generate-resources + + add-resource + + + + + ${project.build.directory}/generated-resources/jakarta + + + + + + add-jakarta-test-source + generate-test-sources + + add-test-source + + + + ${project.build.directory}/generated-test-sources/jakarta + + + + + add-jakarta-test-resource + generate-test-resources + + add-test-resource + + + + + ${project.build.directory}/generated-test-resources/jakarta + + + + + + + + + org.apache.maven.plugins + maven-war-plugin + + ${project.build.directory}/generated-resources/jakarta-webapp + + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/README.md b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/README.md new file mode 100644 index 0000000000000000000000000000000000000000..633f8009ae7420d2bdbe89f4d5fdb5a9ae15ccb5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/README.md @@ -0,0 +1,3 @@ +# The Invoice Demo Application + +This is the invoice demo application which is shipped with the full distributions. diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..8ae4633b95c86ae9ed406a48691db98d1e8fb424 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + + camunda-example-invoice + war + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + Camunda Platform - Example - Invoice + + + org.camunda.bpm.example + camunda-example-root + ../ + 7.24.0-SNAPSHOT + + + + + javax.servlet + javax.servlet-api + 3.0.1 + provided + + + + + + + org.apache.maven.plugins + maven-war-plugin + + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/DemoDataGenerator.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/DemoDataGenerator.java new file mode 100644 index 0000000000000000000000000000000000000000..31ff10ac9c328bd7046efd75629c3788d3fd1cf4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/DemoDataGenerator.java @@ -0,0 +1,364 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.example.invoice; + +import static org.camunda.bpm.engine.authorization.Authorization.ANY; +import static org.camunda.bpm.engine.authorization.Authorization.AUTH_TYPE_GRANT; +import static org.camunda.bpm.engine.authorization.Permissions.ACCESS; +import static org.camunda.bpm.engine.authorization.Permissions.ALL; +import static org.camunda.bpm.engine.authorization.Permissions.READ; +import static org.camunda.bpm.engine.authorization.Permissions.UPDATE; +import static org.camunda.bpm.engine.authorization.Resources.APPLICATION; +import static org.camunda.bpm.engine.authorization.Resources.FILTER; +import static org.camunda.bpm.engine.authorization.Resources.TASK; +import static org.camunda.bpm.engine.authorization.Resources.USER; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.logging.Logger; + +import org.camunda.bpm.engine.AuthorizationService; +import org.camunda.bpm.engine.FilterService; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.TaskService; +import org.camunda.bpm.engine.authorization.Authorization; +import org.camunda.bpm.engine.authorization.Groups; +import org.camunda.bpm.engine.authorization.Permissions; +import org.camunda.bpm.engine.authorization.Resource; +import org.camunda.bpm.engine.authorization.Resources; +import org.camunda.bpm.engine.filter.Filter; +import org.camunda.bpm.engine.identity.Group; +import org.camunda.bpm.engine.identity.User; +import org.camunda.bpm.engine.impl.IdentityServiceImpl; +import org.camunda.bpm.engine.impl.persistence.entity.AuthorizationEntity; +import org.camunda.bpm.engine.task.TaskQuery; + +/** + * Creates demo credentials to be used in the invoice showcase. + * + * @author drobisch + */ +public class DemoDataGenerator { + + private final static Logger LOGGER = Logger.getLogger(DemoDataGenerator.class.getName()); + + public void createUsers(ProcessEngine engine) { + + final IdentityServiceImpl identityService = (IdentityServiceImpl) engine.getIdentityService(); + + if(identityService.isReadOnly()) { + LOGGER.info("Identity service provider is Read Only, not creating any demo users."); + return; + } + + User singleResult = identityService.createUserQuery().userId("demo").singleResult(); + if (singleResult != null) { + return; + } + + LOGGER.info("Generating demo data for invoice showcase"); + + User user = identityService.newUser("demo"); + user.setFirstName("Demo"); + user.setLastName("Demo"); + user.setPassword("demo"); + user.setEmail("demo@camunda.org"); + identityService.saveUser(user, true); + + User user2 = identityService.newUser("john"); + user2.setFirstName("John"); + user2.setLastName("Doe"); + user2.setPassword("john"); + user2.setEmail("john@camunda.org"); + identityService.saveUser(user2, true); + + User user3 = identityService.newUser("mary"); + user3.setFirstName("Mary"); + user3.setLastName("Anne"); + user3.setPassword("mary"); + user3.setEmail("mary@camunda.org"); + identityService.saveUser(user3, true); + + User user4 = identityService.newUser("peter"); + user4.setFirstName("Peter"); + user4.setLastName("Meter"); + user4.setPassword("peter"); + user4.setEmail("peter@camunda.org"); + identityService.saveUser(user4, true); + + Group salesGroup = identityService.newGroup("sales"); + salesGroup.setName("Sales"); + salesGroup.setType("WORKFLOW"); + identityService.saveGroup(salesGroup); + + Group accountingGroup = identityService.newGroup("accounting"); + accountingGroup.setName("Accounting"); + accountingGroup.setType("WORKFLOW"); + identityService.saveGroup(accountingGroup); + + Group managementGroup = identityService.newGroup("management"); + managementGroup.setName("Management"); + managementGroup.setType("WORKFLOW"); + identityService.saveGroup(managementGroup); + + final AuthorizationService authorizationService = engine.getAuthorizationService(); + + // create group + if(identityService.createGroupQuery().groupId(Groups.CAMUNDA_ADMIN).count() == 0) { + Group camundaAdminGroup = identityService.newGroup(Groups.CAMUNDA_ADMIN); + camundaAdminGroup.setName("camunda BPM Administrators"); + camundaAdminGroup.setType(Groups.GROUP_TYPE_SYSTEM); + identityService.saveGroup(camundaAdminGroup); + } + + // create ADMIN authorizations on all built-in resources + for (Resource resource : Resources.values()) { + if(authorizationService.createAuthorizationQuery().groupIdIn(Groups.CAMUNDA_ADMIN).resourceType(resource).resourceId(ANY).count() == 0) { + AuthorizationEntity userAdminAuth = new AuthorizationEntity(AUTH_TYPE_GRANT); + userAdminAuth.setGroupId(Groups.CAMUNDA_ADMIN); + userAdminAuth.setResource(resource); + userAdminAuth.setResourceId(ANY); + userAdminAuth.addPermission(ALL); + authorizationService.saveAuthorization(userAdminAuth); + } + } + + identityService.createMembership("demo", "sales"); + identityService.createMembership("demo", "accounting"); + identityService.createMembership("demo", "management"); + identityService.createMembership("demo", "camunda-admin"); + + identityService.createMembership("john", "sales"); + identityService.createMembership("mary", "accounting"); + identityService.createMembership("peter", "management"); + + + // authorize groups for tasklist only: + + Authorization salesTasklistAuth = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); + salesTasklistAuth.setGroupId("sales"); + salesTasklistAuth.addPermission(ACCESS); + salesTasklistAuth.setResourceId("tasklist"); + salesTasklistAuth.setResource(APPLICATION); + authorizationService.saveAuthorization(salesTasklistAuth); + + Authorization salesReadProcessDefinition = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); + salesReadProcessDefinition.setGroupId("sales"); + salesReadProcessDefinition.addPermission(Permissions.READ); + salesReadProcessDefinition.addPermission(Permissions.READ_HISTORY); + salesReadProcessDefinition.setResource(Resources.PROCESS_DEFINITION); + // restrict to invoice process definition only + salesReadProcessDefinition.setResourceId("invoice"); + authorizationService.saveAuthorization(salesReadProcessDefinition); + + Authorization accountingTasklistAuth = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); + accountingTasklistAuth.setGroupId("accounting"); + accountingTasklistAuth.addPermission(ACCESS); + accountingTasklistAuth.setResourceId("tasklist"); + accountingTasklistAuth.setResource(APPLICATION); + authorizationService.saveAuthorization(accountingTasklistAuth); + + Authorization accountingReadProcessDefinition = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); + accountingReadProcessDefinition.setGroupId("accounting"); + accountingReadProcessDefinition.addPermission(Permissions.READ); + accountingReadProcessDefinition.addPermission(Permissions.READ_HISTORY); + accountingReadProcessDefinition.setResource(Resources.PROCESS_DEFINITION); + // restrict to invoice process definition only + accountingReadProcessDefinition.setResourceId("invoice"); + authorizationService.saveAuthorization(accountingReadProcessDefinition); + + Authorization managementTasklistAuth = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); + managementTasklistAuth.setGroupId("management"); + managementTasklistAuth.addPermission(ACCESS); + managementTasklistAuth.setResourceId("tasklist"); + managementTasklistAuth.setResource(APPLICATION); + authorizationService.saveAuthorization(managementTasklistAuth); + + Authorization managementReadProcessDefinition = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); + managementReadProcessDefinition.setGroupId("management"); + managementReadProcessDefinition.addPermission(Permissions.READ); + managementReadProcessDefinition.addPermission(Permissions.READ_HISTORY); + managementReadProcessDefinition.setResource(Resources.PROCESS_DEFINITION); + // restrict to invoice process definition only + managementReadProcessDefinition.setResourceId("invoice"); + authorizationService.saveAuthorization(managementReadProcessDefinition); + + Authorization salesDemoAuth = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); + salesDemoAuth.setGroupId("sales"); + salesDemoAuth.setResource(USER); + salesDemoAuth.setResourceId("demo"); + salesDemoAuth.addPermission(READ); + authorizationService.saveAuthorization(salesDemoAuth); + + Authorization salesJohnAuth = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); + salesJohnAuth.setGroupId("sales"); + salesJohnAuth.setResource(USER); + salesJohnAuth.setResourceId("john"); + salesJohnAuth.addPermission(READ); + authorizationService.saveAuthorization(salesJohnAuth); + + Authorization manDemoAuth = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); + manDemoAuth.setGroupId("management"); + manDemoAuth.setResource(USER); + manDemoAuth.setResourceId("demo"); + manDemoAuth.addPermission(READ); + authorizationService.saveAuthorization(manDemoAuth); + + Authorization manPeterAuth = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); + manPeterAuth.setGroupId("management"); + manPeterAuth.setResource(USER); + manPeterAuth.setResourceId("peter"); + manPeterAuth.addPermission(READ); + authorizationService.saveAuthorization(manPeterAuth); + + Authorization accDemoAuth = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); + accDemoAuth.setGroupId("accounting"); + accDemoAuth.setResource(USER); + accDemoAuth.setResourceId("demo"); + accDemoAuth.addPermission(READ); + authorizationService.saveAuthorization(accDemoAuth); + + Authorization accMaryAuth = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); + accMaryAuth.setGroupId("accounting"); + accMaryAuth.setResource(USER); + accMaryAuth.setResourceId("mary"); + accMaryAuth.addPermission(READ); + authorizationService.saveAuthorization(accMaryAuth); + + Authorization taskMaryAuth = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT); + taskMaryAuth.setUserId("mary"); + taskMaryAuth.setResource(TASK); + taskMaryAuth.setResourceId(ANY); + taskMaryAuth.addPermission(READ); + taskMaryAuth.addPermission(UPDATE); + authorizationService.saveAuthorization(taskMaryAuth); + + // create default filters + + FilterService filterService = engine.getFilterService(); + + Map filterProperties = new HashMap(); + filterProperties.put("description", "Tasks assigned to me"); + filterProperties.put("priority", -10); + addVariables(filterProperties); + TaskService taskService = engine.getTaskService(); + TaskQuery query = taskService.createTaskQuery().taskAssigneeExpression("${currentUser()}"); + Filter myTasksFilter = filterService.newTaskFilter().setName("My Tasks").setProperties(filterProperties).setOwner("demo").setQuery(query); + filterService.saveFilter(myTasksFilter); + + filterProperties.clear(); + filterProperties.put("description", "Tasks assigned to my Groups"); + filterProperties.put("priority", -5); + addVariables(filterProperties); + query = taskService.createTaskQuery().taskCandidateGroupInExpression("${currentUserGroups()}").taskUnassigned(); + Filter groupTasksFilter = filterService.newTaskFilter().setName("My Group Tasks").setProperties(filterProperties).setOwner("demo").setQuery(query); + filterService.saveFilter(groupTasksFilter); + + // global read authorizations for these filters + + Authorization globalMyTaskFilterRead = authorizationService.createNewAuthorization(Authorization.AUTH_TYPE_GLOBAL); + globalMyTaskFilterRead.setResource(FILTER); + globalMyTaskFilterRead.setResourceId(myTasksFilter.getId()); + globalMyTaskFilterRead.addPermission(READ); + authorizationService.saveAuthorization(globalMyTaskFilterRead); + + Authorization globalGroupFilterRead = authorizationService.createNewAuthorization(Authorization.AUTH_TYPE_GLOBAL); + globalGroupFilterRead.setResource(FILTER); + globalGroupFilterRead.setResourceId(groupTasksFilter.getId()); + globalGroupFilterRead.addPermission(READ); + authorizationService.saveAuthorization(globalGroupFilterRead); + + // management filter + + filterProperties.clear(); + filterProperties.put("description", "Tasks for Group Accounting"); + filterProperties.put("priority", -3); + addVariables(filterProperties); + query = taskService.createTaskQuery().taskCandidateGroupIn(Arrays.asList("accounting")).taskUnassigned(); + Filter candidateGroupTasksFilter = filterService.newTaskFilter().setName("Accounting").setProperties(filterProperties).setOwner("demo").setQuery(query); + filterService.saveFilter(candidateGroupTasksFilter); + + Authorization managementGroupFilterRead = authorizationService.createNewAuthorization(Authorization.AUTH_TYPE_GRANT); + managementGroupFilterRead.setResource(FILTER); + managementGroupFilterRead.setResourceId(candidateGroupTasksFilter.getId()); + managementGroupFilterRead.addPermission(READ); + managementGroupFilterRead.setGroupId("accounting"); + authorizationService.saveAuthorization(managementGroupFilterRead); + + // john's tasks + + filterProperties.clear(); + filterProperties.put("description", "Tasks assigned to John"); + filterProperties.put("priority", -1); + addVariables(filterProperties); + query = taskService.createTaskQuery().taskAssignee("john"); + Filter johnsTasksFilter = filterService.newTaskFilter().setName("John's Tasks").setProperties(filterProperties).setOwner("demo").setQuery(query); + filterService.saveFilter(johnsTasksFilter); + + // mary's tasks + + filterProperties.clear(); + filterProperties.put("description", "Tasks assigned to Mary"); + filterProperties.put("priority", -1); + addVariables(filterProperties); + query = taskService.createTaskQuery().taskAssignee("mary"); + Filter marysTasksFilter = filterService.newTaskFilter().setName("Mary's Tasks").setProperties(filterProperties).setOwner("demo").setQuery(query); + filterService.saveFilter(marysTasksFilter); + + // peter's tasks + + filterProperties.clear(); + filterProperties.put("description", "Tasks assigned to Peter"); + filterProperties.put("priority", -1); + addVariables(filterProperties); + query = taskService.createTaskQuery().taskAssignee("peter"); + Filter petersTasksFilter = filterService.newTaskFilter().setName("Peter's Tasks").setProperties(filterProperties).setOwner("demo").setQuery(query); + filterService.saveFilter(petersTasksFilter); + + // all tasks + + filterProperties.clear(); + filterProperties.put("description", "All Tasks - Not recommended to be used in production :)"); + filterProperties.put("priority", 10); + addVariables(filterProperties); + query = taskService.createTaskQuery(); + Filter allTasksFilter = filterService.newTaskFilter().setName("All Tasks").setProperties(filterProperties).setOwner("demo").setQuery(query); + filterService.saveFilter(allTasksFilter); + + } + + protected void addVariables(Map filterProperties) { + List variables = new ArrayList(); + + addVariable(variables, "amount", "Invoice Amount"); + addVariable(variables, "invoiceNumber", "Invoice Number"); + addVariable(variables, "creditor", "Creditor"); + addVariable(variables, "approver", "Approver"); + + filterProperties.put("variables", variables); + } + + protected void addVariable(List variables, String name, String label) { + Map variable = new HashMap(); + variable.put("name", name); + variable.put("label", label); + variables.add(variable); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/InvoiceApplicationHelper.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/InvoiceApplicationHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..fd0ca3944365f0a3a2efc98012b65e20e7289485 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/InvoiceApplicationHelper.java @@ -0,0 +1,193 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.example.invoice; + +import static org.camunda.bpm.engine.variable.Variables.createVariables; +import static org.camunda.bpm.engine.variable.Variables.fileValue; + +import java.io.InputStream; +import java.util.Arrays; +import java.util.Calendar; +import java.util.logging.Logger; +import org.camunda.bpm.application.ProcessApplicationReference; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.authorization.Groups; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.util.ClockUtil; +import org.camunda.bpm.engine.impl.util.IoUtil; +import org.camunda.bpm.engine.repository.ProcessDefinition; +import org.camunda.bpm.engine.repository.ProcessDefinitionQuery; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.task.Task; + +public class InvoiceApplicationHelper { + + private static final Logger LOGGER = Logger.getLogger(InvoiceApplicationHelper.class.getName()); + + public static void startFirstProcess(ProcessEngine processEngine) { + createUsers(processEngine); + + //enable metric reporting + ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration(); + processEngineConfiguration.setDbMetricsReporterActivate(true); + processEngineConfiguration.getDbMetricsReporter().setReporterId("REPORTER"); + + startProcessInstances(processEngine, "invoice", 1); + startProcessInstances(processEngine, "invoice", null); + + //disable reporting + processEngineConfiguration.setDbMetricsReporterActivate(false); + } + + public static void createDeployment(String processArchiveName, ProcessEngine processEngine, ClassLoader classLoader, ProcessApplicationReference applicationReference) { + // Hack: deploy the first version of the invoice process once before the process application + // is deployed the first time + if (processEngine != null) { + + RepositoryService repositoryService = processEngine.getRepositoryService(); + + if (!isProcessDeployed(repositoryService, "invoice")) { + repositoryService.createDeployment(applicationReference) + .addInputStream("invoice.v1.bpmn", classLoader.getResourceAsStream("invoice.v1.bpmn")) + .addInputStream("invoiceBusinessDecisions.dmn", classLoader.getResourceAsStream("invoiceBusinessDecisions.dmn")) + .addInputStream("reviewInvoice.bpmn", classLoader.getResourceAsStream("reviewInvoice.bpmn")) + .deploy(); + } + } + } + + protected static boolean isProcessDeployed(RepositoryService repositoryService, String key) { + return repositoryService.createProcessDefinitionQuery().processDefinitionKey("invoice").count() > 0; + } + + protected static void startProcessInstances(ProcessEngine processEngine, String processDefinitionKey, Integer version) { + + ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration(); + ProcessDefinitionQuery processDefinitionQuery = processEngine + .getRepositoryService() + .createProcessDefinitionQuery() + .processDefinitionKey(processDefinitionKey); + + if (version != null) { + processDefinitionQuery.processDefinitionVersion(version); + } + else { + processDefinitionQuery.latestVersion(); + } + + ProcessDefinition processDefinition = processDefinitionQuery.singleResult(); + + InputStream invoiceInputStream = InvoiceApplicationHelper.class.getClassLoader().getResourceAsStream("invoice.pdf"); + + long numberOfRunningProcessInstances = processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionId(processDefinition.getId()).count(); + + if (numberOfRunningProcessInstances == 0) { // start three process instances + + LOGGER.info("Start 3 instances of " + processDefinition.getName() + ", version " + processDefinition.getVersion()); + // process instance 1 + processEngine.getRuntimeService().startProcessInstanceById(processDefinition.getId(), createVariables() + .putValue("creditor", "Great Pizza for Everyone Inc.") + .putValue("amount", 30.00d) + .putValue("invoiceCategory", "Travel Expenses") + .putValue("invoiceNumber", "GPFE-23232323") + .putValue("invoiceDocument", fileValue("invoice.pdf") + .file(invoiceInputStream) + .mimeType("application/pdf") + .create())); + + IoUtil.closeSilently(invoiceInputStream); + invoiceInputStream = InvoiceApplicationHelper.class.getClassLoader().getResourceAsStream("invoice.pdf"); + processEngineConfiguration.getDbMetricsReporter().reportNow(); + + // process instance 2 + try { + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.DAY_OF_MONTH, -14); + ClockUtil.setCurrentTime(calendar.getTime()); + + ProcessInstance pi = processEngine.getRuntimeService().startProcessInstanceById(processDefinition.getId(), createVariables() + .putValue("creditor", "Bobby's Office Supplies") + .putValue("amount", 900.00d) + .putValue("invoiceCategory", "Misc") + .putValue("invoiceNumber", "BOS-43934") + .putValue("invoiceDocument", fileValue("invoice.pdf") + .file(invoiceInputStream) + .mimeType("application/pdf") + .create())); + + processEngineConfiguration.getDbMetricsReporter().reportNow(); + calendar.add(Calendar.DAY_OF_MONTH, 14); + ClockUtil.setCurrentTime(calendar.getTime()); + + processEngine.getIdentityService().setAuthentication("demo", Arrays.asList(Groups.CAMUNDA_ADMIN)); + Task task = processEngine.getTaskService().createTaskQuery().processInstanceId(pi.getId()).singleResult(); + processEngine.getTaskService().claim(task.getId(), "demo"); + processEngine.getTaskService().complete(task.getId(), createVariables().putValue("approved", true)); + } + finally{ + processEngineConfiguration.getDbMetricsReporter().reportNow(); + ClockUtil.reset(); + processEngine.getIdentityService().clearAuthentication(); + } + + IoUtil.closeSilently(invoiceInputStream); + invoiceInputStream = InvoiceApplicationHelper.class.getClassLoader().getResourceAsStream("invoice.pdf"); + + // process instance 3 + try { + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.DAY_OF_MONTH, -5); + ClockUtil.setCurrentTime(calendar.getTime()); + + ProcessInstance pi = processEngine.getRuntimeService().startProcessInstanceById(processDefinition.getId(), createVariables() + .putValue("creditor", "Papa Steve's all you can eat") + .putValue("amount", 10.99d) + .putValue("invoiceCategory", "Travel Expenses") + .putValue("invoiceNumber", "PSACE-5342") + .putValue("invoiceDocument", fileValue("invoice.pdf") + .file(invoiceInputStream) + .mimeType("application/pdf") + .create())); + + processEngineConfiguration.getDbMetricsReporter().reportNow(); + calendar.add(Calendar.DAY_OF_MONTH, 5); + ClockUtil.setCurrentTime(calendar.getTime()); + + processEngine.getIdentityService().setAuthenticatedUserId("mary"); + Task task = processEngine.getTaskService().createTaskQuery().processInstanceId(pi.getId()).singleResult(); + processEngine.getTaskService().createComment(null, pi.getId(), "I cannot approve this invoice: the amount is missing.\n\n Could you please provide the amount?"); + processEngine.getTaskService().complete(task.getId(), createVariables().putValue("approved", false)); + } + finally{ + processEngineConfiguration.getDbMetricsReporter().reportNow(); + ClockUtil.reset(); + processEngine.getIdentityService().clearAuthentication(); + } + } else { + LOGGER.info("No new instances of " + processDefinition.getName() + + " version " + processDefinition.getVersion() + + " started, there are " + numberOfRunningProcessInstances + " instances running"); + } + } + + protected static void createUsers(ProcessEngine processEngine) { + + // create demo users + new DemoDataGenerator().createUsers(processEngine); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/InvoiceProcessApplication.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/InvoiceProcessApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..f76dff03dd4168c0e7f7bbe07f802f3b2dd465b3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/InvoiceProcessApplication.java @@ -0,0 +1,46 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.example.invoice; + +import org.camunda.bpm.BpmPlatform; +import org.camunda.bpm.application.PostDeploy; +import org.camunda.bpm.application.ProcessApplication; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.repository.DeploymentBuilder; + +/** + * Process Application exposing this application's resources the process engine. + */ +@ProcessApplication(name = "InvoiceProcessApplication") +// Using fully-qualified class name instead of import statement to allow for automatic Jakarta transformation +public class InvoiceProcessApplication extends org.camunda.bpm.application.impl.ServletProcessApplication { + + /** + * In a @PostDeploy Hook you can interact with the process engine and access + * the processes the application has deployed. + */ + @PostDeploy + public void startFirstProcess(ProcessEngine processEngine) { + InvoiceApplicationHelper.startFirstProcess(processEngine); + } + + @Override + public void createDeployment(String processArchiveName, DeploymentBuilder deploymentBuilder) { + ProcessEngine processEngine = BpmPlatform.getProcessEngineService().getProcessEngine("default"); + InvoiceApplicationHelper.createDeployment(processArchiveName, processEngine, getProcessApplicationClassloader(), getReference()); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/service/ArchiveInvoiceService.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/service/ArchiveInvoiceService.java new file mode 100644 index 0000000000000000000000000000000000000000..47a22e70be4dfc4c973d11bf0c9d3cb1b826e0b0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/service/ArchiveInvoiceService.java @@ -0,0 +1,49 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.example.invoice.service; + +import java.util.logging.Logger; + +import org.camunda.bpm.engine.ProcessEngineException; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.camunda.bpm.engine.variable.value.FileValue; + +/** + *

This is an empty service implementation illustrating how to use a plain + * Java Class as a BPMN 2.0 Service Task delegate.

+ */ +public class ArchiveInvoiceService implements JavaDelegate { + + private final Logger LOGGER = Logger.getLogger(ArchiveInvoiceService.class.getName()); + + public void execute(DelegateExecution execution) throws Exception { + + Boolean shouldFail = (Boolean) execution.getVariable("shouldFail"); + FileValue invoiceDocumentVar = execution.getVariableTyped("invoiceDocument"); + + if(shouldFail != null && shouldFail) { + throw new ProcessEngineException("Could not archive invoice..."); + } + else { + LOGGER.info("\n\n ... Now archiving invoice "+execution.getVariable("invoiceNumber") + +", filename: "+invoiceDocumentVar.getFilename()+" \n\n"); + } + + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/service/NotifyCreditorService.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/service/NotifyCreditorService.java new file mode 100644 index 0000000000000000000000000000000000000000..0c7ed9bf0c828e542f203cb6a8ce42a369437538 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/service/NotifyCreditorService.java @@ -0,0 +1,38 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.example.invoice.service; + +import java.util.logging.Logger; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; + +/** + *

This is an empty service implementation illustrating how to use a plain + * Java Class as a BPMN 2.0 Service Task delegate.

+ */ +public class NotifyCreditorService implements JavaDelegate { + + private final Logger LOGGER = Logger.getLogger(NotifyCreditorService.class.getName()); + + public void execute(DelegateExecution execution) throws Exception { + + LOGGER.info("\n\n ... Now notifying creditor " + execution.getVariable("creditor") + "\n\n"); + + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/META-INF/processes.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/META-INF/processes.xml new file mode 100644 index 0000000000000000000000000000000000000000..841a7a9f1eb6618c3488c4d7c716abd111c2563a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/META-INF/processes.xml @@ -0,0 +1,17 @@ + + + + + + default + invoice.v2.bpmn + invoiceBusinessDecisions.dmn + + false + false + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/invoice.pdf b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/invoice.pdf new file mode 100644 index 0000000000000000000000000000000000000000..95f7c334983caa24fc8fd6ef92dcf787e9fc6b69 Binary files /dev/null and b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/invoice.pdf differ diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/invoice.v1.bpmn b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/invoice.v1.bpmn new file mode 100644 index 0000000000000000000000000000000000000000..101218a8889c5500edbeedecc6cd1cc2a2aaddf6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/invoice.v1.bpmn @@ -0,0 +1,275 @@ + + + + + + + + + + + + + prepareBankTransfer + invoiceProcessed + ServiceTask_1 + + + assignApprover + StartEvent_1 + reviewSuccessful_gw + invoiceNotProcessed + reviewInvoice + + + approveInvoice + invoice_approved + ServiceTask_06mdb3v + + + + + Approve the invoice (or not). + + + if(!!task.getVariable('approver')) { + task.setAssignee(approver); +} + + + task.setVariable('approver', task.getAssignee()); + + + sequenceFlow_178 + reviewSuccessful + sequenceFlow_180 + + + sequenceFlow_180 + invoiceNotApproved + invoiceApproved + + + SequenceFlow_1 + sequenceFlow_178 + + + SequenceFlow_1 + + + sequenceFlow_183 + reviewNotSuccessful + reviewSuccessful + + + Prepare the bank transfer. + SequenceFlow_1pcdtz2 + SequenceFlow_2 + + + DataStoreReference_1 + Property_16iplb1 + + + + SequenceFlow_3 + + + SequenceFlow_2 + SequenceFlow_3 + + + reviewNotSuccessful + + + invoiceApproved + SequenceFlow_1pcdtz2 + + + + + + + + + + + invoiceNotApproved + sequenceFlow_183 + + + + + + ${!clarified} + + + + + ${clarified} + + + ${approved} + + + + + ${!approved} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/invoice.v2.bpmn b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/invoice.v2.bpmn new file mode 100644 index 0000000000000000000000000000000000000000..8159dffde37b8fe7c04787ab0d130644428e0fa3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/invoice.v2.bpmn @@ -0,0 +1,259 @@ + + + + + + + + + + + + + prepareBankTransfer + invoiceProcessed + ServiceTask_1 + + + reviewSuccessful_gw + assignApprover + StartEvent_1 + invoiceNotProcessed + reviewInvoice + + + approveInvoice + invoice_approved + + + + + Approve the invoice (or not). + + + if(!!task.getVariable('approver')) { + task.setAssignee(approver); +} + + + task.setVariable('approver', task.getAssignee()); + + + sequenceFlow_178 + reviewSuccessful + sequenceFlow_180 + + + sequenceFlow_180 + invoiceNotApproved + invoiceApproved + + + sequenceFlow_183 + reviewNotSuccessful + reviewSuccessful + + + Prepare the bank transfer. + invoiceApproved + SequenceFlow_2 + + + DataStoreReference_1 + Property_0bzbsgl + + + + SequenceFlow_1 + sequenceFlow_178 + + + SequenceFlow_1 + + + reviewNotSuccessful + + + SequenceFlow_3 + + + SequenceFlow_2 + SequenceFlow_3 + + + + + + + + + + + invoiceNotApproved + sequenceFlow_183 + + + + + + + ${clarified} + + + ${!clarified} + + + ${approved} + + + + + ${!approved} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/invoiceBusinessDecisions.dmn b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/invoiceBusinessDecisions.dmn new file mode 100644 index 0000000000000000000000000000000000000000..e63e8c12eae2ce5953a24fcbf1a14f510b8e0dbf --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/invoiceBusinessDecisions.dmn @@ -0,0 +1,138 @@ + + + + + + + amount + + + + + invoiceCategory + + + "Travel Expenses","Misc","Software License Costs" + + + + + "day-to-day expense","budget","exceptional" + + + + + < 250 + + + "Misc" + + + "day-to-day expense" + + + + + [250..1000] + + + "Misc" + + + "budget" + + + + + > 1000 + + + "Misc" + + + "exceptional" + + + + + + + + "Travel Expenses" + + + "day-to-day expense" + + + + + + + + "Software License Costs" + + + "budget" + + + + + + + + + + + + invoiceClassification + + + "day-to-day expense","budget","exceptional" + + + + + "management","accounting","sales" + + + + + "day-to-day expense" + + + "accounting" + + + + + "day-to-day expense" + + + "sales" + + + + + "budget", "exceptional" + + + "management" + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/reviewInvoice.bpmn b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/reviewInvoice.bpmn new file mode 100644 index 0000000000000000000000000000000000000000..d10d35eab593826a87e3b7d104a86551f0d633f2 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/resources/reviewInvoice.bpmn @@ -0,0 +1,50 @@ + + + + + SequenceFlow_1ggutts + + + + + SequenceFlow_0vvoxt0 + + + + SequenceFlow_1ggutts + SequenceFlow_144f11w + + + SequenceFlow_144f11w + SequenceFlow_0vvoxt0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/WEB-INF/glassfish-web.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000000000000000000000000000000000000..c51af8d428cacbd5ca850eeadc37d3d5adfa6afd --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,6 @@ + + + + /camunda-invoice + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/WEB-INF/jboss-web.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/WEB-INF/jboss-web.xml new file mode 100644 index 0000000000000000000000000000000000000000..9312b48d551ab452d26051220f12e28c649c8727 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/WEB-INF/jboss-web.xml @@ -0,0 +1,6 @@ + + + + other + /camunda-invoice + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/css/intro.css b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/css/intro.css new file mode 100644 index 0000000000000000000000000000000000000000..e1aaa4bbe6255951a8b57d1813e0f51a6cd8e095 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/css/intro.css @@ -0,0 +1,143 @@ +body.dashboard { + background-color: #e5e5e5; + padding-top: 70px; +} + +[cam-widget-header] .btn-primary, +[cam-widget-header] .btn-primary:hover { + font-size: 14px; + color: #fff; +} +[cam-widget-header] .row { + display: flex; + align-items: center; +} + +.navbar-brand .logo { + margin-right: 5px; + fill: #666; +} + +section .inner { + background-color: #fff; + padding: 15px; + margin-bottom: 30px; +} + +section header { + overflow: hidden; + border-bottom: 1px solid #e5e5e5; + margin-bottom: 15px; +} + +.section-title { + font-size: 28px; + margin-top: 5px; + margin-bottom: 10px; + font-weight: 100; +} + +.subsection-title { + font-size: 20px; + margin-top: 5px; + margin-bottom: 10px; + font-weight: 100; +} + +.section-actions { + margin-top: 15px; +} + +section.webapps .section-body, +section.invoice .section-body { + position: relative; +} + +.screenshot { + display: block; + text-align: center; + position: relative; +} + +.screenshot:before, +.screenshot:after { + content: ""; + display: block; + position: absolute; +} + +.screenshot:before { + bottom: -15px; + height: 30px; + background-color: #fff; + border-top: 1px solid #e5e5e5; + z-index: 3; + left: -5px; + right: -5px; +} + +.page-body a.screenshot:hover { + text-shadow: none; + box-shadow: none; +} + +.screenshot img { + display: inline-block; + max-width: calc(100% - 40px); + margin: 5px auto; + box-shadow: 0 0 40px -10px rgba(0, 0, 0, 0.8); + transition: box-shadow 0.218s ease-in-out, transform 0.218s ease-in-out; +} +.screenshot:hover img { + box-shadow: 0 0 40px -5px rgba(21, 92, 181, 0.8); + transform: translateY(-5px); +} + +.screenshot .hover-text { + text-align: center; + display: block; + position: absolute; + top: 50%; + line-height: 30px; + font-size: 27px; + margin-top: -15px; + left: 15px; + right: 15px; + opacity: 0; + transition: opacity 0.218s ease-in-out; +} +.screenshot:hover { + z-index: 10; +} +.screenshot:hover .hover-text { + opacity: 1; +} +.hover-text > span { + display: inline-block; + background-color: rgba(255, 255, 255, 0.75); + padding-left: 0.25em; + padding-right: 0.25em; +} + +section.invoice .section-body { + min-height: 200px; +} + +section.webapps .section-body { + margin-bottom: 30px; +} +.webapp-screenshot img { + max-width: 500px; +} + +@media screen and (max-width: 992px) { + .webapp-screenshot img { + max-width: 380px; + } +} + +@media screen and (max-width: 767px) { + .webapp-screenshot img { + max-width: 320px; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/css/styles.min.css b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/css/styles.min.css new file mode 100644 index 0000000000000000000000000000000000000000..a273da71b402ac69f44f709bf5885e0a6279ff4d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/css/styles.min.css @@ -0,0 +1 @@ +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,*:before,*:after{color:#000 !important;text-shadow:none !important;background:transparent !important;box-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:'IBMPlexSans','open_sansregular',Helvetica,Arial,Verdana,sans-serif;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#155cb5;text-decoration:none}a:hover,a:focus{color:#0b2d5f;text-decoration:none}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:0}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:0;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role="button"]{cursor:pointer}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}mark,.mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#b5152b}a.text-primary:hover,a.text-primary:focus{color:#871020}.text-success{color:#3c763d}a.text-success:hover,a.text-success:focus{color:#2b542c}.text-info{color:#31708f}a.text-info:hover,a.text-info:focus{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover,a.text-warning:focus{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover,a.text-danger:focus{color:#843534}.bg-primary{color:#fff;background-color:#b5152b}a.bg-primary:hover,a.bg-primary:focus{background-color:#871020}.bg-success{background-color:#dff0d8}a.bg-success:hover,a.bg-success:focus{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover,a.bg-info:focus{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover,a.bg-warning:focus{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover,a.bg-danger:focus{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:843px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote footer:before,blockquote small:before,blockquote .small:before{content:"\2014 \00A0"}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:""}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:"\00A0 \2014"}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:currentColor;background-color:transparent;border-radius:0}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:0;box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:0}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.row-no-gutters{margin-right:0;margin-left:0}.row-no-gutters [class*="col-"]{padding-right:0;padding-left:0}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0%}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0%}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0%}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0%}}table{background-color:transparent}table col[class*="col-"]{position:static;display:table-column;float:none}table td[class*="col-"],table th[class*="col-"]{position:static;display:table-cell;float:none}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#eaf0f8}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#eaf0f8}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#d7e3f2}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}@font-face{font-family:"Glyphicons Halflings";src:url("../fonts/glyphicons-halflings-regular.eot");src:url("../fonts/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"),url("../fonts/glyphicons-halflings-regular.woff2") format("woff2"),url("../fonts/glyphicons-halflings-regular.woff") format("woff"),url("../fonts/glyphicons-halflings-regular.ttf") format("truetype"),url("../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg")}.glyphicon{position:relative;top:1px;display:inline-block;font-family:"Glyphicons Halflings";font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-euro:before,.glyphicon-eur:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;appearance:none}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"].disabled,input[type="checkbox"].disabled,fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"]{cursor:not-allowed}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #aaa;border-radius:2px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s}.form-control:focus{border-color:#0b2d5f;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(11, 45, 95, 0.6);box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(11, 45, 95, 0.6)}.form-control::-moz-placeholder{color:#aaa;opacity:1}.form-control:-ms-input-placeholder{color:#aaa}.form-control::-webkit-input-placeholder{color:#aaa}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){input[type="date"].form-control,input[type="time"].form-control,input[type="datetime-local"].form-control,input[type="month"].form-control{line-height:34px}input[type="date"].input-sm,input[type="time"].input-sm,input[type="datetime-local"].input-sm,input[type="month"].input-sm,.input-group-sm input[type="date"],.input-group-sm input[type="time"],.input-group-sm input[type="datetime-local"],.input-group-sm input[type="month"]{line-height:30px}input[type="date"].input-lg,input[type="time"].input-lg,input[type="datetime-local"].input-lg,input[type="month"].input-lg,.input-group-lg input[type="date"],.input-group-lg input[type="time"],.input-group-lg input[type="datetime-local"],.input-group-lg input[type="month"]{line-height:46px}}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.radio label,.checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{position:absolute;margin-top:4px \9;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:2px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:2px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm textarea.form-control,.form-group-sm select[multiple].form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg textarea.form-control,.form-group-lg select[multiple].form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback,.input-group-lg+.form-control-feedback,.form-group-lg .form-control+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback,.input-group-sm+.form-control-feedback,.form-group-sm .form-control+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#959595}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);opacity:.65;-webkit-box-shadow:none;box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:focus,.btn-default.focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;background-image:none;border-color:#adadad}.btn-default:active:hover,.btn-default.active:hover,.open>.dropdown-toggle.btn-default:hover,.btn-default:active:focus,.btn-default.active:focus,.open>.dropdown-toggle.btn-default:focus,.btn-default:active.focus,.btn-default.active.focus,.open>.dropdown-toggle.btn-default.focus{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#b5152b;border-color:#9e1226}.btn-primary:focus,.btn-primary.focus{color:#fff;background-color:#871020;border-color:#2c050a}.btn-primary:hover{color:#fff;background-color:#871020;border-color:#670c19}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#871020;background-image:none;border-color:#670c19}.btn-primary:active:hover,.btn-primary.active:hover,.open>.dropdown-toggle.btn-primary:hover,.btn-primary:active:focus,.btn-primary.active:focus,.open>.dropdown-toggle.btn-primary:focus,.btn-primary:active.focus,.btn-primary.active.focus,.open>.dropdown-toggle.btn-primary.focus{color:#fff;background-color:#670c19;border-color:#2c050a}.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus{background-color:#b5152b;border-color:#9e1226}.btn-primary .badge{color:#b5152b;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:focus,.btn-success.focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;background-image:none;border-color:#398439}.btn-success:active:hover,.btn-success.active:hover,.open>.dropdown-toggle.btn-success:hover,.btn-success:active:focus,.btn-success.active:focus,.open>.dropdown-toggle.btn-success:focus,.btn-success:active.focus,.btn-success.active.focus,.open>.dropdown-toggle.btn-success.focus{color:#fff;background-color:#398439;border-color:#255625}.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:focus,.btn-info.focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;background-image:none;border-color:#269abc}.btn-info:active:hover,.btn-info.active:hover,.open>.dropdown-toggle.btn-info:hover,.btn-info:active:focus,.btn-info.active:focus,.open>.dropdown-toggle.btn-info:focus,.btn-info:active.focus,.btn-info.active.focus,.open>.dropdown-toggle.btn-info.focus{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:focus,.btn-warning.focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;background-image:none;border-color:#d58512}.btn-warning:active:hover,.btn-warning.active:hover,.open>.dropdown-toggle.btn-warning:hover,.btn-warning:active:focus,.btn-warning.active:focus,.open>.dropdown-toggle.btn-warning:focus,.btn-warning:active.focus,.btn-warning.active.focus,.open>.dropdown-toggle.btn-warning.focus{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:focus,.btn-danger.focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;background-image:none;border-color:#ac2925}.btn-danger:active:hover,.btn-danger.active:hover,.open>.dropdown-toggle.btn-danger:hover,.btn-danger:active:focus,.btn-danger.active:focus,.open>.dropdown-toggle.btn-danger:focus,.btn-danger:active.focus,.btn-danger.active.focus,.open>.dropdown-toggle.btn-danger.focus{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#155cb5;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#0b2d5f;text-decoration:none;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:2px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:2px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height, visibility;transition-property:height, visibility;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-timing-function:ease;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \9;border-right:4px solid transparent;border-left:4px solid transparent}.dropup,.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:0;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:transparent}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#333;text-decoration:none;background-color:transparent;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid \9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:843px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:2px;border-bottom-left-radius:2px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle="buttons"]>.btn input[type="radio"],[data-toggle="buttons"]>.btn-group>.btn input[type="radio"],[data-toggle="buttons"]>.btn input[type="checkbox"],[data-toggle="buttons"]>.btn-group>.btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:2px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #aaa;border-radius:2px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:2px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:4px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#155cb5}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:0 0 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#155cb5;cursor:default;background-color:#fff;border:1px solid #eee;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:0 0 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:0}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#b5152b}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:0 0 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:45px;margin-bottom:20px;border:1px solid transparent}@media (min-width:843px){.navbar{border-radius:0}}@media (min-width:843px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:843px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block !important;height:auto !important;padding-bottom:0;overflow:visible !important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}@media (min-width:843px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:843px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:843px){.navbar-static-top{border-radius:0}}.navbar-brand{float:left;height:45px;padding:12.5px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:843px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-right:15px;margin-top:5.5px;margin-bottom:5.5px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:0}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:843px){.navbar-toggle{display:none}}.navbar-nav{margin:6.25px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:842px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:843px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:12.5px;padding-bottom:12.5px}}.navbar-form{padding:10px 15px;margin-right:-15px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);margin-top:5.5px;margin-bottom:5.5px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:842px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:843px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:5.5px;margin-bottom:5.5px}.navbar-btn.btn-sm{margin-top:7.5px;margin-bottom:7.5px}.navbar-btn.btn-xs{margin-top:11.5px;margin-bottom:11.5px}.navbar-text{margin-top:12.5px;margin-bottom:12.5px}@media (min-width:843px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:843px){.navbar-left{float:left !important}.navbar-right{float:right !important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#fff;border-color:#777}.navbar-default .navbar-brand{color:#545454}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#3b3b3b;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#545454}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#222;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#000;background-color:#eee}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#000;background-color:#eee}@media (max-width:842px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#545454}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#222;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#000;background-color:#eee}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#777}.navbar-default .navbar-link{color:#545454}.navbar-default .navbar-link:hover{color:#222}.navbar-default .btn-link{color:#545454}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#222}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media (max-width:842px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#fff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:0}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:0}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#155cb5;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{z-index:2;color:#0b2d5f;background-color:#eee;border-color:#ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:0;border-bottom-right-radius:0}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:3;color:#fff;cursor:default;background-color:#777;border-color:#777}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:0;border-bottom-left-radius:0}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:0;border-bottom-right-radius:0}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:0;border-bottom-left-radius:0}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:0;border-bottom-right-radius:0}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}.label-primary{background-color:#b5152b}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#871020}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge,.btn-group-xs>.btn .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#155cb5;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:0}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:0;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#155cb5}.thumbnail .caption{padding:9px;color:#555}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:0}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0%;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#b5152b;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#b5152b;border-color:#b5152b}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#f4a2ad}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,button.list-group-item:hover,a.list-group-item:focus,button.list-group-item:focus{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,button.list-group-item-success:hover,a.list-group-item-success:focus,button.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,button.list-group-item-success.active,a.list-group-item-success.active:hover,button.list-group-item-success.active:hover,a.list-group-item-success.active:focus,button.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,button.list-group-item-info:hover,a.list-group-item-info:focus,button.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,button.list-group-item-info.active,a.list-group-item-info.active:hover,button.list-group-item-info.active:hover,a.list-group-item-info.active:focus,button.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,button.list-group-item-warning:hover,a.list-group-item-warning:focus,button.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,button.list-group-item-warning.active,a.list-group-item-warning.active:hover,button.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus,button.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,button.list-group-item-danger:hover,a.list-group-item-danger:focus,button.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,button.list-group-item-danger.active,a.list-group-item-danger.active:hover,button.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus,button.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:0;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:-1;border-top-right-radius:-1}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a,.panel-title>small,.panel-title>.small,.panel-title>small>a,.panel-title>.small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:-1;border-bottom-left-radius:-1}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:-1;border-top-right-radius:-1}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:-1;border-bottom-left-radius:-1}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-right:15px;padding-left:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-left-radius:-1;border-top-right-radius:-1}.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child{border-top-left-radius:-1;border-top-right-radius:-1}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:-1}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:-1}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:-1;border-bottom-left-radius:-1}.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:-1;border-bottom-left-radius:-1}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:-1}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:-1}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:0}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body,.panel-group .panel-heading+.panel-collapse>.list-group{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#b5152b}.panel-primary>.panel-heading{color:#fff;background-color:#b5152b;border-color:#b5152b}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#b5152b}.panel-primary>.panel-heading .badge{color:#b5152b;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#b5152b}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#fff;border:1px solid #b3b3b3;border-radius:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:0}.well-sm{padding:9px;border-radius:0}.close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;appearance:none}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);-o-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform 0.3s ease-out;-moz-transition:-moz-transform 0.3s ease-out;-o-transition:-o-transform 0.3s ease-out;transition:transform 0.3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,0.2);border-radius:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:'IBMPlexSans','open_sansregular',Helvetica,Arial,Verdana,sans-serif;font-style:normal;font-weight:400;line-height:1.42857143;line-break:auto;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;font-size:12px;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:0}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:'IBMPlexSans','open_sansregular',Helvetica,Arial,Verdana,sans-serif;font-style:normal;font-weight:400;line-height:1.42857143;line-break:auto;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;font-size:14px;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);border-radius:0;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover>.arrow{border-width:11px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,0.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:-1 -1 0 0}.popover-content{padding:9px 14px}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform 0.6s ease-in-out;-moz-transition:-moz-transform 0.6s ease-in-out;-o-transition:-o-transform 0.6s ease-in-out;transition:transform 0.6s ease-in-out;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;-moz-perspective:1000px;perspective:1000px}.carousel-inner>.item.next,.carousel-inner>.item.active.right{-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);left:0}.carousel-inner>.item.prev,.carousel-inner>.item.active.left{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);left:0}.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right,.carousel-inner>.item.active{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.0001) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.0001) 100%);background-image:linear-gradient(to right, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.0001) 0%, rgba(0,0,0,0.5) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.0001) 0%, rgba(0,0,0,0.5) 100%);background-image:linear-gradient(to right, rgba(0,0,0,0.0001) 0%, rgba(0,0,0,0.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;outline:0;filter:alpha(opacity=90);opacity:.9}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:"\2039"}.carousel-control .icon-next:before{content:"\203a"}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-header:before,.modal-header:after,.modal-footer:before,.modal-footer:after{display:table;content:" "}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-header:after,.modal-footer:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right !important}.pull-left{float:left !important}.hide{display:none !important}.show{display:block !important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none !important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none !important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none !important}@media (max-width:767px){.visible-xs{display:block !important}table.visible-xs{display:table !important}tr.visible-xs{display:table-row !important}th.visible-xs,td.visible-xs{display:table-cell !important}}@media (max-width:767px){.visible-xs-block{display:block !important}}@media (max-width:767px){.visible-xs-inline{display:inline !important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block !important}table.visible-sm{display:table !important}tr.visible-sm{display:table-row !important}th.visible-sm,td.visible-sm{display:table-cell !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block !important}table.visible-md{display:table !important}tr.visible-md{display:table-row !important}th.visible-md,td.visible-md{display:table-cell !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block !important}}@media (min-width:1200px){.visible-lg{display:block !important}table.visible-lg{display:table !important}tr.visible-lg{display:table-row !important}th.visible-lg,td.visible-lg{display:table-cell !important}}@media (min-width:1200px){.visible-lg-block{display:block !important}}@media (min-width:1200px){.visible-lg-inline{display:inline !important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block !important}}@media (max-width:767px){.hidden-xs{display:none !important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none !important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none !important}}@media (min-width:1200px){.hidden-lg{display:none !important}}.visible-print{display:none !important}@media print{.visible-print{display:block !important}table.visible-print{display:table !important}tr.visible-print{display:table-row !important}th.visible-print,td.visible-print{display:table-cell !important}}.visible-print-block{display:none !important}@media print{.visible-print-block{display:block !important}}.visible-print-inline{display:none !important}@media print{.visible-print-inline{display:inline !important}}.visible-print-inline-block{display:none !important}@media print{.visible-print-inline-block{display:inline-block !important}}@media print{.hidden-print{display:none !important}}@font-face{font-family:'bpmn';src:url('../fonts/bpmn.eot');src:url('../fonts/bpmn.eot#iefix') format('embedded-opentype'),url('../fonts/bpmn.woff') format('woff'),url('../fonts/bpmn.ttf') format('truetype'),url('../fonts/bpmn.svg#bpmn') format('svg');font-weight:normal;font-style:normal}[class^="icon-"]:before,[class*=" icon-"]:before{font-family:"bpmn";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em}.icon-screw-wrench:before{content:'\e800'}.icon-trash:before{content:'\e801'}.icon-gateway-parallel:before{content:'\e802'}.icon-intermediate-event-catch-cancel:before{content:'\e803'}.icon-intermediate-event-catch-non-interrupting-message:before{content:'\e804'}.icon-start-event-compensation:before{content:'\e805'}.icon-start-event-non-interrupting-parallel-multiple:before{content:'\e806'}.icon-loop-marker:before{content:'\e807'}.icon-user-task:before{content:'\e808'}.icon-business-rule:before{content:'\e809'}.icon-parallel-mi-marker:before{content:'\e80a'}.icon-start-event-non-interrupting-signal:before{content:'\e80b'}.icon-intermediate-event-catch-non-interrupting-timer:before{content:'\e80c'}.icon-intermediate-event-catch-parallel-multiple:before{content:'\e80d'}.icon-intermediate-event-catch-compensation:before{content:'\e80e'}.icon-gateway-xor:before{content:'\e80f'}.icon-connection:before{content:'\e810'}.icon-end-event-cancel:before{content:'\e811'}.icon-intermediate-event-catch-condition:before{content:'\e812'}.icon-intermediate-event-catch-non-interrupting-parallel-multiple:before{content:'\e813'}.icon-start-event-condition:before{content:'\e814'}.icon-start-event-non-interrupting-timer:before{content:'\e815'}.icon-sequential-mi-marker-kopie:before{content:'\e816'}.icon-manual:before{content:'\e817'}.icon-receive:before{content:'\e818'}.icon-sub-process-marker:before{content:'\e819'}.icon-start-event-parallel-multiple:before{content:'\e81a'}.icon-start-event-error:before{content:'\e81b'}.icon-intermediate-event-catch-signal:before{content:'\e81c'}.icon-intermediate-event-catch-error:before{content:'\e81d'}.icon-end-event-compensation:before{content:'\e81e'}.icon-subprocess-collapsed:before{content:'\e81f'}.icon-subprocess-expanded:before{content:'\e820'}.icon-task:before{content:'\e821'}.icon-end-event-error:before{content:'\e822'}.icon-intermediate-event-catch-escalation:before{content:'\e823'}.icon-intermediate-event-catch-timer:before{content:'\e824'}.icon-start-event-escalation:before{content:'\e825'}.icon-start-event-signal:before{content:'\e826'}.icon-business-rule-task:before{content:'\e827'}.icon-script:before{content:'\e828'}.icon-send:before{content:'\e829'}.icon-call-activity:before{content:'\e82a'}.icon-start-event-timer:before{content:'\e82b'}.icon-start-event-message:before{content:'\e82c'}.icon-intermediate-event-none:before{content:'\e82d'}.icon-intermediate-event-catch-link:before{content:'\e82e'}.icon-end-event-escalation:before{content:'\e82f'}.icon-text-annotation:before{content:'\e830'}.icon-bpmn-io:before{content:'\e831'}.icon-gateway-complex:before{content:'\e832'}.icon-gateway-eventbased:before{content:'\e833'}.icon-gateway-none:before{content:'\e834'}.icon-gateway-or:before{content:'\e835'}.icon-end-event-terminate:before{content:'\e836'}.icon-end-event-signal:before{content:'\e837'}.icon-end-event-none:before{content:'\e838'}.icon-end-event-multiple:before{content:'\e839'}.icon-end-event-message:before{content:'\e83a'}.icon-end-event-link:before{content:'\e83b'}.icon-intermediate-event-catch-message:before{content:'\e83c'}.icon-intermediate-event-throw-compensation:before{content:'\e83d'}.icon-start-event-multiple:before{content:'\e83e'}.icon-data-input:before{content:'\e83f'}.icon-manual-task:before{content:'\e840'}.icon-service:before{content:'\e841'}.icon-user:before{content:'\e842'}.icon-receive-task:before{content:'\e843'}.icon-data-object:before{content:'\e844'}.icon-start-event-none:before{content:'\e845'}.icon-intermediate-event-throw-escalation:before{content:'\e846'}.icon-intermediate-event-catch-multiple:before{content:'\e847'}.icon-intermediate-event-catch-non-interrupting-escalation:before{content:'\e848'}.icon-intermediate-event-throw-link:before{content:'\e849'}.icon-start-event-non-interrupting-condition:before{content:'\e84a'}.icon-data-output:before{content:'\e84b'}.icon-script-task:before{content:'\e84c'}.icon-send-task:before{content:'\e84d'}.icon-data-store:before{content:'\e84e'}.icon-start-event-non-interrupting-escalation:before{content:'\e84f'}.icon-intermediate-event-throw-message:before{content:'\e850'}.icon-intermediate-event-catch-non-interrupting-multiple:before{content:'\e851'}.icon-intermediate-event-catch-non-interrupting-signal:before{content:'\e852'}.icon-intermediate-event-throw-multiple:before{content:'\e853'}.icon-start-event-non-interrupting-message:before{content:'\e854'}.icon-ad-hoc-marker:before{content:'\e855'}.icon-service-task:before{content:'\e856'}.icon-task-none:before{content:'\e857'}.icon-compensation-marker:before{content:'\e858'}.icon-start-event-non-interrupting-multiple:before{content:'\e859'}.icon-intermediate-event-throw-signal:before{content:'\e85a'}.icon-intermediate-event-catch-non-interrupting-condition:before{content:'\e85b'}@font-face{font-family:'open_sanslight';src:url('../fonts/opensans-light-webfont.eot');src:url('../fonts/opensans-light-webfont.eot?#iefix') format('embedded-opentype'),url('../fonts/opensans-light-webfont.woff2') format('woff2'),url('../fonts/opensans-light-webfont.woff') format('woff'),url('../fonts/opensans-light-webfont.ttf') format('truetype'),url('../fonts/opensans-light-webfont.svg#open_sansregular') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'open_sansregular';src:url('../fonts/opensans-regular-webfont.eot');src:url('../fonts/opensans-regular-webfont.eot?#iefix') format('embedded-opentype'),url('../fonts/opensans-regular-webfont.woff2') format('woff2'),url('../fonts/opensans-regular-webfont.woff') format('woff'),url('../fonts/opensans-regular-webfont.ttf') format('truetype'),url('../fonts/opensans-regular-webfont.svg#open_sansregular') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'open_sansbold';src:url('../fonts/opensans-bold-webfont.eot');src:url('../fonts/opensans-bold-webfont.eot?#iefix') format('embedded-opentype'),url('../fonts/opensans-bold-webfont.woff2') format('woff2'),url('../fonts/opensans-bold-webfont.woff') format('woff'),url('../fonts/opensans-bold-webfont.ttf') format('truetype'),url('../fonts/opensans-bold-webfont.svg#open_sansregular') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'IBMPlexSans';src:url('../fonts/IBMPlexSans-Regular.otf');font-weight:normal;font-style:normal}@font-face{font-family:'IBMPlexSans';src:url('../fonts/IBMPlexSans-Bold.otf');font-weight:bold;font-style:normal}@font-face{font-family:'IBMPlexSans';src:url('../fonts/IBMPlexSans-Italic.otf');font-weight:normal;font-style:italic}@font-face{font-family:'IBMPlexSans';src:url('../fonts/IBMPlexSans-BoldItalic.otf');font-weight:bold;font-style:italic}body{font-family:'IBMPlexSans','open_sansregular',Helvetica,Arial,Verdana,sans-serif}.monospaced{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}h1,h2,h3,h4,h5,h6{font-weight:400}h1 .glyphicon{font-size:.83em}th,dt,label,legend,strong{font-weight:700}[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none !important}[ng-click],[onclick]{cursor:pointer}.text-padded{padding-top:7px;padding-bottom:7px}.text-sm{font-size:12px}.text-sm.text-padded{padding-top:6px;padding-bottom:6px}.text-lg{font-size:18px}.text-lg.text-padded{padding-top:11px;padding-bottom:11px}.well{min-height:20px;padding:13px;margin-bottom:15px;color:#b3b3b3;background-color:#fff;border:2px solid #b3b3b3;border-radius:0;-webkit-box-shadow:none;box-shadow:none}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.tooltip{overflow-wrap:break-word}.form-control{border:1px solid #aaa;color:#555}.form-control::-moz-placeholder{font-style:italic}.form-control:-ms-input-placeholder{font-style:italic}.form-control::-webkit-input-placeholder{font-style:italic}.form-control,.form-control:hover{box-shadow:none}.form-control:hover{color:#0b2d5f}.form-control:focus{box-shadow:none}.has-success .form-control,.form-control.ng-dirty.ng-invalid,.has-error .form-control,.has-warning .form-control,.has-success .form-control:hover,.form-control.ng-dirty.ng-invalid:hover,.has-error .form-control:hover,.has-warning .form-control:hover{box-shadow:none}.has-success .form-control:focus,.form-control.ng-dirty.ng-invalid:focus,.has-error .form-control:focus,.has-warning .form-control:focus{box-shadow:none}.has-success .form-control{color:#3c763d}.form-control.ng-dirty.ng-invalid,.has-error .form-control{color:#a94442}.has-warning .form-control{color:#8a6d3b}.form-control[disabled],.form-control[readonly],.disabled-form .form-control,fieldset[disabled] .form-control{color:#777;background-color:#eee}.form-control[disabled]:focus,.form-control[readonly]:focus,.disabled-form .form-control:focus,fieldset[disabled] .form-control:focus{background-color:#eee;box-shadow:none}.form-control[type="checkbox"],.form-control[type="radio"]{width:auto;height:auto}.form-control[type=file]{border:none !important}.form-control[type=file]:focus{outline:none}.form-control[type=file].ng-invalid{color:#a94442;background-color:#f9efef}a.form-control-static{display:block}.help-block{font-size:90%}.help-block.error{color:#d9534f}.form-group+.help-block{margin-top:-6px}.disabled-form{position:relative}.disabled-form:before{display:block;content:' ';background-color:rgba(238,238,238,0.33);position:absolute;top:-3px;left:-3px;bottom:-3px;right:-3px;cursor:not-allowed;z-index:1000}.cam-table{width:100%;max-width:100%;margin-bottom:20px}.cam-table>thead>tr>th,.cam-table>tbody>tr>th,.cam-table>tfoot>tr>th,.cam-table>thead>tr>td,.cam-table>tbody>tr>td,.cam-table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.cam-table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.cam-table>caption+thead>tr:first-child>th,.cam-table>colgroup+thead>tr:first-child>th,.cam-table>thead:first-child>tr:first-child>th,.cam-table>caption+thead>tr:first-child>td,.cam-table>colgroup+thead>tr:first-child>td,.cam-table>thead:first-child>tr:first-child>td{border-top:0}.cam-table>tbody+tbody{border-top:2px solid #ddd}.cam-table .table{background-color:#fff}.cam-table>thead>tr>th,.cam-table>tbody>tr>th,.cam-table>tfoot>tr>th,.cam-table>thead>tr>td,.cam-table>tbody>tr>td,.cam-table>tfoot>tr>td{padding:5px}.cam-table>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.cam-table>tbody>tr:hover{background-color:#eaf0f8}.cam-table.cam-fixed-layout{table-layout:fixed}.cam-table td.uuid{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cam-table td,.cam-table th{margin:0}.cam-table td.select,.cam-table th.select{text-align:center;width:40px}.cam-table td.select input[type="checkbox"],.cam-table th.select input[type="checkbox"]{margin-top:5px}.cam-table td.checkbox input[type="checkbox"]{position:static;margin-left:0}.cam-table tbody tr:first-child td{border-top:none}.cam-table thead{border-bottom:2px solid #ddd}.cam-table tfoot{border-top:2px solid #ddd}.cam-table thead th,.cam-table tbody th,.cam-table tfoot th,.cam-table thead td,.cam-table tbody td,.cam-table tfoot td{border-top:none;border-bottom:none}.cam-table.values-left tr>td:first-child,.cam-table.values-left tr>th:first-child{width:1%;text-align:right}.cam-table tr.editing td,.cam-table tr.editing th{padding:0}.cam-table tr.editing .form-control-static{padding-left:5px;padding-right:5px}.cam-table.search-results th,.cam-table.search-results td{max-width:10vw}.cam-table.search-results th{white-space:nowrap;overflow:hidden}.cam-table.search-results th>*{display:inline-block;vertical-align:middle}.cam-table.search-results th .column-label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;min-width:5em;max-width:calc(100% - 2.4em)}.cam-table.search-results td[cam-widget-clipboard]{max-width:10vw}.align-left{text-align:left}.align-right{text-align:right}.text-help{font-style:italic;font-size:90%;color:#555;margin-bottom:15px}.dropdown-menu>li{padding:0;margin:2px 0}.dropdown-menu>li>a{padding:2px 9px}.dropdown-menu>.active>a,.dropdown-menu>li:hover>a{padding-left:4px;border-width:0 0 0 3px;margin-left:2px;border-style:solid;color:#000;border-color:#b5152b}.dropdown-menu>li:hover>a{color:#000;border-color:#155cb5}.list-inline>li{padding:1px 5px}.tab-content{position:relative;padding-top:15px}.tooltip .tooltip-inner{word-wrap:break-word}.btn-link:hover{color:#0b2d5f}.glyphicon-fire{color:#d9534f}.form-actions{text-align:right}.nav-tabs{margin-top:5px}.nav-tabs>li{text-align:center;border:none}.nav-tabs>li:first-of-type>a{margin-left:0}.nav-tabs>li>a{border:none;background:none;overflow:hidden;margin:0 2px;display:block;position:relative;padding-bottom:4px;border-bottom:3px solid transparent;transition:border-bottom .218s ease;color:#545454}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{background:none;border-bottom:3px solid #0b2d5f;color:#222}.nav-tabs>li:hover,.nav-tabs>li:focus{border:none;background:none}.nav-tabs>li.active{border:none}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#000;background:none;border:none;cursor:default;border-bottom:3px solid #b5152b}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{border-top:none;border-left:none;border-right:none}@media (min-width:768px){.nav-tabs>li>a{border-top:none;border-left:none;border-right:none}}[cam-widget-search] .main-field,[cam-widget-search] [cam-widget-search-pill]{max-width:100%}.modal-dialog .camunda-ee-license-missing{position:relative;top:0;left:0;margin:0}.modal-dialog .camunda-ee-license-missing>div{width:100%}.camunda-ee-license-missing{position:absolute;top:50%;left:50%;margin-top:-50px;margin-left:-200px}.camunda-ee-license-missing .alert{margin:0}.camunda-ee-license-missing>div{width:400px}.stats-section view>.camunda-ee-license-missing{position:relative;top:0;left:0;margin:auto}.stats-section view>.camunda-ee-license-missing>div{width:auto}.animate-spin{display:inline-block;-webkit-animation:spin 1s infinite linear;-o-animation:spin 1s infinite linear;animation:spin 1s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg);transform:rotate(0deg)}100%{-o-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg);transform:rotate(0deg)}100%{-ms-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);-moz-transform:rotate(359deg);-o-transform:rotate(359deg);transform:rotate(359deg)}}.modal{cursor:auto}.modal:after{content:'';position:absolute;display:block;top:0;right:0;bottom:0;left:0;cursor:pointer;z-index:1}.modal-backdrop{background-color:rgba(255,255,255,0.85);bottom:0;cursor:pointer}.modal-backdrop.in{opacity:1;filter:alpha(opacity=100)}.modal-dialog{position:relative;z-index:2}.modal-content{background-color:#eee}.modal-body{background-color:#fff;border:1px solid #c8c8c8;border-width:1px 0}.modal-body>form{overflow:hidden;padding:15px}.modal-body>form>fieldset{max-width:100%}[notifications-panel] .message,.notifications-panel .message{display:block}[notifications-panel] .close,.notifications-panel .close{float:right;font-size:20px;font-weight:bold;color:#555;text-shadow:0 1px 0 #fff;opacity:.2;padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;margin-left:12px;position:relative;line-height:20px}[notifications-panel] .alert-error,.notifications-panel .alert-error{color:#a94442;background-color:#f2dede;border-color:#ebccd1}[notifications-panel] .alert-error hr,.notifications-panel .alert-error hr{border-top-color:#e4b9c0}[notifications-panel] .alert-error .alert-link,.notifications-panel .alert-error .alert-link{color:#843534}[notifications-panel] .alert-information,.notifications-panel .alert-information{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}[notifications-panel] .alert-information hr,.notifications-panel .alert-information hr{border-top-color:#a6e1ec}[notifications-panel] .alert-information .alert-link,.notifications-panel .alert-information .alert-link{color:#245269}.page-notifications{position:absolute;z-index:1060;max-height:70%;overflow:auto;bottom:20px;right:30px}.pagination{display:block;clear:both;overflow:visible;text-align:center;margin:15px auto}.pagination>li{overflow:visible;display:inline-block}.pagination>li a{float:none;border:none}.pagination>li.active a{background-color:#777;background-color:#eee;color:#555}.form-signin{width:50vw;max-width:450px;padding:30px;margin:30px auto;overflow:hidden;background-color:#fff}.form-signin .login-header{text-align:center;margin:25px 0 75px 0}.form-signin .login-header .login-logo{fill:#666666}.form-signin .login-header .app-name{width:100%;display:block;font-size:28px;font-weight:normal;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-align:center;color:#666666;margin-top:15px}.form-signin .checkbox{margin-bottom:10px}.form-signin h2{margin:0 0 15px 0}.form-signin input[type='text'],.form-signin input[type='password']{font-size:18px;margin-bottom:15px}.form-signin .btn-primary{width:100%;float:right}.form-signin-container{padding:30px}@media screen and (max-width:842px){.form-signin{width:100%;padding:0;background-color:transparent;border:none;box-shadow:none}}[cam-widget-clipboard]{overflow:hidden;display:inline-block}[cam-widget-clipboard]>[ng-transclude],[cam-widget-clipboard]>.glyphicon{display:inline-block;vertical-align:middle}[cam-widget-clipboard]>[ng-transclude]:empty{display:none}[cam-widget-clipboard]>.glyphicon{cursor:pointer;top:0;opacity:0;line-height:inherit;transition:opacity .218s linear,color .218s linear}[cam-widget-clipboard]>.glyphicon.copy-ok:before{content:"\e013";color:#5cb85c}[cam-widget-clipboard]>.glyphicon.copy-error:before{content:"\e107";color:#f0ad4e}[cam-widget-clipboard]:hover>.glyphicon,[cam-widget-clipboard].hovered>.glyphicon,[cam-widget-clipboard].no-transclusion>.glyphicon{opacity:1}[cam-widget-clipboard].form-control-static{display:inline}[cam-widget-clipboard].form-control-static>[ng-transclude],[cam-widget-clipboard].form-control-static>.glyphicon{display:inline}.cam-table [cam-widget-clipboard]{white-space:nowrap;max-width:100%}.cam-table [cam-widget-clipboard]>[ng-transclude]{max-width:100%;overflow:hidden;text-overflow:ellipsis;transition:max-width .218s linear}.cam-table [cam-widget-clipboard]:hover>[ng-transclude].resize{max-width:calc(100% - 2em)}.cam-table td[cam-widget-clipboard]{display:table-cell;max-width:none;width:auto}.cam-table td[cam-widget-clipboard]>[ng-transclude]{white-space:nowrap}body{padding-top:45px}[cam-widget-header]{width:100%;position:fixed;top:0;left:0;right:0;min-height:45px;z-index:1030;margin-bottom:0;border-top:3px solid #b5152b;box-shadow:0 2px 10px -4px #555;color:#777;background-color:#fff;font-size:14px}[cam-widget-header] ul{margin:0;padding:0}[cam-widget-header] ul.dropdown-menu{border-top:none;box-shadow:0 2px 10px -4px #555}[cam-widget-header] ul.dropdown-menu:before{content:'';width:100%;height:4px;margin-top:-2px;display:block;background-color:inherit}[cam-widget-header] a{color:#545454;text-decoration:none}[cam-widget-header] a:hover,[cam-widget-header] a:focus{color:#222;text-decoration:none}[cam-widget-header] .navbar-brand{font-size:21px;line-height:42px;height:42px;padding-top:0;padding-bottom:0;padding-left:10.5px;padding-right:15px;color:#000}[cam-widget-header] .navbar-brand .brand-logo{font-size:21px}[cam-widget-header] .container .navbar-brand{padding-left:0}[cam-widget-header] .brand-logo{display:inline}[cam-widget-header] .navbar-toggle{border:none;background-color:transparent;outline:none;margin-top:0;margin-bottom:0;padding:1px 6px;height:42px}[cam-widget-header] .navbar-toggle>span{height:2px;display:block;width:100%;min-width:16px;margin:3px 0;background-color:#545454;transition:transform .218s ease,opacity .218s ease}[cam-widget-header] .navbar-toggle>span:first-of-type{margin-top:0}[cam-widget-header] .navbar-toggle>span:last-of-type{margin-bottom:0}[cam-widget-header] .navbar-toggle:hover>span{background-color:#222}[cam-widget-header] .navbar-toggle:hover>span:first-of-type{transform:translateY(-2px)}[cam-widget-header] .navbar-toggle:hover>span:last-of-type{transform:translateY(2px)}[cam-widget-header] .navbar-toggle.open>span{opacity:0}[cam-widget-header] .navbar-toggle.open>span:first-of-type{opacity:1;transform:translateY(5px) rotateZ(45deg)}[cam-widget-header] .navbar-toggle.open>span:last-of-type{opacity:1;transform:translateY(-5px) rotateZ(-45deg)}[cam-widget-header] .sections-menu>ul{float:left}[cam-widget-header] .sections-menu>ul>li{display:inline-block;list-style:none;background-color:transparent}[cam-widget-header] .sections-menu>ul>li:empty{display:none}[cam-widget-header] .sections-menu>ul>li>a{display:block;height:42px;line-height:45px;padding:0 6px}@media screen and (max-width:842px){[cam-widget-header] .sections-menu>ul>li>a{height:auto;line-height:1.6}}[cam-widget-header] .sections-menu>ul>li>a:hover,[cam-widget-header] .sections-menu>ul>li>a:focus{background-color:transparent}[cam-widget-header] .sections-menu>ul>li>a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}[cam-widget-header] .sections-menu>ul>li:hover,[cam-widget-header] .sections-menu>ul>li:focus{background-color:transparent}[cam-widget-header] .sections-menu>ul>li:hover>a,[cam-widget-header] .sections-menu>ul>li:focus>a{background-color:transparent}[cam-widget-header] .sections-menu>ul>li.active{background-color:#eee}[cam-widget-header] .sections-menu>ul>li.active>a{color:#000}@media screen and (max-width:842px){[cam-widget-header] .sections-menu>ul>li{padding:0 10.5px}}[cam-widget-header] .sections-menu>ul.collapse{visibility:visible;display:block}@media screen and (max-width:842px){[cam-widget-header] .sections-menu>ul.collapse{visibility:hidden;display:none}}@media screen and (max-width:842px){[cam-widget-header] .sections-menu>ul{text-align:right;margin-left:0;width:auto;border:none}}[cam-widget-header] .app-menu>ul{float:left;float:right}[cam-widget-header] .app-menu>ul>li{display:inline-block;list-style:none;background-color:transparent}[cam-widget-header] .app-menu>ul>li:empty{display:none}[cam-widget-header] .app-menu>ul>li>a{display:block;height:42px;line-height:45px;padding:0 6px}@media screen and (max-width:842px){[cam-widget-header] .app-menu>ul>li>a{height:auto;line-height:1.6}}[cam-widget-header] .app-menu>ul>li>a:hover,[cam-widget-header] .app-menu>ul>li>a:focus{background-color:transparent}[cam-widget-header] .app-menu>ul>li>a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}[cam-widget-header] .app-menu>ul>li:hover,[cam-widget-header] .app-menu>ul>li:focus{background-color:transparent}[cam-widget-header] .app-menu>ul>li:hover>a,[cam-widget-header] .app-menu>ul>li:focus>a{background-color:transparent}[cam-widget-header] .app-menu>ul>li.active{background-color:#eee}[cam-widget-header] .app-menu>ul>li.active>a{color:#000}@media screen and (max-width:842px){[cam-widget-header] .app-menu>ul>li{padding:0 10.5px}}[cam-widget-header] .app-menu>ul.collapse{visibility:visible;display:block}@media screen and (max-width:842px){[cam-widget-header] .app-menu>ul.collapse{visibility:hidden;display:none}}@media screen and (max-width:842px){[cam-widget-header] .app-menu>ul{text-align:right;margin-left:0;width:auto;border:none}}[cam-widget-header] .app-menu>ul>li>view>a{display:block;height:42px;line-height:45px;padding:0 6px}@media screen and (max-width:842px){[cam-widget-header] .app-menu>ul>li>view>a{height:auto;line-height:1.6}}[cam-widget-header] .app-menu>ul>li>view>a:hover,[cam-widget-header] .app-menu>ul>li>view>a:focus{background-color:transparent}[cam-widget-header] .app-menu>ul>li>view>a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}[cam-widget-header] .app-menu>ul>li.active>view>a{color:#000}[cam-widget-header] .navbar-brand{display:flex;align-items:center}[cam-widget-header] .navbar-brand .brand-logo{padding-right:10px}[cam-widget-header] .navbar-brand .brand-logo svg{margin:0 auto;display:block;fill:#666666}[cam-widget-header] [ng-transclude]{float:left}[cam-widget-header] [ng-transclude].collapse{visibility:visible;display:block}@media screen and (max-width:842px){[cam-widget-header] [ng-transclude].collapse{visibility:hidden;display:none}}[cam-widget-header] [ng-transclude] li>view>a{display:block;height:42px;line-height:45px;padding:0 6px}@media screen and (max-width:842px){[cam-widget-header] [ng-transclude] li>view>a{height:auto;line-height:1.6}}[cam-widget-header] [ng-transclude] li>view>a:hover,[cam-widget-header] [ng-transclude] li>view>a:focus{background-color:transparent}[cam-widget-header] [ng-transclude] li>view>a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}[cam-widget-header] [ng-transclude] li>button{display:block;height:42px;line-height:45px;padding:0 6px;background-color:transparent;border:none;color:#545454}@media screen and (max-width:842px){[cam-widget-header] [ng-transclude] li>button{height:auto;line-height:1.6}}[cam-widget-header] [ng-transclude] li>button:hover,[cam-widget-header] [ng-transclude] li>button:focus{background-color:transparent}[cam-widget-header] [ng-transclude] li>button:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}[cam-widget-header] [ng-transclude] li>button:hover,[cam-widget-header] [ng-transclude] li>button:focus{color:#222}[cam-widget-header] [ng-transclude] li:hover,[cam-widget-header] [ng-transclude] li:focus{background-color:transparent}[cam-widget-header] [ng-transclude] li:hover>view>a,[cam-widget-header] [ng-transclude] li:focus>view>a{background-color:transparent}[cam-widget-header] [ng-transclude] li.active{background-color:#eee}[cam-widget-header] [ng-transclude] li.active>view>a{color:#000}[cam-widget-header] .small-screen-warning{display:none;font-size:18px;height:42px;margin-right:10.5px;float:right}[cam-widget-header] .small-screen-warning .glyphicon{margin-top:10px}@media screen and (max-width:842px){[cam-widget-header] .small-screen-warning{display:inline-block}}body{padding-bottom:24px}[cam-widget-footer]{position:fixed;z-index:99;height:24px;line-height:24px;font-size:smaller;bottom:0;left:0;right:0;background-color:#fff;border-top:1px solid #eee;color:#777;text-align:right}.glyphicon.glyphicon-plus-sign,.glyphicon.glyphicon-minus-sign,.glyphicon.glyphicon-remove,.glyphicon.glyphicon-remove-sign{min-width:1em;text-align:center}.glyphicon.glyphicon-plus-sign:before,.glyphicon.glyphicon-minus-sign:before,.glyphicon.glyphicon-remove:before,.glyphicon.glyphicon-remove-sign:before{vertical-align:text-bottom;font-family:'IBMPlexSans','open_sansregular',Helvetica,Arial,Verdana,sans-serif}.glyphicon.glyphicon-plus-sign:before,.glyphicon.glyphicon-minus-sign:before{line-height:.8;font-size:140%}.glyphicon.glyphicon-plus-sign:before{content:'+'}.glyphicon.glyphicon-minus-sign:before{content:'-'}.glyphicon.glyphicon-remove:before,.glyphicon.glyphicon-remove-sign:before{content:'\002A2F';font-weight:900}.page-header{margin:0 15px;border:none}.welcome-page{background-color:#e5e5e5;position:absolute;min-height:calc(100% - (45px + 24px));width:100%}.welcome-page section{padding-top:15px;padding-bottom:15px}.welcome-page section>.inner{background-color:#fff;padding:15px}.welcome-page .section-title{font-size:2em;margin-top:5px;padding-bottom:10px;font-weight:100;margin-bottom:15px;border-bottom:1px solid #e5e5e5}.app-label-wrapper{display:block;position:relative;margin:0 auto;max-width:220px;max-height:220px;overflow:hidden;background-position:center;background-size:125%}.app-label-wrapper:before{content:'';display:block;padding-top:100%}.app-name{text-align:center;margin-top:10px}.cockpit-app .app-label-wrapper{background-image:url('../assets/images/cockpit.svg')}.tasklist-app .app-label-wrapper{background-image:url('../assets/images/tasklist.svg')}.admin-app .app-label-wrapper{background-image:url('../assets/images/admin.svg')}.app-user-docs{margin-top:5px}.app-link{overflow:hidden;display:block;margin-bottom:15px}.user-profile .narrow{border-top-style:dashed;margin-left:auto;margin-right:auto}.user-profile .actions{margin-bottom:0}.user-profile-info{width:100%;overflow:hidden;margin-bottom:10px}.user-profile-name{display:inline-block;margin-top:0}.user-profile-email{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.custom-link-wrapper{margin-bottom:15px}.custom-link-wrapper>a,.custom-link-wrapper>span{display:block}[cam-widget-password]{white-space:nowrap;width:100%}[cam-widget-password] .glyphicon{font-size:1.5em;margin-top:-0.2em}[cam-widget-password] .glyphicon.glyphicon-remove-circle{color:#a94442}[cam-widget-password] .glyphicon.glyphicon-ok-circle{color:#5cb85c}[cam-widget-password] .password-input{position:relative}[cam-widget-password] .password-input .glyphicon{position:absolute;padding:10px;pointer-events:none}[cam-widget-password] .right-addon .glyphicon{right:0px}[cam-widget-password] .right-addon input{padding-right:30px}/*# sourceMappingURL=./styles.css.map */ \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-Bold.otf b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-Bold.otf new file mode 100644 index 0000000000000000000000000000000000000000..d5ef619ea8d17aed5af78df6b9a3dfae9646ae2c --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-Bold.otf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01f3e2bf144db0b5b68a64d1ffeb3c82ce67afd20e1dba73d4c0b6e933119b8f +size 133120 diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-BoldItalic.otf b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-BoldItalic.otf new file mode 100644 index 0000000000000000000000000000000000000000..53d86bf66b9983df63fdf35c0013cd4c5f617a05 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-BoldItalic.otf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28e7e3a4cdf331172e82c7ad8f62fc92373266557937de6f43ee4760f8492acd +size 140360 diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-Italic.otf b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-Italic.otf new file mode 100644 index 0000000000000000000000000000000000000000..e6cfc140cb653e3005511f4a186a981ab24e65cd --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-Italic.otf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4948465691ceaaa8a7ebce505ef3d2cee3fe055525ae208b9ccbe3f41629508f +size 139336 diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-Regular.otf b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-Regular.otf new file mode 100644 index 0000000000000000000000000000000000000000..6000a0da98b1a894842e6b7920a3e09ac000b65d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/fonts/IBMPlexSans-Regular.otf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2d471ed566d2b4ca41edd775812edb1139fe9378398778a3c22dd1b1ef09203 +size 131036 diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/img/favicon.ico b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/img/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..39d81dcfd7f604196ab35bc1bf77407a7f684e17 Binary files /dev/null and b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/assets/img/favicon.ico differ diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/approve-invoice.html b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/approve-invoice.html new file mode 100644 index 0000000000000000000000000000000000000000..bee7baef21f19eff07a1ff323f2432ccb31e3fc5 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/approve-invoice.html @@ -0,0 +1,68 @@ +
+ +

Do you approve this invoice?

+ +
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+ +
+
+
+
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/assign-reviewer.html b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/assign-reviewer.html new file mode 100644 index 0000000000000000000000000000000000000000..473acb34515095784e481a6295f4162d8899dd2a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/assign-reviewer.html @@ -0,0 +1,52 @@ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +

Who should review this invoice?

+
+
+
\ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/prepare-bank-transfer.html b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/prepare-bank-transfer.html new file mode 100644 index 0000000000000000000000000000000000000000..e97ae1a260b7748d16da4fa0bab2a835041e783b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/prepare-bank-transfer.html @@ -0,0 +1,55 @@ +
+ +

Please prepare the bank transfer for the following invoice

+ +
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/review-invoice.html b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/review-invoice.html new file mode 100644 index 0000000000000000000000000000000000000000..38ce23180b43fccbb36381d2045191346cafeb86 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/review-invoice.html @@ -0,0 +1,72 @@ +
+ +

+ Please clarify:
+ This invoice needs clarification and could not be approved due to missing data. +

+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ +
+
+
+
+ diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/start-form.html b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/start-form.html new file mode 100644 index 0000000000000000000000000000000000000000..da66665ea1d0eb7a6a193b924200d4325cda5891 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/forms/start-form.html @@ -0,0 +1,110 @@ +
+ +
+ +
+ +
This field is required
+
+
+ + + +
+ +
+ +
+ (e.g. "Great Pizza for Everyone Inc.") +
+
+
+ +
+ +
+ +
+ (e.g. "30.00") +
+ +

+ Note: Input must be a 'Double'. +

+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ (e.g. "I-12345") +
+
+
+ +
+ diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/index.html b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/index.html new file mode 100644 index 0000000000000000000000000000000000000000..91b3b98ce0d3f41e4c9c4ef8133f8649ca7a7bbc --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/main/webapp/index.html @@ -0,0 +1,131 @@ + + + + + + + + + Welcome to the Camunda Platform + + + + + + + + + +
+ +
+ +
+
+
+ +
+
+

Overview

+
+ +

+ This example allows you to walk through the features of Camunda Platform guided by a simple invoice process. +

+ +

+ Get started with the example by logging into the camunda + Tasklist using + the credentials demo:demo. +

+
+ + +
+ +
+

Available Personas

+
+ +

+ The following logins are provided by the show case and can be used to play around with the invoice process: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
UsernamePasswordGroups
demodemoSales, Accounting, Management
johnjohnSales
marymaryAccounting
peterpeterManagement
+
+ +
+ +
+

Async Continuation Demo

+
+ +

+ This process allows you to experiment with asychronous + continuations: +

+
    +
  1. Start a new instance of the Invoice Receipt process.
  2. +
  3. Log into cockpit. Select an instance of the Invoice Receipt process.
  4. +
  5. Add a variable named shouldFail to the process and set it to true
  6. +
  7. Using the tasklist, make the process advance to the Archive Invoice service task.
  8. +
  9. Back to cockpit, you see an Incident which has been created for the service task.
  10. +
  11. Set the value of the variable shouldFail to false and increment the retries of + the failed job. + As a result, the process instance is completed. +
  12. +
+
+ + + +
+
+
+ + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/test/java/org/camunda/bpm/example/invoice/InvoiceTestCase.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/test/java/org/camunda/bpm/example/invoice/InvoiceTestCase.java new file mode 100644 index 0000000000000000000000000000000000000000..db873c18177e131cfc22e065639b651b915c446d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/test/java/org/camunda/bpm/example/invoice/InvoiceTestCase.java @@ -0,0 +1,218 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.example.invoice; + +import static org.camunda.bpm.engine.variable.Variables.fileValue; + +import java.io.InputStream; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.camunda.bpm.engine.runtime.Job; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.task.IdentityLink; +import org.camunda.bpm.engine.task.Task; +import org.camunda.bpm.engine.test.Deployment; +import org.camunda.bpm.engine.test.ProcessEngineTestCase; +import org.camunda.bpm.engine.variable.VariableMap; +import org.camunda.bpm.engine.variable.Variables; + +public class InvoiceTestCase extends ProcessEngineTestCase { + + @Deployment(resources= {"invoice.v1.bpmn", "invoiceBusinessDecisions.dmn"}) + public void testHappyPathV1() { + InputStream invoiceInputStream = InvoiceProcessApplication.class.getClassLoader().getResourceAsStream("invoice.pdf"); + VariableMap variables = Variables.createVariables() + .putValue("creditor", "Great Pizza for Everyone Inc.") + .putValue("amount", 300.0d) + .putValue("invoiceCategory", "Travel Expenses") + .putValue("invoiceNumber", "GPFE-23232323") + .putValue("invoiceDocument", fileValue("invoice.pdf") + .file(invoiceInputStream) + .mimeType("application/pdf") + .create()); + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("invoice", variables); + + Task task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult(); + assertEquals("approveInvoice", task.getTaskDefinitionKey()); + + List links = taskService.getIdentityLinksForTask(task.getId()); + Set approverGroups = new HashSet(); + for (IdentityLink link : links) { + approverGroups.add(link.getGroupId()); + } + assertEquals(2, approverGroups.size()); + assertTrue(approverGroups.contains("accounting")); + assertTrue(approverGroups.contains("sales")); + + variables.clear(); + variables.put("approved", Boolean.TRUE); + taskService.complete(task.getId(), variables); + + task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult(); + + assertEquals("prepareBankTransfer", task.getTaskDefinitionKey()); + taskService.complete(task.getId()); + + Job archiveInvoiceJob = managementService.createJobQuery().singleResult(); + assertNotNull(archiveInvoiceJob); + managementService.executeJob(archiveInvoiceJob.getId()); + + assertProcessEnded(pi.getId()); + } + + @Deployment(resources= {"invoice.v2.bpmn", "invoiceBusinessDecisions.dmn"}) + public void testHappyPathV2() { + InputStream invoiceInputStream = InvoiceProcessApplication.class.getClassLoader().getResourceAsStream("invoice.pdf"); + VariableMap variables = Variables.createVariables() + .putValue("creditor", "Great Pizza for Everyone Inc.") + .putValue("amount", 300.0d) + .putValue("invoiceCategory", "Travel Expenses") + .putValue("invoiceNumber", "GPFE-23232323") + .putValue("invoiceDocument", fileValue("invoice.pdf") + .file(invoiceInputStream) + .mimeType("application/pdf") + .create()); + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("invoice", variables); + + Task task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult(); + assertEquals("approveInvoice", task.getTaskDefinitionKey()); + + List links = taskService.getIdentityLinksForTask(task.getId()); + Set approverGroups = new HashSet(); + for (IdentityLink link : links) { + approverGroups.add(link.getGroupId()); + } + assertEquals(2, approverGroups.size()); + assertTrue(approverGroups.contains("accounting")); + assertTrue(approverGroups.contains("sales")); + + variables.clear(); + variables.put("approved", Boolean.TRUE); + taskService.complete(task.getId(), variables); + + task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult(); + + assertEquals("prepareBankTransfer", task.getTaskDefinitionKey()); + taskService.complete(task.getId()); + + Job archiveInvoiceJob = managementService.createJobQuery().singleResult(); + assertNotNull(archiveInvoiceJob); + managementService.executeJob(archiveInvoiceJob.getId()); + + assertProcessEnded(pi.getId()); + } + + @Deployment(resources= {"invoice.v2.bpmn", "invoiceBusinessDecisions.dmn"}) + public void testApproveInvoiceAssignment() { + InputStream invoiceInputStream = InvoiceProcessApplication.class.getClassLoader().getResourceAsStream("invoice.pdf"); + + VariableMap variables = Variables.createVariables() + .putValue("creditor", "Great Pizza for Everyone Inc.") + .putValue("amount", 300.0d) + .putValue("invoiceCategory", "Travel Expenses") + .putValue("invoiceNumber", "GPFE-23232323") + .putValue("invoiceDocument", fileValue("invoice.pdf") + .file(invoiceInputStream) + .mimeType("application/pdf") + .create()) + .putValue("approverGroups", Arrays.asList("sales", "accounting")); + + ProcessInstance pi = runtimeService.createProcessInstanceByKey("invoice") + .setVariables(variables) + .startBeforeActivity("approveInvoice") + .execute(); + + // given that the process instance is waiting at task "approveInvoice" + Task task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult(); + assertEquals("approveInvoice", task.getTaskDefinitionKey()); + + // and task has candidate groups + List links = taskService.getIdentityLinksForTask(task.getId()); + Set approverGroups = new HashSet(); + for (IdentityLink link : links) { + approverGroups.add(link.getGroupId()); + } + assertEquals(2, approverGroups.size()); + assertTrue(approverGroups.contains("accounting")); + assertTrue(approverGroups.contains("sales")); + + // and variable approver is null + assertNull(taskService.getVariable(task.getId(), "approver")); + + // if mary claims the task + taskService.claim(task.getId(), "mary"); + + // then the variable "approver" exists and is set to mary + assertEquals("mary", taskService.getVariable(task.getId(), "approver")); + } + + @Deployment(resources= {"invoice.v2.bpmn", "reviewInvoice.bpmn", "invoiceBusinessDecisions.dmn"}) + public void testNonSuccessfulPath() { + InputStream invoiceInputStream = InvoiceProcessApplication.class.getClassLoader().getResourceAsStream("invoice.pdf"); + VariableMap variables = Variables.createVariables() + .putValue("creditor", "Great Pizza for Everyone Inc.") + .putValue("amount", 300.0d) + .putValue("invoiceCategory", "Travel Expenses") + .putValue("invoiceNumber", "GPFE-23232323") + .putValue("invoiceDocument", fileValue("invoice.pdf") + .file(invoiceInputStream) + .mimeType("application/pdf") + .create()); + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("invoice", variables); + + Task task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult(); + assertEquals("approveInvoice", task.getTaskDefinitionKey()); + + List links = taskService.getIdentityLinksForTask(task.getId()); + Set approverGroups = new HashSet(); + for (IdentityLink link : links) { + approverGroups.add(link.getGroupId()); + } + assertEquals(2, approverGroups.size()); + assertTrue(approverGroups.contains("accounting")); + assertTrue(approverGroups.contains("sales")); + + variables.clear(); + variables.put("approved", Boolean.FALSE); + taskService.complete(task.getId(), variables); + + task = taskService.createTaskQuery().singleResult(); + + assertEquals("assignReviewer", task.getTaskDefinitionKey()); + variables.clear(); + variables.put("reviewer", "peter"); + taskService.complete(task.getId(), variables); + + task = taskService.createTaskQuery().singleResult(); + + assertEquals("reviewInvoice", task.getTaskDefinitionKey()); + variables.clear(); + variables.put("clarified", Boolean.FALSE); + taskService.complete(task.getId(), variables); + + assertProcessEnded(task.getProcessInstanceId()); + assertProcessEnded(pi.getId()); + } + + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/test/resources/camunda.cfg.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/test/resources/camunda.cfg.xml new file mode 100644 index 0000000000000000000000000000000000000000..9718b4611f4fafe4763d2f58ca17b098fdd4954a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/invoice/src/test/resources/camunda.cfg.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..b73e7fa2cfbfcccf5c8c52c7142b07fc033bfcb4 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/examples/pom.xml @@ -0,0 +1,104 @@ + + 4.0.0 + + org.camunda.bpm.example + camunda-example-root + pom + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + Camunda Platform - Example - Root + + + org.camunda.bpm + camunda-database-settings + ../database + 7.24.0-SNAPSHOT + + + + 8.1.14.v20131031 + + + + + + org.camunda.bpm + camunda-core-internal-dependencies + ${project.version} + import + pom + + + + + + + + org.camunda.bpm + camunda-engine + provided + + + + junit + junit + test + + + + com.h2database + h2 + test + + + + org.graalvm.js + js + test + + + + org.graalvm.js + js-scriptengine + test + + + + + + + + + org.apache.maven.plugins + maven-war-plugin + + false + true + + + + org.mortbay.jetty + jetty-maven-plugin + ${version.jetty} + + + /camunda + + ${project.basedir}/src/main/webapp + ${project.basedir}/src/develop/webapp + + + + + + + + + + invoice + invoice-jakarta + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/.gitignore b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a3eb55ee1857a9d64266107571fda754b8ad8a2d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/.gitignore @@ -0,0 +1,7 @@ +.idea +*.iml +.classpath +.project +.settings +target +bin diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/README.md b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0e50be663cfb5a32eac76f46d82763cd08aa7296 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/README.md @@ -0,0 +1,29 @@ +camunda-template-engines-freemarker +=============================== + +

+ Camunda 7 Docs | + Forum | + License +

+ +Wrapper of Java Freemarker 2.3 template engine as +[JSR 223](https://www.jcp.org/en/jsr/detail?id=223) compatible +[script engine](http://docs.oracle.com/javase/7/docs/api/javax/script/ScriptEngine.html). + +You can use the template engine in Camunda Automation Platform 7 as scripting language. + +## More template engines (Community Extensions) + +You can find the following template engine extensions in Camunda's [Community Hub](https://github.com/camunda-community-hub/camunda-7-template-engines-jsr223/): + +* Velocity 2.3 +* xQuery Saxon 9.6 +* XSLT Saxon 9.6 + +## Contributing + +Have a look at our [contribution guide](https://github.com/camunda/camunda-bpm-platform/blob/master/CONTRIBUTING.md) for how to contribute to this repository. + +## License +The source files in this repository are made available under the [Apache License Version 2.0](./LICENSE). diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..b094274311f571af318130f58005200d61cfe84d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/pom.xml @@ -0,0 +1,112 @@ + + 4.0.0 + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + + + org.camunda.bpm + camunda-parent + ../parent + 7.24.0-SNAPSHOT + + + org.camunda.template-engines + camunda-template-engines-freemarker + 7.24.0-SNAPSHOT + + camunda template engine jsr223 freemarker + + 2014 + + + false + 5.1.1 + + + + + org.freemarker + freemarker + 2.3.31 + + + + junit + junit + ${version.junit} + test + + + + org.assertj + assertj-core + ${version.assertj} + test + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.17 + + true + + + + org.apache.felix + maven-bundle-plugin + ${maven-bundle-plugin.version} + + + org.camunda.templateengines* + + + + + bundle-manifest + process-classes + + manifest + + + + + + org.codehaus.mojo + license-maven-plugin + 1.14 + + true + test + + + + + + + + license-header-check + + + + com.mycila + license-maven-plugin + + + + + + + + https://github.com/camunda/camunda-bpm-platform + scm:git:git@github.com:camunda/camunda-bpm-platform.git + scm:git:git@github.com:camunda/camunda-bpm-platform.git + HEAD + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/main/java/org/camunda/templateengines/FreeMarkerCompiledScript.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/main/java/org/camunda/templateengines/FreeMarkerCompiledScript.java new file mode 100644 index 0000000000000000000000000000000000000000..51ef3f83691aec80c34ad6ad831acf27100d4841 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/main/java/org/camunda/templateengines/FreeMarkerCompiledScript.java @@ -0,0 +1,71 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.templateengines; + +import freemarker.template.Configuration; +import freemarker.template.Template; +import java.io.*; +import javax.script.*; + +/** + * Wraps a {@link Template Freemaker template} as a {@link CompiledScript} to + * cache the used template. + * + * @author Sebastian Menski + */ +public class FreeMarkerCompiledScript extends CompiledScript { + + protected final ScriptEngine scriptEngine; + protected final Template template; + + public FreeMarkerCompiledScript(ScriptEngine scriptEngine, String script, Configuration configuration) throws ScriptException { + this(scriptEngine, "unknown", script, configuration); + } + + public FreeMarkerCompiledScript(ScriptEngine scriptEngine, Reader script, Configuration configuration) throws ScriptException { + this(scriptEngine, "unknown", script, configuration); + } + + public FreeMarkerCompiledScript(ScriptEngine scriptEngine, String filename, String script, Configuration configuration) throws ScriptException { + this(scriptEngine, filename, new StringReader(script), configuration); + } + + public FreeMarkerCompiledScript(ScriptEngine scriptEngine, String filename, Reader script, Configuration configuration) throws ScriptException { + this.scriptEngine = scriptEngine; + try { + template = new Template(filename, script, configuration); + } catch (IOException e) { + throw new ScriptException(e); + } + } + + public Object eval(ScriptContext context) throws ScriptException { + Writer writer = new StringWriter(); + Bindings bindings = context.getBindings(ScriptContext.ENGINE_SCOPE); + try { + template.process(bindings, writer); + writer.flush(); + } catch (Exception e) { + throw new ScriptException(e); + } + return writer.toString(); + } + + public ScriptEngine getEngine() { + return scriptEngine; + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/main/java/org/camunda/templateengines/FreeMarkerScriptEngine.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/main/java/org/camunda/templateengines/FreeMarkerScriptEngine.java new file mode 100644 index 0000000000000000000000000000000000000000..08462961db328a6811740db4df71a8e83afb7350 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/main/java/org/camunda/templateengines/FreeMarkerScriptEngine.java @@ -0,0 +1,111 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.templateengines; + +import freemarker.template.Configuration; +import freemarker.template.Template; + +import java.io.Reader; +import java.io.StringReader; +import java.io.StringWriter; +import java.io.Writer; + +import javax.script.*; + +/** + * JSR 223 compatible wrapper for the FreeMarker template engine. + * + * @author Sebastian Menski + */ +public class FreeMarkerScriptEngine extends AbstractScriptEngine implements Compilable { + + protected ScriptEngineFactory scriptEngineFactory; + protected Configuration configuration; + + public FreeMarkerScriptEngine() { + this(null); + } + + public FreeMarkerScriptEngine(ScriptEngineFactory scriptEngineFactory) { + this.scriptEngineFactory = scriptEngineFactory; + } + + public Object eval(String script, ScriptContext context) throws ScriptException { + return eval(new StringReader(script), context); + } + + public Object eval(Reader script, ScriptContext context) throws ScriptException { + initConfiguration(); + String filename = getFilename(context); + Writer writer = new StringWriter(); + Bindings bindings = context.getBindings(ScriptContext.ENGINE_SCOPE); + + try { + Template template = new Template(filename, script, configuration); + template.process(bindings, writer); + writer.flush(); + } catch (Exception e) { + throw new ScriptException(e); + } + + return writer.toString(); + } + + public Bindings createBindings() { + return new SimpleBindings(); + } + + public ScriptEngineFactory getFactory() { + if (scriptEngineFactory == null) { + synchronized (this) { + if (scriptEngineFactory == null) { + scriptEngineFactory = new FreeMarkerScriptEngineFactory(); + } + } + } + return scriptEngineFactory; + } + + public void initConfiguration() { + if (configuration == null) { + synchronized (this) { + if (configuration == null) { + configuration = new Configuration(Configuration.VERSION_2_3_29); + } + } + } + } + + protected String getFilename(ScriptContext context) { + String filename = (String) context.getAttribute(ScriptEngine.FILENAME); + if (filename != null) { + return filename; + } + else { + return "unknown"; + } + } + + public CompiledScript compile(String script) throws ScriptException { + return compile(new StringReader(script)); + } + + public CompiledScript compile(Reader script) throws ScriptException { + initConfiguration(); + return new FreeMarkerCompiledScript(this, script, configuration); + } +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/main/java/org/camunda/templateengines/FreeMarkerScriptEngineFactory.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/main/java/org/camunda/templateengines/FreeMarkerScriptEngineFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..cd0b3cf82cc0709cd9c2eda98e132e865b66f6d3 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/main/java/org/camunda/templateengines/FreeMarkerScriptEngineFactory.java @@ -0,0 +1,118 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.templateengines; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import javax.script.ScriptEngine; +import javax.script.ScriptEngineFactory; + +/** + * {@link ScriptEngineFactory} to create a JSR 223 compatible + * wrapper of the FreeMarker template engine. + * + * @author Sebastian Menski + */ +public class FreeMarkerScriptEngineFactory implements ScriptEngineFactory { + + public final static String NAME = "freemarker"; + public final static String VERSION = "2.3.29"; + + public final static List names; + public final static List extensions; + public final static List mimeTypes; + + static { + names = Collections.unmodifiableList(Arrays.asList(NAME, "Freemarker", "FreeMarker")); + extensions = Collections.unmodifiableList(Collections.singletonList("ftl")); + mimeTypes = Collections.emptyList(); + } + + public String getEngineName() { + return NAME; + } + + public String getEngineVersion() { + return VERSION; + } + + public List getExtensions() { + return extensions; + } + + public List getMimeTypes() { + return mimeTypes; + } + + public List getNames() { + return names; + } + + public String getLanguageName() { + return NAME; + } + + public String getLanguageVersion() { + return VERSION; + } + + public Object getParameter(String key) { + if (key.equals(ScriptEngine.NAME)) { + return getLanguageName(); + } else if (key.equals(ScriptEngine.ENGINE)) { + return getEngineName(); + } else if (key.equals(ScriptEngine.ENGINE_VERSION)) { + return getEngineVersion(); + } else if (key.equals(ScriptEngine.LANGUAGE)) { + return getLanguageName(); + } else if (key.equals(ScriptEngine.LANGUAGE_VERSION)) { + return getLanguageVersion(); + } else if (key.equals("THREADING")) { + return "MULTITHREADED"; + } else { + return null; + } + } + + public String getMethodCallSyntax(String object, String method, String... args) { + return "${" + object + "." + method + "(" + joinStrings(", ", args) + ")}"; + } + + public String getOutputStatement(String toDisplay) { + return toDisplay; + } + + public String getProgram(String... statements) { + return joinStrings("\n", statements); + } + + protected String joinStrings(String delimiter, String[] values) { + if (values == null) { + return null; + } + else { + return String.join(delimiter, values); + } + } + + public ScriptEngine getScriptEngine() { + return new FreeMarkerScriptEngine(this); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory new file mode 100644 index 0000000000000000000000000000000000000000..924e4b014a8d5a978dcc0ff8aa7896c04db6976b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory @@ -0,0 +1 @@ +org.camunda.templateengines.FreeMarkerScriptEngineFactory diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/test/java/org/camunda/templateengines/engine/FreeMarkerScriptEngineTest.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/test/java/org/camunda/templateengines/engine/FreeMarkerScriptEngineTest.java new file mode 100644 index 0000000000000000000000000000000000000000..34c723f7b64b0a4c240346fad68387adee041c9a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/test/java/org/camunda/templateengines/engine/FreeMarkerScriptEngineTest.java @@ -0,0 +1,139 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.templateengines.engine; + +import java.util.Arrays; +import java.util.Collection; + +import javax.script.*; + +import org.camunda.templateengines.engine.util.Greeter; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; + +/** + * @author Sebastian Menski + */ +public class FreeMarkerScriptEngineTest { + + protected static ScriptEngine scriptEngine; + protected Bindings bindings; + + protected String template; + protected String expected; + + @BeforeClass + public static void getScriptEngine() { + ScriptEngineManager scriptEngineManager = new ScriptEngineManager(); + scriptEngine = scriptEngineManager.getEngineByName("freemarker"); + } + + @Before + public void createBindings() { + bindings = new SimpleBindings(); + } + + @After + public void checkResult() throws ScriptException { + if (template != null) { + assertThat(evaluate(template)).isEqualTo(expected); + } + } + + protected String evaluate(String template) throws ScriptException { + return (String) scriptEngine.eval(template, bindings); + } + + @Test + public void testScriptEngineExists() { + assertThat(scriptEngine).isNotNull(); + } + + @Test + public void testVariableExpansion() { + bindings.put("name", "world"); + expected = "Hello world!"; + template = "Hello ${name}!"; + } + + @Test + public void testJavaProperties() { + bindings.put("greeter", new Greeter()); + expected = "!"; + template = "${greeter.suffix}"; + } + + @Test + public void testJavaMethodCall() throws ScriptException { + bindings.put("greeter", new Greeter()); + expected = "Hello world!"; + template = "${greeter.hello('world')}"; + } + + @Test + public void testJavaArrays() throws ScriptException { + bindings.put("myarray", new String[]{"hello", "foo", "world", "bar"}); + expected = "4 hello world!"; + template = "${myarray?size} ${myarray[0]} ${myarray[2]}!"; + } + + @Test + public void testJavaBoolean() throws ScriptException { + bindings.put("mybool", false); + expected = "Hello world!"; + template = "<#if mybool>okey<#else>Hello world!"; + } + + @Test + public void testJavaInteger() throws ScriptException { + bindings.put("myint", 6); + expected = "42"; + template = "<#assign myint = myint + 36>${myint}"; + } + + @Test + public void testJavaCollection() throws ScriptException { + Collection names = Arrays.asList("tweety", "duffy", "tom"); + bindings.put("names", names); + expected = "tweety, duffy, tom"; + template = "<#list names as name>${name}<#if name_has_next>, "; + } + + @Test + public void testDefineBlock() throws ScriptException { + bindings.put("who", "world"); + expected = "Hello world!"; + template = "<#macro block>Hello ${who}!<@block/>"; + } + + @Test + public void testFailingEvaluation() { + try { + String invalidTemplate = "${}"; + evaluate(invalidTemplate); + fail("Expected a ScriptException"); + } catch (ScriptException e) { + // happy path + } + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/test/java/org/camunda/templateengines/engine/util/Greeter.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/test/java/org/camunda/templateengines/engine/util/Greeter.java new file mode 100644 index 0000000000000000000000000000000000000000..7f7ba804a3a571a02f1a479424d47a1364e27044 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/freemarker-template-engine/src/test/java/org/camunda/templateengines/engine/util/Greeter.java @@ -0,0 +1,32 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.templateengines.engine.util; + +/** + * @author Sebastian Menski + */ +public class Greeter { + + public String getSuffix() { + return "!"; + } + + public String hello(String name) { + return "Hello " + name + getSuffix(); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/internal-dependencies/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/internal-dependencies/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..b59229274d403c4d854566344ac1e7683b53b5aa --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/internal-dependencies/pom.xml @@ -0,0 +1,401 @@ + + + 4.0.0 + + + org.camunda.bpm + camunda-parent + ../parent + 7.24.0-SNAPSHOT + + + camunda-core-internal-dependencies + pom + Camunda Platform - Core - Internal Dependencies + + + Camunda Platform core internal bill of material for dependencies. + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + + + + + org.camunda.feel + feel-engine + ${version.feel-scala} + scala-shaded + + + com.google.code.gson + gson + ${version.gson} + + + cglib + cglib + 2.2.2 + + + com.zaxxer + HikariCP + ${version.hikaricp} + + + + org.slf4j + slf4j-api + + + + + commons-logging + commons-logging + 1.1.1 + + + org.apache.commons + commons-lang3 + 3.8.1 + + + commons-io + commons-io + 2.17.0 + + + commons-fileupload + commons-fileupload + 1.6.0 + + + + com.sun.xml.bind + jaxb-xjc + 2.3.6 + + + javax.servlet + servlet-api + 2.5 + + + org.hibernate.javax.persistence + hibernate-jpa-2.0-api + 1.0.1.Final + + + junit + junit + ${version.junit} + + + org.assertj + assertj-core + ${version.assertj} + + + ch.qos.logback + logback-classic + ${version.logback} + + + org.slf4j + jcl-over-slf4j + ${version.slf4j} + + + org.slf4j + jul-to-slf4j + ${version.slf4j} + + + org.apache.ant + ant + 1.7.1 + provided + + + + commons-collections + commons-collections + 3.2.2 + test + + + + + org.apache.commons + commons-email + 1.5 + + + + org.apache.geronimo.specs + geronimo-jta_1.1_spec + 1.1.1 + + + org.apache.openjpa + openjpa + ${version.openjpa} + + + + + org.apache.groovy + groovy-bom + ${version.groovy} + import + pom + + + + org.graalvm.js + js + ${version.graal.js} + + + org.graalvm.js + js-scriptengine + ${version.graal.js} + + + org.hamcrest + hamcrest-library + test + 1.3 + + + org.xmlunit + xmlunit-core + 2.6.2 + + + + org.mule.modules + mule-module-cxf + ${mule.version} + + + org.mule.tests + mule-tests-functional + ${mule.version} + + + org.mockito + mockito-core + ${version.mockito} + test + + + org.osgi + org.osgi.core + 4.2.0 + provided + + + org.osgi + org.osgi.compendium + 4.2.0 + provided + + + org.apache.felix + org.apache.felix.fileinstall + 3.0.2 + true + + + org.slf4j + slf4j-jdk14 + ${version.slf4j} + + + org.subethamail + subethasmtp-wiser + 1.2 + test + + + wsdl4j + wsdl4j + 1.6.2 + + + + org.apache.camel + camel-spring + 2.10.0 + + + + org.safehaus.jug + jug + lgpl + 2.0.0 + + + + org.jboss.spec + jboss-javaee-6.0 + ${version.jboss-javaee-spec} + pom + + + + org.jboss.spec + jboss-javaee-web-6.0 + ${version.jboss-javaee-spec} + pom + + + + org.jboss.spec.javax.servlet + jboss-servlet-api_3.0_spec + 1.0.2.Final + + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_1.1_spec + 1.0.1.Final + + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.1_spec + ${version.jaxrs.api} + + + + + org.bouncycastle + bcprov-jdk15on + ${version.bouncycastle} + + + org.bouncycastle + bcprov-ext-jdk15on + ${version.bouncycastle} + + + org.bouncycastle + bcpg-jdk15on + ${version.bouncycastle} + + + + org.apache.tomcat + tomcat-catalina + ${version.tomcat} + + + + org.jboss.resteasy + resteasy-jaxrs + ${version.resteasy} + + + + httpclient5 + org.apache.httpcomponents.client5 + + + commons-httpclient + commons-httpclient + + + + + + org.jboss.resteasy + tjws + ${version.resteasy} + + + + org.apache.directory.server + apacheds-all + 2.0.0-M23 + + + + org.python + jython + 2.5.3 + + + + org.jruby + jruby-complete + 9.1.17.0 + + + + org.freemarker + freemarker + ${version.freemarker} + + + + com.github.tomakehurst + wiremock + ${version.wiremock} + test + + + + org.skyscreamer + jsonassert + 1.5.0 + + + + + org.testcontainers + testcontainers + ${version.testcontainers} + + + org.testcontainers + mysql + ${version.testcontainers} + + + org.testcontainers + postgresql + ${version.testcontainers} + + + org.testcontainers + mssqlserver + ${version.testcontainers} + + + + net.minidev + json-smart + ${version.json-smart} + + + + com.jayway.jsonpath + json-path + ${version.json-path} + + + + com.cronutils + cron-utils + ${version.cronutils} + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client-jakarta/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client-jakarta/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..f38b36d81b5eb23f2dccdbf6b68ece3b7f73a248 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client-jakarta/pom.xml @@ -0,0 +1,182 @@ + + 4.0.0 + + camunda-ejb-client-jakarta + org.camunda.bpm.javaee + Camunda Platform - EJB Client Jakarta + jar + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + + + org.camunda.bpm + camunda-parent + ../../parent + 7.24.0-SNAPSHOT + + + + + + org.camunda.bpm + camunda-core-internal-dependencies + ${project.version} + import + pom + + + jakarta.platform + jakarta.jakartaee-bom + ${version.jakarta-ee-spec} + pom + import + + + + + + + jakarta.annotation + jakarta.annotation-api + provided + + + jakarta.ejb + jakarta.ejb-api + provided + + + jakarta.servlet + jakarta.servlet-api + provided + + + + org.camunda.bpm + camunda-engine + provided + + + livetribe-jsr223 + org.livetribe + + + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + sources + generate-sources + + copy-resources + + + ${project.build.directory}/generated-sources/jakarta + + + ${basedir}/../ejb-client/src/main/java + false + + + + + + resources + generate-resources + + copy-resources + + + ${project.build.directory}/generated-resources/jakarta + + + ${basedir}/../ejb-client/src/main/resources + false + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + initialize + + properties + + + + + + org.eclipse.transformer + transformer-maven-plugin + + + transform-jakarta-sources + generate-sources + + transform + + + ${project.build.directory}/generated-sources/jakarta + + + + transform-jakarta-resources + generate-resources + + transform + + + ${project.build.directory}/generated-resources/jakarta + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.2.0 + + + add-jakarta-source + generate-sources + + add-source + + + + ${basedir}/target/generated-sources/jakarta + + + + + add-jakarta-resource + generate-resources + + add-resource + + + + ${basedir}/target/generated-resources/jakarta + + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..92384f0bb5056db94b18108a8d0a72b61453c99e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/pom.xml @@ -0,0 +1,55 @@ + + 4.0.0 + + camunda-ejb-client + org.camunda.bpm.javaee + Camunda Platform - Client + jar + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + + + org.camunda.bpm + camunda-parent + ../../parent + 7.24.0-SNAPSHOT + + + + + + org.camunda.bpm + camunda-core-internal-dependencies + ${project.version} + import + pom + + + + + + + org.jboss.spec + jboss-javaee-web-6.0 + pom + provided + + + + org.camunda.bpm + camunda-engine + provided + + + livetribe-jsr223 + org.livetribe + + + + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/java/org/camunda/bpm/application/impl/ejb/DefaultEjbProcessApplication.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/java/org/camunda/bpm/application/impl/ejb/DefaultEjbProcessApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..88491d3599c7368ddfe9e179f8ba00424098ca1e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/java/org/camunda/bpm/application/impl/ejb/DefaultEjbProcessApplication.java @@ -0,0 +1,61 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.application.impl.ejb; + +import java.util.HashMap; +import java.util.Map; + +import javax.annotation.PostConstruct; +import javax.annotation.PreDestroy; +import javax.ejb.*; + +import org.camunda.bpm.application.ProcessApplication; +import org.camunda.bpm.application.ProcessApplicationInterface; + + +/** + * + * @author Daniel Meyer + * @author Roman Smirnov + * + */ +@Singleton +@Startup +@ConcurrencyManagement(ConcurrencyManagementType.BEAN) +@TransactionAttribute(TransactionAttributeType.REQUIRED) +@ProcessApplication +@Local(ProcessApplicationInterface.class) +// Using fully-qualified class name instead of import statement to allow for automatic Jakarta transformation +public class DefaultEjbProcessApplication extends org.camunda.bpm.application.impl.EjbProcessApplication { + + protected Map properties = new HashMap(); + + @PostConstruct + public void start() { + deploy(); + } + + @PreDestroy + public void stop() { + undeploy(); + } + + public Map getProperties() { + return properties; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/java/org/camunda/bpm/application/impl/web/ProcessArchiveServletContextListener.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/java/org/camunda/bpm/application/impl/web/ProcessArchiveServletContextListener.java new file mode 100644 index 0000000000000000000000000000000000000000..15426852d80033b60568789fcb9c655297f3cb7f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/java/org/camunda/bpm/application/impl/web/ProcessArchiveServletContextListener.java @@ -0,0 +1,51 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.application.impl.web; + +import javax.ejb.EJB; +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; + +import org.camunda.bpm.application.ProcessApplicationInfo; +import org.camunda.bpm.application.ProcessApplicationInterface; +import org.camunda.bpm.application.impl.ejb.DefaultEjbProcessApplication; + + +/** + *

Sets the ProcessApplicationInfo.PROP_SERVLET_CONTEXT_PATH property if this is + * deployed as part of a WebApplication.

+ * + * @author Daniel Meyer + * + */ +public class ProcessArchiveServletContextListener implements ServletContextListener { + + @EJB + private ProcessApplicationInterface defaultEjbProcessApplication; + + public void contextInitialized(ServletContextEvent contextEvent) { + + String contextPath = contextEvent.getServletContext().getContextPath(); + + defaultEjbProcessApplication.getProperties().put(ProcessApplicationInfo.PROP_SERVLET_CONTEXT_PATH, contextPath); + + } + + public void contextDestroyed(ServletContextEvent arg0) { + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/resources/META-INF/beans.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/resources/META-INF/beans.xml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/resources/META-INF/ejb-jar.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/resources/META-INF/ejb-jar.xml new file mode 100644 index 0000000000000000000000000000000000000000..75c25f11a4c5c1093bf3140afe31cd868a2c331e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/resources/META-INF/ejb-jar.xml @@ -0,0 +1,9 @@ + + + process-archive-support + Process Archive Support + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/resources/META-INF/web-fragment.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/resources/META-INF/web-fragment.xml new file mode 100644 index 0000000000000000000000000000000000000000..d245d7db4493c20d0bca2120f7988d5bfafc7897 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/resources/META-INF/web-fragment.xml @@ -0,0 +1,11 @@ + + + + org.camunda.bpm.application.impl.web.ProcessArchiveServletContextListener + + + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/resources/WEB-INF/ejb-jar.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/resources/WEB-INF/ejb-jar.xml new file mode 100644 index 0000000000000000000000000000000000000000..d9633c504a5b2bb9b697cd1e4b0b3c204cbc2d92 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-client/src/main/resources/WEB-INF/ejb-jar.xml @@ -0,0 +1,10 @@ + + + + process-archive-support + Process Archive Support + + \ No newline at end of file diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/pom.xml b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..92d3bc1c2d5c9fba6e450f41e15b0170cfd1b377 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/pom.xml @@ -0,0 +1,64 @@ + + 4.0.0 + + org.camunda.bpm.javaee + camunda-ejb-service + ejb + + + Note: 7.24.0 is the last community edition release published on Maven Central. This library will not receive any new versions or releases. However, if you are interested in extended maintenance you could look into our enterprise edition. Get in touch with us: https://camunda.com/contact/ + + + Camunda Platform - EJB Service + + + org.camunda.bpm + camunda-database-settings + ../../database + 7.24.0-SNAPSHOT + + + + + + org.camunda.bpm + camunda-core-internal-dependencies + ${project.version} + import + pom + + + + + + + org.camunda.bpm + camunda-engine + provided + + + + org.camunda.bpm.javaee + camunda-jobexecutor-ra + provided + ${project.version} + + + + org.glassfish.extras + glassfish-embedded-all + 3.1.1 + provided + + + + + + + org.apache.maven.plugins + maven-ejb-plugin + + + + + diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/EjbBpmPlatformBootstrap.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/EjbBpmPlatformBootstrap.java new file mode 100644 index 0000000000000000000000000000000000000000..52f01f732fbb6bc1b7b1f981750673522ee4e252 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/EjbBpmPlatformBootstrap.java @@ -0,0 +1,115 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.container.impl.ejb; + +import org.camunda.bpm.ProcessApplicationService; +import org.camunda.bpm.ProcessEngineService; +import org.camunda.bpm.container.ExecutorService; +import org.camunda.bpm.container.RuntimeContainerDelegate; +import org.camunda.bpm.container.impl.RuntimeContainerDelegateImpl; +import org.camunda.bpm.container.impl.deployment.DiscoverBpmPlatformPluginsStep; +import org.camunda.bpm.container.impl.deployment.PlatformXmlStartProcessEnginesStep; +import org.camunda.bpm.container.impl.deployment.StopProcessApplicationsStep; +import org.camunda.bpm.container.impl.deployment.StopProcessEnginesStep; +import org.camunda.bpm.container.impl.deployment.UnregisterBpmPlatformPluginsStep; +import org.camunda.bpm.container.impl.deployment.jobexecutor.StartJobExecutorStep; +import org.camunda.bpm.container.impl.deployment.jobexecutor.StopJobExecutorStep; +import org.camunda.bpm.container.impl.ejb.deployment.EjbJarParsePlatformXmlStep; +import org.camunda.bpm.container.impl.ejb.deployment.StartJcaExecutorServiceStep; +import org.camunda.bpm.container.impl.ejb.deployment.StopJcaExecutorServiceStep; + +import javax.annotation.PostConstruct; +import javax.annotation.PreDestroy; +import javax.ejb.EJB; +import javax.ejb.Singleton; +import javax.ejb.Startup; +import javax.ejb.TransactionAttribute; +import javax.ejb.TransactionAttributeType; + +import java.util.logging.Level; +import java.util.logging.Logger; + + +/** + *

Bootstrap for the Camunda Platform using a singleton EJB

+ * + * @author Daniel Meyer + */ +@Startup +@Singleton(name="BpmPlatformBootstrap") +@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) +public class EjbBpmPlatformBootstrap { + + final private static Logger LOGGER = Logger.getLogger(EjbBpmPlatformBootstrap.class.getName()); + + @EJB + protected ExecutorService executorServiceBean; + + protected ProcessEngineService processEngineService; + protected ProcessApplicationService processApplicationService; + + @PostConstruct + protected void start() { + + final RuntimeContainerDelegateImpl containerDelegate = getContainerDelegate(); + + containerDelegate.getServiceContainer().createDeploymentOperation("deploying Camunda Platform") + .addStep(new EjbJarParsePlatformXmlStep()) + .addStep(new DiscoverBpmPlatformPluginsStep()) + .addStep(new StartJcaExecutorServiceStep(executorServiceBean)) + .addStep(new StartJobExecutorStep()) + .addStep(new PlatformXmlStartProcessEnginesStep()) + .execute(); + + processEngineService = containerDelegate.getProcessEngineService(); + processApplicationService = containerDelegate.getProcessApplicationService(); + + LOGGER.log(Level.INFO, "Camunda Platform started successfully."); + } + + @PreDestroy + protected void stop() { + + final RuntimeContainerDelegateImpl containerDelegate = getContainerDelegate(); + + containerDelegate.getServiceContainer().createUndeploymentOperation("undeploying Camunda Platform") + .addStep(new StopProcessApplicationsStep()) + .addStep(new StopProcessEnginesStep()) + .addStep(new StopJobExecutorStep()) + .addStep(new StopJcaExecutorServiceStep()) + .addStep(new UnregisterBpmPlatformPluginsStep()) + .execute(); + + LOGGER.log(Level.INFO, "Camunda Platform stopped."); + + } + + protected RuntimeContainerDelegateImpl getContainerDelegate() { + return (RuntimeContainerDelegateImpl) RuntimeContainerDelegate.INSTANCE.get(); + } + + // getters ////////////////////////////////////////////// + + public ProcessEngineService getProcessEngineService() { + return processEngineService; + } + + public ProcessApplicationService getProcessApplicationService() { + return processApplicationService; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/EjbProcessApplicationService.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/EjbProcessApplicationService.java new file mode 100644 index 0000000000000000000000000000000000000000..c93035603b327cdf6e6de949f3c2c02ff40c041f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/EjbProcessApplicationService.java @@ -0,0 +1,61 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.container.impl.ejb; + +import java.util.Set; + +import javax.annotation.PostConstruct; +import javax.ejb.EJB; +import javax.ejb.Local; +import javax.ejb.Stateless; +import javax.ejb.TransactionAttribute; +import javax.ejb.TransactionAttributeType; + +import org.camunda.bpm.ProcessApplicationService; +import org.camunda.bpm.application.ProcessApplicationInfo; + +/** + *

Exposes the {@link ProcessApplicationService} as EJB inside the container.

+ * + * @author Daniel Meyer + * + */ +@Stateless(name="ProcessApplicationService", mappedName="ProcessApplicationService") +@Local(ProcessApplicationService.class) +@TransactionAttribute(TransactionAttributeType.SUPPORTS) +public class EjbProcessApplicationService implements ProcessApplicationService { + + @EJB + protected EjbBpmPlatformBootstrap ejbBpmPlatform; + + /** the processApplicationServiceDelegate */ + protected ProcessApplicationService processApplicationServiceDelegate; + + @PostConstruct + protected void initProcessEngineServiceDelegate() { + processApplicationServiceDelegate = ejbBpmPlatform.getProcessApplicationService(); + } + + public Set getProcessApplicationNames() { + return processApplicationServiceDelegate.getProcessApplicationNames(); + } + + public ProcessApplicationInfo getProcessApplicationInfo(String processApplicationName) { + return processApplicationServiceDelegate.getProcessApplicationInfo(processApplicationName); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/EjbProcessEngineService.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/EjbProcessEngineService.java new file mode 100644 index 0000000000000000000000000000000000000000..35641261258792912696b94674e505fd73e7af09 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/EjbProcessEngineService.java @@ -0,0 +1,70 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.container.impl.ejb; + +import java.util.List; +import java.util.Set; + +import javax.annotation.PostConstruct; +import javax.ejb.EJB; +import javax.ejb.Local; +import javax.ejb.Stateless; +import javax.ejb.TransactionAttribute; +import javax.ejb.TransactionAttributeType; + +import org.camunda.bpm.ProcessEngineService; +import org.camunda.bpm.engine.ProcessEngine; + +/** + *

Exposes the {@link ProcessEngineService} as EJB inside the container.

+ * + * @author Daniel Meyer + * + */ +@Stateless(name="ProcessEngineService", mappedName="ProcessEngineService") +@Local(ProcessEngineService.class) +@TransactionAttribute(TransactionAttributeType.SUPPORTS) +public class EjbProcessEngineService implements ProcessEngineService { + + @EJB + protected EjbBpmPlatformBootstrap ejbBpmPlatform; + + /** the processEngineServiceDelegate */ + protected ProcessEngineService processEngineServiceDelegate; + + @PostConstruct + protected void initProcessEngineServiceDelegate() { + processEngineServiceDelegate = ejbBpmPlatform.getProcessEngineService(); + } + + public ProcessEngine getDefaultProcessEngine() { + return processEngineServiceDelegate.getDefaultProcessEngine(); + } + + public List getProcessEngines() { + return processEngineServiceDelegate.getProcessEngines(); + } + + public Set getProcessEngineNames() { + return processEngineServiceDelegate.getProcessEngineNames(); + } + + public ProcessEngine getProcessEngine(String name) { + return processEngineServiceDelegate.getProcessEngine(name); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/ExecutorServiceBean.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/ExecutorServiceBean.java new file mode 100644 index 0000000000000000000000000000000000000000..626c75d4527fd98fa0440266389c859b843454a8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/ExecutorServiceBean.java @@ -0,0 +1,76 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.container.impl.ejb; + +import java.util.List; + +import javax.annotation.PostConstruct; +import javax.annotation.PreDestroy; +import javax.annotation.Resource; +import javax.ejb.Local; +import javax.ejb.Stateless; +import javax.ejb.TransactionAttribute; +import javax.ejb.TransactionAttributeType; +import javax.resource.ResourceException; + +import org.camunda.bpm.container.ExecutorService; +import org.camunda.bpm.container.impl.threading.ra.outbound.JcaExecutorServiceConnection; +import org.camunda.bpm.container.impl.threading.ra.outbound.JcaExecutorServiceConnectionFactory; +import org.camunda.bpm.engine.ProcessEngineException; +import org.camunda.bpm.engine.impl.ProcessEngineImpl; + +/** + * Bean exposing the JCA implementation of the {@link ExecutorService} as Stateless Bean. + * + * @author Daniel Meyer + * + */ +@Stateless +@Local(ExecutorService.class) +@TransactionAttribute(TransactionAttributeType.SUPPORTS) +public class ExecutorServiceBean implements ExecutorService { + + @Resource(mappedName="eis/JcaExecutorServiceConnectionFactory") + protected JcaExecutorServiceConnectionFactory executorConnectionFactory; + + protected JcaExecutorServiceConnection executorConnection; + + @PostConstruct + protected void openConnection() { + try { + executorConnection = executorConnectionFactory.getConnection(); + } catch (ResourceException e) { + throw new ProcessEngineException("Could not open connection to executor service connection factory ", e); + } + } + + @PreDestroy + protected void closeConnection() { + if(executorConnection != null) { + executorConnection.closeConnection(); + } + } + + public boolean schedule(Runnable runnable, boolean isLongRunning) { + return executorConnection.schedule(runnable, isLongRunning); + } + + public Runnable getExecuteJobsRunnable(List jobIds, ProcessEngineImpl processEngine) { + return executorConnection.getExecuteJobsRunnable(jobIds, processEngine); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/JobExecutionHandlerMDB.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/JobExecutionHandlerMDB.java new file mode 100644 index 0000000000000000000000000000000000000000..0d3c42fd772d7cacec0ac87dea3e928bdf81641b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/JobExecutionHandlerMDB.java @@ -0,0 +1,48 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.container.impl.ejb; + +import javax.ejb.MessageDriven; +import javax.ejb.TransactionAttribute; +import javax.ejb.TransactionAttributeType; + +import org.camunda.bpm.container.impl.threading.ra.inflow.JobExecutionHandler; +import org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd; +import org.camunda.bpm.engine.impl.interceptor.CommandExecutor; +import org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper; +import org.camunda.bpm.engine.impl.jobexecutor.JobFailureCollector; + + +/** + *

MessageDrivenBean implementation of the {@link JobExecutionHandler} interface

+ * + * @author Daniel Meyer + */ +@MessageDriven( + name="JobExecutionHandlerMDB", + messageListenerInterface=JobExecutionHandler.class +) +@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) +public class JobExecutionHandlerMDB implements JobExecutionHandler { + + public JobFailureCollector executeJob(String job, CommandExecutor commandExecutor) { + JobFailureCollector jobFailureCollector = new JobFailureCollector(job); + ExecuteJobHelper.executeJob(job, commandExecutor, jobFailureCollector, new ExecuteJobsCmd(job, jobFailureCollector)); + return jobFailureCollector; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/deployment/EjbJarParsePlatformXmlStep.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/deployment/EjbJarParsePlatformXmlStep.java new file mode 100644 index 0000000000000000000000000000000000000000..d83e755ac722e24fe66214080aa84aa6e8e83345 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/deployment/EjbJarParsePlatformXmlStep.java @@ -0,0 +1,37 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.container.impl.ejb.deployment; + +import java.net.URL; + +import org.camunda.bpm.container.impl.deployment.AbstractParseBpmPlatformXmlStep; +import org.camunda.bpm.container.impl.spi.DeploymentOperation; + +/** + *

Deployment Step that reads the bpm-platform.xml from the classpath

+ * + * @author Daniel Meyer + * @author Christian Lipphardt + * + */ +public class EjbJarParsePlatformXmlStep extends AbstractParseBpmPlatformXmlStep { + + public URL getBpmPlatformXmlStream(DeploymentOperation operationContext) { + return lookupBpmPlatformXml(); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/deployment/JcaExecutorServiceDelegate.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/deployment/JcaExecutorServiceDelegate.java new file mode 100644 index 0000000000000000000000000000000000000000..96914ce7c49e04012945708b6d5041283bd1d862 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/javaee/ejb-service/src/main/java/org/camunda/bpm/container/impl/ejb/deployment/JcaExecutorServiceDelegate.java @@ -0,0 +1,48 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.container.impl.ejb.deployment; + +import org.camunda.bpm.container.ExecutorService; +import org.camunda.bpm.container.impl.spi.PlatformService; +import org.camunda.bpm.container.impl.spi.PlatformServiceContainer; + +/** + *

MBean Service delegating to the Jca ExecutorService

+ * + * @author Daniel Meyer + */ +public class JcaExecutorServiceDelegate implements PlatformService, JcaExecutorServiceDelegateMBean { + + private ExecutorService executorService; + + public JcaExecutorServiceDelegate(ExecutorService executorService) { + this.executorService = executorService; + } + + public void start(PlatformServiceContainer mBeanServiceContainer) { + // nothing to do + } + + public void stop(PlatformServiceContainer mBeanServiceContainer) { + // nothing to do + } + + public ExecutorService getValue() { + return executorService; + } + +}