From 042418991910a22ff772aedc113ac84792b736b8 Mon Sep 17 00:00:00 2001 From: Miguel Prieto Date: Wed, 4 Dec 2024 10:13:17 -0300 Subject: [PATCH] In Orkes Conductor API when polling a workflow task maybe present without a name or task reference --- Conductor/Client/Models/WorkflowTask.cs | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/Conductor/Client/Models/WorkflowTask.cs b/Conductor/Client/Models/WorkflowTask.cs index d73bca7..d90d3c1 100644 --- a/Conductor/Client/Models/WorkflowTask.cs +++ b/Conductor/Client/Models/WorkflowTask.cs @@ -15,7 +15,6 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using System.IO; using System.Linq; using System.Runtime.Serialization; using System.Text; @@ -225,24 +224,8 @@ public enum WorkflowTaskTypeEnum /// workflowTaskType. public WorkflowTask(bool? asyncComplete = default(bool?), string caseExpression = default(string), string caseValueParam = default(string), Dictionary> decisionCases = default(Dictionary>), List defaultCase = default(List), List defaultExclusiveJoinTask = default(List), string description = default(string), string dynamicForkJoinTasksParam = default(string), string dynamicForkTasksInputParamName = default(string), string dynamicForkTasksParam = default(string), string dynamicTaskNameParam = default(string), string evaluatorType = default(string), string expression = default(string), List> forkTasks = default(List>), Dictionary inputParameters = default(Dictionary), List joinOn = default(List), string loopCondition = default(string), List loopOver = default(List), string name = default(string), bool? optional = default(bool?), bool? rateLimited = default(bool?), int? retryCount = default(int?), string scriptExpression = default(string), string sink = default(string), int? startDelay = default(int?), SubWorkflowParams subWorkflowParam = default(SubWorkflowParams), TaskDef taskDefinition = default(TaskDef), string taskReferenceName = default(string), string type = default(string), WorkflowTaskTypeEnum? workflowTaskType = default(WorkflowTaskTypeEnum?), Dictionary onStateChange = default(Dictionary)) { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for WorkflowTask and cannot be null"); - } - else - { - this.Name = name; - } - // to ensure "taskReferenceName" is required (not null) - if (taskReferenceName == null) - { - throw new InvalidDataException("taskReferenceName is a required property for WorkflowTask and cannot be null"); - } - else - { - this.TaskReferenceName = taskReferenceName; - } + this.TaskReferenceName = taskReferenceName; + this.Name = name; this.AsyncComplete = asyncComplete; this.CaseExpression = caseExpression; this.CaseValueParam = caseValueParam;