code stringlengths 25 201k | docstring stringlengths 19 96.2k | func_name stringlengths 0 235 | language stringclasses 1 value | repo stringlengths 8 51 | path stringlengths 11 314 | url stringlengths 62 377 | license stringclasses 7 values |
|---|---|---|---|---|---|---|---|
@Test(expected = SpinJsonDataFormatException.class)
@Script(execute = false)
@ScriptVariable(name = "input", file = EXAMPLE_JSON_FILE_NAME)
public void shouldFailToCheckObject2() throws Throwable{
failingWithException();
} | One for child node
@throws Throwable | shouldFailToCheckObject2 | java | camunda/camunda-bpm-platform | spin/dataformat-json-jackson/src/test/java/org/camunda/spin/json/tree/JsonTreeReadPropertyScriptTest.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-json-jackson/src/test/java/org/camunda/spin/json/tree/JsonTreeReadPropertyScriptTest.java | Apache-2.0 |
@Test(expected = SpinJsonPropertyException.class)
@Script(execute = false)
@ScriptVariable(name = "input", file = EXAMPLE_JSON_FILE_NAME)
public void shouldFailToReadProperty() throws Throwable{
failingWithException();
} | One for not existent property
@throws Throwable | shouldFailToReadProperty | java | camunda/camunda-bpm-platform | spin/dataformat-json-jackson/src/test/java/org/camunda/spin/json/tree/JsonTreeReadPropertyScriptTest.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-json-jackson/src/test/java/org/camunda/spin/json/tree/JsonTreeReadPropertyScriptTest.java | Apache-2.0 |
@Test
public void shouldNotFailWithJackson146Bug() {
// this should not fail
SpinJsonNode node = JSON(SpinIoUtil.fileAsString("org/camunda/spin/json/jackson146.json"));
// file has 4000 characters in length a
// 20 characters per repeated JSON object
assertThat(node.prop("abcdef").elements()).hasSize(200);
} | Tests an issue with Jackson 2.4.1
The test contains a negative float at character position 8000 which is important
to provoke Jackson bug #146.
See also <a href="https://github.com/FasterXML/jackson-core/issues/146">the Jackson bug report</a>. | shouldNotFailWithJackson146Bug | java | camunda/camunda-bpm-platform | spin/dataformat-json-jackson/src/test/java/org/camunda/spin/json/tree/JsonTreeReadPropertyTest.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-json-jackson/src/test/java/org/camunda/spin/json/tree/JsonTreeReadPropertyTest.java | Apache-2.0 |
protected Templates reloadFormattingTemplates() {
final TransformerFactory transformerFactory = this.domXmlDataFormat.getTransformerFactory();
try (final InputStream formattingConfiguration = getFormattingConfiguration()) {
if (formattingConfiguration == null) {
throw LOG.unableToFindStripSpaceXsl(STRIP_SPACE_XSL);
}
return transformerFactory.newTemplates(new StreamSource(formattingConfiguration));
} catch (final IOException | TransformerConfigurationException ex) {
throw LOG.unableToLoadFormattingTemplates(ex);
}
} | Return a {@link Templates} instance for formatting configuration.
Uses the configured {@link TransformerFactory} from the {@link DomXmlDataFormat}.
Uses the formatting configuration from the {@link DomXmlDataFormat} if defined,
falls back to a default otherwise.
@return the templates instance for the formatting configuration. | reloadFormattingTemplates | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/format/DomXmlDataFormatWriter.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/format/DomXmlDataFormatWriter.java | Apache-2.0 |
protected Transformer getFormattingTransformer() {
try {
Transformer transformer = formattingTemplates.newTransformer();
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
return transformer;
} catch (TransformerConfigurationException e) {
throw LOG.unableToCreateTransformer(e);
}
} | Returns a configured transformer to write XML and apply indentation (pretty-print) to the xml.
@return the XML configured transformer
@throws SpinXmlElementException if no new transformer can be created | getFormattingTransformer | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/format/DomXmlDataFormatWriter.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/format/DomXmlDataFormatWriter.java | Apache-2.0 |
protected Transformer getTransformer() {
TransformerFactory transformerFactory = domXmlDataFormat.getTransformerFactory();
try {
Transformer transformer = transformerFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
return transformer;
} catch (TransformerConfigurationException e) {
throw LOG.unableToCreateTransformer(e);
}
} | Returns a configured transformer to write XML as is.
@return the XML configured transformer
@throws SpinXmlElementException if no new transformer can be created | getTransformer | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/format/DomXmlDataFormatWriter.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/format/DomXmlDataFormatWriter.java | Apache-2.0 |
public String getNamespaceURI(String prefix) {
ensureNotNull("Prefix", prefix);
if(prefix.equals(XMLConstants.XML_NS_PREFIX)) {
return XMLConstants.XML_NS_URI;
}
if(prefix.equals(XMLConstants.XMLNS_ATTRIBUTE)) {
return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
}
/**
* TODO: This only works for the root element. Every child element with a 'xmlns'-attribute will be ignored
* So you need to specify an own prefix for the child elements default namespace uri
*/
if(prefix.equals(XMLConstants.DEFAULT_NS_PREFIX)) {
return element.namespace();
}
if(namespaces.containsKey(prefix)) {
return namespaces.get(prefix);
} else {
return XMLConstants.NULL_NS_URI;
}
} | Resolves the namespaces of the given element.
@author Stefan Hentschel | getNamespaceURI | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/query/DomXPathNamespaceResolver.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/query/DomXPathNamespaceResolver.java | Apache-2.0 |
public String getPrefix(String namespaceURI) {
ensureNotNull("Namespace URI", namespaceURI);
if(namespaceURI.equals(XMLConstants.XML_NS_URI)) {
return XMLConstants.XML_NS_PREFIX;
}
if(namespaceURI.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
return XMLConstants.XMLNS_ATTRIBUTE;
}
/**
* TODO: This only works for the root element. Every child element with a 'xmlns'-attribute will be ignored.
*/
if (namespaceURI.equals(element.name())) {
return XMLConstants.DEFAULT_NS_PREFIX;
}
String key = null;
if(namespaces.containsValue(namespaceURI)) {
for(Map.Entry<String, String> entry : namespaces.entrySet()) {
if(namespaceURI.equals(entry.getValue())) {
key = entry.getKey();
break;
}
}
}
return key;
} | TODO: This only works for the root element. Every child element with a 'xmlns'-attribute will be ignored
So you need to specify an own prefix for the child elements default namespace uri | getPrefix | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/query/DomXPathNamespaceResolver.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/query/DomXPathNamespaceResolver.java | Apache-2.0 |
public Iterator getPrefixes(String namespaceURI) {
ensureNotNull("Namespace URI", namespaceURI);
List<String> list = new ArrayList<String>();
if(namespaceURI.equals(XMLConstants.XML_NS_URI)) {
list.add(XMLConstants.XML_NS_PREFIX);
return Collections.unmodifiableList(list).iterator();
}
if(namespaceURI.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
list.add(XMLConstants.XMLNS_ATTRIBUTE);
return Collections.unmodifiableList(list).iterator();
}
// default namespace
if(namespaceURI.equals(element.namespace())) {
list.add(XMLConstants.DEFAULT_NS_PREFIX);
}
if(namespaces.containsValue(namespaceURI)) {
// all other namespaces
for (Map.Entry<String, String> entry : namespaces.entrySet()) {
if (namespaceURI.equals(entry.getValue())) {
list.add(entry.getKey());
}
}
}
return Collections.unmodifiableList(list).iterator();
} | TODO: This only works for the root element. Every child element with a 'xmlns'-attribute will be ignored. | getPrefixes | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/query/DomXPathNamespaceResolver.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/query/DomXPathNamespaceResolver.java | Apache-2.0 |
public void setNamespace(String prefix, String namespaceURI) {
ensureNotNull("Prefix", prefix);
ensureNotNull("Namespace URI", namespaceURI);
namespaces.put(prefix, namespaceURI);
} | Maps a single prefix, uri pair as namespace.
@param prefix the prefix to use
@param namespaceURI the URI to use
@throws IllegalArgumentException if prefix or namespaceURI is null | setNamespace | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/query/DomXPathNamespaceResolver.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/query/DomXPathNamespaceResolver.java | Apache-2.0 |
public void setNamespaces(Map<String, String> namespaces) {
ensureNotNull("Namespaces", namespaces);
this.namespaces = namespaces;
} | Maps a map of prefix, uri pairs as namespaces.
@param namespaces the map of namespaces
@throws IllegalArgumentException if namespaces is null | setNamespaces | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/query/DomXPathNamespaceResolver.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/query/DomXPathNamespaceResolver.java | Apache-2.0 |
public static void ensureChildElement(DomXmlElement parentElement, DomXmlElement childElement) {
Node parent = childElement.unwrap().getParentNode();
if (parent == null || !parentElement.unwrap().isEqualNode(parent)) {
throw LOG.elementIsNotChildOfThisElement(childElement, parentElement);
}
} | Ensures that the element is child element of the parent element.
@param parentElement the parent xml dom element
@param childElement the child element
@throws SpinXmlElementException if the element is not child of the parent element | ensureChildElement | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/util/DomXmlEnsure.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/util/DomXmlEnsure.java | Apache-2.0 |
public static void ensureNotDocumentRootExpression(String expression) {
if (ROOT_EXPRESSION.equals(expression)) {
throw LOG.notAllowedXPathExpression(expression);
}
} | Ensures that the expression is not the root expression '/'.
@param expression the expression to ensure to be not the root expression '/'
@throws SpinXPathException if the expression is the root expression '/' | ensureNotDocumentRootExpression | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/util/DomXmlEnsure.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/util/DomXmlEnsure.java | Apache-2.0 |
public static void ensureXPathNotNull(Node node, String expression) {
if (node == null) {
throw LOG.unableToFindXPathExpression(expression);
}
} | Ensure that the node is not null.
@param node the node to ensure to be not null
@param expression the expression was used to find the node
@throws SpinXPathException if the node is null | ensureXPathNotNull | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/util/DomXmlEnsure.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/util/DomXmlEnsure.java | Apache-2.0 |
public static void ensureXPathNotEmpty(NodeList nodeList, String expression) {
if (nodeList == null || nodeList.getLength() == 0) {
throw LOG.unableToFindXPathExpression(expression);
}
} | Ensure that the nodeList is either null or empty.
@param nodeList the nodeList to ensure to be either null or empty
@param expression the expression was used to fine the nodeList
@throws SpinXPathException if the nodeList is either null or empty | ensureXPathNotEmpty | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/util/DomXmlEnsure.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/util/DomXmlEnsure.java | Apache-2.0 |
@Test
public void testStandardFormatter() throws Exception {
// given
DataFormat<SpinXmlElement> dataFormat = new DomXmlDataFormat(DataFormats.XML_DATAFORMAT_NAME);
SpinXmlElement spinXml = SpinFactory.INSTANCE.createSpin(xml, dataFormat);
// when
byte[] serializedValue = serializeValue(spinXml);
// then
// assert that there are now new lines in the serialized value:
assertThat(new String(serializedValue, "UTF-8")).isEqualTo(getExpectedFormattedXML());
// when
// this is what execution.getVariable("test"); does
SpinXmlElement spinXmlElement = deserializeValue(serializedValue, dataFormat);
// then
assertThat(spinXmlElement.toString()).isEqualTo(getExpectedFormattedXML());
} | standard behaviour: an unformatted XML will be formatted stored into a SPIN variable and also returned formatted. | testStandardFormatter | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/test/java/org/camunda/spin/impl/xml/dom/format/DomXmlDataFormatWriterTest.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/test/java/org/camunda/spin/impl/xml/dom/format/DomXmlDataFormatWriterTest.java | Apache-2.0 |
@Test
public void testAlreadyFormattedXml() throws Exception {
// given
DataFormat<SpinXmlElement> dataFormat = new DomXmlDataFormat(DataFormats.XML_DATAFORMAT_NAME);
SpinXmlElement spinXml = SpinFactory.INSTANCE.createSpin(formattedXml, dataFormat);
// when
byte[] serializedValue = serializeValue(spinXml);
// then
// assert that there are no new lines in the serialized value:
assertThat(new String(serializedValue, "UTF-8")).isEqualTo(getExpectedFormattedXML());
// when
// this is what execution.getVariable("test"); does
SpinXmlElement spinXmlElement = deserializeValue(serializedValue, dataFormat);
// then
assertThat(spinXmlElement.toString()).isEqualTo(getExpectedFormattedXML());
} | behaviour fixed by CAM-13699: an already formatted XML will be formatted stored into a SPIN variable and also
returned formatted but no additional blank lines are inserted into the XML. | testAlreadyFormattedXml | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/test/java/org/camunda/spin/impl/xml/dom/format/DomXmlDataFormatWriterTest.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/test/java/org/camunda/spin/impl/xml/dom/format/DomXmlDataFormatWriterTest.java | Apache-2.0 |
@Test
public void testCustomStripSpaceXSL() throws Exception {
final DataFormat<SpinXmlElement> dataFormat = new DomXmlDataFormat(DataFormats.XML_DATAFORMAT_NAME);
try (final InputStream inputStream = DomXmlDataFormatWriterTest.class.getClassLoader()
.getResourceAsStream("org/camunda/spin/strip-space-preserve-space.xsl")) {
((DomXmlDataFormat) dataFormat).setFormattingConfiguration(inputStream);
}
final SpinXmlElement spinXml = SpinFactory.INSTANCE.createSpin(this.xml, dataFormat);
// when
final byte[] serializedValue = serializeValue(spinXml);
// then
// assert that xml has not been formatted
assertThat(new String(serializedValue, "UTF-8")).isEqualTo(getExpectedFormattedXML(true));
// when
// this is what execution.getVariable("test"); does
final SpinXmlElement spinXmlElement = deserializeValue(serializedValue, dataFormat);
// then
assertThat(spinXmlElement.toString()).isEqualTo(getExpectedFormattedXML(true));
} | new feature provided by https://github.com/camunda/camunda-bpm-platform/issues/3633: custom formatting
configuration to preserve-space. | testCustomStripSpaceXSL | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/test/java/org/camunda/spin/impl/xml/dom/format/DomXmlDataFormatWriterTest.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/test/java/org/camunda/spin/impl/xml/dom/format/DomXmlDataFormatWriterTest.java | Apache-2.0 |
public static String removeTimeZone(String input) {
if (input == null) {
return null;
}
final String TIMEZONE = "T00:00:00";
final String CLOSING_BRACKET = "<";
int indexOfTimezone = input.indexOf(TIMEZONE);
if (indexOfTimezone == -1) {
return input;
}
int indexOfClosingBracket = input.indexOf(CLOSING_BRACKET, indexOfTimezone);
if (indexOfClosingBracket == -1) {
return input;
}
return input.substring(0, indexOfTimezone) + input.substring(indexOfClosingBracket);
} | Example input <ns2:date>2015-04-04T00:00:00+02:00</ns2:date> -> <ns2:date>2015-04-04</ns2:date>
@param input a string containing timezone offset
@return same as input string without the timezone offset | removeTimeZone | java | camunda/camunda-bpm-platform | spin/dataformat-xml-dom/src/test/java/org/camunda/spin/xml/XmlTestUtil.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spin/dataformat-xml-dom/src/test/java/org/camunda/spin/xml/XmlTestUtil.java | Apache-2.0 |
@Override
public void preInit(SpringProcessEngineConfiguration configuration) {
if (configuration.getCustomPostBPMNParseListeners() == null) {
configuration.setCustomPostBPMNParseListeners(new ArrayList<>());
}
configuration.getCustomPostBPMNParseListeners().add(new DefaultFailedJobParseListener());
configuration.setFailedJobCommandFactory(new DefaultFailedJobCommandFactory());
} | Register parseListener to setup failed job retry specification. | preInit | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/configuration/impl/DefaultFailedJobConfiguration.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/configuration/impl/DefaultFailedJobConfiguration.java | Apache-2.0 |
@Override
public void preInit(SpringProcessEngineConfiguration processEngineConfiguration) {
if (!property.isTask() && !property.isExecution() && !property.isHistory()) {
logger.info("EVENTING-002: Camunda Spring Boot Eventing Plugin is found, but disabled via property.");
return;
}
if (property.isTask() || property.isExecution()) {
logger.info("EVENTING-001: Initialized Camunda Spring Boot Eventing Engine Plugin.");
if (property.isTask()) {
logger.info("EVENTING-003: Task events will be published as Spring Events.");
} else {
logger.info("EVENTING-004: Task eventing is disabled via property.");
}
if (property.isExecution()) {
logger.info("EVENTING-005: Execution events will be published as Spring Events.");
} else {
logger.info("EVENTING-006: Execution eventing is disabled via property.");
}
if (property.isSkippable()) {
logger.info("EVENTING-009: Listeners will not be invoked if a skipCustomListeners API parameter is set to true by user.");
} else {
logger.info("EVENTING-009: Listeners will always be invoked regardless of skipCustomListeners API parameters.");
}
// register parse listener
processEngineConfiguration.getCustomPostBPMNParseListeners().add(new PublishDelegateParseListener(this.publisher, property));
}
if (property.isHistory()) {
logger.info("EVENTING-007: History events will be published as Spring events.");
// register composite DB event handler.
processEngineConfiguration.getCustomHistoryEventHandlers()
.add(new PublishHistoryEventHandler(this.publisher));
} else {
logger.info("EVENTING-008: History eventing is disabled via property.");
}
} | Engine Plugin forwarding Camunda task, execution and history events as Spring Events. | preInit | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/EventPublisherPlugin.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/EventPublisherPlugin.java | Apache-2.0 |
public String getActivityInstanceId() {
return activityInstanceId;
} | return the Id of the activity instance currently executed by this execution | getActivityInstanceId | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | Apache-2.0 |
public String getBusinessKey() {
return businessKey;
} | The business key for the root execution (e.g. process instance). | getBusinessKey | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | Apache-2.0 |
public String getCurrentActivityId() {
return currentActivityId;
} | Gets the id of the current activity. | getCurrentActivityId | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | Apache-2.0 |
public String getCurrentActivityName() {
return currentActivityName;
} | Gets the name of the current activity. | getCurrentActivityName | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | Apache-2.0 |
public String getCurrentTransitionId() {
return currentTransitionId;
} | return the Id of the current transition | getCurrentTransitionId | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | Apache-2.0 |
public String getEventName() {
return eventName;
} | The {@link ExecutionListener#EVENTNAME_START event name} in case this
execution is passed in for an {@link ExecutionListener} | getEventName | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | Apache-2.0 |
public String getParentId() {
return parentId;
} | Gets the id of the parent of this execution. If null, the execution
represents a process-instance. | getParentId | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | Apache-2.0 |
public String getProcessBusinessKey() {
return processBusinessKey;
} | The business key for the process instance this execution is associated
with. | getProcessBusinessKey | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | Apache-2.0 |
public String getProcessDefinitionId() {
return processDefinitionId;
} | The process definition key for the process instance this execution is
associated with. | getProcessDefinitionId | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | Apache-2.0 |
public String getProcessInstanceId() {
return processInstanceId;
} | Reference to the overall process instance | getProcessInstanceId | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java | Apache-2.0 |
private TaskDefinition taskDefinition(final ActivityImpl activity) {
final UserTaskActivityBehavior activityBehavior = (UserTaskActivityBehavior) activity.getActivityBehavior();
return activityBehavior.getTaskDefinition();
} | Retrieves task definition.
@param activity the taskActivity
@return taskDefinition for activity | taskDefinition | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/PublishDelegateParseListener.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/PublishDelegateParseListener.java | Apache-2.0 |
public String getAssignee() {
return assignee;
} | The {@link User.getId() userId} of the person to which this task is
delegated. | getAssignee | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | Apache-2.0 |
public String getCaseExecutionId() {
return caseExecutionId;
} | Reference to the case execution or null if it is not related to a case
instance. | getCaseExecutionId | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | Apache-2.0 |
public String getCaseInstanceId() {
return caseInstanceId;
} | Reference to the case instance or null if it is not related to a case
instance. | getCaseInstanceId | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | Apache-2.0 |
public Date getCreateTime() {
return createTime;
} | The date/time when this task was created | getCreateTime | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | Apache-2.0 |
public String getDeleteReason() {
return deleteReason;
} | Get delete reason of the task. | getDeleteReason | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | Apache-2.0 |
public String getDescription() {
return description;
} | Free text description of the task. | getDescription | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | Apache-2.0 |
public String getExecutionId() {
return executionId;
} | Reference to the path of execution or null if it is not related to a
process instance. | getExecutionId | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | Apache-2.0 |
public Date getFollowUpDate() {
return followUpDate;
} | Follow-up date of the task. | getFollowUpDate | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | Apache-2.0 |
public Date getLastUpdated() {
return lastUpdated;
} | The date/time when this task was last updated.
All operations that fire {@link TaskListener#EVENTNAME_UPDATE} count as an update to the task.
Returns null if the task was never updated before (i.e. it was only created). | getLastUpdated | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | Apache-2.0 |
public String getName() {
return name;
} | Name or title of the task. | getName | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | Apache-2.0 |
public String getOwner() {
return owner;
} | The {@link User.getId() userId} of the person responsible for this task. | getOwner | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | Apache-2.0 |
public int getPriority() {
return priority;
} | indication of how important/urgent this task is with a number between 0 and
100 where higher values mean a higher priority and lower values mean lower
priority: [0..19] lowest, [20..39] low, [40..59] normal, [60..79] high
[80..100] highest | getPriority | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | Apache-2.0 |
public String getTaskDefinitionKey() {
return taskDefinitionKey;
} | The id of the activity in the process defining this task or null if this is
not related to a process | getTaskDefinitionKey | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java | Apache-2.0 |
public String getSchemaUpdate() {
return schemaUpdate;
} | enables batch processing mode for db operations | getSchemaUpdate | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/property/DatabaseProperty.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/property/DatabaseProperty.java | Apache-2.0 |
@Override
public void onApplicationEvent(final ApplicationEnvironmentPreparedEvent event) {
event.getEnvironment()
.getPropertySources()
.addFirst(version.getPropertiesPropertySource());
} | Initialize with version.
@param version the current camundaBpmVersion instance. | onApplicationEvent | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/runlistener/PropertiesListener.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/runlistener/PropertiesListener.java | Apache-2.0 |
public void setId(Long id) {
this.id = id;
} | @param id
the id to set | setId | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/test/java/org/camunda/bpm/spring/boot/starter/test/nonpa/jpa/domain/TestEntity.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/test/java/org/camunda/bpm/spring/boot/starter/test/nonpa/jpa/domain/TestEntity.java | Apache-2.0 |
@Test
public void gets_annotated_bean() throws Exception {
Optional<GetProcessApplicationNameFromAnnotation.AnnotatedBean> bean = GetProcessApplicationNameFromAnnotation.getAnnotatedBean.apply(ctx);
assertThat(bean.isPresent()).isTrue();
} | see issue #187 ... this failed when static bean definitions where used inside the springBootApplication
@throws Exception | gets_annotated_bean | java | camunda/camunda-bpm-platform | spring-boot-starter/starter/src/test/java/org/camunda/bpm/spring/boot/starter/util/it/GetAnnotatedBeanTest.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/test/java/org/camunda/bpm/spring/boot/starter/util/it/GetAnnotatedBeanTest.java | Apache-2.0 |
@Test
public void shouldVerifyStaticBeanIsNotInterpretedAsClientBean() {
verify(clientBuilder).baseUrl("http://localhost:8080/engine-rest");
verify(clientBuilder).build();
verifyNoMoreInteractions(clientBuilder);
} | ListableBeanFactory#getBeanNamesForAnnotation(class annotation) returns static methods
defined in a class with class level. Make sure that static methods are filtered out. | shouldVerifyStaticBeanIsNotInterpretedAsClientBean | java | camunda/camunda-bpm-platform | spring-boot-starter/starter-client/spring/src/test/java/org/camunda/bpm/client/spring/client/StaticBeanClientAnnotationTest.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter-client/spring/src/test/java/org/camunda/bpm/client/spring/client/StaticBeanClientAnnotationTest.java | Apache-2.0 |
@Test
public void shouldNotDetermineApplicationServer() {
DiagnosticsRegistry diagnosticsRegistry = ((ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration()).getDiagnosticsRegistry();
// then
ApplicationServerImpl applicationServer = diagnosticsRegistry.getApplicationServer();
assertThat(applicationServer).isNull();
} | Verifies that a Spring Boot project without spring-boot-starter-web and
spring-boot-starter-jersey (i.e. without servlet API) still works correctly. | shouldNotDetermineApplicationServer | java | camunda/camunda-bpm-platform | spring-boot-starter/starter-qa/integration-test-simple/src/test/java/org/camunda/bpm/springboot/project/qa/simple/SimpleApplicationIT.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter-qa/integration-test-simple/src/test/java/org/camunda/bpm/springboot/project/qa/simple/SimpleApplicationIT.java | Apache-2.0 |
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
var matchOutcome = super.getMatchOutcome(context, metadata);
return new ConditionOutcome(!matchOutcome.isMatch(), matchOutcome.getConditionMessage());
} | Condition that matches if no {@code spring.security.oauth2.client.registration} properties are defined
by inverting the outcome of {@link ClientsConfiguredCondition}. | getMatchOutcome | java | camunda/camunda-bpm-platform | spring-boot-starter/starter-security/src/main/java/org/camunda/bpm/spring/boot/starter/security/oauth2/impl/ClientsNotConfiguredCondition.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter-security/src/main/java/org/camunda/bpm/spring/boot/starter/security/oauth2/impl/ClientsNotConfiguredCondition.java | Apache-2.0 |
protected static boolean nullOrContainsIgnoreCase(String searchLike, String value) {
return searchLike == null || value == null || value.toLowerCase()
.contains(searchLike.replaceAll("%", "").toLowerCase());
} | @param searchLike the like value to search for
@param value the actual user attribute value
@return true if either values are {@code null} or if {@code value} contains {@code searchLike} (case-insensitive) | nullOrContainsIgnoreCase | java | camunda/camunda-bpm-platform | spring-boot-starter/starter-security/src/main/java/org/camunda/bpm/spring/boot/starter/security/oauth2/impl/OAuth2IdentityProvider.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter-security/src/main/java/org/camunda/bpm/spring/boot/starter/security/oauth2/impl/OAuth2IdentityProvider.java | Apache-2.0 |
public ProcessEngineRule rule() {
return new ProcessEngineRule(buildProcessEngine());
} | Default in memory configuration, pre-configured with mock, dbSchema and metrics. | rule | java | camunda/camunda-bpm-platform | spring-boot-starter/starter-test/src/main/java/org/camunda/bpm/spring/boot/starter/test/helper/StandaloneInMemoryTestConfiguration.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter-test/src/main/java/org/camunda/bpm/spring/boot/starter/test/helper/StandaloneInMemoryTestConfiguration.java | Apache-2.0 |
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
String requestURI = ((HttpServletRequest) request).getRequestURI();
((HttpServletResponse) response).sendRedirect(requestURI + "/");
} | Servlet filter to ensure request paths always have a trailing slash. Before Spring Boot 3, missing trailing slashes were
handled automatically. This filter implements the Spring Boot 2 behavior for the registered request patterns.
@see https://github.com/spring-projects/spring-framework/issues/28552 | doFilter | java | camunda/camunda-bpm-platform | spring-boot-starter/starter-webapp-core/src/main/java/org/camunda/bpm/spring/boot/starter/webapp/filter/AppendTrailingSlashFilter.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter-webapp-core/src/main/java/org/camunda/bpm/spring/boot/starter/webapp/filter/AppendTrailingSlashFilter.java | Apache-2.0 |
protected String trimChar(String input, char charachter) {
input = StringUtils.trimLeadingCharacter(input, charachter);
input = StringUtils.trimTrailingCharacter(input, charachter);
return input;
} | @param input - String to trim
@param charachter - Char to trim
@return the trimmed String | trimChar | java | camunda/camunda-bpm-platform | spring-boot-starter/starter-webapp-core/src/main/java/org/camunda/bpm/spring/boot/starter/webapp/filter/ResourceLoadingProcessEnginesFilter.java | https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter-webapp-core/src/main/java/org/camunda/bpm/spring/boot/starter/webapp/filter/ResourceLoadingProcessEnginesFilter.java | Apache-2.0 |
public static ProcessEngine processEngine() {
ProcessEngine processEngine = AbstractAssertions.processEngine.get();
if (processEngine != null)
return processEngine;
Map<String, ProcessEngine> processEngines = ProcessEngines.getProcessEngines();
if (processEngines.size() == 1) {
processEngine = processEngines.values().iterator().next();
init(processEngine);
return processEngine;
}
String message = processEngines.size() == 0 ? "No ProcessEngine found to be " +
"registered with " + ProcessEngines.class.getSimpleName() + "!"
: String.format(processEngines.size() + " ProcessEngines initialized. Call %s.init" +
"(ProcessEngine processEngine) first!", BpmnAwareTests.class.getSimpleName());
throw new IllegalStateException(message);
} | Retrieve the processEngine bound to the current testing thread
via calling init(ProcessEngine processEngine). In case no such
processEngine is bound yet, init(processEngine) is called with
a default process engine.
@return processEngine bound to the current testing thread
@throws IllegalStateException in case a processEngine has not
been initialised yet and cannot be initialised with a
default engine. | processEngine | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/AbstractAssertions.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/AbstractAssertions.java | Apache-2.0 |
public static void init(final ProcessEngine processEngine) {
AbstractAssertions.processEngine.set(processEngine);
AbstractProcessAssert.resetLastAsserts();
} | Bind an instance of ProcessEngine to the current testing calls done
in your test method.
@param processEngine ProcessEngine which should be bound to the
current testing thread. | init | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/AbstractAssertions.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/AbstractAssertions.java | Apache-2.0 |
public static void reset() {
AbstractAssertions.processEngine.remove();
AbstractProcessAssert.resetLastAsserts();
} | Resets operations done via calling init(ProcessEngine processEngine)
to its clean state - just as before calling init() for the first time. | reset | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/AbstractAssertions.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/AbstractAssertions.java | Apache-2.0 |
public static ProcessDefinitionAssert assertThat(final ProcessDefinition actual) {
return ProcessDefinitionAssert.assertThat(processEngine(), actual);
} | Assert that... the given ProcessDefinition meets your expectations.
@param actual ProcessDefinition under test
@return Assert object offering ProcessDefinition specific assertions. | assertThat | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ProcessInstanceAssert assertThat(final ProcessInstance actual) {
return ProcessInstanceAssert.assertThat(processEngine(), actual);
} | Assert that... the given ProcessInstance meets your expectations.
@param actual ProcessInstance under test
@return Assert object offering ProcessInstance specific assertions. | assertThat | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static TaskAssert assertThat(final Task actual) {
return TaskAssert.assertThat(processEngine(), actual);
} | Assert that... the given Task meets your expectations.
@param actual Task under test
@return Assert object offering Task specific assertions. | assertThat | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ExternalTaskAssert assertThat(final ExternalTask actual) {
return ExternalTaskAssert.assertThat(processEngine(), actual);
} | Assert that... the given ExternalTask meets your expectations.
@param actual ExternalTask under test
@return Assert object offering Task specific assertions. | assertThat | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static JobAssert assertThat(final Job actual) {
return JobAssert.assertThat(processEngine(), actual);
} | Assert that... the given Job meets your expectations.
@param actual Job under test
@return Assert object offering Job specific assertions. | assertThat | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static RuntimeService runtimeService() {
return processEngine().getRuntimeService();
} | Helper method to easily access RuntimeService
@return RuntimeService of process engine bound to this testing thread
@see org.camunda.bpm.engine.RuntimeService | runtimeService | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static AuthorizationService authorizationService() {
return processEngine().getAuthorizationService();
} | Helper method to easily access AuthorizationService
@return AuthorizationService of process engine bound to this
testing thread
@see org.camunda.bpm.engine.AuthorizationService | authorizationService | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static FormService formService() {
return processEngine().getFormService();
} | Helper method to easily access FormService
@return FormService of process engine bound to this testing thread
@see org.camunda.bpm.engine.FormService | formService | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static HistoryService historyService() {
return processEngine().getHistoryService();
} | Helper method to easily access HistoryService
@return HistoryService of process engine bound to this testing thread
@see org.camunda.bpm.engine.HistoryService | historyService | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static IdentityService identityService() {
return processEngine().getIdentityService();
} | Helper method to easily access IdentityService
@return IdentityService of process engine bound to this testing thread
@see org.camunda.bpm.engine.IdentityService | identityService | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ManagementService managementService() {
return processEngine().getManagementService();
} | Helper method to easily access ManagementService
@return ManagementService of process engine bound to this testing thread
@see org.camunda.bpm.engine.ManagementService | managementService | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static RepositoryService repositoryService() {
return processEngine().getRepositoryService();
} | Helper method to easily access RepositoryService
@return RepositoryService of process engine bound to this testing thread
@see org.camunda.bpm.engine.RepositoryService | repositoryService | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static TaskService taskService() {
return processEngine().getTaskService();
} | Helper method to easily access TaskService
@return TaskService of process engine bound to this testing thread
@see org.camunda.bpm.engine.TaskService | taskService | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ExternalTaskService externalTaskService() {
return processEngine().getExternalTaskService();
} | Helper method to easily access ExternalTaskService
@return ExternalTaskService of process engine bound to this testing thread
@see org.camunda.bpm.engine.ExternalTaskService | externalTaskService | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static DecisionService decisionService() {
return processEngine().getDecisionService();
} | Helper method to easily access DecisionService
@return DecisionService of process engine bound to this testing thread
@see org.camunda.bpm.engine.DecisionService | decisionService | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static TaskQuery taskQuery() {
return taskService().createTaskQuery();
} | Helper method to easily create a new TaskQuery
@return new TaskQuery for process engine bound to this testing thread
@see org.camunda.bpm.engine.task.TaskQuery | taskQuery | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ExternalTaskQuery externalTaskQuery() {
return externalTaskService().createExternalTaskQuery();
} | Helper method to easily create a new ExternalTaskQuery
@return new ExternalTaskQuery for process engine bound to this testing thread
@see org.camunda.bpm.engine.externaltask.ExternalTaskQuery | externalTaskQuery | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static JobQuery jobQuery() {
return managementService().createJobQuery();
} | Helper method to easily create a new JobQuery
@return new JobQuery for process engine bound to this testing thread
@see org.camunda.bpm.engine.runtime.JobQuery | jobQuery | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ProcessInstanceQuery processInstanceQuery() {
return runtimeService().createProcessInstanceQuery();
} | Helper method to easily create a new ProcessInstanceQuery
@return new ProcessInstanceQuery for process engine bound to this
testing thread
@see org.camunda.bpm.engine.runtime.ProcessInstanceQuery | processInstanceQuery | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ProcessDefinitionQuery processDefinitionQuery() {
return repositoryService().createProcessDefinitionQuery();
} | Helper method to easily create a new ProcessDefinitionQuery
@return new ProcessDefinitionQuery for process engine bound to this
testing thread
@see org.camunda.bpm.engine.repository.ProcessDefinitionQuery | processDefinitionQuery | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ExecutionQuery executionQuery() {
return runtimeService().createExecutionQuery();
} | Helper method to easily create a new ExecutionQuery
@return new ExecutionQuery for process engine bound to this testing thread
@see org.camunda.bpm.engine.runtime.ExecutionQuery | executionQuery | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static Map<String, Object> withVariables(final String key, final Object value, final Object... furtherKeyValuePairs) {
if (key == null)
throw new IllegalArgumentException(format("Illegal call of withVariables(key = '%s', value = '%s', ...) - key must not be null!", key, value));
final Map<String, Object> map = new HashMap<>();
map.put(key, value);
if (furtherKeyValuePairs != null) {
if (furtherKeyValuePairs.length % 2 != 0) {
throw new IllegalArgumentException(format("Illegal call of withVariables() - must have an even number of arguments, but found length = %s!", furtherKeyValuePairs.length + 2));
}
for (int i = 0; i < furtherKeyValuePairs.length; i += 2) {
if (!(furtherKeyValuePairs[i] instanceof String))
throw new IllegalArgumentException(format("Illegal call of withVariables() - keys must be strings, found object of type '%s'!", furtherKeyValuePairs[i] != null ? furtherKeyValuePairs[i].getClass().getName() : null));
map.put((String) furtherKeyValuePairs[i], furtherKeyValuePairs[i + 1]);
}
}
return map;
} | Helper method to easily construct a map of process variables
@param key (obligatory) key of first process variable
@param value (obligatory) value of first process variable
@param furtherKeyValuePairs (optional) key/value pairs for further
process variables
@return a map of process variables by passing a list of String,
Object key value pairs. | withVariables | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static Task task() {
return task(taskQuery());
} | Helper method to easily access the only task currently
available in the context of the last asserted process
instance.
@return the only task of the last asserted process
instance. May return null if no such task exists.
@throws java.lang.IllegalStateException in case more
than one task is delivered by the underlying
query or in case no process instance was asserted
yet. | task | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static Task task(ProcessInstance processInstance) {
return task(taskQuery(), processInstance);
} | Helper method to easily access the only task currently
available in the context of the given process instance.
@param processInstance the process instance for which
a task should be retrieved.
@return the only task of the process instance. May
return null if no such task exists.
@throws java.lang.IllegalStateException in case more
than one task is delivered by the underlying
query. | task | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static Task task(String taskDefinitionKey) {
Assertions.assertThat(taskDefinitionKey).isNotNull();
return task(taskQuery().taskDefinitionKey(taskDefinitionKey));
} | Helper method to easily access the only task with the
given taskDefinitionKey currently available in the context
of the last asserted process instance.
@param taskDefinitionKey the key of the task that should
be retrieved.
@return the only task of the last asserted process
instance. May return null if no such task exists.
@throws java.lang.IllegalStateException in case more
than one task is delivered by the underlying
query or in case no process instance was asserted
yet. | task | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static Task task(String taskDefinitionKey, ProcessInstance processInstance) {
Assertions.assertThat(taskDefinitionKey).isNotNull();
return task(taskQuery().taskDefinitionKey(taskDefinitionKey), processInstance);
} | Helper method to easily access the only task with the
given taskDefinitionKey currently available in the context
of the given process instance.
@param taskDefinitionKey the key of the task that should
be retrieved.
@param processInstance the process instance for which
a task should be retrieved.
@return the only task of the given process instance. May
return null if no such task exists.
@throws java.lang.IllegalStateException in case more
than one task is delivered by the underlying
query. | task | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static Task task(TaskQuery taskQuery) {
ProcessInstanceAssert lastAssert = AbstractProcessAssert.getLastAssert(ProcessInstanceAssert.class);
if (lastAssert == null)
throw new IllegalStateException(
"Call a process instance assertion first - " +
"e.g. assertThat(processInstance)... !"
);
return task(taskQuery, lastAssert.getActual());
} | Helper method to easily access the only task compliant to
a given taskQuery and currently available in the context
of the last asserted process instance.
@param taskQuery the query with which the task should
be retrieved. This query will be further narrowed
to the last asserted process instance.
@return the only task of the last asserted process instance
and compliant to the given query. May return null
in case no such task exists.
@throws java.lang.IllegalStateException in case more
than one task is delivered by the underlying
query or in case no process instance was asserted
yet. | task | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static Task task(TaskQuery taskQuery, ProcessInstance processInstance) {
return assertThat(processInstance).isNotNull().task(taskQuery).getActual();
} | Helper method to easily access the only task compliant to
a given taskQuery and currently available in the context
of the given process instance.
@param taskQuery the query with which the task should
be retrieved. This query will be further narrowed
to the given process instance.
@param processInstance the process instance for which
a task should be retrieved.
@return the only task of the given process instance and
compliant to the given query. May return null in
case no such task exists.
@throws java.lang.IllegalStateException in case more
than one task is delivered by the underlying
query. | task | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ExternalTask externalTask() {
return externalTask(externalTaskQuery());
} | Helper method to easily access the only external task currently
available in the context of the last asserted process instance.
@return the only external task of the last asserted process instance.
May return null if no such external task exists.
@throws java.lang.IllegalStateException
in case more than one external task is delivered by the underlying
query or in case no process instance was asserted yet. | externalTask | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ExternalTask externalTask(ProcessInstance processInstance) {
return externalTask(externalTaskQuery(), processInstance);
} | Helper method to easily access the only external task currently
available in the context of the given process instance.
@param processInstance the process instance for which
an external task should be retrieved.
@return the only external task of the process instance.
May return null if no such external task exists.
@throws java.lang.IllegalStateException in case more
than one external task is delivered by the underlying
query. | externalTask | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ExternalTask externalTask(String activityId) {
Assertions.assertThat(activityId).isNotNull();
return externalTask(externalTaskQuery().activityId(activityId));
} | Helper method to easily access the only external task with the
given activityId currently available in the context
of the last asserted process instance.
@param activityId the key of the external task that should
be retrieved.
@return the only external task of the last asserted process
instance. May return null if no such external task exists.
@throws java.lang.IllegalStateException in case more
than one external task is delivered by the underlying
query or in case no process instance was asserted
yet. | externalTask | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ExternalTask externalTask(String activityId, ProcessInstance processInstance) {
Assertions.assertThat(activityId).isNotNull();
return externalTask(externalTaskQuery().activityId(activityId), processInstance);
} | Helper method to easily access the only external task with the
given activityId currently available in the context
of the given process instance.
@param activityId the key of the external task that should
be retrieved.
@param processInstance the process instance for which
a external task should be retrieved.
@return the only external task of the given process instance. May
return null if no such external task exists.
@throws java.lang.IllegalStateException in case more
than one external task is delivered by the underlying
query. | externalTask | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ExternalTask externalTask(ExternalTaskQuery externalTaskQuery) {
ProcessInstanceAssert lastAssert = AbstractProcessAssert.getLastAssert(ProcessInstanceAssert.class);
if (lastAssert == null)
throw new IllegalStateException(
"Call a process instance assertion first - " +
"e.g. assertThat(processInstance)... !"
);
return externalTask(externalTaskQuery, lastAssert.getActual());
} | Helper method to easily access the only external task compliant to
a given externalTaskQuery and currently available in the context
of the last asserted process instance.
@param externalTaskQuery the query with which the external task should
be retrieved. This query will be further narrowed
to the last asserted process instance.
@return the only external task of the last asserted process instance
and compliant to the given query. May return null
in case no such external task exists.
@throws java.lang.IllegalStateException in case more
than one external task is delivered by the underlying
query or in case no process instance was asserted
yet. | externalTask | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ExternalTask externalTask(ExternalTaskQuery externalTaskQuery, ProcessInstance processInstance) {
return assertThat(processInstance).isNotNull().externalTask(externalTaskQuery).getActual();
} | Helper method to easily access the only external task compliant to
a given externalTaskQuery and currently available in the context
of the given process instance.
@param externalTaskQuery the query with which the external task should
be retrieved. This query will be further narrowed
to the given process instance.
@param processInstance the process instance for which
a external task should be retrieved.
@return the only external task of the given process instance and
compliant to the given query. May return null in
case no such external task exists.
@throws java.lang.IllegalStateException in case more
than one external task is delivered by the underlying
query. | externalTask | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ProcessDefinition processDefinition() {
ProcessInstanceAssert lastAssert = AbstractProcessAssert.getLastAssert(ProcessInstanceAssert.class);
if (lastAssert == null)
throw new IllegalStateException(
"Call a process instance assertion first - " +
"e.g. assertThat(processInstance)... !"
);
return processDefinition(lastAssert.getActual());
} | Helper method to easily access the process definition
on which the last asserted process instance is based.
@return the process definition on which the last
asserted process instance is based.
@throws java.lang.IllegalStateException in case no
process instance was asserted yet. | processDefinition | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ProcessDefinition processDefinition(ProcessInstance processInstance) {
assertThat(processInstance).isNotNull();
return processDefinition(processDefinitionQuery().processDefinitionId(processInstance.getProcessDefinitionId()));
} | Helper method to easily access the process definition
on which the given process instance is based.
@param processInstance the process instance for which
the definition should be retrieved.
@return the process definition on which the given
process instance is based. | processDefinition | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ProcessDefinition processDefinition(String processDefinitionKey) {
Assertions.assertThat(processDefinitionKey).isNotNull();
return processDefinition(processDefinitionQuery().processDefinitionKey(processDefinitionKey));
} | Helper method to easily access the process definition with the
given processDefinitionKey.
@param processDefinitionKey the key of the process definition
that should be retrieved.
@return the process definition with the given key.
May return null if no such process definition exists. | processDefinition | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ProcessDefinition processDefinition(ProcessDefinitionQuery processDefinitionQuery) {
return processDefinitionQuery.singleResult();
} | Helper method to easily access the process definition compliant
to a given process definition query.
@param processDefinitionQuery the query with which the process
definition should be retrieved.
@return the process definition compliant to the given query. May
return null in case no such process definition exists.
@throws org.camunda.bpm.engine.ProcessEngineException in case more
than one process definition is delivered by the underlying
query. | processDefinition | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ProcessInstance calledProcessInstance() {
return calledProcessInstance(processInstanceQuery());
} | Helper method to easily access the only called process instance
currently available in the context of the last asserted process
instance.
@return the only called process instance called by the last asserted process
instance. May return null if no such process instance exists.
@throws java.lang.IllegalStateException in case more
than one process instance is delivered by the underlying
query or in case no process instance was asserted
yet. | calledProcessInstance | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ProcessInstance calledProcessInstance(ProcessInstance processInstance) {
return calledProcessInstance(processInstanceQuery(), processInstance);
} | Helper method to easily access the only called process instance
currently available in the context of the given process instance.
@param processInstance the process instance for which
a called process instance should be retrieved.
@return the only called process instance called by the given process
instance. May return null if no such process instance exists.
@throws java.lang.IllegalStateException in case more
than one process instance is delivered by the underlying
query. | calledProcessInstance | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
public static ProcessInstance calledProcessInstance(String processDefinitionKey) {
Assertions.assertThat(processDefinitionKey).isNotNull();
return calledProcessInstance(processInstanceQuery().processDefinitionKey(processDefinitionKey));
} | Helper method to easily access the only called process instance with
the given processDefinitionKey currently available in the context
of the last asserted process instance.
@param processDefinitionKey the key of the process instance that should
be retrieved.
@return the only such process instance called by the last asserted process
instance. May return null if no such process instance exists.
@throws java.lang.IllegalStateException in case more
than one process instance is delivered by the underlying
query or in case no process instance was asserted
yet. | calledProcessInstance | java | camunda/camunda-bpm-platform | test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | https://github.com/camunda/camunda-bpm-platform/blob/master/test-utils/assert/core/src/main/java/org/camunda/bpm/engine/test/assertions/bpmn/BpmnAwareTests.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.