Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DTPDEVEL and version 5.3.3

...

Event TopicDescription

Anchor
AnalysisMetadata-jms-topic-desc
AnalysisMetadata-jms-topic-desc
AnalysisMetadata

This topic notifies subscribers about changes to analysis metadata in the Violations and Test Explorers.

There are two types of messages with the corresponding JMSType:

  • JMSType = 'violations'
  • JMSType = 'test'

The body of the JSON messages employ the following schema:

Code Block
languagexml
titleAnalysisMetadata Event Schema
{
   "fields": [{
      "newValue": "Retest",
      "fieldName": "action"
      }],
      "type": "test",
      "date": "2015-06-08T17:12:39.323+0000",
      "user": "admin",
      "ids": ["8a981276-e694-337e-b543-2187ab610c95"],
      eventId": 18
}

Anchor
buildreview-jms-event-jms-topic-desc
buildreview-jms-event-jms-topic-desc
BuildReview

This topic notifies subscribers about changes to a build review in the Change Explorer. There are two types of messages with the corresponding JMSType:

  • JMSType = 'Review': Event is thrown when a request to create, update, or delete a review is successfully fulfilled.
  • JMSType = 'Finding': Event is thrown when a request to create, update, or delete a review finding is successfully fulfilled.

Each message also contains a string property 'action' that represents the type of requested action:

  • action = 'Create'
  • action = 'Update'
  • action = 'Delete'

Messages are TextMessage types that contain JSON as the message body. Example:

Code Block
languagexml
titleBuildReview Event Schema
{
  "type": "Review",
  "action": "Create",
  "entity": {
    "id": "36",
    "baselineBuild": {
      "id": "BaselineBuild"
    },
    "targetBuild": {
      "id": "TargetBuild"
    },
    "name": "ReviewName",
    "author": "admin",
    "metadata": {}
  },
  "activity": {
    "author": "admin",
    "date": "2016-12-09T18:50:11Z",
    "changes": {
      "name": "ReviewName"
    }
  }
}


The JSON in the message body is the same JSON that will be returned for a successful request to the corresponding /v1.3/buildReviews or /v1.3/buildReviews/{id}/findings REST endpoint.

See REST API for more information about the REST endpoint, including how to provide REST authentication.


DataCollector

Notifies subscribers about events created from Data Collector. There are three types of messages with the corresponding JMSType:

  • JMSType = ReceivedEvent: Event is thrown when Data Collector receives the report and starts to process it.
  • JMSType = ProcessedEvent: Event is thrown when Data Collector successfully finishes processing the report.
  • JMSType = ErroredEvent: Event is thrown when Data Collector encounters an error while processing the report.

The body of the JSON messages employ the following schema:

Code Block
languagexml
titleDataCollector Event Schema
{
   "reportFileName":"javaStaticAnalysisRun007.xml",
   "eventTime":"2014-07-10 16:31:04",
   "status":"ReceivedEvent"
}

For ProcessedEvent, the body of JSON includes additional information.

Code Block
languagexml
{
   "reportFileName": "em.xml",
   "eventTime": "2014-09-30 15:20:06",
   "status": "ProcessedEvent",
   "fixedViolationsCount": 0,
   "newViolationsCount": 391,
   "suppressedViolationsCount": 48,
   "violationsCount": 439,
   "runConfigurationId": "33",
   "runId": "580",
   "testConfig": {
      "name": "Recommended Rules",
      "machine": "embuilder1.parasoft.com",
      "user": "jenkins",
      "pseudoUrl": "builtin://Recommended Rules"
   },
   "resultsSession": {
      "id": "1412929102566",
      "project": "Environment Manager",
      "time": "2014-09-30T14:44:46-07:00",
      "hasVoils":"true",
      "tag": "Recommended Rules",
      "toolId": "jtest",
      "toolVer": "10.0.6.201406011700",
      "toolName": "Parasoft Jtest",
      "machine": "embuilder1.parasoft.com",
      "lang": "en_US",
      "climode": "true"
      }
}

PrioritizationView

This topic is deprecated in DTP 5.1.4 and later. If you are currently using this topic, we strongly recommend switching to the AnalysisMetdata topic, which also includes changes in the Test Explorer. In the new topic, you can use JMStype = "violations" to filter for messages specifically from the Violations Explorer (called Prioritization View in DTP 5.1.3 and older). See AnalysisMetadata for details.

This topic notifies subscribers about violation priority changes made in the Violations Explorer. There is only one type of message, so JMSType is not required. The message corresponds to an event that modified one or more violations. The JSON contains an event identifier and a list of IDs for all of the modified violations.

Code Block
languagexml
titlePrioritizationView Event Schema
{
   "eventId":"102",
   "violationIds": ["8f522ef1-18bf-38a9-a9ce-dfaa3c91f4f6"],
}

The eventId can be used with the following API endpoint:

/grs/api/v1/staticAnalysisViolations/<violationId>/prioritization/events

An array of the violation’s modification history is returned, and the eventId can be used to correlate what has changed.


Project

This topic notifies subscribers about changes made to Project Center projects. DTP will publish an event each time a project is created, updated, or deleted. Messages are TextMessage types that contain JSON as the message body. Example:

Code Block
languagexml
titlePrioritizationView Event Schema
{
   "eventType":"CREATED",
   "project": ["id":"27","name":"Parasbank"]
}

The JMSType values are:

  • CREATED
  • UPDATED
  • DELETED

Each message also contains a string property projectName, which is the name of the project. You can use this string property and the JMSType to create a message selector. In the following example, a message selector detects when any project is created:

JMSType = 'CREATED'

In the following example, a message selector detects when only the "Parabank" project is updated:

JMSType = 'UPDATED' and projectName = 'Parabank'

Anchor
extending-project-event-with-rest-api
extending-project-event-with-rest-api
Extending the Project Event Topic with the REST API

You can use the /v1/projects/{id} REST endpoint to retrieve additional project information, such as the state of the project or its end date, after detecting that it has been created or updated.

For example, assume that the project ID for the updated "Parabank" project in the previous example is 27. You could apply a GET to this URL, substituting the proper host and port:

https://yourserver:8443/grs/api/v1/projects/27

See REST API for more information about the REST endpoint, including how to provide REST authentication.

ProjectCenter

This topic notifies subscribers about changes made to Project Center entities, including tasks, requirements, and defects.

When a change is made, Project Center will publish a message that describes the details of the change for each entity directly affected. Messages are TextMessages that contain JSON as the String message body. The type of entity affected by the change is indicated by the value of the message header JMSType:

  • RequirementEvent
  • DefectEvent
  • TaskEvent
  • TestingSessionEvent
  • ScenarioEvent
  • ScenarioRunEvent

Subscribers can use this header as part of their message selector. For example:

JMSType = 'RequirementEvent'

...