-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove SetOptions method from builder (#178)
* Move class * Add WorkflowMetadata attribute * Add missing namespaces, specify missing properties * Add missing namespace * Add missing namespace * Add test case
- Loading branch information
Showing
80 changed files
with
546 additions
and
429 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using ConductorSharp.Engine.Builders; | ||
using ConductorSharp.Engine.Builders.Metadata; | ||
using ConductorSharp.Engine.Model; | ||
using ConductorSharp.Patterns.Builders; | ||
using ConductorSharp.Patterns.Model; | ||
|
@@ -14,6 +15,7 @@ public class CSharpLambdaWorkflowInput : WorkflowInput<CSharpLambdaWorkflowOutpu | |
|
||
public class CSharpLambdaWorkflowOutput : WorkflowOutput { } | ||
|
||
[WorkflowMetadata(OwnerEmail = "[email protected]")] | ||
public class CSharpLambdaWorkflow : Workflow<CSharpLambdaWorkflow, CSharpLambdaWorkflowInput, CSharpLambdaWorkflowOutput> | ||
{ | ||
public class LambdaTaskInput : IRequest<LambdaTaskOutput> | ||
|
@@ -81,8 +83,6 @@ public override void BuildDefinition() | |
} | ||
); | ||
#pragma warning restore CS0618 // Type or member is obsolete | ||
|
||
_builder.SetOptions(options => options.OwnerEmail = "[email protected]"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using ConductorSharp.Engine.Builders; | ||
using ConductorSharp.Engine.Builders.Metadata; | ||
using ConductorSharp.Engine.Util; | ||
using ConductorSharp.Patterns.Tasks; | ||
using Newtonsoft.Json; | ||
|
@@ -14,18 +15,19 @@ public class HandleNotificationFailureInput : WorkflowInput<HandleNotificationFa | |
public class HandleNotificationFailureOutput : WorkflowOutput { } | ||
|
||
[OriginalName("NOTIFICATION_handle_failure")] | ||
[WorkflowMetadata(OwnerEmail = "[email protected]")] | ||
public class HandleNotificationFailure : Workflow<HandleNotificationFailure, HandleNotificationFailureInput, HandleNotificationFailureOutput> | ||
{ | ||
public HandleNotificationFailure( | ||
WorkflowDefinitionBuilder<HandleNotificationFailure, HandleNotificationFailureInput, HandleNotificationFailureOutput> builder | ||
) : base(builder) { } | ||
) | ||
: base(builder) { } | ||
|
||
public ReadWorkflowTasks ReadExecutedTasks { get; set; } | ||
|
||
public override void BuildDefinition() | ||
{ | ||
_builder.AddTask(a => a.ReadExecutedTasks, b => new() { TaskNames = "dynamic_handler", WorkflowId = b.WorkflowInput.WorkflowId }); | ||
_builder.SetOptions(options => options.OwnerEmail = "[email protected]"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
using ConductorSharp.Definitions.Generated; | ||
using ConductorSharp.Engine.Builders; | ||
using ConductorSharp.Engine.Builders.Metadata; | ||
using ConductorSharp.Engine.Model; | ||
using ConductorSharp.Engine.Util; | ||
using ConductorSharp.Patterns.Tasks; | ||
|
@@ -25,11 +26,13 @@ public class ExpectedDynamicInput : CustomerGetV1Input, IRequest<ExpectedDynamic | |
public class ExpectedDynamicOutput : CustomerGetV1Output { } | ||
|
||
[OriginalName("NOTIFICATION_send_to_customer")] | ||
[WorkflowMetadata(OwnerEmail = "[email protected]", FailureWorkflow = typeof(HandleNotificationFailure))] | ||
public class SendCustomerNotification : Workflow<SendCustomerNotification, SendCustomerNotificationInput, SendCustomerNotificationOutput> | ||
{ | ||
public SendCustomerNotification( | ||
WorkflowDefinitionBuilder<SendCustomerNotification, SendCustomerNotificationInput, SendCustomerNotificationOutput> builder | ||
) : base(builder) { } | ||
) | ||
: base(builder) { } | ||
|
||
public EmailPrepareV1 PrepareEmail { get; set; } | ||
public DynamicTaskModel<ExpectedDynamicInput, ExpectedDynamicOutput> DynamicHandler { get; set; } | ||
|
@@ -60,13 +63,6 @@ public override void BuildDefinition() | |
Constant = 500 | ||
} | ||
); | ||
|
||
_builder.SetOptions(options => | ||
{ | ||
options.Version = 1; | ||
options.FailureWorkflow = typeof(HandleNotificationFailure); | ||
options.OwnerEmail = "[email protected]"; | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.