Skip to content

Instantly share code, notes, and snippets.

View tijsrademakers's full-sized avatar

Tijs Rademakers tijsrademakers

  • KIS Consultancy
  • Eindhoven
View GitHub Profile
processMigrationService.createProcessInstanceMigrationBuilder()
.migrateToProcessDefinition(version2ProcessDef.getId())
.addActivityMigrationMapping(
ActivityMigrationMapping.createMappingFor("userTask2Id", "subScriptTask")
.withLocalVariable("subprocessVariable", "passedValue"))
.migrate(processInstanceToMigrate.getId());
ProcessInstanceMigrationValidationResult valdationResult = processMigrationService.createProcessInstanceMigrationBuilder()
.migrateToProcessDefinition(version2ProcessDef.getId())
.addActivityMigrationMapping(ActivityMigrationMapping.createMappingFor("finalTask", "intermediateTask"))
.validateMigration(processInstanceToMigrate.getId());
protected void executeActivityBehavior(ActivityBehavior activityBehavior, FlowNode flowNode) {
LOGGER.debug("Executing activityBehavior {} on activity '{}' with execution {}",
activityBehavior.getClass(), flowNode.getId(), execution.getId());
ProcessEngineConfigurationImpl processEngineConfiguration =
CommandContextUtil.getProcessEngineConfiguration();
....
if (processEngineConfiguration.isLoggingSessionEnabled()) {
BpmnLoggingSessionUtil.addExecuteActivityBehaviorLoggingData(
// Deploy intro process definition
Deployment deployment = repositoryService.createDeployment().name("intro")
.addClasspathResource("intro.bpmn20.xml")
.deploymentProperty(DeploymentProperties.DEPLOY_AS_FLOWABLE5_PROCESS_DEFINITION, true)
.deploy();
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()
.deploymentId(deployment.getId())
.singleResult();
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="processEngineConfiguration"
class="org.flowable.engine.impl.cfg.StandaloneProcessEngineConfiguration">
<property name="jdbcUrl" value="jdbc:h2:mem:flowable;DB_CLOSE_DELAY=1000;MVCC=TRUE" />
<property name="jdbcDriver" value="org.h2.Driver" />
<property name="jdbcUsername" value="sa" />
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable5-compatibility</artifactId>
<version>6.0.0.RC1</version>
</dependency>
// Deploy intro process definition
repositoryService.createDeployment().name("dmn")
.addClasspathResource("dmn.bpmn20.xml")
.addClasspathResource("intro.dmn")
.deploy();
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="dmnExample"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:flowable="http://flowable.org/bpmn"
targetNamespace="http://flowable.org/examples">
<process id="dmn">
<startEvent id="start"/>
<sequenceFlow id="flow1" sourceRef="start" targetRef="dmnTask" />
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="processEngineConfiguration"
class="org.flowable.engine.impl.cfg.StandaloneProcessEngineConfiguration">
<property name="jdbcUrl" value="jdbc:h2:mem:flowable;DB_CLOSE_DELAY=1000;MVCC=TRUE" />
<property name="jdbcDriver" value="org.h2.Driver" />
<property name="jdbcUsername" value="sa" />
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-dmn-engine</artifactId>
<version>6.0.0.RC1</version>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-dmn-engine-configurator</artifactId>
<version>6.0.0.RC1</version>
</dependency>