Skip to content

Commit

Permalink
Adds AbandonCurrentMoveToNext to logic handler for `CompleteCurrent… (
Browse files Browse the repository at this point in the history
#104)

* Adds `AbandonCurrentMoveToNext` to logic handler for `CompleteCurrentMoveToNext`

* Constant pattern null check
danielskovli authored May 30, 2024
1 parent f92bd3d commit f68a61c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Controllers/Storage/ProcessController.cs
Original file line number Diff line number Diff line change
@@ -76,8 +76,9 @@ public async Task<ActionResult<Instance>> PutProcess(

string altinnTaskType = existingInstance.Process?.CurrentTask?.AltinnTaskType;
string taskId = null;

if (processState?.CurrentTask?.FlowType != null && !processState.CurrentTask.FlowType.Equals("CompleteCurrentMoveToNext"))

var moveNextFlows = new []{"CompleteCurrentMoveToNext", "AbandonCurrentMoveToNext"};
if (processState?.CurrentTask?.FlowType is not null && !moveNextFlows.Contains(processState.CurrentTask.FlowType))
{
altinnTaskType = processState.CurrentTask.AltinnTaskType;
taskId = processState.CurrentTask.ElementId;

0 comments on commit f68a61c

Please sign in to comment.