GSA / ITDB-schema

IT Dashboard submissions schema, documentation and example files.
18 stars 24 forks source link

Add Project/Activities Results in Unexpected Response #413

Open kengineer opened 4 years ago

kengineer commented 4 years ago

As part of a monthly major business case submission last month we added a new project with activities. We received a success response with the generated OMB IDs for the project and activities but these values were in an XML node that do not exist in the schema or sample XML responses.

Here is a portion of what we submitted:

<operations xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.itdashboard.gov/service">
    <investmentInformation uniqueInvestmentIdentifier="429-000008400">
        <monthlySubmission>
            <addProject>
                <agencyProjectId>1830</agencyProjectId>
                <addProjectActivities>
                    <addProjectActivity>
                        <agencyActivityId>389</agencyActivityId>
                        <activityName>Vogtle </activityName>
                        <activityDescription>Vogtle Dashboard is a tool that leverages existing data/reports designed to serve information needs of various stakeholders (executives, BC’s, tech staff / inspectors, licensee, public, commission) with drill down capability.</activityDescription>
                        <structureId>1830.1</structureId>
                        <plannedStartDate>2019-10-01</plannedStartDate>
                        <projectedStartDate>2019-10-01</projectedStartDate>
                        <actualStartDate>2019-10-01</actualStartDate>
                        <plannedTotalCost>0.150000</plannedTotalCost>
                        <projectedTotalCost>0.150000</projectedTotalCost>
                        <plannedCompletionDate>2020-03-31</plannedCompletionDate>
                        <projectedCompletionDate>2020-03-31</projectedCompletionDate>
                    </addProjectActivity>
                    <addProjectActivity>
                        <agencyActivityId>390</agencyActivityId>
                        <activityName>Inspections and Licensing</activityName>
                        <activityDescription>The scope of this activity is to improve reactor safety program data (Licensing and Inspections) analytics and decision support to better serve internal and external stakeholders in a way that is harmonized across the mission area.</activityDescription>
                        <structureId>1830.2</structureId>
                        <plannedStartDate>2020-02-06</plannedStartDate>
                        <projectedStartDate>2020-02-06</projectedStartDate>
                        <actualStartDate>2020-02-06</actualStartDate>
                        <plannedTotalCost>0.591332</plannedTotalCost>
                        <projectedTotalCost>0.591332</projectedTotalCost>
                        <plannedCompletionDate>2020-07-31</plannedCompletionDate>
                        <projectedCompletionDate>2020-07-31</projectedCompletionDate>
                    </addProjectActivity>
                    <addProjectActivity>
                        <agencyActivityId>391</agencyActivityId>
                        <activityName>Data Analytics</activityName>
                        <activityDescription>The scope of this activity is to analyze, clean, transform, and reformat data pertaining to Reactor Safety Program</activityDescription>
                        <structureId>1830.3</structureId>
                        <plannedStartDate>2020-04-15</plannedStartDate>
                        <projectedStartDate>2020-04-15</projectedStartDate>
                        <plannedTotalCost>0.350000</plannedTotalCost>
                        <projectedTotalCost>0.350000</projectedTotalCost>
                        <plannedCompletionDate>2020-09-30</plannedCompletionDate>
                        <projectedCompletionDate>2020-09-30</projectedCompletionDate>
                    </addProjectActivity>
                </addProjectActivities>
            </addProject>
        </monthlySubmission>
    </investmentInformation>
</operations>

According to the schema and sample XML files, we are expecting the response to return something similar to the following:

