Skip to content

Instantly share code, notes, and snippets.

Avatar

Tijs Rademakers tijsrademakers

  • KIS Consultancy
  • Eindhoven
View GitHub Profile
View Migration example 4.java
processMigrationService.createProcessInstanceMigrationBuilder()
.migrateToProcessDefinition(version2ProcessDef.getId())
.addActivityMigrationMapping(
ActivityMigrationMapping.createMappingFor("userTask2Id", "subScriptTask")
.withLocalVariable("subprocessVariable", "passedValue"))
.migrate(processInstanceToMigrate.getId());
View ContinueProcessOperation
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(
View Migration example 1 validation.java
ProcessInstanceMigrationValidationResult valdationResult = processMigrationService.createProcessInstanceMigrationBuilder()
.migrateToProcessDefinition(version2ProcessDef.getId())
.addActivityMigrationMapping(ActivityMigrationMapping.createMappingFor("finalTask", "intermediateTask"))
.validateMigration(processInstanceToMigrate.getId());
View Flowable 6 embedded intro.java
// 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();
View Flowable 6 embedded 5 config.xml
<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" />
View Flowable 6 embedded5 pom.xml
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable5-compatibility</artifactId>
<version>6.0.0.RC1</version>
</dependency>
View Flowable 6 DMN test.java
// Deploy intro process definition
repositoryService.createDeployment().name("dmn")
.addClasspathResource("dmn.bpmn20.xml")
.addClasspathResource("intro.dmn")
.deploy();
View Flowable 6 intro DMN bpmn20.xml
<?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" />
View Flowable6 DMN engine configuration.xml
<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" />
View Flowable6 DMN intro pom.xml
<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>
You can’t perform that action at this time.