-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DBACLD-143918] Write developer documentation for the DMN implementation
- Loading branch information
Gabriele-Cardosi
committed
Jul 22, 2024
1 parent
72691f3
commit 6eddb73
Showing
5 changed files
with
185 additions
and
24 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,45 @@ | ||
/' | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
'/ | ||
@startuml | ||
participant DMNAssemblerService | ||
DMNAssemblerService -> DMNMarshaller : unmarshal(Reader) | ||
DMNMarshaller -> DMNAssemblerService: Definitions | ||
DMNAssemblerService -> DMNCompilerImpl: compile(Definitions, Resource, Collection<DMNModel> || Resource, Collection<DMNModel>) | ||
DMNCompilerImpl -> DMNMarshaller : unmarshal(Resource.getReader()) | ||
DMNMarshaller -> DMNCompilerImpl: Definitions | ||
DMNCompilerImpl -> DMNCompilerImpl: new DMNModelImpl | ||
loop every ItemDefinition in Definitions.getItemDefinition | ||
DMNCompilerImpl -> DMNCompilerImpl: new ItemDefNodeImpl | ||
DMNCompilerImpl -> DMNModelImpl: addItemDefinition(ItemDefNodeImpl) | ||
end | ||
loop every DRGElement in Definitions.getDrgElement | ||
DMNCompilerImpl -> DRGElementCompiler: compileNode(DRGElement, DMNCompilerImpl, DMNModel) | ||
DRGElementCompiler -> FEELImpl: compile(String, CompilerContext) | ||
FEELImpl -> ProcessedExpression: new | ||
ProcessedExpression -> FEEL_1_1Parser: compilation_unit | ||
FEEL_1_1Parser -> ProcessedExpression: ParseTree | ||
ProcessedExpression -> ParseTree: accept(ASTBuilderVisitor) | ||
ParseTree -> ProcessedExpression: BaseNode | ||
FEELImpl -> ProcessedExpression: asCompiledFEELExpression | ||
ProcessedExpression -> FEELImpl: InterpretedExecutableExpression || CompiledExecutableExpression | ||
FEELImpl -> DRGElementCompiler: DMNExpressionEvaluator | ||
DRGElementCompiler -> DRGElement: setEvaluator(DMNExpressionEvaluator) | ||
end | ||
DMNCompilerImpl -> DMNAssemblerService: DMNModel | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,55 @@ | ||
/' | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
'/ | ||
@startuml | ||
participant Actor | ||
Actor -> DMNRuntimeUtil : createRuntime | ||
DMNRuntimeUtil -> Actor: DMNRuntime | ||
Actor -> DMNRuntime: getModel | ||
DMNRuntime -> Actor : DMNModel | ||
Actor -> DMNFactory: newContext | ||
DMNFactory -> Actor: DMNContext | ||
Actor -> Actor: (populate dmn context) | ||
Actor -> DMNRuntime: evaluate*(DMNModel, DMNContext) | ||
DMNRuntime -> DMNResultImplFactory: createResult | ||
DMNResultImplFactory -> DMNRuntime: DMNResult | ||
loop every DecisionNode in DMNModel.decisions | ||
DMNRuntime -> DMNResult: getDecisionResultById | ||
DMNResult -> DMNRuntime: DMNDecisionResultImpl | ||
DMNRuntime -> DMNRuntime: DMNResult.setEvaluationStatus(EVALUATING) | ||
loop every DMNNode in DecisionNode.dependencies | ||
DMNRuntime -> DMNRuntime: DMNNode evaluate* | ||
end | ||
DMNRuntime -> DecisionNode: decision.getEvaluator().evaluate | ||
DecisionNode -> DMNExpressionEvaluator: evaluate(DMNRuntimeEventManager, DMNResult) | ||
DMNExpressionEvaluator -> FEELImpl: newEvaluationContext | ||
FEELImpl -> DMNExpressionEvaluator: EvaluationContextImpl | ||
DMNExpressionEvaluator -> FEELImpl: evaluate(CompiledExpression, EvaluationContextImpl) | ||
FEELImpl -> ProcessedExpression: apply(EvaluationContextImpl) | ||
ProcessedExpression -> CompiledFEELExpression: (InterpretedExecutableExpression || CompiledExecutableExpression) apply(EvaluationContextImpl) | ||
CompiledFEELExpression -> ProcessedExpression: Object | ||
ProcessedExpression -> FEELImpl: Object | ||
FEELImpl -> DMNExpressionEvaluator: Object | ||
DMNExpressionEvaluator -> DMNRuntime: EvaluatorResult(Object) | ||
DMNRuntime -> CoerceUtil: coerceValue(DMNType, Object) | ||
CoerceUtil -> DMNRuntime: Object | ||
DMNRuntime -> DMNResult: setResult(Object) | ||
DMNRuntime -> DMNResult: setEvaluationStatus(SUCCEEDED || FAILED) | ||
DMNRuntime -> Actor: DMNResult | ||
end | ||
@enduml |