Skip to content
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

Documentation for Addon priority #152

Merged
merged 2 commits into from
Jan 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ deactivate Launcher
deactivate Launcher

Engine --> addon : engineAboutToStart
note right
if required, the order of the calls to the Addons
can be controled by defining
EngineAddonSortingRules in the Addons
end note
Engine -> Engine : beforeStart
Engine --> addon : engineStarted
Engine -> Engine : performStart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ Most notably, the _IEngineAddon_ and _IExecutionEngine_ interfaces that are the
image::images/dev/frameworkcommons_api_overview_CD.png["Execution Framework API Interfaces overview"]


TIP: The section <<dev-new-addons>> contains some details and code snippets about how to write an engine addon.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ scale max 1024 width
scale max 800 height

package xdsmlframework.api.engine_addon {

interface IEngineAddon #beige {
void engineAboutToStart(IExecutionEngine engine)
void engineStarted(IExecutionEngine executionEngine)
Expand All @@ -23,7 +24,40 @@ package xdsmlframework.api.engine_addon {
void stepExecuted(IExecutionEngine engine, trace.commons.model.trace.Step<?> stepExecuted)
void engineStatusChanged(IExecutionEngine engine, EngineStatus.RunStatus newStatus)
List<String> validate(List<engine_addon.IEngineAddon> otherAddons)
String getAddonID()
List<String> getTags()
List<EngineAddonSortingRule> getAddonSortingRules()
}

class EngineAddonSortingRule {
Priority priority
IEngineAddon owner;
EngineEvent event;
Priority priority;
List<String> addonsWithTags;
}
enum Priority {
BEFORE
AFTER
}
enum EngineEvent {
engineAboutToStart
engineStarted,
engineInitialized
engineAboutToStop,
engineStopped
engineAboutToDispose
aboutToSelectStep
proposedStepsChanged
stepSelected
aboutToExecuteStep
stepExecuted
engineStatusChanged
}

Priority -[hidden]> EngineAddonSortingRule
EngineEvent -[hidden]> EngineAddonSortingRule
IEngineAddon <-- EngineAddonSortingRule : owner
}

package xdsmlframework.api.core {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ default public List<String> getTags() {
* A given rule indicate when to call the current addon relatively to addons referred by the rule
* @return
*/
default public List<EngineAddonSortingRule> getAddonSortingRules(){
default public List<EngineAddonSortingRule> getAddonSortingRules() {
return new ArrayList<EngineAddonSortingRule>();
}

Expand Down