<?xml version="1.0" encoding="UTF-8"?>
<sr:operationResults xmlns="http://www.itdashboard.gov/service"
                     xmlns:businessCase-add="urn:us:gov:businessCase-add"
                     xmlns:businessCase-update="urn:us:gov:businessCase-update"
                     xmlns:businessCase-response="urn:us:gov:businessCase-response"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xmlns:sr="http://www.itdashboard.gov/serviceResponse"
                     xsi:schemaLocation="http://www.itdashboard.gov/serviceResponse ../Exchange/serviceResponse.xsd">
  <sr:investment uniqueInvestmentIdentifier="000-000000000">
    <sr:success>
      <sr:addProjectResult id="String">
        <sr:project>
          <sr:projectId>0</sr:projectId>
          <sr:agencyProjectId>a</sr:agencyProjectId>
          <sr:projectDetail>
            <sr:uniqueProjectId>a</sr:uniqueProjectId>
            <sr:projectName>a</sr:projectName>
            <sr:objectivesExpectedOutcomes>a</sr:objectivesExpectedOutcomes>
            <sr:projectStartDate>1970-01-01</sr:projectStartDate>
            <sr:projectCompletionDate>1970-01-01</sr:projectCompletionDate>
            <sr:projectLifeCycleCost>10000</sr:projectLifeCycleCost>
            <sr:SDLCmethodology>2</sr:SDLCmethodology>
            <sr:releaseEverySixMo>no</sr:releaseEverySixMo>
            <sr:releaseEverySixMoComment>a</sr:releaseEverySixMoComment>
            <sr:productionDeploymentDate>1970-01-01</sr:productionDeploymentDate>
            <sr:fundedBy>TMF</sr:fundedBy>
            <sr:commercialSolutionsCosts>This is a text field 1.</sr:commercialSolutionsCosts>
            <sr:commercialSolutionsAdoption>This is a text field 2.</sr:commercialSolutionsAdoption>
            <sr:commercialSolutionsReasoning>This is a text field 3.</sr:commercialSolutionsReasoning>
            <sr:isActive>deactivated</sr:isActive>
          </sr:projectDetail>
          <sr:projectActivities>
            <sr:projectActivity>
              <sr:activityId>0</sr:activityId>
              <sr:agencyActivityId>a</sr:agencyActivityId>
              <sr:uniqueProjectId>a</sr:uniqueProjectId>
              <sr:activityName>a</sr:activityName>
              <sr:activityDescription>a</sr:activityDescription>
              <sr:structureId>String</sr:structureId>
              <sr:plannedStartDate>1970-01-01</sr:plannedStartDate>
              <sr:projectedStartDate>1970-01-01</sr:projectedStartDate>
              <sr:actualStartDate>1970-01-01</sr:actualStartDate>
              <sr:plannedCompletionDate>1970-01-01</sr:plannedCompletionDate>
              <sr:projectedCompletionDate>1970-01-01</sr:projectedCompletionDate>
              <sr:actualCompletionDate>1970-01-01</sr:actualCompletionDate>
              <sr:plannedTotalCost>10000</sr:plannedTotalCost>
              <sr:projectedTotalCost>10000</sr:projectedTotalCost>
              <sr:actualTotalCost>10000</sr:actualTotalCost>
              <sr:isActive>active</sr:isActive>
            </sr:projectActivity>
          </sr:projectActivities>
        </sr:project>
      </sr:addProjectResult>
      <sr:message>String</sr:message>
    </sr:success>
  </sr:investment>
</sr:operationResults>

However the response we get looks more like this:

<?xml version="1.0" encoding="UTF-8"?>
<sr:operationResults xmlns:sr="http://www.itdashboard.gov/serviceResponse" xmlns:businessCase-response="urn:us:gov:businessCase-response" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.itdashboard.gov/serviceResponse serviceResponse.xsd" validateOnlyIndicator="false" submissionId="1879714">
  <sr:investment uniqueInvestmentIdentifier="429-000008400">
    <sr:success>
      <!-- ******* We thought this would be addProjectResult  *******--->
      <sr:reviseAddInvestmentProjectResult id="">
        <sr:project>
          <sr:projectId>18240</sr:projectId>
          <sr:agencyProjectId>1830</sr:agencyProjectId>
          <sr:projectDetail>
            <sr:uniqueProjectId>1830</sr:uniqueProjectId>
            <sr:projectName>Mission Analytics Portal (MAP) </sr:projectName>
            <sr:projectGoal>The objective of MAP is to improve reactor safety program data analytics to serve internal and external stakeholders in a consistent way across mission area. The initial focus of MAP is for tools that all NRC staff can easily access.</sr:projectGoal>
            <sr:projectStartDate>2019-10-01</sr:projectStartDate>
            <sr:projectCompletionDate>2020-09-30</sr:projectCompletionDate>
            <sr:projectLifeCycleCost>1.091332</sr:projectLifeCycleCost>
            <sr:softwareProject>yes</sr:softwareProject>
            <sr:isActive>active</sr:isActive>
          </sr:projectDetail>
          <sr:projectMetric>
            <sr:newOrExisting>new</sr:newOrExisting>
            <sr:newMetric>
              <sr:description>MAP Uptime
