Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle exceptions when checking revision of BatchProcess #1254

Closed
csc-gip opened this issue Nov 15, 2024 · 0 comments · Fixed by #1265
Closed

Handle exceptions when checking revision of BatchProcess #1254

csc-gip opened this issue Nov 15, 2024 · 0 comments · Fixed by #1265
Assignees
Labels
enhancement New feature or request

Comments

@csc-gip
Copy link
Contributor

csc-gip commented Nov 15, 2024

This should return false

public boolean isInRevision(Long revision) {
return batchProcessArchiveData.getRevision().equals(revision);
}

if the BatchProcess belongs to an unknown revision and throws an IllegalArgumentException

public Long getRevision() {
Long revision = RevisionManagement.REVISION_DEFAULT_WORKSPACE;
try {
revision = XynaFactory.getInstance().getFactoryManagement().getXynaFactoryControl().getRevisionManagement()
.getRevision(application, version, workspace);
} catch (XNWH_OBJECT_NOT_FOUND_FOR_PRIMARY_KEY e) {
if (application != null) {
throw new IllegalArgumentException("version '" + version + "' not found in application '" + application +"'", e);
} else {
throw new IllegalArgumentException("workspace '" + workspace + "' not found", e);
}
}
return revision;
}

@csc-gip csc-gip added the enhancement New feature or request label Nov 15, 2024
@LukasFey-GIP LukasFey-GIP self-assigned this Nov 20, 2024
@LukasFey-GIP LukasFey-GIP linked a pull request Nov 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants