Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add skeleton of new task execution framework
This commit lays the ground for the new approach to task definition and execution, based on activities. It provides: 1. Updated XSD for definition of activities within tasks. 2. Basic parts of the execution framework: generic task handler, parts of ActivityDefinition, WorkDefinition, ActivityHandler, and ActivityExecution class hierarchies. 3. Sample basic, semi-composite and pure composite activities. This is a work in progress. The system is not compilable at this moment, but very basic test (TestActions) passes.
- Loading branch information
Showing
187 changed files
with
5,327 additions
and
2,462 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
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
52 changes: 52 additions & 0 deletions
52
...hema/src/main/java/com/evolveum/midpoint/schema/util/task/LegacyWorkDefinitionSource.java
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,52 @@ | ||
/* | ||
* Copyright (C) 2010-2021 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
|
||
package com.evolveum.midpoint.schema.util.task; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import com.evolveum.midpoint.prism.PrismContainer; | ||
import com.evolveum.midpoint.prism.PrismContainerValue; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.ExtensionType; | ||
|
||
public class LegacyWorkDefinitionSource implements WorkDefinitionSource { | ||
|
||
@NotNull private final String taskHandlerUri; | ||
private final PrismContainerValue<?> taskExtension; | ||
|
||
private LegacyWorkDefinitionSource(@NotNull String taskHandlerUri, PrismContainerValue<?> taskExtension) { | ||
this.taskHandlerUri = taskHandlerUri; | ||
this.taskExtension = taskExtension; | ||
} | ||
|
||
@NotNull | ||
public static WorkDefinitionSource create(@NotNull String handlerUri, | ||
PrismContainer<? extends ExtensionType> extensionContainer) { | ||
PrismContainerValue<?> pcv = extensionContainer != null ? extensionContainer.getValue() : null; | ||
return new LegacyWorkDefinitionSource(handlerUri, pcv); | ||
} | ||
|
||
public @NotNull String getTaskHandlerUri() { | ||
return taskHandlerUri; | ||
} | ||
|
||
public PrismContainerValue<?> getTaskExtension() { | ||
return taskExtension; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "LegacyWorkDefinitionSource{" + | ||
"taskHandlerUri='" + taskHandlerUri + '\'' + | ||
", taskExtension size=" + getExtensionSize() + | ||
'}'; | ||
} | ||
|
||
private int getExtensionSize() { | ||
return taskExtension != null ? taskExtension.size() : 0; | ||
} | ||
} |
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
124 changes: 0 additions & 124 deletions
124
infra/schema/src/main/java/com/evolveum/midpoint/schema/util/task/TaskPartUtil.java
This file was deleted.
Oops, something went wrong.
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.