Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Groovy script can be written for many configuration values on specific step or gate. Additionally, gate or step can be skipped by providing Precondition groovy script as well. All such groovy script has access to various variables and methods listed below on this page. For some samples of such scripts, see Groovy Script Examples.

Additionally, you can find the JavaDoc for the necessary classes here: https://flexagon.com/function-sdk/6.5/

FlexDeploy allows for finding such variables and methods using Variable Lookup help. Prior versions allowed such help with use of Image Removed drop-down next to script input.

...

Variable

...

Description

...

ReleaseName

...

Name of the release provided when created

...

SnapshotId

...

Internal id value of Snapshot.

...

SnapshotName

...

Name of the snapshot (auto generated by date and time when created)

...

SnapshotDuplicateFilesFlag

...

True if there are duplicate files in the snapshot

...

SnapshotDescription

...

Description of the snapshot

...

StageExecutionId

...

ID of the execution

...

PipelineDefinitionId

...

Pipeline Id.

...

PipelineName

...

Pipeline name.

...

stgexec

...

Allows access to execution details for Gate, Step, Deploy or Utility workflows.

This variable was previously called FD_Release, which will continue to work but is deprecated now.

...

stgexecinfo

...

Allows access to details entered by user on Stage Execution Info.

It will not show any default values or FlexFields or WorkFlowInputs that are not set in the Stage Execution Info popup (The Paper Clip on the release dashboard screen)

...

topology

...

Allows access to properties within Topology Integration Accounts such as Source Control, Change Management, Cloud, or other tools. 

...

release

...

Returns Release object with methods - getReleaseName(), getReleaseDefinitionId(), getDescription(). These are details of the Release.

...

snapshot

...

Returns Snapshot object with methods - getSnapshotId(), getReleaseDefinitionId(), getSnapshotName(), getDescription(), getDuplicateFilesFlag(), getCreatedBy(). These are details of the Snapshot being executed. getCreatedBy was added as part of 5.4.0.1.

...

deploystate

...

Allows access to methods to compare an incoming snapshot to the projects or packages currently deployed on a stage.

...

scanresult

...

Allows access to methods to retrieve ScanResult objects. These results can be further filtered by environment or project and environment.

...

<Release Property Code>

...

All release properties are exposed as variables.

...

<Snapshot Variable Code>

...

All release snapshot variables are exposed as variables.

Methods for stgexec variable.

...

Method

...

Description

...

stgexec.getEnvironmentCode()

...

returns environment code

e.g. "DEV"

...

stgexec.getReleaseName()

...

returns the name of the release

e.g "December Release"

...

stgexec.getSnapshotName()

...

returns the name of the snapshot

e.g. 12-04-2019 16:21:18

...

stgexec.getProjectStageExecution(projectId, packageName)

...

returns ProjectStageExecution object for given a project id and package name. Both project id and package name must match.

...

stgexec.getProjectStageExecution(projectName, packageName)

...

returns ProjectStageExecution object for given a project name and package name. Both project name and package name must match.

...

stgexec.getSnapshotProjects()

...

returns list of ReleaseProjectVersion objects in the snapshot.

...

stgexec.getSnapshotProjectsAsString()

...

returns all projects in snapshot concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

...

stgexec.getSnapshotDeployedProjects()

...

returns list of ReleaseProjectVersion objects in the snapshot which were deployed successfully.

...

stgexec.getSnapshotDeployedProjectsAsString()

...

returns all successfully deployed projects concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

...

stgexec.getSnapshotFailedProjects()

...

returns list of ReleaseProjectVersion objects in the snapshot which failed to deploy.

...

stgexec.getSnapshotFailedProjectsAsString()

...

returns all failed projects concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

...

stgexec.getSnapshotSkippedProjects()

...

returns list of ReleaseProjectVersion objects in the snapshot which were skipped.

...

stgexec.getSnapshotSkippedProjectsAsString()

...

returns all skipped projects concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

...

stgexec.getSnapshotNotAttemptedProjects()

...

returns list of ReleaseProjectVersion objects in the snapshot which were not attempted.

...

stgexec.getSnapshotNotAttemptedProjectsAsString()

...

returns all not attempted projects concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

...

stgexec.isAnyDeployFailed()

...

returns true if any projects failed to deploy or submit.

...

stgexec.isAnyDeployFailed(groupName)

...

returns true if any projects in a specific group of projects failed to deploy or submit.

returns false if the group doesn't exist or if the group doesn't have any failed project deployments.

...

stgexec.isAnyDeployOrUtilityFailed()

...

returns true if any deploy or utility workflows failed.

...

stgexec.isAnyDeployOrUtilityFailed(groupName)

...

returns true if any deploy or utility workflows in a specific group failed.

returns false if the group doesn't exist or if the group doesn't have any failed projects.

...

stgexec.isAnyUtilityFailed()

...

returns true if any utility workflows failed.

...

stgexec.isAnyUtilityFailed(groupName)

...

returns true if any utility workflows in a specific group failed.

returns false if the group doesn't exist or if the group doesn't have any failed utility projects.

...

stgexec.isProjectDeployed(projectId)

...

returns true only if project was deployed successfully. If partial deployment project, then if any package failed, this will return false, but if some packages were skipped and some deployed successfully this will still return true.

...

stgexec.isProjectDeployed(projectId, packageName)

...

returns true if a project is deployed, given the project id and package name. If package name is not supplied, this will behave same as stgexec.isProjectDeployed(projectId) method.

...

stgexec.isProjectDeployed(projectName)

...

returns true only if project was deployed successfully. If partial deployment project, then if any package failed, this will return false, but if some packages were skipped and some deployed successfully this will still return true.

...

stgexec.isProjectDeployed(projectName, packageName)

...

returns true if a project is deployed, given the project name and package name. If package name is not supplied, this will behave same as stgexec.isProjectDeployed(projectName) method.

...

stgexec.isProjectFailed(projectId)

...

returns true if a project failed to deploy or submit. if skipped or not attempted, this will return false. If partial deployment project, then if any package failed, this will return true.

...

stgexec.isProjectFailed(projectId, packageName)

...

returns true if a project failed to deploy, given the project id and package name. If package name is not supplied, this will behave same as stgexec.isProjectFailed(projectId).

...

stgexec.isProjectFailed(projectName)

...

returns true if a project failed to deploy or submit. if skipped or not attempted, this will return false. If partial deployment project, then if any package failed, this will return true.

...

stgexec.isProjectFailed(projectName, packageName)

...

returns true if a project failed to deploy, given the project name and package name. If package name is not supplied, this will behave same as stgexec.isProjectFailed(projectName).

...

stgexec.isProjectSkipped(projectId)

...

returns true if project is skipped. If partial deployment project, then if any package is skipped, this method will return true.

...

stgexec.isProjectSkipped(projectId, packageName)

...

returns true if a project is skipped, given the project id and package name. If package name is not supplied then this method will behave same as stgexec.isProjectSkipped(projectId).

...

stgexec.isProjectSkipped(projectName)

...

returns true if project is skipped. If partial deployment project, then if any package is skipped, this method will return true.

...

stgexec.isProjectSkipped(projectName, packageName)

...

returns true if a project is skipped, given the project name and package name. If package name is not supplied then this method will behave same as stgexec.isProjectSkipped(projectName).

...

stgexec.isProjectNotAttempted(projectId)

...

returns true if project was not attempted. If partial deployment project, then if any package is not attempted, this method will return true.

...

stgexec.isProjectNotAttempted(projectId, packageName)

...

returns true if a project was not attempted, given the project id and package name. If package name is not supplied then this method will behave same as stgexec.isProjectNotAttempted(projectId).

...

stgexec.isProjectNotAttempted(projectName)

...

returns true if project was not attempted. If partial deployment project, then if any package is not attempted, this method will return true.

...

stgexec.isProjectNotAttempted(projectName, packageName)

...

returns true if a project was not attempted, given the project name and package name. If package name is not supplied then this method will behave same as stgexec.isProjectNotAttempted(projectName).

...

stgexec.getGateStatus(gateName)

...

returns gate status String, "SUCCESSFUL", "RUNNING", "FAILED" or null if the gate name doesn't match or doesn't yet have a status.

note that Skipped steps that were FAILED will still return FAILED.

If an invalid gate name is given or the gate hasn't run yet, the status will be null.

...

isGateSuccessful(gateName)

...

returns true if gate status is SUCCESSFUL.

...

isGateFailed(gateName)

...

returns true if gate status is FAILED.

...

isGateSkipped(gateName)

...

returns true if gate status is PRECOND_SKIPPED.

...

isAnyGateFailed()

...

returns true if any gate failed.

...

isAnyGateSkipped()

...

returns true if any gate was skipped.

...

stgexec.getStepStatus(stepName)

...

returns step status String, "SUCCESSFUL", "RUNNING", "FAILED" or null if the gate name doesn't match or doesn't yet have a status.

If an invalid step name is given or the step hasn't run yet, the status will be null.

...

isStepSuccessful(stepName)

...

returns true if step status is SUCCESSFUL.

...

isStepFailed(stepName)

...

returns true if step status is FAILED.

...

isStepSkipped(stepName)

...

returns true if step status is PRECOND_SKIPPED.

...

isAnyStepFailed()

...

returns true if any step failed.

...

isAnyStepSkipped()

...

return true if any step was skipped.

...

stgexec.getProjectWorkflowOutputValues(outputName)

...

returns an array of deploy workflow output values with the given output name irrespective of project.

e.g. [1234123]

Note that any encrypted workflow outputs will return as "******"

...

stgexec.getProjectWorkflowOutputValues(projectName, outputName)

...

returns an array of deploy workflow output values with the given output name for the given project name.

