-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first simple evaluation api, see #40
- Loading branch information
1 parent
4935ff1
commit 426ec1d
Showing
17 changed files
with
164 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
extension/model-api/src/main/kotlin/evaluation/CamundaDecisionEvaluationRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package io.holunda.decision.model.api.evaluation | ||
|
||
import io.holunda.decision.model.api.DiagramId | ||
import org.camunda.bpm.engine.variable.VariableMap | ||
import org.camunda.bpm.engine.variable.Variables | ||
import org.camunda.bpm.engine.variable.context.VariableContext | ||
import org.camunda.bpm.engine.variable.impl.VariableMapImpl | ||
|
||
interface CamundaDecisionEvaluationRequest { | ||
|
||
companion object { | ||
|
||
fun request(diagramId: DiagramId, variables: Map<String,Any>) = CamundaDecisionEvaluationRequestDto( | ||
diagramId = diagramId, | ||
variableContext = Variables.fromMap(variables) as VariableMapImpl | ||
) | ||
|
||
fun request(diagramId: DiagramId, variables: VariableMap) = CamundaDecisionEvaluationRequestDto( | ||
diagramId = diagramId, | ||
variableContext = variables as VariableMapImpl | ||
) | ||
|
||
} | ||
|
||
val diagramId: DiagramId | ||
|
||
val variableContext: VariableContext | ||
|
||
} | ||
|
||
data class CamundaDecisionEvaluationRequestDto( | ||
override val diagramId: DiagramId, | ||
override val variableContext: VariableContext | ||
) : CamundaDecisionEvaluationRequest | ||
|
21 changes: 21 additions & 0 deletions
21
extension/model-api/src/main/kotlin/evaluation/CamundaDecisionEvaluationResult.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.holunda.decision.model.api.evaluation | ||
|
||
import io.holunda.decision.model.api.DiagramId | ||
import io.holunda.decision.model.api.data.ResultType | ||
import org.camunda.bpm.engine.variable.VariableMap | ||
|
||
interface CamundaDecisionEvaluationResult { | ||
|
||
val diagramId: DiagramId | ||
|
||
val resultType: ResultType | ||
|
||
val result: List<VariableMap> | ||
|
||
} | ||
|
||
data class CamundaDecisionEvaluationResultDto( | ||
override val diagramId: DiagramId, | ||
override val resultType: ResultType, | ||
override val result: List<VariableMap> | ||
) : CamundaDecisionEvaluationResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.