Parasoft provides some common utility flows are frequently used when creating flows. These flows are located in the Import> Library> Common menu.

The following flows are available:

About Builds

Most DTP reports and REST APIs are based on build IDs. Some widgets provide build-related options during configuration, such as:

  • Latest Build
  • Previous Build
  • First Build in Period

The common flows help you determine this data when building services. See DTP Concepts for additional information about build IDs.

Get Build Delta

Your flows may require two build IDs–a baseline build and a target build. This utility flow will help you to find right builds based on customizable criteria. It validates the input to determine if there is valid baseline build and target build. Double-click each function node and review the comments in the script to understand how they work if you need to make any customizations.

Expected Input Payload

ObjectDescription
msg.payload.filterIdNumber: Filter ID that the build located
msg.payload.baselineBuildIdString: firstBuildInPeriodpreviousBuild, or build ID that uses are looking for.
msg.payload.targetBuildIdString: latestBuild or build ID that users are looking for.

Expected Output Payload

ObjectDescription
msg.baseline 

Matches the build data from the /v1.2/builds REST API if there is a matching baseline build ID.

msg.target 

Matches the build data from the /v1.2/builds REST API if there is a matching target build ID.

Error Output Payload

ObjectDescription

msg.payload

This object contains a standard Error Object from the Extension Designer with a localized error message.


DTP REST API in Use

  • /v1.2/filters - get filter details to validate if the user enters valid filter ID.
  • /v1.2/builds - retrieve build information based on Filter ID entered.

Get Build

If provided with an input filter ID and build ID, this utility flow can help you locate the build detail information based on build criteria that you are looking for, such as  

  • locked build
  • archived build
  • build containing static analysis, test, or coverage

This flow only accepts one build ID and returns one matching build ID. If you want to get the baseline build and target build, you should use the Get Build Delta flow.

Double-click each function node and review the comments in the script to understand how they work if you need to make any customizations.

Expected Input Payload

ObjectDescription
msg.payload.filterId 

Number: Filter ID that Build supposedly located

msg.payload.buildId

String: latestBuild or build ID that users are looking for.

Expected Output Payload

ObjectDescription
msg.buildMatches build data from the /v1.2/builds REST API if there is a matching Build ID.

Error Output Payload

ObjectDescription
msg.payloadContains a standard Error Object from the Extension Designer with localized error message.

DTP REST API in Use

  • /v1.2/filters - get filter details to validate if the user enters valid filter ID.
  • /v1.2/builds - retrieve build information based on Filter ID entered.

Get Project name from Build

This utility flow identifies the project name based on the build ID. If you only have a build ID, but you need filter ID or project name, this utility flow plug directly into the flow to find the project name.

Once you identify project name from this flow, you can get a default filter by looking for the filter with the project name. There is always one filter matching the project name and this filter often contains the necessary data.

Expected Input Payload

ObjectDescription
msg.payload.buildId

String: build ID

Expected Output Payload

ObjectDescription
msg.projectProject name found from /v1.2/runs API.

Error Output Payload

ObjectDescription
msg.payloadContains a standard Error Object from the Extension Designer with localized error message.

DTP REST API in use

  • /v1.2/runs - Identifies what project was reported for the Build ID.

Violation Events

In previous versions of Extension Designer (PIE Slice Designer 1.3.x and older), Parasoft provided built-in PIE events to work easily with new and fixed violations. This flow enables you to work those events back and use them in your service. 

You May Not Need to Deploy this Flow

If you already deployed Static Analysis Violation Reporter for Atlassian JIRA artifact from Artifact Manager to your service, this flow is already bundled into the same event flows and should not be deployed again.

In DTP 5.4.0, the static analysis REST API used to generate trend information was updated. The API now returns data using the build-based paradigm, as opposed to the date-based paradigm. If you updated DTP from 5.3.3 or older, any custom artifacts you may have created using the an older version of the Violation Events flow will need to be updated to use the Violation Events flow shipped with DTP 5.4.x or later.


  • No labels