</sr:description>
              <sr:unitOfMeasure>percent </sr:unitOfMeasure>
              <sr:measurementCondition>Over target</sr:measurementCondition>
            </sr:newMetric>
            <sr:deploymentTarget>98.00</sr:deploymentTarget>
          </sr:projectMetric>
          <sr:projectActivities>
            <sr:projectActivity>
              <sr:activityId>127313</sr:activityId>
              <sr:agencyActivityId>389</sr:agencyActivityId>
              <sr:uniqueProjectId>1830</sr:uniqueProjectId>
              <sr:activityName>Vogtle </sr:activityName>
              <sr:activityDescription>Vogtle Dashboard is a tool that leverages existing data/reports designed to serve information needs of various stakeholders (executives, BC’s, tech staff / inspectors, licensee, public, commission) with drill down capability.</sr:activityDescription>
              <sr:structureId>1830.1</sr:structureId>
              <sr:plannedStartDate>2019-10-01</sr:plannedStartDate>
              <sr:projectedStartDate>2019-10-01</sr:projectedStartDate>
              <sr:actualStartDate>2019-10-01</sr:actualStartDate>
              <sr:plannedCompletionDate>2020-03-31</sr:plannedCompletionDate>
              <sr:projectedCompletionDate>2020-03-31</sr:projectedCompletionDate>
              <sr:plannedTotalCost>0.150000</sr:plannedTotalCost>
              <sr:projectedTotalCost>0.150000</sr:projectedTotalCost>
              <sr:isActive>active</sr:isActive>
            </sr:projectActivity>
            <sr:projectActivity>
              <sr:activityId>127314</sr:activityId>
              <sr:agencyActivityId>390</sr:agencyActivityId>
              <sr:uniqueProjectId>1830</sr:uniqueProjectId>
              <sr:activityName>Inspections and Licensing</sr:activityName>
              <sr:activityDescription>The scope of this activity is to improve reactor safety program data (Licensing and Inspections) analytics and decision support to better serve internal and external stakeholders in a way that is harmonized across the mission area.</sr:activityDescription>
              <sr:structureId>1830.2</sr:structureId>
              <sr:plannedStartDate>2020-02-06</sr:plannedStartDate>
              <sr:projectedStartDate>2020-02-06</sr:projectedStartDate>
              <sr:actualStartDate>2020-02-06</sr:actualStartDate>
              <sr:plannedCompletionDate>2020-07-31</sr:plannedCompletionDate>
              <sr:projectedCompletionDate>2020-07-31</sr:projectedCompletionDate>
              <sr:plannedTotalCost>0.591332</sr:plannedTotalCost>
              <sr:projectedTotalCost>0.591332</sr:projectedTotalCost>
              <sr:isActive>active</sr:isActive>
            </sr:projectActivity>
            <sr:projectActivity>
              <sr:activityId>127315</sr:activityId>
              <sr:agencyActivityId>391</sr:agencyActivityId>
              <sr:uniqueProjectId>1830</sr:uniqueProjectId>
              <sr:activityName>Data Analytics</sr:activityName>
              <sr:activityDescription>The scope of this activity is to analyze, clean, transform, and reformat data pertaining to Reactor Safety Program 
</sr:activityDescription>
              <sr:structureId>1830.3</sr:structureId>
              <sr:plannedStartDate>2020-04-15</sr:plannedStartDate>
              <sr:projectedStartDate>2020-04-15</sr:projectedStartDate>
              <sr:plannedCompletionDate>2020-09-30</sr:plannedCompletionDate>
              <sr:projectedCompletionDate>2020-09-30</sr:projectedCompletionDate>
              <sr:plannedTotalCost>0.350000</sr:plannedTotalCost>
              <sr:projectedTotalCost>0.350000</sr:projectedTotalCost>
              <sr:isActive>active</sr:isActive>
            </sr:projectActivity>
          </sr:projectActivities>
        </sr:project>
      </sr:reviseAddInvestmentProjectResult>
    </sr:success>
  </sr:investment>
</sr:operationResults>

Notice the added project and activities is in the XML node "reviseAddInvestmentProjectResult" rather than "addProjectResult". I cannot find reference to this node anywhere in the schema or sample XML files. Is this a bug in the response or the schema?

Attached is the full requests and response.

RequestResponse.zip

Thanks, Ken Nehring Supporting NRC

mayuri-khatri commented 4 years ago

Hi Ken,

Thank you for your question. We have added a work item to address this issue to the Product Owner's backlog. Before we can prioritize the item, could you please let us know if this is causing any issues on your end, and if so, what it impacts?

Thank you, Mayuri ITDB Support

kengineer commented 4 years ago

The issue it is causing is our tool that is used to submit requests is unable to read and store the ITDB generated activity IDs because they are not where they are expected to be in the response. Having that ID in our system is what indicates that the activity has been added to the ITDB. So on subsequent requests, since we don't have the ID in our database, we submit the activities as an "add" again instead of an "update" and get an error response from the ITDB because the agency ID already exists in the ITDB.

The workaround for us is once we receive that error we then query the ITDB for the projects under the investment we're submitting, get the IDs, and then update our database manually.

This is not a common occurrence as activities are not added with every submission, but since it doesn't happen that often, when it does it occur it becomes an exercise in hunting down the problem until we realize it was the issue we dealt with a few months ago.

Thanks, Ken

mayuri-khatri commented 4 years ago

Hi Ken,

Thank you for providing this information. We are notifying the vendor community to understand the full impact that this issue has and that subsequent changes to correct it will have. After prioritizing the work item to correct the issue, we will provide an update.

Thank you, Mayuri ITDB Support