Skip to content

Commit

Permalink
Merge pull request #7519 from GlobalDataverseCommunityConsortium/IQSS…
Browse files Browse the repository at this point in the history
…/7517-fix-prepublication-workflows

IQSS/7517-fix-prepublication-workflow
  • Loading branch information
kcondon authored Jan 21, 2021
2 parents 492a651 + a518ce9 commit 9d6801d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,12 @@ public boolean onSuccess(CommandContext ctxt, Object r) {
}

if (dataset != null) {
logger.fine("From onSuccess, calling FinalizeDatasetPublicationCommand for dataset " + dataset.getGlobalId().asString());
ctxt.datasets().callFinalizePublishCommandAsynchronously(dataset.getId(), ctxt, request, datasetExternallyReleased);
Optional<Workflow> prePubWf = ctxt.workflows().getDefaultWorkflow(TriggerType.PrePublishDataset);
//A pre-publication workflow will call FinalizeDatasetPublicationCommand itself when it completes
if (! prePubWf.isPresent() ) {
logger.fine("From onSuccess, calling FinalizeDatasetPublicationCommand for dataset " + dataset.getGlobalId().asString());
ctxt.datasets().callFinalizePublishCommandAsynchronously(dataset.getId(), ctxt, request, datasetExternallyReleased);
}
return true;
}

Expand Down

0 comments on commit 9d6801d

Please sign in to comment.