Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2017-08-22 11:25:40 -0400
committerDonald Dunne2017-08-28 18:07:07 -0400
commit9a6e465a2b06bbf2af49987c721182e2e5d5a636 (patch)
tree2ed31f617b8f6fded939ff748f3bbbac90fb82ca
parent2097e9ca7f9bf4cc4e2b08d8fe56e8df60179ee1 (diff)
downloadorg.eclipse.osee-9a6e465a2b06bbf2af49987c721182e2e5d5a636.tar.gz
org.eclipse.osee-9a6e465a2b06bbf2af49987c721182e2e5d5a636.tar.xz
org.eclipse.osee-9a6e465a2b06bbf2af49987c721182e2e5d5a636.zip
refinement: Convert demo init and tests to use tokens
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java4
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/JaxAtsObject.java4
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java4
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java2
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/INewActionListener.java8
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java105
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoAgile.java27
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateSawBuild2Actions.java130
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbActionData.java30
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbGroups.java5
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java5
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbTasks.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java39
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/DemoNavigateViewItems.java5
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Demo_AIs_And_Team_Definitions.ats15
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java213
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java23
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/WfePrintTest.java11
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/ActionUiResourceTest.java23
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsActionEndpointImplTest.java25
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/OrcsWriterEndpointTest.java1
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java10
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java8
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java23
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsChangeSet.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java1
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java33
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java10
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCore.java20
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapter.java1
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java20
-rw-r--r--plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoArtifactToken.java68
-rw-r--r--plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoDbAIs.java37
-rw-r--r--plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoWorkflowTitles.java34
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java6
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/access/AtsBranchAccessManager.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java11
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java13
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java2
43 files changed, 542 insertions, 464 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java
index f49fcd6a33..b42ac9cfad 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java
@@ -45,6 +45,7 @@ import org.eclipse.osee.ats.api.workflow.IAtsAction;
import org.eclipse.osee.ats.api.workflow.IAtsActionFactory;
import org.eclipse.osee.ats.api.workflow.IAtsBranchService;
import org.eclipse.osee.ats.api.workflow.IAtsImplementerService;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.api.workflow.IAtsWorkItemServiceProvider;
import org.eclipse.osee.ats.api.workflow.ITeamWorkflowProvidersLazy;
import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory;
@@ -183,4 +184,7 @@ public interface IAtsServices extends IAtsEarnedValueServiceProvider, IAtsConfig
ArtifactToken getArtifactByAtsId(String id);
<T> T getConfigItem(ArtifactId artId);
+
+ IAtsTeamWorkflow getTeamWf(ArtifactToken artifact);
+
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/JaxAtsObject.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/JaxAtsObject.java
index 1e2536ee50..1fde408fe8 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/JaxAtsObject.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/JaxAtsObject.java
@@ -123,4 +123,8 @@ public class JaxAtsObject {
this.guid = guid;
}
+ public String toStringWithId() {
+ return String.format("[%s]-[%s]", getName(), getUuid());
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java
index ad133e6224..bc46668367 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java
@@ -82,4 +82,8 @@ public interface IAtsStoreService {
TransactionId getTransactionId(IAtsWorkItem workItem);
+ default boolean isInDb(IAtsWorkItem workItem) {
+ return getTransactionId(workItem).isValid();
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java
index ad99dc189c..23fa0a66e6 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java
@@ -34,7 +34,7 @@ public interface IAtsActionFactory {
IAtsTeamWorkflow createTeamWorkflow(IAtsAction action, IAtsTeamDefinition teamDef, Collection<IAtsActionableItem> actionableItems, List<IAtsUser> assignees, IAtsChangeSet changes, Date createdDate, IAtsUser createdBy, INewActionListener newActionListener, CreateTeamOption... createTeamOption) throws OseeCoreException;
- IAtsTeamWorkflow createTeamWorkflow(IAtsAction action, IAtsTeamDefinition teamDef, Collection<IAtsActionableItem> actionableItems, List<? extends IAtsUser> assignees, Date createdDate, IAtsUser createdBy, String guid, IArtifactType artifactType, INewActionListener newActionListener, IAtsChangeSet changes, CreateTeamOption... createTeamOption) throws OseeCoreException;
+ IAtsTeamWorkflow createTeamWorkflow(IAtsAction action, IAtsTeamDefinition teamDef, Collection<IAtsActionableItem> actionableItems, List<? extends IAtsUser> assignees, Date createdDate, IAtsUser createdBy, IArtifactType artifactType, INewActionListener newActionListener, IAtsChangeSet changes, CreateTeamOption... createTeamOption) throws OseeCoreException;
/**
* Auto-add actions to a goal configured with relations to the given ActionableItem or Team Definition
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/INewActionListener.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/INewActionListener.java
index 1f4671ef08..1122e977b5 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/INewActionListener.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/INewActionListener.java
@@ -10,7 +10,10 @@
*******************************************************************************/
package org.eclipse.osee.ats.api.workflow;
+import java.util.List;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
/**
@@ -39,4 +42,9 @@ public interface INewActionListener {
// for override
return null;
}
+
+ public default ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ // for override
+ return null;
+ }
}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java
index 7654abb788..d67abbe96f 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java
@@ -10,25 +10,20 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.demo;
-import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
-import java.util.List;
-import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
-import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
-import org.eclipse.osee.framework.core.enums.DeletionFlag;
+import org.eclipse.osee.ats.core.util.AtsObjects;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.skynet.core.utility.OseeInfo;
public class DemoUtil {
- public static final String SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW =
- "SAW (committed) Reqt Changes for Diagram View";
+ private static String atsIds;
private DemoUtil() {
// Utility class
@@ -66,57 +61,73 @@ public class DemoUtil {
}
public static TeamWorkFlowArtifact getSawCodeCommittedWf() throws OseeCoreException {
- return getCodeTeamWorkflowNamed(SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW);
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.SAW_Commited_Code_TeamWf);
+ }
+
+ public static TeamWorkFlowArtifact getSawTestCommittedWf() throws OseeCoreException {
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.SAW_Commited_Test_TeamWf);
+ }
+
+ public static TeamWorkFlowArtifact getSawReqCommittedWf() throws OseeCoreException {
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.SAW_Commited_Req_TeamWf);
+ }
+
+ public static TeamWorkFlowArtifact getSawSWDesignCommittedWf() throws OseeCoreException {
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.SAW_Commited_SWDesign_TeamWf);
}
public static TeamWorkFlowArtifact getSawCodeUnCommittedWf() throws OseeCoreException {
- return getCodeTeamWorkflowNamed("SAW (uncommitted) More Reqt Changes for Diagram View");
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.SAW_UnCommited_Code_TeamWf);
}
- public static TeamWorkFlowArtifact getSawCodeNoBranchWf() throws OseeCoreException {
- return getCodeTeamWorkflowNamed("SAW (no-branch) Even More Requirement Changes for Diagram View");
+ public static TeamWorkFlowArtifact getSawTestUnCommittedWf() throws OseeCoreException {
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.SAW_UnCommited_Test_TeamWf);
}
- public static Collection<TeamWorkFlowArtifact> getSawWfs(String name) {
- List<TeamWorkFlowArtifact> teamWfs = new ArrayList<>();
- for (Artifact art : ArtifactQuery.getArtifactListFromName(name, AtsClientService.get().getAtsBranch(),
- DeletionFlag.EXCLUDE_DELETED)) {
- if (art.isOfType(AtsArtifactTypes.TeamWorkflow)) {
- teamWfs.add((TeamWorkFlowArtifact) art);
- }
- }
- return teamWfs;
+ public static TeamWorkFlowArtifact getSawReqUnCommittedWf() throws OseeCoreException {
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.SAW_UnCommited_Req_TeamWf);
+ }
+
+ public static TeamWorkFlowArtifact getSawSWDesignUnCommittedWf() throws OseeCoreException {
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(
+ DemoArtifactToken.SAW_UnCommited_SWDesign_TeamWf);
}
public static TeamWorkFlowArtifact getSwDesignNoBranchWf() throws OseeCoreException {
- for (Artifact artifact : ArtifactQuery.getArtifactListFromName(
- "SAW (uncommitted) More Reqt Changes for Diagram View", AtsClientService.get().getAtsBranch(),
- DeletionFlag.EXCLUDE_DELETED)) {
- if (artifact.isOfType(AtsArtifactTypes.TeamWorkflow)) {
- TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) artifact;
- for (IAtsActionableItem ai : teamArt.getActionableItems()) {
- if (ai.getName().contains("SW Design")) {
- return teamArt;
- }
- }
- }
- }
- return null;
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.SAW_NoBranch_SWDesign_TeamWf);
}
- public static TeamWorkFlowArtifact getCodeTeamWorkflowNamed(String name) throws OseeCoreException {
- TeamWorkFlowArtifact result = null;
- for (Artifact art : getSawWfs(name)) {
- if (art.isOfType(DemoArtifactTypes.DemoCodeTeamWorkflow)) {
- result = (TeamWorkFlowArtifact) art;
- break;
- }
- }
- return result;
+ public static TeamWorkFlowArtifact getSawCodeNoBranchWf() throws OseeCoreException {
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.SAW_NoBranch_Code_TeamWf);
+ }
+
+ public static TeamWorkFlowArtifact getSawTestNoBranchWf() throws OseeCoreException {
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.SAW_NoBranch_Test_TeamWf);
+ }
+
+ public static TeamWorkFlowArtifact getSawReqNoBranchWf() throws OseeCoreException {
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.SAW_NoBranch_Req_TeamWf);
+ }
+
+ public static TeamWorkFlowArtifact getSawSWDesignNoBranchWf() throws OseeCoreException {
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.SAW_NoBranch_SWDesign_TeamWf);
+ }
+
+ public static Collection<TeamWorkFlowArtifact> getSawCommittedTeamWfs() {
+ return Arrays.asList(DemoUtil.getSawTestCommittedWf(), DemoUtil.getSawReqCommittedWf(),
+ DemoUtil.getSawCodeCommittedWf());
}
- public static Collection<TeamWorkFlowArtifact> getSawCommittedWfs() {
- return getSawWfs(SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW);
+ public static Collection<TeamWorkFlowArtifact> getSawUnCommittedTeamWfs() {
+ return Arrays.asList(DemoUtil.getSawTestUnCommittedWf(), DemoUtil.getSawReqUnCommittedWf(),
+ DemoUtil.getSawCodeUnCommittedWf(), DemoUtil.getSawSWDesignUnCommittedWf());
+ }
+
+ public static String getSawAtsIds() {
+ if (atsIds == null) {
+ atsIds = Collections.toString(",", AtsObjects.toAtsIds(getSawCommittedTeamWfs()));
+ }
+ return atsIds;
}
}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java
index e3e8b86f12..c75085feda 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java
@@ -14,6 +14,7 @@ import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_1;
import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_2;
import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_3;
import java.io.File;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.HashSet;
@@ -21,6 +22,7 @@ import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.team.ChangeType;
import org.eclipse.osee.ats.api.user.IAtsUser;
@@ -326,11 +328,13 @@ public class PopulateDemoActions extends XNavigateItemAction {
int x = 0;
Date createdDate = new Date();
IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
+ IAtsActionableItem ai = AtsClientService.get().getConfigItem(aData.aiToken);
+ List<IAtsActionableItem> ais = Arrays.asList(ai);
for (String prefixTitle : aData.prefixTitles) {
ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null,
prefixTitle + " " + aData.postFixTitle, TITLE_PREFIX[x] + " " + aData.postFixTitle, CHANGE_TYPE[x],
- aData.priority, false, null, aData.getActionableItems(), createdDate, createdBy, null, changes);
+ aData.priority, false, null, ais, createdDate, createdBy, null, changes);
actionArts.add((ActionArtifact) actionResult.getActionArt());
for (IAtsTeamWorkflow teamWf : AtsClientService.get().getWorkItemService().getTeams(actionResult)) {
TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf, AtsClientService.get().getServices(),
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoAgile.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoAgile.java
index ba74616bfc..b97a0f78de 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoAgile.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoAgile.java
@@ -44,6 +44,7 @@ import org.eclipse.osee.ats.core.workflow.transition.TransitionFactory;
import org.eclipse.osee.ats.core.workflow.transition.TransitionHelper;
import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.ats.demo.api.DemoWorkflowTitles;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
@@ -252,26 +253,26 @@ public class PopulateDemoAgile {
datas.add(new SprintItemData("3", "Can't see the Graph View", "8", "Unplanned Work", "Framework", "10/03/2016"));
datas.add(new SprintItemData("4", "Problem in Diagram Tree", "40", " ", "Framework", "10/03/2016"));
datas.add(new SprintItemData("5", "Problem with the Graph View", "8", " ", "Communications", "10/03/2016"));
- datas.add(new SprintItemData("6", "SAW (committed) Reqt Changes for Diagram View", "2", "Unplanned Work",
+ datas.add(new SprintItemData("6", DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "2",
+ "Unplanned Work", "Framework", "10/03/2016"));
+ datas.add(new SprintItemData("7", DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "8", " ",
"Framework", "10/03/2016"));
- datas.add(
- new SprintItemData("7", "SAW (committed) Reqt Changes for Diagram View", "8", " ", "Framework", "10/03/2016"));
- datas.add(
- new SprintItemData("8", "SAW (committed) Reqt Changes for Diagram View", "16", " ", "UI", "10/03/2016"));
- datas.add(new SprintItemData("9", "SAW (no-branch) Even More Requirement Changes for Diagram View", "32", " ",
+ datas.add(new SprintItemData("8", DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "16", " ", "UI",
+ "10/03/2016"));
+ datas.add(new SprintItemData("9", DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW, "32", " ",
"Communications", "10/03/2016"));
- datas.add(new SprintItemData("10", "SAW (no-branch) Even More Requirement Changes for Diagram View", "40", " ",
+ datas.add(new SprintItemData("10", DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW, "40", " ",
"Documentation", "10/03/2016"));
- datas.add(new SprintItemData("11", "SAW (no-branch) Even More Requirement Changes for Diagram View", "8", " ",
+ datas.add(new SprintItemData("11", DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW, "8", " ",
"Documentation", "10/03/2016"));
- datas.add(new SprintItemData("12", "SAW (uncommitted) More Reqt Changes for Diagram View", "1", " ",
+ datas.add(new SprintItemData("12", DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "1", " ",
"Communications", "10/03/2016"));
- datas.add(new SprintItemData("13", "SAW (uncommitted) More Reqt Changes for Diagram View", "6", " ",
+ datas.add(new SprintItemData("13", DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "6", " ",
"Documentation", "10/03/2016"));
- datas.add(new SprintItemData("14", "SAW (uncommitted) More Reqt Changes for Diagram View", "32", " ",
+ datas.add(new SprintItemData("14", DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "32", " ",
+ "Communications", "10/03/2016"));
+ datas.add(new SprintItemData("15", DemoArtifactToken.SAW_UnCommitedConflicted_Req_TeamWf.getName(), "1", " ",
"Communications", "10/03/2016"));
- datas.add(new SprintItemData("15", "SAW (uncommitted-conflicted) More Requirement Changes for Diagram View", "1",
- " ", "Communications", "10/03/2016"));
datas.add(new SprintItemData("16", "Workaround for Graph View for SAW_Bld_2", "1", "Unplanned Work",
"Communications", "10/03/2016"));
datas.add(new SprintItemData("17", "Workaround for Graph View for SAW_Bld_3", "2", "Unplanned Work",
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateSawBuild2Actions.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateSawBuild2Actions.java
index f3bafce243..c5ea28ed02 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateSawBuild2Actions.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateSawBuild2Actions.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.client.demo;
import java.util.Collection;
import java.util.Date;
+import java.util.List;
import java.util.logging.Level;
import org.eclipse.osee.ats.api.IAtsConfigObject;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
@@ -24,6 +25,7 @@ import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.api.workdef.model.ReviewBlockType;
import org.eclipse.osee.ats.api.workflow.ActionResult;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
import org.eclipse.osee.ats.client.demo.config.DemoDbUtil.SoftwareRequirementStrs;
@@ -35,9 +37,10 @@ import org.eclipse.osee.ats.core.workflow.state.TeamState;
import org.eclipse.osee.ats.core.workflow.transition.TeamWorkFlowManager;
import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
import org.eclipse.osee.ats.demo.api.DemoCscis;
-import org.eclipse.osee.ats.demo.api.DemoDbAIs;
import org.eclipse.osee.ats.demo.api.DemoSubsystems;
+import org.eclipse.osee.ats.demo.api.DemoWorkflowTitles;
import org.eclipse.osee.ats.util.AtsBranchManager;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
@@ -67,20 +70,20 @@ public class PopulateSawBuild2Actions {
Conditions.checkNotNull(version, "SAW_Bld_2");
// Create SAW_Bld_2 Actions
- IAtsChangeSet changes = AtsClientService.get().createChangeSet("Populate Demo DB - PopulateSawBuild2Actions");
-
- // SawBuild2Action1
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet("Populate Demo DB - PopulateSawBuild2Actions - 1");
ActionResult committedAction = sawBuild2Action1_createCommittedAction(changes);
+ changes.execute();
- // SawBuild2Action2
+ changes = AtsClientService.get().createChangeSet("Populate Demo DB - PopulateSawBuild2Actions - 2");
ActionResult unCommittedAction = sawBuild2Action2_createUnCommittedAction(changes);
+ changes.execute();
- // SawBuild2Action3
+ changes = AtsClientService.get().createChangeSet("Populate Demo DB - PopulateSawBuild2Actions - 3");
sawBuild2Action3_createNoBranchAction(changes);
+ changes.execute();
- // SawBuild2Action4
+ changes = AtsClientService.get().createChangeSet("Populate Demo DB - PopulateSawBuild2Actions - 4");
ActionResult conflictedAction = sawBuild2Action4_createUnCommittedConflictedAction(changes);
-
changes.execute();
// Working Branch off SAW_Bld_2, Make Changes, Commit
@@ -95,16 +98,15 @@ public class PopulateSawBuild2Actions {
}
private static ActionResult sawBuild2Action4_createUnCommittedConflictedAction(IAtsChangeSet changes) throws OseeCoreException {
- String title = "SAW (uncommitted-conflicted) More Requirement Changes for Diagram View";
- Collection<IAtsActionableItem> aias =
- DemoDbUtil.getActionableItems(new String[] {DemoDbAIs.SAW_Requirements.getAIName()});
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.SAW_Requirements_AI);
Date createdDate = new Date();
IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
String priority = "3";
- ActionResult actionResult =
- AtsClientService.get().getActionFactory().createAction(null, title, "Problem with the Diagram View",
- ChangeType.Problem, priority, false, null, aias, createdDate, createdBy, null, changes);
+ ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null,
+ DemoArtifactToken.SAW_UnCommitedConflicted_Req_TeamWf.getName(), "Problem with the Diagram View",
+ ChangeType.Problem, priority, false, null, aias, createdDate, createdBy,
+ new SAWUnCommitedConflictedActionListener(), changes);
for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf, AtsClientService.get().getServices(),
@@ -128,20 +130,24 @@ public class PopulateSawBuild2Actions {
return actionResult;
}
+ private static class SAWUnCommitedConflictedActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ return DemoArtifactToken.SAW_UnCommitedConflicted_Req_TeamWf;
+ }
+ }
+
private static ActionResult sawBuild2Action3_createNoBranchAction(IAtsChangeSet changes) throws OseeCoreException {
- String title = "SAW (no-branch) Even More Requirement Changes for Diagram View";
- Collection<IAtsActionableItem> aias = DemoDbUtil.getActionableItems(new String[] {
- DemoDbAIs.SAW_Code.getAIName(),
- DemoDbAIs.SAW_SW_Design.getAIName(),
- DemoDbAIs.SAW_Requirements.getAIName(),
- DemoDbAIs.SAW_Test.getAIName()});
+ String title = DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW;
+ Collection<IAtsActionableItem> aias = AtsClientService.get().getConfigItems(DemoArtifactToken.SAW_Code_AI,
+ DemoArtifactToken.SAW_SW_Design_AI, DemoArtifactToken.SAW_Requirements_AI, DemoArtifactToken.SAW_Test_AI);
Date createdDate = new Date();
IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
String priority = "3";
- ActionResult actionResult =
- AtsClientService.get().getActionFactory().createAction(null, title, "Problem with the Diagram View",
- ChangeType.Problem, priority, false, null, aias, createdDate, createdBy, null, changes);
+ ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null, title,
+ "Problem with the Diagram View", ChangeType.Problem, priority, false, null, aias, createdDate, createdBy,
+ new SAWNoBranchArtifactTokenActionListener(), changes);
for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
boolean isSwDesign = teamWf.getTeamDefinition().getName().contains("SW Design");
@@ -201,21 +207,33 @@ public class PopulateSawBuild2Actions {
}
return actionResult;
}
+ private static class SAWNoBranchArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Test_AI)) {
+ return DemoArtifactToken.SAW_NoBranch_Test_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Code_AI)) {
+ return DemoArtifactToken.SAW_NoBranch_Code_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Requirements_AI)) {
+ return DemoArtifactToken.SAW_NoBranch_Req_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_SW_Design_AI)) {
+ return DemoArtifactToken.SAW_NoBranch_SWDesign_TeamWf;
+ }
+ throw new UnsupportedOperationException();
+ }
+ }
private static ActionResult sawBuild2Action2_createUnCommittedAction(IAtsChangeSet changes) throws OseeCoreException {
- String title = "SAW (uncommitted) More Reqt Changes for Diagram View";
- Collection<IAtsActionableItem> aias = DemoDbUtil.getActionableItems(new String[] {
- DemoDbAIs.SAW_Code.getAIName(),
- DemoDbAIs.SAW_SW_Design.getAIName(),
- DemoDbAIs.SAW_Requirements.getAIName(),
- DemoDbAIs.SAW_Test.getAIName()});
+ String title = DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW;
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.SAW_Code_AI,
+ DemoArtifactToken.SAW_SW_Design_AI, DemoArtifactToken.SAW_Requirements_AI, DemoArtifactToken.SAW_Test_AI);
Date createdDate = new Date();
IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
String priority = "3";
- ActionResult actionResult =
- AtsClientService.get().getActionFactory().createAction(null, title, "Problem with the Diagram View",
- ChangeType.Problem, priority, false, null, aias, createdDate, createdBy, null, changes);
+ ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null, title,
+ "Problem with the Diagram View", ChangeType.Problem, priority, false, null, aias, createdDate, createdBy,
+ new SAWUnCommittedArtifactTokenActionListener(), changes);
for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
boolean isSwDesign = teamWf.getTeamDefinition().getName().contains("SW Design");
@@ -277,19 +295,33 @@ public class PopulateSawBuild2Actions {
return actionResult;
}
+ private static class SAWUnCommittedArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Test_AI)) {
+ return DemoArtifactToken.SAW_UnCommited_Test_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Code_AI)) {
+ return DemoArtifactToken.SAW_UnCommited_Code_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Requirements_AI)) {
+ return DemoArtifactToken.SAW_UnCommited_Req_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_SW_Design_AI)) {
+ return DemoArtifactToken.SAW_UnCommited_SWDesign_TeamWf;
+ }
+ throw new UnsupportedOperationException();
+ }
+ }
+
private static ActionResult sawBuild2Action1_createCommittedAction(IAtsChangeSet changes) throws OseeCoreException {
- String title = "SAW (committed) Reqt Changes for Diagram View";
- Collection<IAtsActionableItem> aias = DemoDbUtil.getActionableItems(new String[] {
- DemoDbAIs.SAW_Requirements.getAIName(),
- DemoDbAIs.SAW_Code.getAIName(),
- DemoDbAIs.SAW_Test.getAIName()});
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.SAW_Requirements_AI,
+ DemoArtifactToken.SAW_Code_AI, DemoArtifactToken.SAW_Test_AI);
Date createdDate = new Date();
IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
String priority = "1";
- ActionResult actionResult =
- AtsClientService.get().getActionFactory().createAction(null, title, "Problem with the Diagram View",
- ChangeType.Problem, priority, false, null, aias, createdDate, createdBy, null, changes);
+ ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null,
+ DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "Problem with the Diagram View",
+ ChangeType.Problem, priority, false, null, aias, createdDate, createdBy,
+ new SAWCommittedArtifactTokenActionListener(), changes);
for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
if (teamWf.getTeamDefinition().getName().contains(
@@ -304,10 +336,6 @@ public class PopulateSawBuild2Actions {
"Test") && !teamWf.getWorkDefinition().getName().equals("WorkDef_Team_Demo_Test")) {
throw new OseeCoreException("Test workflow expected work def [WorkDef_Team_Demo_Test] actual [%s]",
teamWf.getWorkDefinition().getName());
- } else if (teamWf.getTeamDefinition().getName().contains(
- "Design") && !teamWf.getWorkDefinition().getName().equals("WorkDef_Team_Demo_SwDesign")) {
- throw new OseeCoreException("SwDesign workflow expected work def [WorkDef_Team_Demo_SwDesign] actual [%s]",
- teamWf.getWorkDefinition().getName());
}
TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf, AtsClientService.get().getServices(),
@@ -331,6 +359,20 @@ public class PopulateSawBuild2Actions {
return actionResult;
}
+ private static class SAWCommittedArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Test_AI)) {
+ return DemoArtifactToken.SAW_Commited_Test_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Code_AI)) {
+ return DemoArtifactToken.SAW_Commited_Code_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Requirements_AI)) {
+ return DemoArtifactToken.SAW_Commited_Req_TeamWf;
+ }
+ throw new UnsupportedOperationException();
+ }
+ }
+
private static void makeCommittedActionChanges(ActionResult actionResult) throws OseeCoreException {
if (DEBUG) {
OseeLog.log(Activator.class, Level.INFO, "Making Action 1 Requirement Changes");
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbActionData.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbActionData.java
index b70fc81ab8..1d217b99ee 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbActionData.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbActionData.java
@@ -11,12 +11,10 @@
package org.eclipse.osee.ats.client.demo.config;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.List;
-import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
-import org.eclipse.osee.ats.demo.api.DemoDbAIs;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
/**
* @author Donald G. Dunne
@@ -24,7 +22,7 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
public class DemoDbActionData {
public final String postFixTitle;
public final String priority;
- public final String[] actionableItems;
+ public final ArtifactToken aiToken;
public final TeamState toState;
public final String[] prefixTitles;
private final CreateReview[] createReviews;
@@ -34,40 +32,36 @@ public class DemoDbActionData {
None
};
- public DemoDbActionData(String[] prefixTitles, String postFixTitle, String priority, String[] actionableItems, TeamState toState, CreateReview... createReviews) {
+ public DemoDbActionData(String[] prefixTitles, String postFixTitle, String priority, ArtifactToken aiToken, TeamState toState, CreateReview... createReviews) {
this.prefixTitles = prefixTitles;
this.postFixTitle = postFixTitle;
this.priority = priority;
- this.actionableItems = actionableItems;
+ this.aiToken = aiToken;
this.toState = toState;
this.createReviews = createReviews;
}
- public Collection<IAtsActionableItem> getActionableItems() throws OseeCoreException {
- return DemoDbUtil.getActionableItems(actionableItems);
- }
-
public static List<DemoDbActionData> getNonReqSawActionData() {
List<DemoDbActionData> actionDatas = new ArrayList<>();
actionDatas.add(new DemoDbActionData(new String[] {"Workaround for"}, "Graph View", "1",
- new String[] {DemoDbAIs.Adapter.getAIName()}, TeamState.Implement));
+ DemoArtifactToken.Adapter_AI, TeamState.Implement));
actionDatas.add(new DemoDbActionData(new String[] {"Working with"}, "Diagram Tree", "3",
- new String[] {DemoDbAIs.SAW_SW_Design.getAIName()}, TeamState.Endorse));
+ DemoArtifactToken.SAW_SW_Design_AI, TeamState.Endorse));
return actionDatas;
}
public static List<DemoDbActionData> getGenericActionData() {
List<DemoDbActionData> actionDatas = new ArrayList<>();
actionDatas.add(new DemoDbActionData(new String[] {"Problem with the", "Can't see the"}, "Graph View", "1",
- new String[] {DemoDbAIs.Adapter.getAIName()}, TeamState.Implement));
+ DemoArtifactToken.Adapter_AI, TeamState.Implement));
actionDatas.add(new DemoDbActionData(new String[] {"Problem in", "Can't load"}, "Diagram Tree", "3",
- new String[] {DemoDbAIs.CIS_Test.getAIName()}, TeamState.Endorse));
+ DemoArtifactToken.CIS_Test_AI, TeamState.Endorse));
actionDatas.add(new DemoDbActionData(new String[] {"Button W doesn't work on"}, "Situation Page", "3",
- new String[] {DemoDbAIs.CIS_Test.getAIName()}, TeamState.Analyze));
+ DemoArtifactToken.CIS_Test_AI, TeamState.Analyze));
actionDatas.add(new DemoDbActionData(new String[] {"Problem with the"}, "user window", "4",
- new String[] {DemoDbAIs.Timesheet.getAIName()}, TeamState.Implement));
+ DemoArtifactToken.Timesheet_AI, TeamState.Implement));
actionDatas.add(new DemoDbActionData(new String[] {"Button S doesn't work on"}, "help", "3",
- new String[] {DemoDbAIs.Reader.getAIName()}, TeamState.Completed, CreateReview.Decision));
+ DemoArtifactToken.Reader_AI, TeamState.Completed, CreateReview.Decision));
return actionDatas;
}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbGroups.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbGroups.java
index da0b74ecd4..94c50614d1 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbGroups.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbGroups.java
@@ -11,11 +11,13 @@
package org.eclipse.osee.ats.client.demo.config;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.eclipse.osee.ats.client.demo.internal.Activator;
import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
@@ -47,7 +49,8 @@ public class DemoDbGroups {
OseeLog.log(Activator.class, Level.INFO, "Create Groups and add objects");
}
Artifact groupArt = UniversalGroup.addGroup(TEST_GROUP_NAME, AtsClientService.get().getAtsBranch(), transaction);
- for (TeamWorkFlowArtifact codeArt : DemoDbUtil.getSampleCodeWorkflows()) {
+ for (TeamWorkFlowArtifact codeArt : Arrays.asList(DemoUtil.getSawCodeCommittedWf(),
+ DemoUtil.getSawCodeUnCommittedWf())) {
// Add Action to Universal Group
groupArt.addRelation(CoreRelationTypes.Universal_Grouping__Members, codeArt.getParentActionArtifact());
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java
index 015da58bc9..5ddba2ca8e 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java
@@ -21,6 +21,7 @@ import org.eclipse.osee.ats.api.review.Role;
import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.eclipse.osee.ats.client.demo.internal.Activator;
import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.review.DecisionReviewArtifact;
@@ -127,8 +128,8 @@ public class DemoDbReviews {
if (DEBUG) {
OseeLog.log(Activator.class, Level.INFO, "Create Peer To Peer reviews");
}
- TeamWorkFlowArtifact firstCodeArt = DemoDbUtil.getSampleCodeWorkflows().get(0);
- TeamWorkFlowArtifact secondCodeArt = DemoDbUtil.getSampleCodeWorkflows().get(1);
+ TeamWorkFlowArtifact firstCodeArt = DemoUtil.getSawCodeCommittedWf();
+ TeamWorkFlowArtifact secondCodeArt = DemoUtil.getSawCodeUnCommittedWf();
// Create a PeerToPeer review and leave in Prepare state
PeerToPeerReviewArtifact reviewArt = PeerToPeerReviewManager.createNewPeerToPeerReview(firstCodeArt,
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbTasks.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbTasks.java
index 378c274e19..295a7d73b4 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbTasks.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbTasks.java
@@ -22,6 +22,7 @@ import org.eclipse.osee.ats.api.task.NewTaskData;
import org.eclipse.osee.ats.api.task.NewTaskDataFactory;
import org.eclipse.osee.ats.api.task.NewTaskDatas;
import org.eclipse.osee.ats.api.user.IAtsUser;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.eclipse.osee.ats.client.demo.internal.Activator;
import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
@@ -41,7 +42,8 @@ public class DemoDbTasks {
IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
boolean firstTaskWorkflow = true;
NewTaskDatas newTaskDatas = new NewTaskDatas();
- for (TeamWorkFlowArtifact codeArt : DemoDbUtil.getSampleCodeWorkflows()) {
+ for (TeamWorkFlowArtifact codeArt : Arrays.asList(DemoUtil.getSawCodeCommittedWf(),
+ DemoUtil.getSawCodeUnCommittedWf())) {
NewTaskData newTaskData = NewTaskDataFactory.get("Populate Demo DB - Create Tasks", createdBy, codeArt);
List<String> assigneeUserIds = new ArrayList<>();
if (firstTaskWorkflow) {
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java
index e62906213e..08a32c56c9 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java
@@ -10,19 +10,13 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.demo.config;
-import static org.eclipse.osee.framework.core.enums.DeletionFlag.EXCLUDE_DELETED;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
import java.util.logging.Level;
-import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.client.demo.internal.Activator;
import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
-import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.config.ActionableItems;
-import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
@@ -41,24 +35,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
public class DemoDbUtil {
public static String INTERFACE_INITIALIZATION = "Interface Initialization";
- private static List<TeamWorkFlowArtifact> codeArts;
-
- public static List<TeamWorkFlowArtifact> getSampleCodeWorkflows() throws OseeCoreException {
- if (codeArts == null) {
- codeArts = new ArrayList<>();
- for (String actionName : new String[] {
- "SAW (committed) Reqt Changes for Diagram View",
- "SAW (uncommitted) More Reqt Changes for Diagram View"}) {
- for (Artifact art : ArtifactQuery.getArtifactListFromName(actionName, AtsClientService.get().getAtsBranch(),
- EXCLUDE_DELETED)) {
- if (art.isOfType(DemoArtifactTypes.DemoCodeTeamWorkflow)) {
- codeArts.add((TeamWorkFlowArtifact) art);
- }
- }
- }
- }
- return codeArts;
- }
public static Result isDbPopulatedWithDemoData(boolean DEBUG, Branch branch) throws OseeCoreException {
if (DemoDbUtil.getSoftwareRequirements(DEBUG, SoftwareRequirementStrs.Robot, branch).size() != 6) {
@@ -103,15 +79,10 @@ public class DemoDbUtil {
branch);
}
- public static Collection<IAtsActionableItem> getActionableItems(String[] aiasNames) throws OseeCoreException {
- Set<IAtsActionableItem> aias = new HashSet<>();
- for (String str : aiasNames) {
- for (IAtsActionableItem aia : ActionableItems.getActionableItemsAll(
- AtsClientService.get().getQueryService())) {
- if (str.equals(aia.getName())) {
- aias.add(aia);
- }
- }
+ public static <T> Collection<T> getConfigObjects(ArtifactToken... configTokens) throws OseeCoreException {
+ Set<T> aias = new HashSet<>();
+ for (ArtifactToken configObj : configTokens) {
+ aias.add(AtsClientService.get().getConfigItem(configObj));
}
return aias;
}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/DemoNavigateViewItems.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/DemoNavigateViewItems.java
index 5576b8917e..6f2804eaff 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/DemoNavigateViewItems.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/DemoNavigateViewItems.java
@@ -18,7 +18,6 @@ import java.util.logging.Level;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.query.ReleasedOption;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
-import org.eclipse.osee.ats.client.demo.PopulateDemoActions;
import org.eclipse.osee.ats.client.demo.internal.Activator;
import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
import org.eclipse.osee.ats.config.ValidateAtsConfiguration;
@@ -39,7 +38,6 @@ import org.eclipse.osee.ats.world.search.WorldSearchItem.LoadView;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemFolder;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateUrlItem;
@@ -141,9 +139,6 @@ public class DemoNavigateViewItems implements IAtsNavigateItem {
new ValidateAtsConfiguration(healthItems);
new CreateGoalTestDemoArtifacts(healthItems);
- XNavigateItem demoItems = new XNavigateItem(adminItems, "Demo Data", PluginUiImage.ADMIN);
- new PopulateDemoActions(demoItems);
-
return items;
}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Demo_AIs_And_Team_Definitions.ats b/plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Demo_AIs_And_Team_Definitions.ats
index 81b15c46e8..188c419454 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Demo_AIs_And_Team_Definitions.ats
+++ b/plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Demo_AIs_And_Team_Definitions.ats
@@ -221,6 +221,7 @@ actionableItem "Actionable Items" GetOrCreate {
team "CIS SW Design"
}
actionableItem "CIS Test" {
+ id 441657987
team "CIS Test"
}
}
@@ -267,13 +268,16 @@ actionableItem "Actionable Items" GetOrCreate {
actionableItem "SAW HW" {
team "SAW HW"
children {
- actionableItem "Adapter"
+ actionableItem "Adapter" {
+ id 456465465
+ }
actionableItem "Case"
actionableItem "Manual"
actionableItem "Screen"
}
}
actionableItem "SAW Requirements" {
+ id 668954846
team "SAW Requirements"
children {
actionableItem "COMM"
@@ -282,6 +286,7 @@ actionableItem "Actionable Items" GetOrCreate {
}
}
actionableItem "SAW SW Design" {
+ id 98129283
team "SAW SW Design"
}
actionableItem "SAW Test" {
@@ -300,9 +305,13 @@ actionableItem "Actionable Items" GetOrCreate {
actionableItem "Tools" {
team "Tools Team"
children {
- actionableItem "Reader"
+ actionableItem "Reader" {
+ id 132213123
+ }
actionableItem "Results Reporter"
- actionableItem "Timesheet"
+ actionableItem "Timesheet" {
+ id 79465444
+ }
actionableItem "Website" {
team "Web Team"
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java
index 76079ca5bc..2850661767 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java
@@ -21,6 +21,7 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.version.IAtsVersion;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.eclipse.osee.ats.client.demo.PopulateDemoActions;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
@@ -37,8 +38,10 @@ import org.eclipse.osee.ats.core.client.task.TaskStates;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.util.AtsObjects;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.eclipse.osee.ats.demo.api.DemoWorkflowTitles;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.core.enums.DemoUsers;
@@ -88,114 +91,35 @@ public class PopulateDemoActionsTest {
}
@org.junit.Test
- public void testSawBuild2Action1() throws OseeCoreException {
+ public void testSawUnCommittedTeamWfs() throws OseeCoreException {
+ Collection<TeamWorkFlowArtifact> sawUnCommittedTeamWfs = DemoUtil.getSawUnCommittedTeamWfs();
+ Assert.assertEquals(4, sawUnCommittedTeamWfs.size());
- // {@link DemoDbActionData.getReqSawActionsData()} - 1
- String title = "SAW (committed) Reqt Changes for Diagram View";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
-
- // test teams
- Assert.assertEquals(3, action.getTeams().size());
- TeamWorkFlowArtifact codeTeamArt = null;
- int numTested = 0;
- for (TeamWorkFlowArtifact teamArt : action.getTeams()) {
- String aiStr =
- AtsClientService.get().getWorkItemService().getActionableItemService().getActionableItemsStr(teamArt);
- if (aiStr.contains("Code")) {
- numTested++;
- codeTeamArt = teamArt;
- testTeamContents(teamArt, title, "1", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Code",
- "Joe Smith", DemoArtifactTypes.DemoCodeTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Code));
- } else if (aiStr.contains("Test")) {
- numTested++;
- testTeamContents(teamArt, title, "1", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Test",
- "Kay Jones", DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Test));
- } else if (aiStr.contains("Req")) {
- numTested++;
- testTeamContents(teamArt, title, "1", SAW_Bld_2.getName(), TeamState.Implement.getName(),
- "SAW Requirements", "Joe Smith", DemoArtifactTypes.DemoReqTeamWorkflow,
- DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
- }
- }
- Assert.assertEquals(3, numTested);
+ TeamWorkFlowArtifact codeTeamArt = DemoUtil.getSawCodeUnCommittedWf();
Assert.assertNotNull(codeTeamArt);
+ TeamWorkFlowArtifact testTeamArt = DemoUtil.getSawTestUnCommittedWf();
+ Assert.assertNotNull(testTeamArt);
+ TeamWorkFlowArtifact reqTeamArt = DemoUtil.getSawReqUnCommittedWf();
+ Assert.assertNotNull(reqTeamArt);
+ TeamWorkFlowArtifact designTeamArt = DemoUtil.getSawSWDesignUnCommittedWf();
+ Assert.assertNotNull(designTeamArt);
+
+ testTeamContents(codeTeamArt, DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "3",
+ SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Code", "Joe Smith",
+ DemoArtifactTypes.DemoCodeTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Code));
+ testTeamContents(testTeamArt, DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "3",
+ SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Test", "Kay Jones",
+ DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Test));
+ testTeamContents(reqTeamArt, DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "3",
+ SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Requirements", "Joe Smith",
+ DemoArtifactTypes.DemoReqTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
+ testTeamContents(designTeamArt, DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "3",
+ SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW SW Design", "Kay Jones",
+ AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_SW_Design));
- // test reviews
- Assert.assertEquals("Should only be two reviews", 2, ReviewManager.getReviews(codeTeamArt).size());
- PeerToPeerReviewArtifact rev1 = null;
- PeerToPeerReviewArtifact rev2 = null;
- for (AbstractReviewArtifact revArt : ReviewManager.getReviews(codeTeamArt)) {
- if (revArt.getName().contains("algorithm")) {
- rev1 = (PeerToPeerReviewArtifact) revArt;
- } else {
- rev2 = (PeerToPeerReviewArtifact) revArt;
- }
- }
- Assert.assertNotNull(rev1);
- Assert.assertNotNull(rev2);
- testReviewContents(rev1, "Peer Review algorithm used in code", PeerToPeerReviewState.Review.getName(),
- new String[] {"Joe Smith", "Kay Jones"});
- testReviewContents(rev2, "Peer Review first set of code changes", PeerToPeerReviewState.Prepare.getName(),
- "Joe Smith");
-
- // test tasks
- List<String> taskNames = new ArrayList<>();
- taskNames.addAll(DemoTestUtil.getTaskTitles(true));
- for (TaskArtifact task : codeTeamArt.getTaskArtifacts()) {
- testTaskContents(task, TaskStates.InWork.getName(), TeamState.Implement.getName());
- taskNames.remove(task.getName());
- Assert.assertEquals("Joe Smith; Kay Jones", task.getStateMgr().getAssigneesStr());
- }
- Assert.assertEquals(
- String.format("Not all tasks exist for [%s]; [%s] remain", codeTeamArt.toStringWithId(), taskNames), 0,
- taskNames.size());
- }
-
- @org.junit.Test
- public void testSawBuild2Action2() throws OseeCoreException {
- // {@link DemoDbActionData.getReqSawActionsData()} - 2
- String title = "SAW (uncommitted) More Reqt Changes for Diagram View";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(4, action.getTeams().size());
- TeamWorkFlowArtifact codeTeam = null, designTeam = null;
- int numTested = 0;
- for (TeamWorkFlowArtifact teamArt : action.getTeams()) {
- String aiStr =
- AtsClientService.get().getWorkItemService().getActionableItemService().getActionableItemsStr(teamArt);
- if (aiStr.contains("Code")) {
- numTested++;
-
- codeTeam = teamArt;
- testTeamContents(teamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Code",
- "Joe Smith", DemoArtifactTypes.DemoCodeTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Code));
- } else if (aiStr.contains("Test")) {
- numTested++;
-
- testTeamContents(teamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Test",
- "Kay Jones", DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Test));
- } else if (aiStr.contains("Req")) {
- numTested++;
-
- testTeamContents(teamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(),
- "SAW Requirements", "Joe Smith", DemoArtifactTypes.DemoReqTeamWorkflow,
- DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
- } else if (aiStr.contains("Design")) {
- numTested++;
-
- designTeam = teamArt;
- testTeamContents(teamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW SW Design",
- "Kay Jones", AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_SW_Design));
- }
- }
- Assert.assertEquals(4, numTested);
// test code team 1 review and 6 tasks
// - test review
- Assert.assertNotNull(codeTeam);
- Collection<AbstractReviewArtifact> reviews = ReviewManager.getReviews(codeTeam);
+ Collection<AbstractReviewArtifact> reviews = ReviewManager.getReviews(codeTeamArt);
Assert.assertEquals(1, reviews.size());
PeerToPeerReviewArtifact revArt = (PeerToPeerReviewArtifact) reviews.iterator().next();
testReviewContents(revArt, "Review new logic", PeerToPeerReviewState.Completed.getName());
@@ -203,76 +127,57 @@ public class PopulateDemoActionsTest {
// - test tasks
List<String> taskNames = new ArrayList<>();
taskNames.addAll(DemoTestUtil.getTaskTitles(false));
- for (TaskArtifact task : codeTeam.getTaskArtifacts()) {
+ for (TaskArtifact task : codeTeamArt.getTaskArtifacts()) {
testTaskContents(task, TaskStates.InWork.getName(), TeamState.Implement.getName());
taskNames.remove(task.getName());
Assert.assertEquals("Joe Smith", task.getStateMgr().getAssigneesStr());
}
Assert.assertEquals(
- String.format("Not all tasks exist for [%s]; [%s] remain", codeTeam.toStringWithId(), taskNames), 0,
+ String.format("Not all tasks exist for [%s]; [%s] remain", codeTeamArt.toStringWithId(), taskNames), 0,
taskNames.size());
// test sw_design 1 peer and 1 decision review
- testSwDesign1PeerAnd1DecisionReview(designTeam);
+ testSwDesign1PeerAnd1DecisionReview(designTeamArt);
}
@org.junit.Test
- public void testSawBuild2Action3() throws OseeCoreException {
+ public void testSawNoBranchCommittedTeamWfs() throws OseeCoreException {
// {@link DemoDbActionData.getReqSawActionsData()} - 3
- String title = "SAW (no-branch) Even More Requirement Changes for Diagram View";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(4, action.getTeams().size());
- Assert.assertEquals(4, action.getTeams().size());
- TeamWorkFlowArtifact designTeam = null;
- int numTested = 0;
- for (TeamWorkFlowArtifact teamArt : action.getTeams()) {
- String aiStr =
- AtsClientService.get().getWorkItemService().getActionableItemService().getActionableItemsStr(teamArt);
- if (aiStr.contains("Code")) {
- numTested++;
-
- testTeamContents(teamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Code",
- "Joe Smith", DemoArtifactTypes.DemoCodeTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Code));
- } else if (aiStr.contains("Test")) {
- numTested++;
-
- testTeamContents(teamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Test",
- "Kay Jones", DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Test));
- } else if (aiStr.contains("Req")) {
- numTested++;
-
- testTeamContents(teamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(),
- "SAW Requirements", "Joe Smith", DemoArtifactTypes.DemoReqTeamWorkflow,
- DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
- } else if (aiStr.contains("Design")) {
- numTested++;
-
- designTeam = teamArt;
- testTeamContents(teamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW SW Design",
- "Kay Jones", AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_SW_Design));
- }
- }
- Assert.assertEquals(4, numTested);
- // test sw_design 1 peer and 1 decision review
- testSwDesign1PeerAnd1DecisionReview(designTeam);
+ String title = DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW;
+ TeamWorkFlowArtifact codeTeamArt = DemoUtil.getSawCodeNoBranchWf();
+ Assert.assertNotNull(codeTeamArt);
+ TeamWorkFlowArtifact testTeamArt = DemoUtil.getSawTestNoBranchWf();
+ Assert.assertNotNull(testTeamArt);
+ TeamWorkFlowArtifact reqTeamArt = DemoUtil.getSawReqNoBranchWf();
+ Assert.assertNotNull(reqTeamArt);
+ TeamWorkFlowArtifact designTeamArt = DemoUtil.getSawSWDesignNoBranchWf();
+ Assert.assertNotNull(designTeamArt);
+
+ testTeamContents(codeTeamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Code",
+ "Joe Smith", DemoArtifactTypes.DemoCodeTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Code));
+ testTeamContents(testTeamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Test",
+ "Kay Jones", DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Test));
+ testTeamContents(reqTeamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Requirements",
+ "Joe Smith", DemoArtifactTypes.DemoReqTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
+ testTeamContents(designTeamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW SW Design",
+ "Kay Jones", AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_SW_Design));
+
+ // test sw_design 1 peer and 1 decision review
+ testSwDesign1PeerAnd1DecisionReview(designTeamArt);
}
@org.junit.Test
- public void testSawBuild2Action4() throws OseeCoreException {
+ public void testSawUnCommittedForDiagramViewTeamWfs() throws OseeCoreException {
// {@link DemoDbActionData.getReqSawActionsData()} - 4
- String title = "SAW (uncommitted-conflicted) More Requirement Changes for Diagram View";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
+ String title = DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW;
+ IAtsTeamWorkflow teamWf = AtsClientService.get().getTeamWf(DemoArtifactToken.SAW_UnCommitedConflicted_Req_TeamWf);
+ Assert.assertNotNull(teamWf);
- testTeamContents(teamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Requirements",
- "Joe Smith", DemoArtifactTypes.DemoReqTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
+ testTeamContents((TeamWorkFlowArtifact) teamWf.getStoreObject(), title, "3", SAW_Bld_2.getName(),
+ TeamState.Implement.getName(), "SAW Requirements", "Joe Smith", DemoArtifactTypes.DemoReqTeamWorkflow,
+ DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
}
@org.junit.Test
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java
index 10517b635a..c0a640d24e 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java
@@ -58,8 +58,8 @@ public class AtsBranchAccessManagerTest {
public void cleanup() throws OseeCoreException {
TeamWorkFlowArtifact teamArt =
(TeamWorkFlowArtifact) DemoTestUtil.getUncommittedActionWorkflow(DemoWorkType.Requirements);
- SkynetTransaction transaction =
- TransactionManager.createTransaction(AtsClientService.get().getAtsBranch(), "testGetContextIdArtifact cleanup");
+ SkynetTransaction transaction = TransactionManager.createTransaction(AtsClientService.get().getAtsBranch(),
+ "testGetContextIdArtifact cleanup");
Artifact teamDefArt = AtsClientService.get().getConfigArtifact(teamArt.getTeamDefinition());
teamDefArt.deleteAttributes(CoreAttributeTypes.AccessContextId);
teamDefArt.persist(transaction);
@@ -85,7 +85,7 @@ public class AtsBranchAccessManagerTest {
(TeamWorkFlowArtifact) DemoTestUtil.getUncommittedActionWorkflow(DemoWorkType.Requirements);
// confirm that no context id returned
- Assert.assertEquals(0, mgr.getContextId(teamArt.getWorkingBranch()).size());
+ Assert.assertEquals(0, mgr.getContextId(teamArt.getWorkingBranch(), false).size());
String teamDefContextId1 = "teamDef.context.1";
String teamDefContextId2 = "teamDef.context.2";
@@ -94,9 +94,7 @@ public class AtsBranchAccessManagerTest {
Arrays.asList(teamDefContextId1, teamDefContextId2));
teamDefArt.persist(getClass().getSimpleName());
- mgr.clearCache();
-
- Assert.assertEquals(2, mgr.getContextId(teamArt.getWorkingBranch()).size());
+ Assert.assertEquals(2, mgr.getContextId(teamArt.getWorkingBranch(), false).size());
String aiContextId = "ai.context.1";
Artifact aiArt = AtsClientService.get().getConfigArtifact(
@@ -105,9 +103,7 @@ public class AtsBranchAccessManagerTest {
aiArt.setAttributeValues(CoreAttributeTypes.AccessContextId, Arrays.asList(aiContextId));
aiArt.persist(getClass().getSimpleName());
- mgr.clearCache();
-
- Assert.assertEquals(1, mgr.getContextId(teamArt.getWorkingBranch()).size());
+ Assert.assertEquals(1, mgr.getContextId(teamArt.getWorkingBranch(), false).size());
String teamContextId1 = "team.context.1";
String teamContextId2 = "team.context.2";
@@ -116,14 +112,13 @@ public class AtsBranchAccessManagerTest {
Arrays.asList(teamContextId1, teamContextId2, teamContextId3));
teamArt.persist(getClass().getSimpleName());
- mgr.clearCache();
-
- Assert.assertEquals(3, mgr.getContextId(teamArt.getWorkingBranch()).size());
-
+ Assert.assertEquals(3, mgr.getContextId(teamArt.getWorkingBranch(), false).size());
}
/**
- * Test method for {@link org.eclipse.osee.ats.access.AtsBranchAccessManager#convertAccessAttributeToGuid
+ * Test method for {
+ *
+ * @param useCache TODO@link org.eclipse.osee.ats.access.AtsBranchAccessManager#convertAccessAttributeToGuid
*/
@Test
public void testConvertAccessAttributeToGuid() throws Exception {
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/WfePrintTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/WfePrintTest.java
index 9d83643d24..7448a5d7d0 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/WfePrintTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/WfePrintTest.java
@@ -11,13 +11,13 @@
package org.eclipse.osee.ats.client.integration.tests.ats.editor;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.core.client.review.DecisionReviewArtifact;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.core.client.review.ReviewManager;
import org.eclipse.osee.ats.core.client.task.TaskArtifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
import org.eclipse.osee.ats.editor.WfePrint;
import org.eclipse.osee.framework.core.util.result.XResultData;
import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
@@ -31,7 +31,7 @@ import org.junit.Test;
* Demo test that will run the SMAPrint action against Demo populated actions to ensure that nothing has broken.This
* test simply runs the html generation portion of SMAPrint, ensures the results are of a reasonable length and looks
* for exceptions at the end.
- *
+ *
* @author Donald G. Dunne
*/
public class WfePrintTest {
@@ -40,16 +40,15 @@ public class WfePrintTest {
public void testSMAPrint() throws Exception {
SevereLoggingMonitor monitorLog = TestUtil.severeLoggingStart();
- TeamWorkFlowArtifact teamArt =
- (TeamWorkFlowArtifact) ArtifactQuery.getArtifactFromTypeAndName(DemoArtifactTypes.DemoCodeTeamWorkflow,
- "SAW (uncommitted) More Reqt Changes for Diagram View", AtsClientService.get().getAtsBranch());
+ TeamWorkFlowArtifact teamArt = DemoUtil.getSawCodeUnCommittedWf();
Assert.assertNotNull(teamArt);
WfePrint smaPrint = new WfePrint(teamArt);
XResultData resultData = smaPrint.getResultData();
Assert.assertNotNull(resultData);
// Make sure it's a reasonable length
- Assert.assertTrue(XResultDataUI.getReport(resultData, "report").getManipulatedHtml().length() > 5800);
+ String html = XResultDataUI.getReport(resultData, "report").getManipulatedHtml();
+ Assert.assertTrue(html.length() > 5600);
PeerToPeerReviewArtifact peerArt = (PeerToPeerReviewArtifact) ReviewManager.getReviews(teamArt).iterator().next();
smaPrint = new WfePrint(peerArt);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/ActionUiResourceTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/ActionUiResourceTest.java
index 1a7efeaa21..8d96da3471 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/ActionUiResourceTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/ActionUiResourceTest.java
@@ -24,7 +24,7 @@ import org.junit.Test;
/**
* Test unit for {@link ActionUiResource}
- *
+ *
* @author Donald G. Dunne
*/
public class ActionUiResourceTest extends AbstractRestTest {
@@ -43,15 +43,15 @@ public class ActionUiResourceTest extends AbstractRestTest {
@Test
public void getAction() throws Exception {
- Collection<TeamWorkFlowArtifact> wfs = DemoUtil.getSawCommittedWfs();
- TeamWorkFlowArtifact teamWf = wfs.iterator().next();
+ TeamWorkFlowArtifact teamWf = DemoUtil.getSawCodeCommittedWf();
String html = getAndCheck("/ats/ui/action/" + teamWf.getAtsId(), MediaType.TEXT_HTML_TYPE);
Assert.assertTrue(html.contains("Title: <b>" + teamWf.getName() + "</b>"));
}
@Test
public void getActions() throws Exception {
- Collection<TeamWorkFlowArtifact> wfs = DemoUtil.getSawCommittedWfs();
+ Collection<TeamWorkFlowArtifact> wfs =
+ Arrays.asList(DemoUtil.getSawCodeCommittedWf(), DemoUtil.getSawTestCommittedWf());
String atsIds = Collections.toString(",", AtsObjects.toAtsIds(wfs));
String html = getAndCheck("/ats/ui/action/" + atsIds, MediaType.TEXT_HTML_TYPE);
Assert.assertTrue(html.contains("$url='/ats/action/" + atsIds + "/details';"));
@@ -59,17 +59,14 @@ public class ActionUiResourceTest extends AbstractRestTest {
@Test
public void getActionDetails() throws Exception {
- Collection<TeamWorkFlowArtifact> wfs = DemoUtil.getSawCommittedWfs();
- TeamWorkFlowArtifact teamWf = wfs.iterator().next();
+ TeamWorkFlowArtifact teamWf = DemoUtil.getSawCodeCommittedWf();
String html = getAndCheck("/ats/ui/action/" + teamWf.getAtsId() + "/details", MediaType.TEXT_HTML_TYPE);
Assert.assertTrue(html.contains("Artifact Type: <b>" + teamWf.getArtifactTypeName() + "</b>"));
}
@Test
public void getActionDetailsError() throws Exception {
- Collection<TeamWorkFlowArtifact> wfs = DemoUtil.getSawCommittedWfs();
- String atsIds = Collections.toString(",", AtsObjects.toAtsIds(wfs));
- String html = getAndCheck("/ats/ui/action/" + atsIds + "/details", MediaType.TEXT_HTML_TYPE);
+ String html = getAndCheck("/ats/ui/action/" + DemoUtil.getSawAtsIds() + "/details", MediaType.TEXT_HTML_TYPE);
Assert.assertTrue(html.contains("can not be found"));
}
@@ -87,10 +84,10 @@ public class ActionUiResourceTest extends AbstractRestTest {
@Test
public void getTransition() throws Exception {
- Collection<TeamWorkFlowArtifact> wfs = DemoUtil.getSawCommittedWfs();
- TeamWorkFlowArtifact teamWf = wfs.iterator().next();
- String html = getAndCheck("/ats/ui/action/" + teamWf.getAtsId() + "/Transition", MediaType.TEXT_HTML_TYPE);
- Assert.assertTrue(html.contains("<input type=\"hidden\" name=\"atsId\" value=\"" + teamWf.getAtsId() + "\">"));
+ String html = getAndCheck("/ats/ui/action/" + DemoUtil.getSawCodeCommittedWf().getAtsId() + "/Transition",
+ MediaType.TEXT_HTML_TYPE);
+ Assert.assertTrue(html.contains(
+ "<input type=\"hidden\" name=\"atsId\" value=\"" + DemoUtil.getSawCodeCommittedWf().getAtsId() + "\">"));
Matcher m = Pattern.compile(".*form action=\"\\/ats\\/action\\/state\" method=\"post\">").matcher(html);
Assert.assertTrue(m.find());
for (String stateName : Arrays.asList("Cancelled", "Completed", "Analyze", "Authorize")) {
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsActionEndpointImplTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsActionEndpointImplTest.java
index a807e03ff4..573ca11b01 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsActionEndpointImplTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsActionEndpointImplTest.java
@@ -20,7 +20,6 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Arrays;
-import java.util.Collection;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.Form;
import javax.ws.rs.core.MediaType;
@@ -35,11 +34,10 @@ import org.eclipse.osee.ats.api.workflow.Attribute;
import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.util.AtsObjects;
+import org.eclipse.osee.ats.demo.api.DemoWorkflowTitles;
import org.eclipse.osee.framework.core.client.OseeClientProperties;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
-import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
@@ -124,7 +122,7 @@ public class AtsActionEndpointImplTest extends AbstractRestTest {
@Test
public void testQueryMulti() throws Exception {
- String name = DemoUtil.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW.replaceAll(" ", "%20");
+ String name = DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW.replaceAll(" ", "%20");
URI uri = UriBuilder.fromUri(getAppServerAddr()).path("/ats/action/query").queryParam("Name", name).build();
JsonArray array = getAndCheckArray(uri);
@@ -143,9 +141,7 @@ public class AtsActionEndpointImplTest extends AbstractRestTest {
@Test
public void testAtsActionsRestCall() throws Exception {
- Collection<TeamWorkFlowArtifact> wfs = DemoUtil.getSawCommittedWfs();
- String atsIds = Collections.toString(",", AtsObjects.toAtsIds(wfs));
- JsonArray array = getAndCheckArray("/ats/action/" + atsIds);
+ JsonArray array = getAndCheckArray("/ats/action/" + DemoUtil.getSawAtsIds());
Assert.assertEquals(3, array.size());
for (JsonElement elment : array) {
JsonObject obj = (JsonObject) elment;
@@ -155,9 +151,7 @@ public class AtsActionEndpointImplTest extends AbstractRestTest {
@Test
public void testAtsActionsDetailsRestCall() throws Exception {
- Collection<TeamWorkFlowArtifact> wfs = DemoUtil.getSawCommittedWfs();
- String atsIds = Collections.toString(",", AtsObjects.toAtsIds(wfs));
- JsonArray array = getAndCheckArray("/ats/action/" + atsIds + "/details");
+ JsonArray array = getAndCheckArray("/ats/action/" + DemoUtil.getSawAtsIds() + "/details");
Assert.assertEquals(3, array.size());
JsonObject obj = (JsonObject) array.iterator().next();
testAction(obj);
@@ -166,7 +160,8 @@ public class AtsActionEndpointImplTest extends AbstractRestTest {
}
private void testAction(JsonObject obj) {
- Assert.assertEquals(DemoUtil.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, obj.get("Name").getAsString());
+ Assert.assertEquals(DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW,
+ obj.get("Name").getAsString());
Assert.assertNotNull(obj.has("uuid"));
Assert.assertNotNull(obj.has("AtsId"));
Assert.assertEquals("/ats/ui/action/" + obj.get("AtsId").getAsString(), obj.get("actionLocation").getAsString());
@@ -174,9 +169,7 @@ public class AtsActionEndpointImplTest extends AbstractRestTest {
@Test
public void testAtsActionRestCall() throws Exception {
- Collection<TeamWorkFlowArtifact> wfs = DemoUtil.getSawCommittedWfs();
- TeamWorkFlowArtifact teamWf = wfs.iterator().next();
- JsonArray array = getAndCheckArray("/ats/action/" + teamWf.getAtsId());
+ JsonArray array = getAndCheckArray("/ats/action/" + DemoUtil.getSawCodeCommittedWf().getAtsId());
Assert.assertEquals(1, array.size());
JsonObject obj = (JsonObject) array.iterator().next();
testAction(obj);
@@ -184,9 +177,7 @@ public class AtsActionEndpointImplTest extends AbstractRestTest {
@Test
public void testAtsActionDetailsRestCall() throws Exception {
- Collection<TeamWorkFlowArtifact> wfs = DemoUtil.getSawCommittedWfs();
- TeamWorkFlowArtifact teamWf = wfs.iterator().next();
- JsonArray array = getAndCheckArray("/ats/action/" + teamWf.getAtsId() + "/details");
+ JsonArray array = getAndCheckArray("/ats/action/" + DemoUtil.getSawCodeCommittedWf().getAtsId() + "/details");
Assert.assertEquals(1, array.size());
JsonObject obj = (JsonObject) array.iterator().next();
testAction(obj);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/OrcsWriterEndpointTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/OrcsWriterEndpointTest.java
index 6453b4f315..18acb70acd 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/OrcsWriterEndpointTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/OrcsWriterEndpointTest.java
@@ -102,6 +102,7 @@ public class OrcsWriterEndpointTest extends AbstractRestTest {
OwArtifact userGroupOwArt = collector.getUpdate().iterator().next();
Artifact userGroupArt = AtsClientService.get().getArtifact(userGroupOwArt.getId());
assertNotNull(userGroupArt);
+ userGroupArt.reloadAttributesAndRelations();
assertEquals("test static id", userGroupArt.getSoleAttributeValue(CoreAttributeTypes.StaticId, null));
assertEquals("test annotation", userGroupArt.getSoleAttributeValue(CoreAttributeTypes.Annotation, null));
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java
index f6a8a439a3..c0a41d0883 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java
@@ -186,7 +186,7 @@ public class AtsQueryImplTest {
// by program
query = queryService.createQuery(WorkItemType.TeamWorkflow);
query.andProgram(program.getId());
- assertEquals(2, query.getResults().size());
+ assertEquals(3, query.getResults().size());
query = queryService.createQuery(WorkItemType.Task);
query.andProgram(program.getId());
@@ -194,22 +194,22 @@ public class AtsQueryImplTest {
query = queryService.createQuery(WorkItemType.TeamWorkflow, WorkItemType.Task);
query.andProgram(program.getId());
- assertEquals(2, query.getResults().size());
+ assertEquals(3, query.getResults().size());
// by insertion
query = queryService.createQuery(WorkItemType.TeamWorkflow, WorkItemType.Task);
query.andInsertion(insertion.getId());
- assertEquals(2, query.getResults().size());
+ assertEquals(3, query.getResults().size());
// by insertion activity
query = queryService.createQuery(WorkItemType.TeamWorkflow, WorkItemType.Task);
query.andInsertionActivity(activity.getId());
- assertEquals(1, query.getResults().size());
+ assertEquals(2, query.getResults().size());
// by work package
query = queryService.createQuery(WorkItemType.TeamWorkflow, WorkItemType.Task);
query.andWorkPackage(wp.getId());
- assertEquals(1, query.getResults().size());
+ assertEquals(2, query.getResults().size());
}
@Test
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java
index 335a526807..ff86ef76b7 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java
@@ -33,6 +33,7 @@ import org.eclipse.osee.ats.api.workflow.ActionResult;
import org.eclipse.osee.ats.api.workflow.IAtsAction;
import org.eclipse.osee.ats.api.workflow.IAtsTask;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.core.client.task.TaskArtifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
@@ -171,9 +172,7 @@ public class DemoTestUtil {
public static Artifact getUncommittedActionWorkflow(DemoWorkType demoWorkType) throws OseeCoreException {
if (unCommittedWorkflows == null) {
unCommittedWorkflows = new HashMap<>();
- for (Artifact art : ArtifactQuery.getArtifactListFromName(
- "SAW (uncommitted) More Reqt Changes for Diagram View", AtsClientService.get().getAtsBranch(),
- EXCLUDE_DELETED)) {
+ for (Artifact art : DemoUtil.getSawUnCommittedTeamWfs()) {
if (art.isOfType(DemoArtifactTypes.DemoCodeTeamWorkflow)) {
unCommittedWorkflows.put(DemoWorkType.Code, art);
} else if (art.isOfType(DemoArtifactTypes.DemoTestTeamWorkflow)) {
@@ -191,8 +190,7 @@ public class DemoTestUtil {
public static Artifact getCommittedActionWorkflow(DemoWorkType demoWorkType) throws OseeCoreException {
if (committedWorkflows == null) {
committedWorkflows = new HashMap<>();
- for (Artifact art : ArtifactQuery.getArtifactListFromName("SAW (committed) Reqt Changes for Diagram View",
- AtsClientService.get().getAtsBranch(), EXCLUDE_DELETED)) {
+ for (Artifact art : DemoUtil.getSawCommittedTeamWfs()) {
if (art.isOfType(DemoArtifactTypes.DemoCodeTeamWorkflow)) {
committedWorkflows.put(DemoWorkType.Code, art);
} else if (art.isOfType(DemoArtifactTypes.DemoTestTeamWorkflow)) {
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java
index 40cf85805b..999b9c4105 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java
@@ -29,6 +29,7 @@ import org.eclipse.osee.ats.core.config.IActionableItemFactory;
import org.eclipse.osee.ats.core.config.IAtsCacheProvider;
import org.eclipse.osee.ats.core.config.ITeamDefinitionFactory;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.orcs.rest.client.OseeClient;
@@ -81,4 +82,8 @@ public interface IAtsClient extends IAtsServices, IAtsNotifier, IAttributeResolv
OseeClient getOseeClient();
+ <T> T getConfigItem(ArtifactToken configToken);
+
+ <T> Collection<T> getConfigItems(ArtifactToken... configTokens);
+
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java
index 3a01f63895..27d6e9f3c8 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java
@@ -546,4 +546,27 @@ public class AtsClientImpl extends AtsCoreServiceImpl implements IAtsClient {
configProvider.clearConfigurationsCaches();
}
+ @SuppressWarnings("unchecked")
+ @Override
+ public <T> T getConfigItem(ArtifactToken configToken) {
+ ArtifactId artifact = getArtifact(configToken.getId());
+ if (artifact != null) {
+ IAtsConfigObject configObject = getConfigItemFactory().getConfigObject(artifact);
+ return (T) configObject;
+ }
+ return null;
+ }
+
+ @Override
+ public <T> Collection<T> getConfigItems(ArtifactToken... configTokens) {
+ List<T> results = new LinkedList<>();
+ for (ArtifactToken art : configTokens) {
+ T configItem = getConfigItem(art);
+ if (configItem != null) {
+ results.add(configItem);
+ }
+ }
+ return results;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsChangeSet.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsChangeSet.java
index 5d7dfbe117..621c5b5566 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsChangeSet.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsChangeSet.java
@@ -26,6 +26,7 @@ import org.eclipse.osee.ats.api.util.IExecuteListener;
import org.eclipse.osee.ats.api.workdef.RuleEventType;
import org.eclipse.osee.ats.api.workdef.RunRuleData;
import org.eclipse.osee.ats.api.workdef.RunRuleResults;
+import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.search.AtsArtifactQuery;
import org.eclipse.osee.ats.core.util.AbstractAtsChangeSet;
@@ -79,7 +80,9 @@ public class AtsChangeSet extends AbstractAtsChangeSet {
for (IAtsObject atsObject : new ArrayList<>(atsObjects)) {
if (atsObject instanceof IAtsWorkItem) {
IAtsWorkItem workItem = (IAtsWorkItem) atsObject;
- if (workItem.getStateMgr() != null && workItem.getStateMgr().isDirty()) {
+ IAtsStateManager stateMgr = workItem.getStateMgr();
+ Conditions.assertNotNull(stateMgr, "StateManager");
+ if (stateMgr != null && stateMgr.isDirty()) {
AtsClientService.get().getStateFactory().writeToStore(asUser, workItem, this);
}
if (workItem.getLog().isDirty()) {
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java
index ec401efc82..8a595ed3a9 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java
@@ -805,6 +805,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
@Override
public void setStateMgr(IAtsStateManager stateMgr) {
+ Conditions.assertNotNull(stateMgr, "StateManager");
AtsClientService.get().getStateFactory().setStateMgr(this, stateMgr);
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
index 0a1d869d81..fc104e6604 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
@@ -138,7 +138,7 @@ public class ActionFactory implements IAtsActionFactory {
// NOTE: The persist of the workflow will auto-email the assignees
IAtsTeamWorkflow teamWf = createTeamWorkflow(action, teamDef, actionableItems, assignees, createdDate, createdBy,
- null, teamWorkflowArtifactType, newActionListener, changes, createTeamOption);
+ teamWorkflowArtifactType, newActionListener, changes, createTeamOption);
return teamWf;
}
@@ -172,7 +172,7 @@ public class ActionFactory implements IAtsActionFactory {
}
@Override
- public IAtsTeamWorkflow createTeamWorkflow(IAtsAction action, IAtsTeamDefinition teamDef, Collection<IAtsActionableItem> actionableItems, List<? extends IAtsUser> assignees, Date createdDate, IAtsUser createdBy, String guid, IArtifactType artifactType, INewActionListener newActionListener, IAtsChangeSet changes, CreateTeamOption... createTeamOption) throws OseeCoreException {
+ public IAtsTeamWorkflow createTeamWorkflow(IAtsAction action, IAtsTeamDefinition teamDef, Collection<IAtsActionableItem> actionableItems, List<? extends IAtsUser> assignees, Date createdDate, IAtsUser createdBy, IArtifactType artifactType, INewActionListener newActionListener, IAtsChangeSet changes, CreateTeamOption... createTeamOption) throws OseeCoreException {
if (!Arrays.asList(createTeamOption).contains(CreateTeamOption.Duplicate_If_Exists)) {
// Make sure team doesn't already exist
@@ -184,22 +184,32 @@ public class ActionFactory implements IAtsActionFactory {
}
}
+ List<IAtsActionableItem> applicableAis = new LinkedList<>();
+ for (IAtsActionableItem ai : actionableItems) {
+ IAtsTeamDefinition teamDefinitionInherited = ai.getTeamDefinitionInherited();
+ if (teamDefinitionInherited != null && teamDef.getId().equals(teamDefinitionInherited.getId())) {
+ applicableAis.add(ai);
+ }
+ }
+
IAtsTeamWorkflow teamWf = null;
- if (guid == null) {
+ ArtifactToken artToken = null;
+ if (newActionListener != null) {
+ artToken = newActionListener.getArtifactToken(applicableAis);
+ }
+ if (artToken == null) {
teamWf = workItemFactory.getTeamWf(changes.createArtifact(artifactType, ""));
} else {
- teamWf = workItemFactory.getTeamWf(changes.createArtifact(artifactType, "", guid));
+ teamWf = workItemFactory.getTeamWf(changes.createArtifact(artToken));
}
setArtifactIdentifyData(action, teamWf, changes);
- // Relate Workflow to ActionableItems (by guid) if team is responsible
- // for that AI
- for (IAtsActionableItem aia : actionableItems) {
- IAtsTeamDefinition teamDefinitionInherited = aia.getTeamDefinitionInherited();
- if (teamDefinitionInherited != null && teamDef.getId().equals(teamDefinitionInherited.getId())) {
- actionableItemManager.addActionableItem(teamWf, aia, changes);
- }
+ /**
+ * Relate Workflow to ActionableItems (by guid) if team is responsible for that AI
+ */
+ for (IAtsActionableItem aia : applicableAis) {
+ actionableItemManager.addActionableItem(teamWf, aia, changes);
}
// Relate WorkFlow to Team Definition (by guid due to relation loading issues)
@@ -288,6 +298,7 @@ public class ActionFactory implements IAtsActionFactory {
}
StateManager stateMgr = new StateManager(workItem, services.getLogFactory(), services);
workItem.setStateMgr(stateMgr);
+
StateManagerUtility.initializeStateMachine(stateMgr, startState, assignees,
createdBy == null ? changes.getAsUser() : createdBy, changes);
IAtsUser user = createdBy == null ? changes.getAsUser() : createdBy;
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java
index 39ca663b90..d49c5a30f9 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java
@@ -49,6 +49,7 @@ import org.eclipse.osee.ats.api.workdef.IRelationResolver;
import org.eclipse.osee.ats.api.workflow.IAtsActionFactory;
import org.eclipse.osee.ats.api.workflow.IAtsBranchService;
import org.eclipse.osee.ats.api.workflow.IAtsImplementerService;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.api.workflow.IAtsWorkItemService;
import org.eclipse.osee.ats.api.workflow.ITeamWorkflowProvidersLazy;
import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory;
@@ -544,4 +545,13 @@ public abstract class AtsCoreServiceImpl implements IAtsServices {
return artifact;
}
+ @Override
+ public IAtsTeamWorkflow getTeamWf(ArtifactToken artifact) {
+ ArtifactId art = getArtifact(artifact);
+ if (art != null) {
+ return getWorkItemFactory().getTeamWf(art);
+ }
+ return null;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCore.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCore.java
index 75f6801410..59d15c8a04 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCore.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCore.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.core.workflow;
-import java.util.logging.Level;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.review.IAtsAbstractReview;
import org.eclipse.osee.ats.api.user.IAtsUser;
@@ -19,7 +18,6 @@ import org.eclipse.osee.ats.api.workdef.IAtsStateDefinition;
import org.eclipse.osee.ats.api.workdef.model.RuleDefinitionOption;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLog;
/**
* @author Donald G. Dunne
@@ -55,17 +53,13 @@ public class WorkflowManagerCore {
protected boolean teamDefHasRule(IAtsWorkItem workItem, RuleDefinitionOption option) {
boolean hasRule = false;
IAtsTeamWorkflow teamWf = null;
- try {
- if (workItem instanceof IAtsTeamWorkflow) {
- teamWf = (IAtsTeamWorkflow) workItem;
- } else if (workItem instanceof IAtsAbstractReview) {
- teamWf = ((IAtsAbstractReview) workItem).getParentTeamWorkflow();
- }
- if (teamWf != null) {
- hasRule = teamWf.getTeamDefinition().hasRule(option.name());
- }
- } catch (Exception ex) {
- OseeLog.log(WorkflowManagerCore.class, Level.SEVERE, ex);
+ if (workItem instanceof IAtsTeamWorkflow) {
+ teamWf = (IAtsTeamWorkflow) workItem;
+ } else if (workItem instanceof IAtsAbstractReview) {
+ teamWf = ((IAtsAbstractReview) workItem).getParentTeamWorkflow();
+ }
+ if (teamWf != null && teamWf.getTeamDefinition() != null) {
+ hasRule = teamWf.getTeamDefinition().hasRule(option.name());
}
return hasRule;
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapter.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapter.java
index 6db4d1186f..019ff17dde 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapter.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapter.java
@@ -57,6 +57,7 @@ public abstract class TransitionHelperAdapter implements ITransitionHelper {
return false;
}
+ @Override
public boolean isOverrideWorkingBranchCheck() {
return false;
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java
index 91e8b15f8a..c045b8b7da 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java
@@ -28,6 +28,7 @@ import org.eclipse.osee.ats.api.task.IAtsTaskService;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.util.IAtsStoreService;
import org.eclipse.osee.ats.api.util.IExecuteListener;
import org.eclipse.osee.ats.api.workdef.IAtsStateDefinition;
import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionService;
@@ -69,6 +70,7 @@ public class TransitionManager implements IAtsTransitionManager, IExecuteListene
private final IAtsWorkDefinitionService workDefService;
private final IAttributeResolver attrResolver;
private final Map<IAtsWorkItem, String> workItemFromStateMap;
+ private final IAtsStoreService storeService;
public TransitionManager(ITransitionHelper helper) {
this.helper = helper;
@@ -78,24 +80,32 @@ public class TransitionManager implements IAtsTransitionManager, IExecuteListene
this.workDefService = helper.getServices().getWorkDefinitionService();
this.attrResolver = helper.getServices().getAttributeResolver();
this.taskService = helper.getServices().getTaskService();
+ this.storeService = helper.getServices().getStoreService();
this.workItemFromStateMap = new HashMap<>();
}
@Override
public TransitionResults handleAll() {
+ IAtsWorkItem workItem = helper.getWorkItems().iterator().next();
+
TransitionResults results = new TransitionResults();
- handleWorkflowReload(results);
- if (results.isCancelled() || !results.isEmpty()) {
- return results;
+ if (storeService.isInDb(workItem)) {
+ handleWorkflowReload(results);
+ if (results.isCancelled() || !results.isEmpty()) {
+ return results;
+ }
}
+
handleTransitionValidation(results);
if (results.isCancelled() || !results.isEmpty()) {
return results;
}
+
handleTransitionUi(results);
if (results.isCancelled() || !results.isEmpty()) {
return results;
}
+
handleTransition(results);
return results;
}
@@ -283,6 +293,7 @@ public class TransitionManager implements IAtsTransitionManager, IExecuteListene
helper.getChangeSet().addExecuteListener(this);
for (IAtsWorkItem workItem : helper.getWorkItems()) {
try {
+
IAtsStateDefinition fromState = workItem.getStateDefinition();
IAtsStateDefinition toState = workItem.getWorkDefinition().getStateByName(helper.getToStateName());
@@ -290,12 +301,14 @@ public class TransitionManager implements IAtsTransitionManager, IExecuteListene
if (!fromState.equals(toState)) {
Date transitionDate = getTransitionOnDate();
IAtsUser transitionUser = getTransitionAsUser();
+
// Log transition
if (fromState.getStateType().isCancelledState()) {
logWorkflowUnCancelledEvent(workItem, toState, helper.getChangeSet(), attrResolver);
} else if (fromState.getStateType().isCompletedState()) {
logWorkflowUnCompletedEvent(workItem, toState, helper.getChangeSet(), attrResolver);
}
+
if (toState.getStateType().isCancelledState()) {
logWorkflowCancelledEvent(workItem, fromState, toState, completedCancellationReason,
transitionDate, transitionUser, helper.getChangeSet(), attrResolver);
@@ -307,7 +320,6 @@ public class TransitionManager implements IAtsTransitionManager, IExecuteListene
completedCancellationReason, transitionDate, transitionUser);
}
logStateStartedEvent(workItem, toState, transitionDate, transitionUser);
-
// Get transition to assignees, do some checking to ensure someone is assigneed and UnAssigned
List<? extends IAtsUser> updatedAssigees = getToAssignees(workItem, toState);
diff --git a/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoArtifactToken.java b/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoArtifactToken.java
index 0f3c79208d..ef41c52b7f 100644
--- a/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoArtifactToken.java
+++ b/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoArtifactToken.java
@@ -20,11 +20,6 @@ import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
*/
public final class DemoArtifactToken {
- public static final ArtifactToken SAW_Test_AI =
- TokenFactory.createArtifactToken(75881049, "SAW Test", AtsArtifactTypes.ActionableItem);
- public static final ArtifactToken SAW_Code_AI =
- TokenFactory.createArtifactToken(733306468, "SAW Code", AtsArtifactTypes.ActionableItem);
-
public static ArtifactToken Process_Team =
TokenFactory.createArtifactToken(55170736, "Process_Team", AtsArtifactTypes.TeamDefinition);
public static ArtifactToken Tools_Team =
@@ -44,8 +39,25 @@ public final class DemoArtifactToken {
TokenFactory.createArtifactToken(20592, "SAW Requirements", AtsArtifactTypes.TeamDefinition);
public static ArtifactToken SAW_SW =
TokenFactory.createArtifactToken(3902389, "SAW SW", AtsArtifactTypes.TeamDefinition);
+
public static ArtifactToken SAW_CSCI_AI =
TokenFactory.createArtifactToken(1866, "SAW CSCI", AtsArtifactTypes.ActionableItem);
+ public static ArtifactToken Timesheet_AI =
+ TokenFactory.createArtifactToken(79465444, "Timesheet", AtsArtifactTypes.ActionableItem);
+ public static ArtifactToken Reader_AI =
+ TokenFactory.createArtifactToken(132213123, "Reader", AtsArtifactTypes.ActionableItem);
+ public static ArtifactToken Adapter_AI =
+ TokenFactory.createArtifactToken(456465465, "Adapter", AtsArtifactTypes.ActionableItem);
+ public static final ArtifactToken CIS_Test_AI =
+ TokenFactory.createArtifactToken(441657987, "CIS Test", AtsArtifactTypes.ActionableItem);
+ public static final ArtifactToken SAW_Test_AI =
+ TokenFactory.createArtifactToken(75881049, "SAW Test", AtsArtifactTypes.ActionableItem);
+ public static final ArtifactToken SAW_Code_AI =
+ TokenFactory.createArtifactToken(733306468, "SAW Code", AtsArtifactTypes.ActionableItem);
+ public static final ArtifactToken SAW_Requirements_AI =
+ TokenFactory.createArtifactToken(668954846, "SAW Req", AtsArtifactTypes.ActionableItem);
+ public static final ArtifactToken SAW_SW_Design_AI =
+ TokenFactory.createArtifactToken(98129283, "SAW SW Design", AtsArtifactTypes.ActionableItem);
// SAW_SW Versions
public static ArtifactToken SAW_Bld_1 =
@@ -85,6 +97,52 @@ public final class DemoArtifactToken {
public static ArtifactToken SAW_Test_AI_WorkPackage_0C =
TokenFactory.createArtifactToken(8141323, "AZp8M1kvEGrRt9tybTwA", "Work Pkg 0C", AtsArtifactTypes.WorkPackage);
+ public static ArtifactToken SAW_Commited_Req_TeamWf = TokenFactory.createArtifactToken(68678945,
+ DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoReqTeamWorkflow);
+ public static ArtifactToken SAW_Commited_Code_TeamWf = TokenFactory.createArtifactToken(745689465,
+ DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoCodeTeamWorkflow);
+ public static ArtifactToken SAW_Commited_Test_TeamWf = TokenFactory.createArtifactToken(4684523,
+ DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoTestTeamWorkflow);
+ public static ArtifactToken SAW_Commited_SWDesign_TeamWf = TokenFactory.createArtifactToken(9784654,
+ DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, AtsArtifactTypes.TeamWorkflow);
+
+ public static ArtifactToken SAW_UnCommited_Code_TeamWf = TokenFactory.createArtifactToken(295510263,
+ DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoCodeTeamWorkflow);
+ public static ArtifactToken SAW_UnCommited_Test_TeamWf = TokenFactory.createArtifactToken(81679355,
+ DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoTestTeamWorkflow);
+ public static ArtifactToken SAW_UnCommited_Req_TeamWf = TokenFactory.createArtifactToken(55313463,
+ DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoReqTeamWorkflow);
+ public static ArtifactToken SAW_UnCommited_SWDesign_TeamWf = TokenFactory.createArtifactToken(8879465,
+ DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, AtsArtifactTypes.TeamWorkflow);
+
+ public static ArtifactToken SAW_UnCommitedConflicted_Code_TeamWf = TokenFactory.createArtifactToken(114579,
+ DemoWorkflowTitles.SAW_UNCOMMITTED_CONFLICTED_REQT_CHANGES_FOR_DIAGRAM_VIEW,
+ DemoArtifactTypes.DemoCodeTeamWorkflow);
+ public static ArtifactToken SAW_UnCommitedConflicted_Req_TeamWf = TokenFactory.createArtifactToken(9876413,
+ DemoWorkflowTitles.SAW_UNCOMMITTED_CONFLICTED_REQT_CHANGES_FOR_DIAGRAM_VIEW,
+ DemoArtifactTypes.DemoReqTeamWorkflow);
+
+ public static ArtifactToken SAW_NoBranch_Code_TeamWf = TokenFactory.createArtifactToken(8885445,
+ DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoCodeTeamWorkflow);
+ public static ArtifactToken SAW_NoBranch_SWDesign_TeamWf = TokenFactory.createArtifactToken(7784565,
+ DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW, AtsArtifactTypes.TeamWorkflow);
+ public static ArtifactToken SAW_NoBranch_Req_TeamWf = TokenFactory.createArtifactToken(5564873,
+ DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoReqTeamWorkflow);
+ public static ArtifactToken SAW_NoBranch_Test_TeamWf = TokenFactory.createArtifactToken(11548766,
+ DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoTestTeamWorkflow);
+
+ /**
+ * Do NOT use these as ways to load Demo workflows by Name. Use DemoUtil instead.
+ */
+ public static final String SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW =
+ "SAW (committed) Reqt Changes for Diagram View";
+ public static final String SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW =
+ "SAW (uncommitted) More Reqt Changes for Diagram View";
+ public static final String SAW_UNCOMMITTED_CONFLICTED_REQT_CHANGES_FOR_DIAGRAM_VIEW =
+ "SAW (uncommitted-conflicted) More Requirement Changes for Diagram View";
+ public static final String SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW =
+ "SAW (no-branch) Even More Requirement Changes for Diagram View";
+
private DemoArtifactToken() {
// Constants
}
diff --git a/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoDbAIs.java b/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoDbAIs.java
deleted file mode 100644
index dd6ed29c09..0000000000
--- a/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoDbAIs.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ats.demo.api;
-
-/**
- * @author Donald G. Dunne
- */
-public enum DemoDbAIs {
- Computers,
- Network,
- Config_Mgmt,
- Reviews,
- Timesheet,
- Website,
- Reader,
- CIS_Code,
- CIS_Test,
- CIS_Requirements,
- CIS_SW_Design,
- SAW_Code,
- SAW_Test,
- SAW_Requirements,
- SAW_SW_Design,
- Adapter;
-
- public String getAIName() {
- return name().replaceAll("_", " ");
- }
-}
diff --git a/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoWorkflowTitles.java b/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoWorkflowTitles.java
new file mode 100644
index 0000000000..54f4a170b4
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoWorkflowTitles.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.demo.api;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class DemoWorkflowTitles {
+
+ private DemoWorkflowTitles() {
+ // utility class
+ }
+
+ /**
+ * Do NOT use these as ways to load Demo workflows by Name. Use DemoUtil instead.
+ */
+ public static final String SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW =
+ "SAW (committed) Reqt Changes for Diagram View";
+ public static final String SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW =
+ "SAW (uncommitted) More Reqt Changes for Diagram View";
+ public static final String SAW_UNCOMMITTED_CONFLICTED_REQT_CHANGES_FOR_DIAGRAM_VIEW =
+ "SAW (uncommitted-conflicted) More Requirement Changes for Diagram View";
+ public static final String SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW =
+ "SAW (no-branch) Even More Requirement Changes for Diagram View";
+
+}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java
index 9bad8d06d0..2360903b63 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java
@@ -237,9 +237,11 @@ public final class AtsConfigEndpointImpl implements AtsConfigEndpointApi {
// add team to ai ids
for (Long aiId : services.getRelationResolver().getRelatedIds(teamDef,
AtsRelationTypes.TeamActionableItem_ActionableItem)) {
- jaxTeamDef.addAi(aiId);
JaxActionableItem jai = configs.getIdToAi().get(aiId);
- jai.setTeamDefId(teamDefId);
+ if (jai != null) {
+ jaxTeamDef.addAi(aiId);
+ jai.setTeamDefId(teamDefId);
+ }
}
return jaxTeamDef;
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java
index e79e18fcf8..ebc15a9fa2 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java
@@ -30,9 +30,11 @@ import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory;
+import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
import org.eclipse.osee.ats.core.util.AtsObjects;
import org.eclipse.osee.ats.rest.IAtsServer;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/access/AtsBranchAccessManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/access/AtsBranchAccessManager.java
index c29153296f..b08b480b4a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/access/AtsBranchAccessManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/access/AtsBranchAccessManager.java
@@ -98,7 +98,11 @@ public class AtsBranchAccessManager implements IArtifactEventListener, EventHand
}
public Collection<IAccessContextId> getContextId(BranchId branch) {
- if (branchUuidToContextIdCache.containsKey(branch)) {
+ return getContextId(branch, true);
+ }
+
+ public Collection<IAccessContextId> getContextId(BranchId branch, boolean useCache) {
+ if (useCache && branchUuidToContextIdCache.containsKey(branch)) {
return branchUuidToContextIdCache.get(branch);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
index e1374f973b..e6910ac7d7 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
@@ -50,6 +50,7 @@ import org.eclipse.osee.ats.core.util.AtsObjects;
import org.eclipse.osee.ats.core.workflow.transition.TransitionManager;
import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.internal.AtsClientService;
+import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.ats.world.WorldXNavigateItemAction;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.BranchId;
@@ -222,12 +223,15 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
atsHealthCheck.validateAtsDatabase(artifacts, results);
}
- // Clear ATS caches
+ /**
+ * Clear ATS caches; Don't run during tests. Not good for tests to have cached copies held and then new
+ * copies loaded. Can result in duplicate non-historical artifacts in JVM.
+ */
for (Artifact artifact : artifacts) {
if (artifact instanceof TeamWorkFlowArtifact) {
AtsTaskCache.decache((TeamWorkFlowArtifact) artifact);
}
- if (!(artifact instanceof User)) {
+ if (!AtsUtil.isInTest() && !(artifact instanceof User)) {
ArtifactCache.deCache(artifact);
}
}
@@ -719,7 +723,8 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) artifact;
try {
BranchId workingBranch = AtsClientService.get().getBranchService().getWorkingBranch(teamArt);
- if (workingBranch != null && !BranchManager.getType(workingBranch).isBaselineBranch()) {
+ if (workingBranch != null && workingBranch.isValid() && !BranchManager.getType(
+ workingBranch).isBaselineBranch()) {
if (!BranchManager.getState(workingBranch).isCommitted()) {
Collection<BranchId> branchesCommittedTo =
AtsClientService.get().getBranchService().getBranchesCommittedTo(teamArt);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java
index 99128a4052..28a3f78b74 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java
@@ -45,6 +45,13 @@ public final class ArtifactCache {
}
}
+ /**
+ * <p>
+ * This should NOT be called by applications unless extreme care is taken. Grabbing an artifact, then decaching, then
+ * searching/loading the artifact by another operation can cause 2 current versions of the same artifact in the JVM.
+ * This can cause problems changing the artifact and/or processing incoming events.
+ * </p>
+ */
public static void deCache(Artifact artifact) {
if (!artifact.isHistorical()) {
ID_CACHE.deCache(artifact);
@@ -54,7 +61,11 @@ public final class ArtifactCache {
/**
* <p>
* De-caches all artifacts from <code>HISTORICAL_CACHE</code> and <code>ACTIVE_CACHE</code> for a specific branch.
- * This method is usually called by a purge operation or at the end of a unit test/suite.
+ * This method is usually called by a purge operation or at the end of a unit test/suite.</br>
+ * </br>
+ * This should NOT be called by applications unless extreme care is taken. Grabbing an artifact, then decaching, then
+ * searching/loading the artifact by another operation can cause 2 current versions of the same artifact in the JVM.
+ * This can cause problems changing the artifact and/or processing incoming events.
* </p>
*
* @param branch of which artifacts (all) will be de-cache'ed.
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java
index b9c251403a..72dd8108f5 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java
@@ -311,7 +311,7 @@ public class ArtifactQueryBuilder {
}
}
- protected Artifact getOrCheckArtifact(QueryType queryType) throws OseeCoreException {
+ public Artifact getOrCheckArtifact(QueryType queryType) throws OseeCoreException {
if (emptyCriteria) {
throw new ArtifactDoesNotExist("received an empty list in the criteria for this search");
}
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java
index 920865de08..47d914ebf7 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java
@@ -159,7 +159,7 @@ public class ArtifactImpl extends AttributeManagerImpl implements Artifact {
@Override
public String getExceptionString() {
try {
- return String.format("artifact type[%s] guid[%s] on branch[%s]", getArtifactType(), getGuid(), getBranch());
+ return String.format("artifact type[%s] id[%s] on branch[%s]", getArtifactType(), getId(), getBranch());
} catch (OseeCoreException ex) {
return Lib.exceptionToString(ex);
}

Back to the top