Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2014-08-08 22:12:01 +0000
committerRoberto E. Escobar2014-08-28 23:59:52 +0000
commit218e7a8f09a65f486b8ec71c574b08658d4df601 (patch)
tree8a5ba58ff117a17ba34167274f18a52b9ba36da3
parent3b9112f2fa0485e6d7c3cd9b9bc5d53075bc8bd6 (diff)
downloadorg.eclipse.osee-218e7a8f09a65f486b8ec71c574b08658d4df601.tar.gz
org.eclipse.osee-218e7a8f09a65f486b8ec71c574b08658d4df601.tar.xz
org.eclipse.osee-218e7a8f09a65f486b8ec71c574b08658d4df601.zip
feature[ats_ATS64164]: CPA: Retrieve workflow artifact types from TeamDef
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java
index c59d07caac..bf29b72ba8 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java
@@ -42,6 +42,7 @@ import org.eclipse.osee.ats.core.workflow.transition.TransitionHelper;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.model.type.ArtifactType;
import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -312,6 +313,26 @@ public class TeamWorkFlowManager {
public static IArtifactType getTeamWorkflowArtifactType(IAtsTeamDefinition teamDef, Collection<IAtsActionableItem> actionableItems) throws OseeCoreException {
IArtifactType teamWorkflowArtifactType = AtsArtifactTypes.TeamWorkflow;
+ if (teamDef.getStoreObject() != null) {
+ String artifactTypeName =
+ ((Artifact) teamDef.getStoreObject()).getSoleAttributeValue(AtsAttributeTypes.TeamWorkflowArtifactType,
+ null);
+ if (Strings.isValid(artifactTypeName)) {
+ boolean found = false;
+ for (IArtifactType type : ArtifactTypeManager.getAllTypes()) {
+ if (type.getName().equals(artifactTypeName)) {
+ teamWorkflowArtifactType = type;
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ throw new OseeArgumentException(
+ "Team Workflow Artifact Type name [%s] off Team Definition %s could not be found.", artifactTypeName,
+ teamDef.toStringWithId());
+ }
+ }
+ }
ITeamWorkflowProvider teamWorkflowProvider = getTeamWorkflowProvider(teamDef, actionableItems);
if (teamWorkflowProvider != null) {
teamWorkflowArtifactType = teamWorkflowProvider.getTeamWorkflowArtifactType(teamDef, actionableItems);

Back to the top