-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace references to WorkflowDefinition with AbstractWorkflowDefinition #312
Conversation
nflow-engine/src/main/java/io/nflow/engine/internal/workflow/WorkflowInstancePreProcessor.java
Show resolved
Hide resolved
CHANGELOG.md
Outdated
@@ -1,5 +1,8 @@ | |||
## 5.5.1-SNAPSHOT (future release) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New feature is added => minor version bump here and in pom.xml files: (5.6.0-SNAPSHOT)
|
||
fun repeat(execution: StateExecution): NextAction { | ||
println("Counter: " + execution.getVariable(VAR_COUNTER)) | ||
execution.setVariable(VAR_COUNTER, execution.getVar<Int>(VAR_COUNTER) + 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this getVar<Int>
method? Is it some kind of kotlin magic thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's Kotlin extension function, and allows nice inline reified typing of the return value (as a type parameter to the function), instead of requiring to pass the type class as a parameter to the function. Kotlin magic...
We want to put the two binary |
ee4c848
to
24e28aa
Compare
24e28aa
to
ecd6743
Compare
This will fix issue #311 by replacing references to WorkflowDefinition (which requires use of enum) with AbstractWorkflowDefinition (which works with any WorkflowState type classes).