Skip to content

Commit

Permalink
feat(clearinghouse): add comments to process step and application che…
Browse files Browse the repository at this point in the history
…cklist (#847)

* enhance application checklist with a comment of the skipped self description step
* adjust selfDescription retriever to check if clearinghouseConnect is disabled
--------------------
Reviewed-By: Evelyn Gurschler <evelyn.gurschler@bmw.de>
Reviewed-By: Norbert Truchsess <norbert.truchsess@t-online.de>
Refs: #837
  • Loading branch information
Phil91 authored Aug 7, 2024
1 parent 7fa72b1 commit 4dea66d
Show file tree
Hide file tree
Showing 14 changed files with 9,716 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public Task TriggerChecklistAsync(Guid applicationId, ApplicationChecklistEntryT
throw new ControllerArgumentException($"The processStep {processStepTypeId} is not retriggerable");
}

var nextStepData = processStepTypeId.GetNextProcessStepDataForManualTriggerProcessStepId();
var nextStepData = processStepTypeId.GetNextProcessStepDataForManualTriggerProcessStepId(_settings.ClearinghouseConnectDisabled);
if (nextStepData == default)
{
throw new UnexpectedConditionException($"While the processStep {processStepTypeId} is configured to be retriggerable there is no next step configured");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ public class RegistrationSettings
public string HelpAddress { get; set; } = null!;

public bool UseDimWallet { get; set; }

/// <summary>
/// If <c>true</c> all sd factory calls are disabled and won't be called. The respective process steps will be skipped.
/// </summary>
public bool ClearinghouseConnectDisabled { get; set; }
}

public static class RegistrationSettingsExtension
Expand Down
10 changes: 7 additions & 3 deletions src/administration/Administration.Service/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,15 @@
},
"Connectors": {
"MaxPageSize": 20,
"ValidCertificationContentTypes": []
"ValidCertificationContentTypes": [],
"SelfDescriptionDocumentUrl": "",
"ClearinghouseConnectDisabled": false
},
"Registration": {
"ApplicationsMaxPageSize": 20,
"DocumentTypeIds": [],
"UseDimWallet": false
"UseDimWallet": false,
"ClearinghouseConnectDisabled": false
},
"UserManagement": {
"ApplicationsMaxPageSize": 20,
Expand Down Expand Up @@ -314,7 +317,8 @@
"Scope": "",
"TokenAddress": "",
"SdFactoryUrl": "https://sdfactory.example.org/selfdescription",
"SdFactoryIssuerBpn": ""
"SdFactoryIssuerBpn": "",
"ClearinghouseConnectDisabled": false
},
"Dim": {
"Username": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ public Task RegisterConnectorAsync(
{
return new IApplicationChecklistService.WorkerChecklistProcessStepExecutionResult(
ProcessStepStatusId.SKIPPED,
entry => entry.ApplicationChecklistEntryStatusId = ApplicationChecklistEntryStatusId.DONE,
new[] { ProcessStepTypeId.ACTIVATE_APPLICATION },
entry =>
{
entry.ApplicationChecklistEntryStatusId = ApplicationChecklistEntryStatusId.SKIPPED;
entry.Comment = "Self description was skipped due to clearinghouse trigger is disabled";
},
[ProcessStepTypeId.ACTIVATE_APPLICATION],
null,
true,
null
"Self description was skipped due to clearinghouse trigger is disabled"
);
}

Expand All @@ -67,7 +71,7 @@ await RegisterSelfDescriptionInternalAsync(context.ApplicationId, cancellationTo
return new IApplicationChecklistService.WorkerChecklistProcessStepExecutionResult(
ProcessStepStatusId.DONE,
entry => entry.ApplicationChecklistEntryStatusId = ApplicationChecklistEntryStatusId.IN_PROGRESS,
new[] { ProcessStepTypeId.FINISH_SELF_DESCRIPTION_LP },
[ProcessStepTypeId.FINISH_SELF_DESCRIPTION_LP],
null,
true,
null
Expand Down Expand Up @@ -106,9 +110,9 @@ public async Task ProcessFinishSelfDescriptionLpForApplication(SelfDescriptionRe
.VerifyChecklistEntryAndProcessSteps(
data.ExternalId,
ApplicationChecklistEntryTypeId.SELF_DESCRIPTION_LP,
new[] { ApplicationChecklistEntryStatusId.IN_PROGRESS },
[ApplicationChecklistEntryStatusId.IN_PROGRESS],
ProcessStepTypeId.FINISH_SELF_DESCRIPTION_LP,
processStepTypeIds: new[] { ProcessStepTypeId.START_SELF_DESCRIPTION_LP })
processStepTypeIds: [ProcessStepTypeId.START_SELF_DESCRIPTION_LP])
.ConfigureAwait(ConfigureAwaitOptions.None);

if (confirm)
Expand Down
Loading

0 comments on commit 4dea66d

Please sign in to comment.