e.g. [1234123]

Note that any encrypted workflow outputs will return as "******"

...

stgexec.getProjectWorkflowOutputMap(projectId)

...

returns a map of deploy workflow output values for the given project id. Key of map is output name and value is list of output values.

e.g. [OP1:[1,3], ENCOP2:[******, ******], BOP3:[false], DBOP4:[123.456], INOP5:[1234,123]]

Note that any encrypted workflow outputs will return as "******"

...

stgexec.getProjectWorkflowOutputMap(projectName)

...

returns a map of deploy workflow output values for the given project name. Key of map is output name and value is list of output values.

e.g. [OP1:[1,3], ENCOP2:[******, ******], BOP3:[false], DBOP4:[123.456], INOP5:[1234,123]]

Note that any encrypted workflow outputs will return as "******"

...

stgexec.getProjectBuildWorkflowOutputValues(outputName)

...

returns an array of build output values with the given output name irrespective of project.

e.g. [1234123]

Note that any encrypted workflow outputs will return as "******"

...

 stgexec.getProjectBuildWorkflowOutputValues(projectName, outputName)

...

returns an array of build output values with the given output name for the given project name.

e.g. [1234123]

Note that any encrypted workflow outputs will return as "******"

...

stgexec.getProjectBuildWorkflowOutputMap(projectId)

...

returns a map of build output values for the given project id. Key of map is output name and value is list of output values.

e.g. [OP1:[1,3], ENCOP2:[******, ******], BOP3:[false], DBOP4:[123.456], INOP5:[1234,123]]

Note that any encrypted workflow outputs will return as "******"

...

stgexec.getProjectBuildWorkflowOutputMap(projectName)

...

returns a map of build output values for the given project name. Key of map is output name and value is list of output values.

e.g. [OP1:[1,3], ENCOP2:[******, ******], BOP3:[false], DBOP4:[123.456], INOP5:[1234,123]]

Note that any encrypted workflow outputs will return as "******"

...

stgexec.getGateTaskUserInfo(gateName)

...

Returns TaskUserInfo object for a given Manual or Externa gate  name.

...

stgexec.getStepTaskUserInfo(stepName)

...

Returns TaskUserInfo object for a given Manual task step name.

...

Method

...

Description

...

getRelatedTicket()

...

returns related ticket associated to the stage.

...

getRelatedTicket(projectId)

...

returns related ticket associated to snapshot project or the stage.  If not found, related ticket is returned from the stage.

...

getRelatedTicket(projectId, packageName)

...

returns related ticket associated to the snapshot project and package.  If not found, related ticket is returned from the stage.

...

setRelatedTicket(ticketNumber)

...

sets the related ticket field on stage.

...

setRelatedTicket(projectId, ticketNumber)

...

sets the related ticket field for the snapshot project on the stage.

...

setRelatedTicket(projectId, packageName, ticketNumber)

...

sets the related ticket field for the snapshot project and package on the stage.

...

getWorkflowInputs(inputName)

...

returns list of workflow deploy workflow inputs for input name irrespective of project.

...

getWorkflowInputMap(projectName)

...

returns a map of deploy workflow input values for the given project name. Key of map is input name and value is list of input values.

...

getWorkflowInputMap(projectId)

...

returns a map of deploy workflow input values for the given project id. Key of map is input name and value is list of input values.

...

getWorkflowInputMap(projectId, packageName)

...

returns a map of deploy workflow input values for the given project id and package name. Key of map is input name and value is list of input values.

...

getWorkflowInputMap(projectName, packageName)

...

returns a map of deploy workflow input values for the given project name and package name. Key of map is input name and value is list of input values.

...

getFlexFields(flexfieldCode)

...

returns list of flex field values for code irrespective of project.

...

getFlexFieldMap(projectId)

...

returns a map of flex field values for the given project id. Key of map is flex field code and value is list of flex field values.

...

getFlexFieldMap(projectName)

...

returns a map of flex field values for the given project name. Key of map is flex field code and value is list of flex field values.

...

getFlexFieldMap(projectId, packageName)

...

returns a map of flex field values for the given project id and package name. Key of map is flex field code and value is list of flex field values.

...

getFlexFieldMap(projectName, packageName)

...

returns a map of flex field values for the given project name and package name. Key of map is flex field code and value is list of flex field values.

...

isUserNoOverride(projectId)

...

returns true if the deploy override option is No Override for the snapshot project on the stage.

...

isUserNoOverride(projectId, packageName)

...

returns true if the deploy override option is No Override for the snapshot project and package on the stage.

...

isUserForceDeploy(projectI)

...

returns true if the deploy override option is Force for the snapshot project on the stage.

...

isUserForceDeploy(projectId, packageName)

...

returns true if the deploy override option is Force for the snapshot project and package on the stage.

...

isUserSkipDeploy(projectId)

...

returns true if the deploy override option is Skip for the snapshot project on the stage.

...

isUserSkipDeploy(projectId, packageName)

...

returns true if the deploy override option is Skip for the snapshot project and package on the stage.

...

setUserNoOverride(projectId)

...

removes any previously set deploy option override for the snapshot project on the stage.

...

setUserNoOverride(projectId, packageName)

...

removes any previously set deploy option override for the snapshot project and package on the stage.

...

setUserForceDeploy(projectId)

...

force deploy the snapshot project on the stage.

...

setUserForceDeploy(projectId, packageName)

...

force deploy the snapshot project and package on the stage.

...

setUserSkipDeploy(projectId)

...

skip the deployment for the snapshot project on the stage.

...

setUserSkipDeploy(projectId, packageName)

...

skip the deployment for the snapshot project and package on the stage.

...

setInstanceOverride(projectId, instanceCode)

...

Set target group override (deploy or utility) for specified project id.

If specified target group is not mapped to current environment then execution will be skipped.

This method is to be used for Full Deployment project of All Files Partial Deployment project. If you are using stgexec.getSnapshotProjects(), then just use setInstanceOverride(projectId, packageName, instanceCode) as package name will be null for full project or all files in stgexec.getSnapshotProjects().

...

setInstanceOverride(projectId, instanceCodeList)

...

Set target group overrides (deploy or utility) for specified project id. Execution will only happen against specified target groups (supply java.util.List of String target group codes) if it is mapped to current environment.

Target group codes that are not mapped to current environment will be skipped.

This method is to be used for Full Deployment project of All Files Partial Deployment project. If you are using stgexec.getSnapshotProjects(), then just use setInstanceOverride(projectId, packageName, instanceCode) as package name will be null for full project or all files in stgexec.getSnapshotProjects().

...

setInstanceOverride(projectId, packageName, instanceCode)

...

Set target group overrides (deploy or utility) for specified project id and package name.

If specified target group is not mapped to current environment then execution will be skipped.

This method is to be used for Partial Deployment project where Package is used in release. If you are using stgexec.getSnapshotProjects(), then just use setInstanceOverride(projectId, packageName, instanceCode) as package name will be null for full project or all files in stgexec.getSnapshotProjects().

...

setInstanceOverride(projectId, packageName, instanceCodeList)

...

Set target group overrides (deploy or utility) for specified project id and package name. Execution will only happen against specified target groups (supply java.util.List of String target group codes), if it is mapped to current environment.

Target group codes that are not mapped to current environment will be skipped.

This method is to be used for Partial Deployment project where Package is used in release. If you are using stgexec.getSnapshotProjects(), then just use setInstanceOverride(projectId, packageName, instanceCode) as package name will be null for full project or all files in stgexec.getSnapshotProjects().

...

getInstanceOverride(projectId)

...

Returns List of target group codes configured as overrides.

...

getInstanceOverride(projectId, packageName)

...

Returns List of target group codes configured as overrides.

...

setFlexField(projectId, code, value)

...

Set the value of the flex field for the snapshot project on the stage.

...

setFlexField(projectId, packageName, code, value)

...

Set the value of the flex field for the snapshot project and package on the stage. If package name is null, all the release projects with the matching projectid will be updated with the same value.

...

setWorkflowInput(projectId, code, value)

...

Set the value of the workflow inputs for the snapshot project on the stage.

...

setWorkflowInput(projectId, packageName, code, value)

...

Set the value of the workflow inputs for the snapshot project and package on the stage. If package name is null, all the release projects with the matching projectid will be updated with the same value.

...

Method

...

Description

...

getProjectName()

...

returns the String project name for the current project.

...

getDeployPriority()

...

returns the Integer deploy priority for the current release project.

...

isPartialDeploy()

...

returns the boolean isPartialDeploy flag if the isPartialDeploy instance variable is not null.

...

getIsPartialDeploy()

...

returns the boolean isPartialDeploy flag for the current release project.

...

getPackageName()

...

returns the String package name for the current release project.

...

getProjectGroupNames()

...

returns a list of project group names for the current release project.

...

getProjectId()

...

returns the Long project Id for the current release project.

...

getProjectStreamId()

...

returns the Long project stream Id for the current release project.

...

getProjectStreamName()

...

returns the String project stream name for the current release project.

...

getProjectTypeEnum()

...

returns a ProjectTypeEnum object for the current project.

Possible Values:  GENERAL, EBS, PARTIAL_FILE, PARTIAL_JDBC, OracleForms, ORACLE_DB, ORACLE_BI, ORACLE_APEX, MFT, SALESFORCE, UTILITY, MDS, SAP, and GENERIC

...

getProjectType()

...

returns a ProjectType as String for the current release project.

Possible Values: GENERAL, EBS, PARTIAL_FILE, PARTIAL_JDBC, OracleForms, ORACLE_DB, ORACLE_BI, ORACLE_APEX, MFT, SALESFORCE, UTILITY, MDS, SAP, and GENERIC

