Skip to content

Commit

Permalink
adding new fields to messages for external app executions
Browse files Browse the repository at this point in the history
Signed-off-by: Neil South <[email protected]>
  • Loading branch information
neildsouth committed Jul 21, 2023
1 parent 8f81687 commit d805500
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Messaging/Common/ExportRequestType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

namespace Monai.Deploy.Messaging.Common
{
public enum ExportRequestType
{
None = 0,
ExternalProcessing
}
}
10 changes: 10 additions & 0 deletions src/Messaging/Events/ExportRequestEvent.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

using System.ComponentModel.DataAnnotations;
using Monai.Deploy.Messaging.Common;
using Newtonsoft.Json;

namespace Monai.Deploy.Messaging.Events
Expand Down Expand Up @@ -75,6 +76,15 @@ public class ExportRequestEvent : EventBase
/// </summary>
public List<string> ErrorMessages { get; private set; }

/// <summary>
/// Gets or set the ExportRequest type.
/// For standard exports this will be ExportRequestType.None
/// but for exports to external apps this will be ExportRequestType.ExternalProcessing
/// </summary>
[JsonProperty(PropertyName = "export_request")]
[Required]
public ExportRequestType ExportRequest { get; set; } = default!;

public ExportRequestEvent()
{
ErrorMessages = new List<string>();
Expand Down
8 changes: 8 additions & 0 deletions src/Messaging/Events/WorkflowRequestEvent.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ public class WorkflowRequestEvent : EventBase
[Required]
public DateTime Timestamp { get; set; }

/// <summary>
/// Sets the workflow instance ID for the Workflow Manager.
/// This is only applicable to resume events (after external app executions)
/// In standard workflows this will not be set
/// </summary>
[JsonProperty(PropertyName = "workflow_instance_id")]
public string? WorkflowInstanceId { get; set; } = default;

/// <summary>
/// Gets or sets a list of files and metadata files in this request.
/// </summary>
Expand Down

0 comments on commit d805500

Please sign in to comment.