I created sample Spring Boot + Flowable application project on github.
Purpose:
How easy… . The project is not about how easy it is to implement BPM , Low Code , Business Automation , … .
I want to show, where the bottle necks are.
Step 1 Basic Spring Boot app opens the first topic - tests .
Sample:
assertThat(runtimeService.createVariableInstanceQuery().processInstanceId(helloWorldProcess.getId()).list())
.extracting("name", "value")
.containsExactly(Tuple.tuple("initiator", null));
vs
assertThat(helloWorldProcess)
.isRunning()
.hasVariableWithValue('initiator', null)
Step 2 is dedicated to variables
If you want to contribute with your bottleNeck
, please create an issue , or even better contribute to the project. The next step can address your problem.
1 Like
I added possibility to automatically download application model from cloud designer.
$ ./mvnw generate-resources -PdownloadModel
downloads the application model from flowable cloud designer,
unzips the content to allow local changes,
zips models to deployable bar file again.
2 Likes
How to test versioning?
test project
broader context
Use case :
e.g.: The data structure for variable stored in the process instance has changed in the time.
The example does not propose any solution yet.
1 Like
Nobody uses java serialization (previous post) for variables. At least I hope so.
Is json
better?
Example
How to support variable format differences across the versions?
multiple if
solution
return process -> {
Object contract = process.getProcessVariables().get("contract");
ObjectNode objectNode = objectMapper.createObjectNode();
if (contract instanceof JsonNode jsonContract) {
if (jsonContract.has("account")) {
JsonNode account = jsonContract.get("account");
if (account.has("id")) {
// version 0.2.3
objectNode.put("account", account.get("id").asText());
} else {
// version 0.2.2
objectNode.put("account", account.asText());
}
} else {
throw new RuntimeException("Unexpected json contract format in process " + process.getId());
}
} else if (contract instanceof Contract javaSerializationContract) {
// version 0.2.1 (version 0.2.0 java serialization was omitted).
objectNode.put("account", javaSerializationContract.getAccount().getId());
} else if (contract instanceof String stringContract) {
This file has been truncated. show original