...

getProjectVersionId()

...

returns the Long project version id for the current release project.

...

getProjectVersionName()

...

returns the String project version name for the current release project.

...

getRequestAllFiles()

...

returns the String request all files for the current release project.

...

getWorkflowId()

...

Returns deploy or utility workflow id configured on project.

...

getWorkflowName()

...

Returns deploy or utility workflow name configured on project.

...

getInstances()

...

Returns deploy or utility target groups configured on project. This returns target group object with methods like getInstanceID(), getCode(), getName() for topology target group.

...

getFolderPath()

...

Returns folder path where project is configured on project explorer.

...

findProjectWorkflowExecutionData(workflowExecutionId)

...

returns a ProjectWorkflowExecutionData object for the given workflowExecutionId.

...

getRequestStatus()

...

returns the String request status for the current project.

...

getRequestStatusEnum()

...

returns a RequestStatusEnum object for the current project.

Possible Values:  INITIATED("Initiated"), PENDING_APPROVAL("Pending Approval"), SCHEDULED("Scheduled"), REJECTED("Rejected"), READY("Ready"), SUBMITTED("Submitted"), COMPLETED("Completed"), ABORTED("Aborted"), and FAILED("Failed");

...

getSubmitStatus()

...

returns a WorkflowRequestSubmitStatus object for the current project.

Possible Values: SUBMITFAILED, SUBMITTED, SKIPPED, PENDING

...

getWasForced()

...

returns the boolean wasForced flag for the current project.

...

getWorkflowExecutionData()

...

returns a map of output values for the given workflow execution name. Key of map is target group code and value is a ProjectWorkflowExecutionData object.

...

getWorkflowType()

...

returns the String workflow type for the current project.

...

isDeployed()

...

returns the boolean isDeployed flag for the current project.

...

isDeployWorkflow()

...

returns the boolean isDeployWorkflow flag depending on if the workflow type is a deploy workflow for the current project.

...

isFailed()

...

returns the boolean isFailed flag depending on if the workflow is a deploy workflow and the submission or request to deploy has failed or not.

...

isNotAttempted()

...

returns the boolean isNotAttempted flag depending on if the request status and submission status is null.

...

IsPartialDeploy()

...

returns the boolean isPartialDeploy flag for the current project.

...

isRequestAborted()

...

returns the boolean isRequestAborted flag depending on if the requestStatus is equal to RequestStatusEnum.ABORTED.

...

isRequestFailed()

...

returns the boolean isRequestFailed flag depending on if the requestStatus is equal to RequestStatusEnum.ABORTED or RequestStatusEnum.FAILED.

...

isRequestOrSubmitFailed()

...

returns the boolean isRequestOrSubmitFailed flag depending on the result of isSubmitFailed() OR isRequestFailed().

...

isRequestSuccess()

...

returns the boolean isRequestAborted flag depending on if the requestStatus is equal to RequestStatusEnum.COMPLETED

...

isSkipped()

...

returns the boolean isSkipped flag depending on the result of isDeployWorkflow() AND isSubmitSkipped().

...

isSubmitFailed()

...

returns the boolean isSubmitFailed flag depending on if the submitStatus is equal to WorkflowRequestSubmitStatus.SUBMITFAILED

...

isSubmitSkipped()

...

returns the boolean isSubmitSkipped flag depending on if the submitStatus is equal to WorkflowRequestSubmitStatus.SKIPPED

...

isTestWorkflow()

...

returns the boolean isTestWorkflow flag depending on if the project workflow type is "TEST".

...

isUtilityWorkflow()

...

returns the boolean isUtilityWorkflow flag depending on if the project workflow type is "UTILITY".

...

Method

...

Description

...

getInstanceCode()

...

returns the String target group code for the current project stage execution.

...

getInstanceid()

...

returns the Long target group id for the current project stage execution.

...

getOutputValues()

...

returns a map of output values. Key of map is output name and value is the description. 

...

getWorkflowExecutionId()

...

returns the Long workflow execution id for the current project stage execution..

Methods for ReleaseProjectVersion object.

...

Method

...

Description

...

getProjectName()

...

returns the String project name for the current project.

...

getDeployPriority()

...

returns the Integer deploy priority for the current release project.

...

getIsPartialDeploy()

...

returns the Boolean isPartialDeploy flag for the current release project.

...

getPackageName()

...

returns the String package name for the current release project.

...

getProjectGroupNames()

...

returns a list of project group names for the current release project.

...

getProjectId()

...

returns the Long project Id for the current release project.

...

getProjectStreamId()

...

returns the Long project stream Id for the current release project.

...

getProjectStreamName()

...

returns the String project stream name for the current release project.

...

getProjectType()

...

returns a String for the current release project type.

Possible Values: GENERAL, EBS, PARTIAL_FILE, PARTIAL_JDBC, OracleForms, ORACLE_DB, ORACLE_BI, ORACLE_APEX, MFT, SALESFORCE, UTILITY, MDS, SAP, GENERIC, and null (if project has no type)

...

getProjectTypeEnum()

...

returns a ProjectTypeEnum object for the current release project.

Possible Values: GENERAL, EBS, PARTIAL_FILE, PARTIAL_JDBC, OracleForms, ORACLE_DB, ORACLE_BI, ORACLE_APEX, MFT, SALESFORCE, UTILITY, MDS, SAP, GENERIC, and null (if project has no type)

...

getProjectVersionId()

...

returns the Long project version id for the current release project.

...

getProjectVersionName()

...

returns the String project version name for the current release project.

...

getRequestAllFiles()

...

returns the String request all files for the current release project.

...

isMatch(projectId, packageName)

...

returns the boolean isMatch flag depending on if the passed projectId and packageName match this release project's projectId and packageName. 

...

isMatch(projectName, packageName)

...

returns the boolean isMatch flag depending on if the passed projectName and packageName match this release project's projectName and packageName. 

...

isPartialDeploy()

...

returns the boolean isPartialDeploy flag if the isPartialDeploy instance variable is not null.

...

getWorkflowId()

...

Returns deploy or utility workflow id configured on project.

...

getWorkflowName()

...

Returns deploy or utility workflow name configured on project.

...

getInstances()

...

Returns deploy or utility target groups configured on project. This returns target group object with methods like getInstanceID(), getCode(), getName() for topology target group.

...

getFolderPath()

...

Returns folder path where project is configured on project explorer.

Methods for TaskUserInfo object.

...

Method

...

Description

...

getActionByUserName()

...

returns the user name of the person approved the gate/step.

...

getActionByFirstName()

...

returns the first name of the the person approved the gate/step.

...

getActionByLastName()

...

returns the last name of the person approved the gate/step.

...

getActionByEmailAddress()

...

returns the email address of the person approved the gate/step.

Methods for topology object.

...

Method

...

Description

...

topology.getInstanceProperties(instanceCode)

...

returns a Map<String, Object> containing all the properties for the integration account matching the passed target group code. Key of map is a property code and value is the primitive value for that property.

