Interface WorkflowMigrationResult
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractWorkflowMigrationResult,WorkflowMigrationResultForMultipleProjects,WorkflowMigrationSuccess,WorkflowMigrationTerminated
The result could be either SUCCESS or TERMINATED. This object also communicates
if there were any errors detected before migrating any issues to the new workflow or
the number of issues that failed during migration. If there were failed issues, this object contains the issue
ids and keys of failed issues.
The workflow migration is made to tolerate several failures. This ensures that if migrating a project with a large number of issues and only a few (a number lower than an agreed threshold) of them fail, the migration proceeds and does not leave the project in an inconsistent state.
Therefore, even if the result is SUCCESS, the object could contain information about one or more failed
issues. To determine the number of failed issues, call getNumberOfFailedIssues() method. To get a
Map of issue ids to issue key mappings call getFailedIssues() method.
If there were no failures, (a perfect migration). The getNumberOfFailedIssues() method will return 0 and the
getFailedIssues() method will return an empty map.
If the result is SUCCESS the object should never have any error messages. Error messages
are detected before the migration begins. If any errors are detected a TERMINATED result code should be
returned.
If the result is TERMINATED, then the object can either contain one or more errors that were detected
before any of the issues were migrated, or no errors and one or more failed issues.
At no time can the object have errors as well as failed issues.
If TERMINATED is returned and the object contains one or more errors, then the migration did not
actually occur as there were errors found with the data before migrating any issues.
If failed issues are returned, then no errors were found before the migration, but the migration terminated before completion as there were too many failures (more failures than the agreed threshold). In this case, the project is likely left in an inconsistent state and users should be warned.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe workflow migration has succeeded.static final intThe workfow migration either did not occur as there were problems found with the data before starting the migration. -
Method Summary
Modifier and TypeMethodDescriptionReturns a collection of errors that were found before starting the migration.AMapof issue ids to issue keys of failed issues.intThe number of issues that failed during the migration, or until the migration was terminated.intReturns the result of the workflow migration.
-
Field Details
-
SUCCESS
static final int SUCCESSThe workflow migration has succeeded. However, there could still have been failures migrating several issues. SeegetNumberOfFailedIssues()andgetFailedIssues().- See Also:
-
TERMINATED
static final int TERMINATEDThe workfow migration either did not occur as there were problems found with the data before starting the migration. In this, there will be one or more errors. SeegetErrorCollection().Otherwise, the migration could have been stopped before completion as too many failures were encountered. In this case
getNumberOfFailedIssues()should return a positive number andgetFailedIssues()should return the issue ids and issue keys.- See Also:
-
-
Method Details
-
getResult
int getResult()Returns the result of the workflow migration.- Returns:
- Either
SUCCESSorTERMINATED
-
getErrorCollection
ErrorCollection getErrorCollection()Returns a collection of errors that were found before starting the migration. -
getNumberOfFailedIssues
int getNumberOfFailedIssues()The number of issues that failed during the migration, or until the migration was terminated.- Returns:
- 0 if no failures were encountered, or if the migration did not start due to found errors
(see
getNumberOfFailedIssues()). Or the number of failures during the migration, or until the migration was terminated.
-
getFailedIssues
AMapof issue ids to issue keys of failed issues.- Returns:
- an empty map if
getNumberOfFailedIssues()is 0 or a mapping of issue id to issue key for every failed issue during the migration.
-