e.g. Git SCM Account [FDGIT_URL: https://github.com/flexagon9/flextest.git, FDGIT_USER: flexagon9, FDGIT_PASSWORD: password123, FDGIT_TIMEOUT: null]

...

topology.getMappedInstances()

...

returns list of target group codes that are mapped to current stage(environment)

...

topology.isMappedToCurrentEnvironment(instanceCode)

...

returns true or false to indicate whether provided target group code is mapped to current stage(environment)

Methods for release object

...

Method

...

Description

...

release.getReleaseName()

...

returns the name of the release

...

release.getReleaseDefinitionId()

...

returns the internal id of the release

...

release.getDescription()

...

returns the description for the release

Methods for snapshot object

...

Method

...

Description

...

snapshot.getSnapshotId()

...

returns the internal id of the snapshot

...

snapshot.getReleaseDeinitionId()

...

returns the internal id of the snapshot's release

...

snapshot.getSnapshotName()

...

returns the snapshot name

...

snapshot.getDescription()

...

returns the snapshot description

...

snapshot.getDuplicateFilesFlag()

...

returns whether the snapshot packages have duplicate files which may have conflicting revisions

Methods for deploystate variable

...

Method

...

Description

...

deploystate.willProjectDeploy(projectId)

...

returns the boolean isProjectDeployed flag, if the project with the given projectId has changes in the snapshot compared to what is already deployed on the current stage.

...

deploystate.willProjectDeploy(projectId, packageName)

...

returns the boolean isProjectDeployed flag, if the package with the given projectId and packageName has changes in the snapshot compared to what is already deployed on the current stage. This method will return true if any file in the project package has changed. Use this method with partial deployment projects. When partial project is building all files, then simply pass null for packageName parameter.

Groovy script can be written for many configuration values on specific step or gate. Additionally, gate or step can be skipped by providing Precondition groovy script as well. All such groovy script has access to various variables and methods listed below on this page. For some samples of such scripts, see Groovy Script Examples.

FlexDeploy allows for finding such variables and methods using Variable Lookup help. Prior versions allowed such help with use of Image Removed drop-down next to script input.

...

Variable

...

Description

...

ReleaseName

...

Name of the release provided when created

...

SnapshotId

...

Internal id value of Snapshot.

...

SnapshotName

...

Name of the snapshot (auto generated by date and time when created)

...

SnapshotDuplicateFilesFlag

...

True if there are duplicate files in the snapshot

...

SnapshotDescription

...

Description of the snapshot

...

StageExecutionId

...

ID of the execution

...

PipelineDefinitionId

...

Pipeline Id.

...

PipelineName

...

Pipeline name.

...

stgexec

...

Allows access to execution details for Gate, Step, Deploy or Utility workflows.

This variable was previously called FD_Release, which will continue to work but is deprecated now.

...

stgexecinfo

...

Allows access to details entered by user on Stage Execution Info.

It will not show any default values or FlexFields or WorkFlowInputs that are not set in the Stage Execution Info popup (The Paper Clip on the release dashboard screen)

...

topology

...

Allows access to properties within Topology Integration Accounts such as Source Control, Change Management, Cloud, or other tools. 

...

release

...

Returns Release object with methods - getReleaseName(), getReleaseDefinitionId(), getDescription(). These are details of the Release.

...

snapshot

...

Returns Snapshot object with methods - getSnapshotId(), getReleaseDefinitionId(), getSnapshotName(), getDescription(), getDuplicateFilesFlag(), getCreatedBy(). These are details of the Snapshot being executed. getCreatedBy was added as part of 5.4.0.1.

...

deploystate

...

Allows access to methods to compare an incoming snapshot to the projects or packages currently deployed on a stage.

...

<Release Property Code>

...

All release properties are exposed as variables.

...

<Snapshot Variable Code>

...

All release snapshot variables are exposed as variables.

Methods for stgexec variable.

...

Method

...

Description

...

stgexec.getEnvironmentCode()

...

returns environment code

e.g. "DEV"

...

stgexec.getReleaseName()

...

returns the name of the release

e.g "December Release"

...

stgexec.getSnapshotName()

...

returns the name of the snapshot

e.g. 12-04-2019 16:21:18

...

stgexec.getProjectStageExecution(projectId, packageName)

...

returns ProjectStageExecution object for given a project id and package name. Both project id and package name must match.

...

stgexec.getProjectStageExecution(projectName, packageName)

...

returns ProjectStageExecution object for given a project name and package name. Both project name and package name must match.

...

stgexec.getSnapshotProjects()

...

returns list of ReleaseProjectVersion objects in the snapshot.

...

stgexec.getSnapshotProjectsAsString()

...

returns all projects in snapshot concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

...

stgexec.getSnapshotDeployedProjects()

...

returns list of ReleaseProjectVersion objects in the snapshot which were deployed successfully.

...

stgexec.getSnapshotDeployedProjectsAsString()

...

returns all successfully deployed projects concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

...

stgexec.getSnapshotFailedProjects()

...

returns list of ReleaseProjectVersion objects in the snapshot which failed to deploy.

...

stgexec.getSnapshotFailedProjectsAsString()

...

returns all failed projects concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

...

stgexec.getSnapshotSkippedProjects()

...

returns list of ReleaseProjectVersion objects in the snapshot which were skipped.

...

stgexec.getSnapshotSkippedProjectsAsString()

...

returns all skipped projects concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

...

stgexec.getSnapshotNotAttemptedProjects()

...

returns list of ReleaseProjectVersion objects in the snapshot which were not attempted.

...

stgexec.getSnapshotNotAttemptedProjectsAsString()

...

returns all not attempted projects concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

...

stgexec.isAnyDeployFailed()

...

returns true if any projects failed to deploy or submit.

...

stgexec.isAnyDeployFailed(groupName)

...

returns true if any projects in a specific group of projects failed to deploy or submit.

returns false if the group doesn't exist or if the group doesn't have any failed project deployments.

...

stgexec.isAnyDeployOrUtilityFailed()

...

returns true if any deploy or utility workflows failed.

...

stgexec.isAnyDeployOrUtilityFailed(groupName)

...

returns true if any deploy or utility workflows in a specific group failed.

returns false if the group doesn't exist or if the group doesn't have any failed projects.

...

stgexec.isAnyUtilityFailed()

...

returns true if any utility workflows failed.

...

stgexec.isAnyUtilityFailed(groupName)

...

returns true if any utility workflows in a specific group failed.

returns false if the group doesn't exist or if the group doesn't have any failed utility projects.

...

stgexec.isProjectDeployed(projectId)

...

returns true only if project was deployed successfully. If partial deployment project, then if any package failed, this will return false, but if some packages were skipped and some deployed successfully this will still return true.

...

stgexec.isProjectDeployed(projectId, packageName)

...

returns true if a project is deployed, given the project id and package name. If package name is not supplied, this will behave same as stgexec.isProjectDeployed(projectId) method.

...

stgexec.isProjectDeployed(projectName)

...

returns true only if project was deployed successfully. If partial deployment project, then if any package failed, this will return false, but if some packages were skipped and some deployed successfully this will still return true.

...

stgexec.isProjectDeployed(projectName, packageName)

...

returns true if a project is deployed, given the project name and package name. If package name is not supplied, this will behave same as stgexec.isProjectDeployed(projectName) method.

...

stgexec.isProjectFailed(projectId)

...

returns true if a project failed to deploy or submit. if skipped or not attempted, this will return false. If partial deployment project, then if any package failed, this will return true.

...

stgexec.isProjectFailed(projectId, packageName)

...

returns true if a project failed to deploy, given the project id and package name. If package name is not supplied, this will behave same as stgexec.isProjectFailed(projectId).

...

stgexec.isProjectFailed(projectName)

...

returns true if a project failed to deploy or submit. if skipped or not attempted, this will return false. If partial deployment project, then if any package failed, this will return true.

...

stgexec.isProjectFailed(projectName, packageName)

...

returns true if a project failed to deploy, given the project name and package name. If package name is not supplied, this will behave same as stgexec.isProjectFailed(projectName).

...

stgexec.isProjectSkipped(projectId)

...

returns true if project is skipped. If partial deployment project, then if any package is skipped, this method will return true.

...

stgexec.isProjectSkipped(projectId, packageName)

...

returns true if a project is skipped, given the project id and package name. If package name is not supplied then this method will behave same as stgexec.isProjectSkipped(projectId).

...

stgexec.isProjectSkipped(projectName)

...

returns true if project is skipped. If partial deployment project, then if any package is skipped, this method will return true.

...

stgexec.isProjectSkipped(projectName, packageName)

...

returns true if a project is skipped, given the project name and package name. If package name is not supplied then this method will behave same as stgexec.isProjectSkipped(projectName).

...

stgexec.isProjectNotAttempted(projectId)

...

returns true if project was not attempted. If partial deployment project, then if any package is not attempted, this method will return true.

...

stgexec.isProjectNotAttempted(projectId, packageName)

...

returns true if a project was not attempted, given the project id and package name. If package name is not supplied then this method will behave same as stgexec.isProjectNotAttempted(projectId).

...

stgexec.isProjectNotAttempted(projectName)

...

returns true if project was not attempted. If partial deployment project, then if any package is not attempted, this method will return true.

...

stgexec.isProjectNotAttempted(projectName, packageName)

...

returns true if a project was not attempted, given the project name and package name. If package name is not supplied then this method will behave same as stgexec.isProjectNotAttempted(projectName).

...

stgexec.getGateStatus(gateName)

...

returns gate status String, "SUCCESSFUL", "RUNNING", "FAILED" or null if the gate name doesn't match or doesn't yet have a status.

note that Skipped steps that were FAILED will still return FAILED.

If an invalid gate name is given or the gate hasn't run yet, the status will be null.

...

isGateSuccessful(gateName)

...

returns true if gate status is SUCCESSFUL.

...

isGateFailed(gateName)

...

returns true if gate status is FAILED.

...

isGateSkipped(gateName)

...

returns true if gate status is PRECOND_SKIPPED.

...

isAnyGateFailed()

...

returns true if any gate failed.

...

isAnyGateSkipped()

...

returns true if any gate was skipped.

...

stgexec.getStepStatus(stepName)

...

returns step status String, "SUCCESSFUL", "RUNNING", "FAILED" or null if the gate name doesn't match or doesn't yet have a status.

If an invalid step name is given or the step hasn't run yet, the status will be null.

...

isStepSuccessful(stepName)

...

returns true if step status is SUCCESSFUL.

...

isStepFailed(stepName)

...

returns true if step status is FAILED.

...

isStepSkipped(stepName)

...

returns true if step status is PRECOND_SKIPPED.

...

isAnyStepFailed()

...

returns true if any step failed.

...

isAnyStepSkipped()

...

return true if any step was skipped.

...

stgexec.getProjectWorkflowOutputValues(outputName)

...

Groovy script can be written for many configuration values on specific step or gate. Additionally, gate or step can be skipped by providing Precondition groovy script as well. All such groovy script has access to various variables and methods listed below on this page. For some samples of such scripts, see Groovy Script Examples.

Additionally, you can find the JavaDoc for the necessary classes here: https://flexagon.com/function-sdk/7.0/

FlexDeploy allows for finding such variables and methods using suggestions in the Groovy Editor.

...

Info

Pipeline Groovy Logging

LOG function methods are available with FlexDeploy 7.0. This should be used instead of any other logging utilities (java logger, System.out etc.) for Pipeline Groovy scripts. LOG functions handle hiding secret values within logs. By default, the logging level will be based on the global FlexDeploy logging level. This can be modified specifically for groovy script logs by setting the logging level of flexagon.fd.services.groovy.functions.LogFunctions in Administration → Admin Operations.

...

Variable

Description

ReleaseName

Name of the release provided when created

ReleaseId

ID of the current release

release

Returns Release object with details about the Release.

SnapshotId

Internal id value of Snapshot.

SnapshotName

Name of the snapshot (auto generated by date and time when created)

SnapshotDuplicateFilesFlag

True if there are duplicate files in the snapshot

SnapshotDescription

Description of the snapshot

snapshot

Returns Snapshot object with details of the Snapshot being executed.

StageExecutionId

ID of the execution

stgexec

Allows access to execution details for Gate, Step, Deploy or Utility workflows.

This variable was previously called FD_Release, which will continue to work but is deprecated now.

stgexecinfo

Allows access to details entered by user on Stage Execution Info.

PipelineDefinitionId

ID of the pipeline being used in the release

PipelineName

Name of the pipeline being used in the release

environment

Returns the environment details of the current stage

deploystate

Allows access to methods to compare an incoming snapshot to the projects or packages currently deployed on a stage.

scanresult

Allows access to methods to retrieve ScanResult objects. These results can be further filtered by environment or project and environment.

<Pipeline Property Code>

All pipeline properties are exposed as variables.

<Snapshot Variable Code>

All release snapshot variables are exposed as variables.

FLEXDEPLOY

Functions for performing actions in FlexDeploy.

EMAIL

Functions for formatting and sending emails.

REST

Object exposing REST functions. For more info see Using the REST object.

LOG

Functions for printing log messages

SLACK

Functions for formatting and sending Slack messages

MICROSOFTTEAMS

Functions for formatting and sending Teams messages

topology or TOPOLOGY

Allows access to Integration Accounts(such as Source Control, Change Management, Cloud, or other tools) properties. Additionally it also provides methods to get mapped target groups for current stage.

TOPOLOGY variable is recommended

Methods for stgexec variable.

Method

Description

stgexec.getEnvironmentCode()

returns environment code

e.g. "DEV"

stgexec.getReleaseName()

returns the name of the release

e.g "December Release"

stgexec.getSnapshotName()

returns the name of the snapshot

e.g. 12-04-2019 16:21:18

stgexec.getProjectStageExecution(projectId, packageName)

returns ProjectStageExecution object for given a project id and package name. Both project id and package name must match.

stgexec.getProjectStageExecution(projectName, packageName)

returns ProjectStageExecution object for given a project name and package name. Both project name and package name must match.

stgexec.getSnapshotProjects()

returns list of ReleaseProjectVersion objects in the snapshot.

stgexec.getSnapshotProjectsAsString()

returns all projects in snapshot concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

stgexec.getSnapshotDeployedProjects()

returns list of ReleaseProjectVersion objects in the snapshot which were deployed successfully.

stgexec.getSnapshotDeployedProjectsAsString()

returns all successfully deployed projects concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

stgexec.getSnapshotFailedProjects()

returns list of ReleaseProjectVersion objects in the snapshot which failed to deploy.

stgexec.getSnapshotFailedProjectsAsString()

returns all failed projects concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

stgexec.getSnapshotSkippedProjects()

returns list of ReleaseProjectVersion objects in the snapshot which were skipped.

stgexec.getSnapshotSkippedProjectsAsString()

returns all skipped projects concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

stgexec.getSnapshotNotAttemptedProjects()

returns list of ReleaseProjectVersion objects in the snapshot which were not attempted.

stgexec.getSnapshotNotAttemptedProjectsAsString()

returns all not attempted projects concatenated in the format "ProjectName,PartialProjectName (PackageName),..."

stgexec.isAnyDeployFailed()

returns true if any projects failed to deploy or submit.

stgexec.isAnyDeployFailed(groupName)

returns true if any projects in a specific group of projects failed to deploy or submit.

returns false if the group doesn't exist or if the group doesn't have any failed project deployments.

stgexec.isAnyDeployOrUtilityFailed()

returns true if any deploy or utility workflows failed.

stgexec.isAnyDeployOrUtilityFailed(groupName)

returns true if any deploy or utility workflows in a specific group failed.

returns false if the group doesn't exist or if the group doesn't have any failed projects.

stgexec.isAnyUtilityFailed()

returns true if any utility workflows failed.

stgexec.isAnyUtilityFailed(groupName)

returns true if any utility workflows in a specific group failed.

returns false if the group doesn't exist or if the group doesn't have any failed utility projects.

stgexec.isProjectDeployed(projectId)

returns true only if project was deployed successfully. If partial deployment project, then if any package failed, this will return false, but if some packages were skipped and some deployed successfully this will still return true.

stgexec.isProjectDeployed(projectId, packageName)

returns true if a project is deployed, given the project id and package name. If package name is not supplied, this will behave same as stgexec.isProjectDeployed(projectId) method.

stgexec.isProjectDeployed(projectName)

returns true only if project was deployed successfully. If partial deployment project, then if any package failed, this will return false, but if some packages were skipped and some deployed successfully this will still return true.

stgexec.isProjectDeployed(projectName, packageName)

returns true if a project is deployed, given the project name and package name. If package name is not supplied, this will behave same as stgexec.isProjectDeployed(projectName) method.

stgexec.isProjectFailed(projectId)

returns true if a project failed to deploy or submit. if skipped or not attempted, this will return false. If partial deployment project, then if any package failed, this will return true.

stgexec.isProjectFailed(projectId, packageName)

returns true if a project failed to deploy, given the project id and package name. If package name is not supplied, this will behave same as stgexec.isProjectFailed(projectId).

stgexec.isProjectFailed(projectName)

returns true if a project failed to deploy or submit. if skipped or not attempted, this will return false. If partial deployment project, then if any package failed, this will return true.

stgexec.isProjectFailed(projectName, packageName)

returns true if a project failed to deploy, given the project name and package name. If package name is not supplied, this will behave same as stgexec.isProjectFailed(projectName).

stgexec.isProjectSkipped(projectId)

returns true if project is skipped. If partial deployment project, then if any package is skipped, this method will return true.

stgexec.isProjectSkipped(projectId, packageName)

returns true if a project is skipped, given the project id and package name. If package name is not supplied then this method will behave same as stgexec.isProjectSkipped(projectId).

stgexec.isProjectSkipped(projectName)

returns true if project is skipped. If partial deployment project, then if any package is skipped, this method will return true.

stgexec.isProjectSkipped(projectName, packageName)

returns true if a project is skipped, given the project name and package name. If package name is not supplied then this method will behave same as stgexec.isProjectSkipped(projectName).

stgexec.isProjectNotAttempted(projectId)

returns true if project was not attempted. If partial deployment project, then if any package is not attempted, this method will return true.

stgexec.isProjectNotAttempted(projectId, packageName)

returns true if a project was not attempted, given the project id and package name. If package name is not supplied then this method will behave same as stgexec.isProjectNotAttempted(projectId).

stgexec.isProjectNotAttempted(projectName)

returns true if project was not attempted. If partial deployment project, then if any package is not attempted, this method will return true.

stgexec.isProjectNotAttempted(projectName, packageName)

returns true if a project was not attempted, given the project name and package name. If package name is not supplied then this method will behave same as stgexec.isProjectNotAttempted(projectName).

stgexec.getGateStatus(gateName)

returns gate status String, "SUCCESSFUL", "RUNNING", "FAILED" or null if the gate name doesn't match or doesn't yet have a status.

note that Skipped steps that were FAILED will still return FAILED.

If an invalid gate name is given or the gate hasn't run yet, the status will be null.

isGateSuccessful(gateName)

returns true if gate status is SUCCESSFUL.

isGateFailed(gateName)

returns true if gate status is FAILED.

isGateSkipped(gateName)

returns true if gate status is PRECOND_SKIPPED.

isAnyGateFailed()

returns true if any gate failed.

isAnyGateSkipped()

returns true if any gate was skipped.

stgexec.getStepStatus(stepName)

returns step status String, "SUCCESSFUL", "RUNNING", "FAILED" or null if the gate name doesn't match or doesn't yet have a status.

If an invalid step name is given or the step hasn't run yet, the status will be null.

isStepSuccessful(stepName)

returns true if step status is SUCCESSFUL.

isStepFailed(stepName)

returns true if step status is FAILED.

isStepSkipped(stepName)

returns true if step status is PRECOND_SKIPPED.

isAnyStepFailed()

returns true if any step failed.

isAnyStepSkipped()

return true if any step was skipped.

stgexec.getProjectWorkflowOutputValues(outputName)

returns an array of deploy workflow output values with the given output name irrespective of project.

e.g. [1234123]

Note that any encrypted workflow outputs will return as "******"

stgexec.getProjectWorkflowOutputValues(projectName, outputName)

returns an array of deploy workflow output values with the given output name for the given project name.

e.g. [1234123]

Note that any encrypted workflow outputs will return as "******"

stgexec.getProjectWorkflowOutputMap(projectId)

returns a map of deploy workflow output values for the given project id. Key of map is output name and value is list of output values.

e.g. [OP1:[1,3], ENCOP2:[******, ******], BOP3:[false], DBOP4:[123.456], INOP5:[1234,123]]

Note that any encrypted workflow outputs will return as "******"

stgexec.getProjectWorkflowOutputMap(projectName)

returns a map of deploy workflow output values for the given project name. Key of map is output name and value is list of output values.

e.g. [OP1:[1,3], ENCOP2:[******, ******], BOP3:[false], DBOP4:[123.456], INOP5:[1234,123]]

Note that any encrypted workflow outputs will return as "******"

stgexec.getProjectBuildWorkflowOutputValues(outputName)

returns an array of build output values with the given output name irrespective of project.

e.g. [1234123]

Note that any encrypted workflow outputs will return as "******"

stgexec.getProjectBuildWorkflowOutputValues(projectName, outputName)

returns an array of build output values with the given output name for the given project name.

e.g. [1234123]

Note that any encrypted workflow outputs will return as "******"

stgexec.getProjectBuildWorkflowOutputMap(projectId)

returns a map of build output values for the given project id. Key of map is output name and value is list of output values.

e.g. [OP1:[1,3], ENCOP2:[******, ******], BOP3:[false], DBOP4:[123.456], INOP5:[1234,123]]

Note that any encrypted workflow outputs will return as "******"

Pass projectId as 12345 or new Long(12345).

stgexec.getProjectBuildWorkflowOutputMap(projectName)

returns a map of build output values for the given project name. Key of map is output name and value is list of output values.

e.g. [OP1:[1,3], ENCOP2:[******, ******], BOP3:[false], DBOP4:[123.456], INOP5:[1234,123]]

Note that any encrypted workflow outputs will return as "******"

stgexec.getProjectBuildWorkflowInputValues(inputName)

returns an array of build input values with the given input name irrespective of project.

e.g. [1234123]

Note that any encrypted workflow inputs will return as "******"

stgexec.getProjectBuildWorkflowInputValues(projectName, inputName)

returns an array of build input values with the given input name for the given project name.

e.g. [1234123]

Note that any encrypted workflow inputs will return as "******"

stgexec.getProjectBuildWorkflowInputMap(projectId)

returns a map of build input values for the given project id. Key of map is input name and value is list of input values.

e.g. [OP1:[1,3], ENCOP2:[******, ******], BOP3:[false], DBOP4:[123.456], INOP5:[1234,123]]

Note that any encrypted workflow inputs will return as "******"

Pass projectId as 12345 or new Long(12345).

stgexec.getProjectBuildWorkflowInputMap(projectName)

returns a map of build input values for the given project name. Key of map is input name and value is list of input values.

e.g. [OP1:[1,3], ENCOP2:[******, ******], BOP3:[false], DBOP4:[123.456], INOP5:[1234,123]]

Note that any encrypted workflow inputs will return as "******"

stgexec.getProjectBuildWorkflowFlexfieldValues(flexfieldName)

returns an array of build flexfield values with the given flexfield name irrespective of project.

e.g. [1234123]

Note that any encrypted workflow

outputs

flexfields will return as "******"

stgexec.

getProjectWorkflowOutputValues

getProjectBuildWorkflowFlexfieldValues(projectName,

outputName

flexfieldName)

returns an array of

output

build flexfield values with the given

output

flexfield name for the given project name.

e.g. [1234123]

Note that any encrypted workflow

outputs

flexfields will return as "******"

stgexec.

getProjectWorkflowOutputMap

getProjectBuildWorkflowFlexfieldMap(projectId)

returns a map of

output

build flexfield values for the given project id. Key of map is

output

flexfield name and value is list of

output

flexfield values.

e.g. [OP1:[1,3], ENCOP2:[******, ******], BOP3:[false], DBOP4:[123.456], INOP5:[1234,123]]

Note that any encrypted workflow

outputs

flexfields will return as "***

***"

***"

Pass projectId as 12345 or new Long(12345).

stgexec.

getProjectWorkflowOutputMap

getProjectBuildWorkflowFlexfieldMap(projectName)

returns a map of

output

build flexfield values for the given project name. Key of map is

output

flexfield name and value is list of

output

flexfield values.

e.g. [OP1:[1,3], ENCOP2:[******, ******], BOP3:[false], DBOP4:[123.456], INOP5:[1234,123]]

Note that any encrypted workflow

outputs

flexfields will return as "******"

stgexec.getGateTaskUserInfo(gateName)

Returns TaskUserInfo object for a given Manual or Externa gate  name.

stgexec.getStepTaskUserInfo(stepName)

Returns TaskUserInfo object for a given Manual task step name.

Methods for stgexecinfovariable.

Method

Description

getRelatedTicket()

returns related ticket associated to the stage.

getRelatedTicket(projectId)

returns related ticket associated to snapshot project or the stage.  If not found, related ticket is returned from the stage.

getRelatedTicket(projectId, packageName)

returns related ticket associated to the snapshot project and package.  If not found, related ticket is returned from the stage.

setRelatedTicket(ticketNumber)

sets the related ticket field on stage.

setRelatedTicket(projectId, ticketNumber)

sets the related ticket field for the snapshot project on the stage.

setRelatedTicket(projectId, packageName, ticketNumber)

sets the related ticket field for the snapshot project and package on the stage.

getWorkflowInputs(inputName)

returns list of workflow deploy workflow inputs for input name irrespective of project.

getWorkflowInputMap(projectName)

returns a map of deploy workflow input values for the given project name. Key of map is input name and value is list of input values.

getWorkflowInputMap(projectId)

returns a map of deploy workflow input values for the given project id. Key of map is input name and value is list of input values.

getWorkflowInputMap(projectId, packageName)

returns a map of deploy workflow input values for the given project id and package name. Key of map is input name and value is list of input values.

getWorkflowInputMap(projectName, packageName)

returns a map of deploy workflow input values for the given project name and package name. Key of map is input name and value is list of input values.

getFlexFields(flexfieldCode)

returns list of flex field values for code irrespective of project.

getFlexFieldMap(projectId)

returns a map of flex field values for the given project id. Key of map is flex field code and value is list of flex field values.

getFlexFieldMap(projectName)

returns a map of flex field values for the given project name. Key of map is flex field code and value is list of flex field values.

getFlexFieldMap(projectId, packageName)

returns a map of flex field values for the given project id and package name. Key of map is flex field code and value is list of flex field values.

getFlexFieldMap(projectName, packageName)

returns a map of flex field values for the given project name and package name. Key of map is flex field code and value is list of flex field values.

isUserNoOverride(projectId)

returns true if the deploy override option is No Override for the snapshot project on the stage.

isUserNoOverride(projectId, packageName)

returns true if the deploy override option is No Override for the snapshot project and package on the stage.

isUserForceDeploy(projectI)

returns true if the deploy override option is Force for the snapshot project on the stage.

isUserForceDeploy(projectId, packageName)

returns true if the deploy override option is Force for the snapshot project and package on the stage.

isUserSkipDeploy(projectId)

returns true if the deploy override option is Skip for the snapshot project on the stage.

isUserSkipDeploy(projectId, packageName)

returns true if the deploy override option is Skip for the snapshot project and package on the stage.

setUserNoOverride(projectId)

removes any previously set deploy option override for the snapshot project on the stage.

setUserNoOverride(projectId, packageName)

removes any previously set deploy option override for the snapshot project and package on the stage.

setUserForceDeploy(projectId)

force deploy the snapshot project on the stage.

setUserForceDeploy(projectId, packageName)

force deploy the snapshot project and package on the stage.

setUserSkipDeploy(projectId)

skip the deployment for the snapshot project on the stage.

setUserSkipDeploy(projectId, packageName)

skip the deployment for the snapshot project and package on the stage.

setInstanceOverride(projectId, instanceCode)

Set target group override (deploy or utility) for specified project id.

If specified target group is not mapped to current environment then execution will be skipped.

This method is to be used for Full Deployment project of All Files Partial Deployment project. If you are using stgexec.getSnapshotProjects(), then just use setInstanceOverride(projectId, packageName, instanceCode) as package name will be null for full project or all files in stgexec.getSnapshotProjects().

setInstanceOverride(projectId, instanceCodeList)

Set target group overrides (deploy or utility) for specified project id. Execution will only happen against specified target groups (supply java.util.List of String target group codes) if it is mapped to current environment.

Target group codes that are not mapped to current environment will be skipped.

This method is to be used for Full Deployment project of All Files Partial Deployment project. If you are using stgexec.getSnapshotProjects(), then just use setInstanceOverride(projectId, packageName, instanceCode) as package name will be null for full project or all files in stgexec.getSnapshotProjects().

setInstanceOverride(projectId, packageName, instanceCode)

Set target group overrides (deploy or utility) for specified project id and package name.

If specified target group is not mapped to current environment then execution will be skipped.

This method is to be used for Partial Deployment project where Package is used in release. If you are using stgexec.getSnapshotProjects(), then just use setInstanceOverride(projectId, packageName, instanceCode) as package name will be null for full project or all files in stgexec.getSnapshotProjects().

setInstanceOverride(projectId, packageName, instanceCodeList)

Set target group overrides (deploy or utility) for specified project id and package name. Execution will only happen against specified target groups (supply java.util.List of String target group codes), if it is mapped to current environment.

Target group codes that are not mapped to current environment will be skipped.

This method is to be used for Partial Deployment project where Package is used in release. If you are using stgexec.getSnapshotProjects(), then just use setInstanceOverride(projectId, packageName, instanceCode) as package name will be null for full project or all files in stgexec.getSnapshotProjects().

getInstanceOverride(projectId)

Returns List of target group codes configured as overrides.

getInstanceOverride(projectId, packageName)

Returns List of target group codes configured as overrides.

setFlexField(projectId, code, value)

Set the value of the flex field for the snapshot project on the stage.

setFlexField(projectId, packageName, code, value)

Set the value of the flex field for the snapshot project and package on the stage. If package name is null, all the release projects with the matching projectid will be updated with the same value.

setWorkflowInput(projectId, code, value)

Set the value of the workflow inputs for the snapshot project on the stage.

setWorkflowInput(projectId, packageName, code, value)

Set the value of the workflow inputs for the snapshot project and package on the stage. If package name is null, all the release projects with the matching projectid will be updated with the same value.

Methods for ProjectStageExecutionobject.

Method

Description

getProjectName()

returns the String project name for the current project.

getDeployPriority()

returns the Integer deploy priority for the current release project.

isPartialDeploy()

returns the boolean isPartialDeploy flag if the isPartialDeploy instance variable is not null.

getIsPartialDeploy()

returns the boolean isPartialDeploy flag for the current release project.

getPackageName()

returns the String

package name for the current release project.getProjectGroupNames

package name for the current release project.

getProjectGroupNames()

returns a list of project group names for the current release project.

getProjectId()

returns the Long project Id for the current release project.

getProjectStreamId()

returns the Long project stream Id for the current release project.

getProjectStreamName()

returns the String project stream name for the current release project.

getProjectTypeEnum()

returns a ProjectTypeEnum object for the current project.

Possible Values:  GENERAL, EBS, PARTIAL_FILE, PARTIAL_JDBC, OracleForms, ORACLE_DB, ORACLE_BI, ORACLE_APEX, MFT, SALESFORCE, UTILITY, MDS, SAP, and GENERIC

getProjectType()

returns a

list of project group names

ProjectType as String for the current release project.

getProjectId

Possible Values: GENERAL, EBS, PARTIAL_FILE, PARTIAL_JDBC, OracleForms, ORACLE_DB, ORACLE_BI, ORACLE_APEX, MFT, SALESFORCE, UTILITY, MDS, SAP, and GENERIC

getProjectVersionId()

returns the Long project

Id

version id for the current release project.

getProjectStreamId

getProjectVersionName()

returns the

Long

String project

stream Id

version name for the current release project.

getProjectStreamName

getRequestAllFiles()

returns the String

project stream name for the current release

request all files for the current release project.

getWorkflowId()

Returns deploy or utility workflow id configured on project.

getProjectTypeEnum

getProjectType()

returns a ProjectType as String for the current release project.

Possible Values: GENERAL, EBS, PARTIAL_FILE, PARTIAL_JDBC, OracleForms, ORACLE_DB, ORACLE_BI, ORACLE_APEX, MFT, SALESFORCE, UTILITY, MDS, SAP, and GENERIC

getProjectVersionId()

returns the Long project version id for the current release project.

getProjectVersionName()

returns the String project version name for the current release project.

getRequestAllFiles

getWorkflowName()

returns a ProjectTypeEnum object for the current project.

Possible Values:  GENERAL, EBS, PARTIAL_FILE, PARTIAL_JDBC, OracleForms, ORACLE_DB, ORACLE_BI, ORACLE_APEX, MFT, SALESFORCE, UTILITY, MDS, SAP, and GENERIC

Returns deploy or utility workflow name configured on project.

getInstances()

Returns deploy or utility target groups configured on project. This returns target group object with methods like getInstanceID(), getCode(), getName() for topology target group.

getFolderPath()

Returns folder path where project is configured on project explorer.

findProjectWorkflowExecutionData(workflowExecutionId)

returns a ProjectWorkflowExecutionData object for the given workflowExecutionId.

getRequestStatus()

returns the String request

all files

status for the current

release

project.

getWorkflowId

getRequestStatusEnum()

Returns deploy or utility workflow id configured on project.

getWorkflowName()

Returns deploy or utility workflow name configured on project.

getInstances()

Returns deploy or utility target groups configured on project. This returns target group object with methods like getInstanceID(), getCode(), getName() for topology target group.

getFolderPath()

Returns folder path where project is configured on project explorer.

findProjectWorkflowExecutionData(workflowExecutionId)

returns a ProjectWorkflowExecutionData object for the given workflowExecutionId.

getRequestStatus()

returns the String request status

returns a RequestStatusEnum object for the current project.

Possible Values:  INITIATED("Initiated"), PENDING_APPROVAL("Pending Approval"), SCHEDULED("Scheduled"), REJECTED("Rejected"), READY("Ready"), SUBMITTED("Submitted"), COMPLETED("Completed"), ABORTED("Aborted"), and FAILED("Failed");

getSubmitStatus()

returns a WorkflowRequestSubmitStatus object for the current project.

Possible Values: SUBMITFAILED, SUBMITTED, SKIPPED, PENDING

getWasForced()

returns the boolean wasForced flag for the current project.

getWorkflowExecutionData()

returns a map of output values for the given workflow execution name. Key of map is target group code and value is a ProjectWorkflowExecutionData object.

getWorkflowType()

returns the String workflow type for the current project.

isDeployed()

returns the boolean isDeployed flag for the current project.

getRequestStatusEnum

isDeployWorkflow()

returns

a RequestStatusEnum object

getSubmitStatus()

returns a WorkflowRequestSubmitStatus object for the current project.

Possible Values: SUBMITFAILED, SUBMITTED, SKIPPED, PENDING

getWasForced

the boolean isDeployWorkflow flag depending on if the workflow type is a deploy workflow for the current project.

Possible Values:  INITIATED("Initiated"), PENDING_APPROVAL("Pending Approval"), SCHEDULED("Scheduled"), REJECTED("Rejected"), READY("Ready"), SUBMITTED("Submitted"), COMPLETED("Completed"), ABORTED("Aborted"), and FAILED("Failed");

isFailed()

returns the boolean isFailed flag depending on if the workflow is a deploy workflow and the submission or request to deploy has failed or not.

isNotAttempted()

returns the boolean isNotAttempted flag depending on if the request status and submission status is null.

IsPartialDeploy()

returns the boolean isPartialDeploy flag for the current project.

isRequestAborted()

returns the boolean isRequestAborted flag depending on if the requestStatus is equal to RequestStatusEnum.ABORTED.

isRequestFailed()

returns the boolean isRequestFailed flag depending on if the requestStatus is equal to RequestStatusEnum.ABORTED or RequestStatusEnum.FAILED.

isRequestOrSubmitFailed()

returns the boolean isRequestOrSubmitFailed flag depending on the result of isSubmitFailed() OR isRequestFailed().

isRequestSuccess()

returns the boolean

wasForced

isRequestAborted flag

for the current project.getWorkflowExecutionData

depending on if the requestStatus is equal to RequestStatusEnum.COMPLETED

isSkipped()

returns

a map of output values for the given workflow execution name. Key of map is target group code and value is a ProjectWorkflowExecutionData object.getWorkflowType

the boolean isSkipped flag depending on the result of isDeployWorkflow() AND isSubmitSkipped().

isSubmitFailed()

returns the

String workflow type for the current project.isDeployed

boolean isSubmitFailed flag depending on if the submitStatus is equal to WorkflowRequestSubmitStatus.SUBMITFAILED

isSubmitSkipped()

returns the boolean

isDeployed

isSubmitSkipped flag

for the current project.isDeployWorkflow

depending on if the submitStatus is equal to WorkflowRequestSubmitStatus.SKIPPED

isTestWorkflow()

returns the boolean

isDeployWorkflow

isTestWorkflow flag depending on if the project workflow type is

a deploy workflow for the current project

"TEST".

isFailed

isUtilityWorkflow()

returns the boolean

isFailed

isUtilityWorkflow flag depending on if the project workflow

is a deploy workflow and the submission or request to deploy has failed or not.isNotAttempted

type is "UTILITY".

Methods for ProjectWorkflowExecutionDataobject. This has details of execution, so it would not be available till deploy execution is completed.

Method

Description

getInstanceCode()

returns the

boolean isNotAttempted flag depending on if the request status and submission status is null.IsPartialDeploy

String target group code for the current project stage execution.

getInstanceid()

returns the

boolean isPartialDeploy flag

Long target group id for the current project stage execution.

isRequestAborted

getOutputValues()

returns

the boolean isRequestAborted flag depending on if the requestStatus is equal to RequestStatusEnum.ABORTED.isRequestFailed

a map of output values. Key of map is output name and value is the description. 

getWorkflowExecutionId()

returns the

boolean isRequestFailed flag depending on if the requestStatus is equal to RequestStatusEnum.ABORTED or RequestStatusEnum.FAILED.

isRequestOrSubmitFailed()

returns the boolean isRequestOrSubmitFailed flag depending on the result of isSubmitFailed() OR isRequestFailed().

isRequestSuccess

Long workflow execution id for the current project stage execution..

Methods for ReleaseProjectVersion object.

Method

Description

getProjectName()

returns the String project name for the current project.

getDeployPriority()

returns the Integer deploy priority for the current release project.

getIsPartialDeploy()

returns the

boolean isRequestAborted flag depending on if the requestStatus is equal to RequestStatusEnum.COMPLETEDisSkipped

Boolean isPartialDeploy flag for the current release project.

getPackageName()

returns the

boolean isSkipped flag depending on the result of isDeployWorkflow() AND isSubmitSkipped().isSubmitFailed

String package name for the current release project.

getProjectGroupNames()

returns

the boolean isSubmitFailed flag depending on if the submitStatus is equal to WorkflowRequestSubmitStatus.SUBMITFAILEDisSubmitSkipped

a list of project group names for the current release project.

getProjectId()

returns the

boolean isSubmitSkipped flag depending on if the submitStatus is equal to WorkflowRequestSubmitStatus.SKIPPEDisTestWorkflow

Long project Id for the current release project.

getProjectStreamId()

returns the

boolean isTestWorkflow flag depending on if the project workflow type is "TEST".isUtilityWorkflow

Long project stream Id for the current release project.

getProjectStreamName()

returns the

boolean isUtilityWorkflow flag depending on if the project workflow type is "UTILITY".

...

Method

Description

getInstanceCode

String project stream name for the current release project.

getProjectType()

returns

the

a String

target group code

for the

current

current release project

stage execution.

getInstanceid()

returns the Long target group id for the current project stage execution.

getOutputValues()

returns a map of output values. Key of map is output name and value is the description. 

getWorkflowExecutionId()

returns the Long workflow execution id for the current project stage execution..

Methods for ReleaseProjectVersion object.

Method

Description

getProjectName()

returns the String project name for the current project.

getDeployPriority()

returns the Integer deploy priority for the current release project.

getIsPartialDeploy()

returns the Boolean isPartialDeploy flag

type.

Possible Values: GENERAL, EBS, PARTIAL_FILE, PARTIAL_JDBC, OracleForms, ORACLE_DB, ORACLE_BI, ORACLE_APEX, MFT, SALESFORCE, UTILITY, MDS, SAP, GENERIC, and null (if project has no type)

getProjectTypeEnum()

returns a ProjectTypeEnum object for the current release project.

Possible Values: GENERAL, EBS, PARTIAL_FILE, PARTIAL_JDBC, OracleForms, ORACLE_DB, ORACLE_BI, ORACLE_APEX, MFT, SALESFORCE, UTILITY, MDS, SAP, GENERIC, and null (if project has no type)

getProjectVersionId()

returns the Long project version id for the current release project.

getPackageName

getProjectVersionName()

returns the String

package

project version name for the current release project.

getProjectGroupNames

getRequestAllFiles()

returns

a list of project group names

the String request all files for the

current release

current release project.

getProjectId

isMatch(projectId, packageName)

returns the

Long project Id for the current release project.

getProjectStreamId()

returns the Long project stream Id for the current release project.

getProjectStreamName

boolean isMatch flag depending on if the passed projectId and packageName match this release project's projectId and packageName. 

isMatch(projectName, packageName)

returns the boolean isMatch flag depending on if the passed projectName and packageName match this release project's projectName and packageName. 

isPartialDeploy()

returns the

String project stream name for the current release project.

getProjectType()

returns a String for the current release project type.

Possible Values: GENERAL, EBS, PARTIAL_FILE, PARTIAL_JDBC, OracleForms, ORACLE_DB, ORACLE_BI, ORACLE_APEX, MFT, SALESFORCE, UTILITY, MDS, SAP, GENERIC, and null (if project has no type)

getProjectTypeEnum()

returns a ProjectTypeEnum object for the current release project.

Possible Values: GENERAL, EBS, PARTIAL_FILE, PARTIAL_JDBC, OracleForms, ORACLE_DB, ORACLE_BI, ORACLE_APEX, MFT, SALESFORCE, UTILITY, MDS, SAP, GENERIC, and null (if project has no type)

getProjectVersionId()

returns the Long project version id for the current release project.

getProjectVersionName()

returns the String project version name for the current release project.

getRequestAllFiles()

returns the String request all files for the current release project.

isMatch(projectId, packageName)

returns the boolean isMatch flag depending on if the passed projectId and packageName match this release project's projectId and packageName. 

isMatch(projectName, packageName)

returns the boolean isMatch flag depending on if the passed projectName and packageName match this release project's projectName and packageName. 

isPartialDeploy()

returns the boolean isPartialDeploy flag if the isPartialDeploy instance variable is not null.

getWorkflowId()

Returns deploy or utility workflow id configured on project.

getWorkflowName()

Returns deploy or utility workflow name configured on project.

getInstances()

Returns deploy or utility target groups configured on project. This returns target group object with methods like getInstanceID(), getCode(), getName() for topology target group.

getFolderPath()

Returns folder path where project is configured on project explorer.

Methods for TaskUserInfo object.

...

Method

...

Description

...

getActionByUserName()

...

returns the user name of the person approved the gate/step.

...

getActionByFirstName()

...

returns the first name of the the person approved the gate/step.

...

getActionByLastName()

...

returns the last name of the person approved the gate/step.

...

getActionByEmailAddress()

...

returns the email address of the person approved the gate/step.

Methods for topology object.

Method

Description

topology

boolean isPartialDeploy flag if the isPartialDeploy instance variable is not null.

getWorkflowId()

Returns deploy or utility workflow id configured on project.

getWorkflowName()

Returns deploy or utility workflow name configured on project.

getInstances()

Returns deploy or utility target groups configured on project. This returns target group object with methods like getInstanceID(), getCode(), getName() for topology target group.

getFolderPath()

Returns folder path where project is configured on project explorer.

Methods for TaskUserInfo object.

Method

Description

getActionByUserName()

returns the user name of the person approved the gate/step.

getActionByFirstName()

returns the first name of the the person approved the gate/step.

getActionByLastName()

returns the last name of the person approved the gate/step.

getActionByEmailAddress()

returns the email address of the person approved the gate/step.

Methods for topology object. (deprecated)

Method

Description

topology.getInstanceProperties(instanceCode)

returns a Map<String, Object> containing all the properties for the integration account matching the passed target group code. Key of map is a property code and value is the primitive value for that property.

e.g. Git SCM Account [FDGIT_URL: https://github.com/flexagon9/flextest.git, FDGIT_USER: flexagon9, FDGIT_PASSWORD: password123, FDGIT_TIMEOUT: null]

topology.getMappedInstances()

returns list of target group codes that are mapped to current stage(environment)

topology.isMappedToCurrentEnvironment(instanceCode)

returns true or false to indicate whether provided target group code is mapped to current stage(environment)

Methods for TOPOLOGY object

Method

Description

TOPOLOGY.isMappedToCurrentEnvironment(String pInstanceCode)

returns true or false to indicate whether provided target group code is mapped to current stage(environment)

TOPOLOGY.getMappedInstances()

returns list of target group codes that are mapped to current stage(environment)

TOPOLOGY.getInstanceProperties(instanceCode)

returns a Map<String, Object> containing all the properties for the integration account matching the passed target group code. Key of map is a property code and value is the primitive value for that property.

e.g. Git SCM Account [FDGIT_URL: https://github.com/flexagon9/flextest.git, FDGIT_USER: flexagon9, FDGIT_PASSWORD: password123, FDGIT_TIMEOUT: null]

topology.getMappedInstances()

returns list of target group codes that are mapped to current stage(environment)

topology.isMappedToCurrentEnvironment(instanceCode)

returns true or false to indicate whether provided target group code is mapped to current stage(environment)

Methods for release object

Method

Description

release.getReleaseName()

returns the name of the release

release.getReleaseDefinitionId()

returns the internal id of the release

release.getDescription()

returns the description for the release

Methods for snapshot object

Method

Description

snapshot.getSnapshotId()

returns the internal id of the snapshot

snapshot.getReleaseDefinitionId()

returns the internal id of the snapshot's release

snapshot.getSnapshotName()

returns the snapshot name

snapshot.getDescription()

returns the snapshot description

snapshot.getDuplicateFilesFlag()

returns whether the snapshot packages have duplicate files which may have conflicting revisions

snapshot.getCreatedBy()

returns the created by username.

Methods for deploystate variable

Method

Description

deploystate.willProjectDeploy(projectId)

returns the boolean isProjectDeployed flag, if the project with the given projectId has changes in the snapshot compared to what is already deployed on the current stage.

deploystate.willProjectDeploy(projectId, packageName)

returns the boolean isProjectDeployed flag, if the package with the given projectId and packageName has changes in the snapshot compared to what is already deployed on the current stage. This method will return true if any file in the project package has changed. Use this method with partial deployment projects. When partial project is building all files, then simply pass null for packageName parameter.

Methods for scanresult variable. This has details based on an execution, so there will not be any scan results until a scan is executed within a workflow.

Method

Description

scanresult.getAll()

returns a ScanResultInfo object containing all scan results in the current snapshot.

scanresult.byEnvironment(environmentId)

returns a ScanResultInfo object containing all scan results for the given environmentId in the current snapshot.

scanresult.byEnvironment(environmentCode)

returns a ScanResultInfo object containing all scan results for the given environmentCode in the current snapshot.

This is useful to use with stexec.getEnvironmentCode() to check scan results in the current stage.

scanresult.byProjectAndEnvironment(projectId, environmentId)

returns a ScanResultInfo object containing all scan results for the given projectId and environmentId in the current snapshot.

scanresult.byProjectAndEnvironment(projectId, environmentCode)

returns a ScanResultInfo object containing all scan results for the given projectId and environmentId in the current snapshot.

This is useful to use with stexec.getEnvironmentCode() to check scan results in the current stage.

Methods for ScanResultInfo object

Method

Description

get()

returns a list of ScanResult objects

getTotalCriticalCounts()

returns the Integer critical count sum for all ScanResult objects

getTotalHighCounts()

returns the Integer high count sum for all ScanResult objects

getTotalMediumCounts()

returns the Integer medium count sum for all ScanResult objects

getTotalLowCounts()

returns the Integer low count sum for all ScanResult objects

isAnyFailure()

returns a boolean value of True if any scan results objects have a scan status of “FAILED”

isAnyRunning()

returns a boolean value of True if any scan results objects have a scan status of “RUNNING”

Methods for ScanResult object

Method

Description

getScanResultId()

returns the Long scan result id.

getProjectVersionId()

returns the Long project version id.

getPipelineStageStepExecId()

returns the Long pipeline stage step execution id.

getScanStatus()

returns the String scan status. Valid values include ['RUNNING', ‘SUCCESS’, ‘FAILED’]

getCriticalCount()

returns the Integer critical count.

getHighCount()

returns the Integer high count.

getMediumCount()

returns the Integer medium count.

getLowCount()

returns the Integer low count.

getStartTime()

returns the Timestamp start time when the scan result started.

getEndTime()

returns the Timestamp end time when the scan result completed. Will be null if scan status is ‘RUNNING’

getEnvironmentId()

returns the Long environment id.

getExtScanId()

returns the String external scan id. This field may be null depending on the Type and SubType.

getExtScanUrl()

returns the String external scan url. This field may be null depending on the Type and SubType.

getInstanceId()

returns the Long instance id.

getProjectId()

returns the Long project id.

getType()

returns the String type. I.E. ‘SAST' (Static Application Security Testing), ‘OSA’ (Open Source Analysis), etc..

getSubType()

returns the String subType. I.E. ‘Acunetix’, ‘Checkmarx’, ‘PMD’, ‘SonarQube’, etc..

getWorkflowExecutionId()

returns the Long workflow execution id.

getCreatedOn()

returns the Timestamp created on.

getCreatedBy()

returns the String created by username.

getUpdatedOn()

returns the Timestamp updated on.

getUpdatedBy()

returns the String updated by username.