Skip to content

Commit 3adc5c4

Browse files
authored
Merge pull request #241 from Project-MONAI/release/1.0.3
Release/1.0.3
2 parents e6195b0 + 3d3800f commit 3adc5c4

File tree

6 files changed

+76
-15
lines changed

6 files changed

+76
-15
lines changed

src/Messaging/Common/Artifact.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ namespace Monai.Deploy.Messaging.Common
1818
{
1919
public class Artifact
2020
{
21+
/// <summary>
22+
/// Type of the artifact
23+
/// </summary>
2124
public ArtifactType Type { get; set; } = ArtifactType.Unset;
25+
26+
/// <summary>
27+
/// relative path from the bucket to the artifact
28+
/// </summary>
2229
public string Path { get; set; } = string.Empty;
2330
}
2431
}

src/Messaging/Common/ArtifactType.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ namespace Monai.Deploy.Messaging.Common
1919
public enum ArtifactType
2020
{
2121
Unset, //Unset
22+
Folder, // Folder
2223
AR, //Autorefraction
2324
ASMT, //Content Assessment Results
2425
AU, //Audio

src/Messaging/Common/ArtifactTypes.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ namespace Monai.Deploy.Messaging.Common
1818
{
1919
public static class ArtifactTypes
2020
{
21-
private static readonly Dictionary<ArtifactType, string> ListOfModularity = new()
21+
public static readonly Dictionary<ArtifactType, string> ListOfModularity = new()
2222
{
2323
{ ArtifactType.Unset, "Unset" },
24+
{ ArtifactType.Folder, "Folders" },
2425
{ ArtifactType.AR, "Autorefract" },
2526
{ ArtifactType.ASMT, "Content Assessment Results" },
2627
{ ArtifactType.AU, "Audio" },

src/Messaging/Events/ArtifactsReceivedEvent.cs

Lines changed: 62 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,83 @@ namespace Monai.Deploy.Messaging.Events
2424
public class ArtifactsReceivedEvent : EventBase
2525
{
2626
/// <summary>
27-
/// Gets or sets the workflow instanceID generated by the Workflow Manager.
27+
/// Gets or sets the ID of the payload which is also used as the root path of the payload.
2828
/// </summary>
29-
[JsonProperty(PropertyName = "workflow_instance_id")]
30-
[JsonPropertyName("workflow_instance_id")]
29+
[JsonProperty(PropertyName = "payload_id")]
30+
[JsonPropertyName("payload_id")]
3131
[Required]
32-
public string WorkflowInstanceId { get; set; } = default!;
32+
public Guid PayloadId { get; set; }
3333

3434
/// <summary>
35-
/// Gets or sets the export task ID generated by the Workflow Manager.
35+
/// Gets or sets the associated workflows to be launched.
3636
/// </summary>
37-
[JsonProperty(PropertyName = "task_id")]
38-
[JsonPropertyName("task_id")]
37+
[JsonProperty(PropertyName = "workflows")]
38+
[JsonPropertyName("workflows")]
39+
public IEnumerable<string> Workflows { get; set; } = new List<string>();
40+
41+
/// <summary>
42+
/// Gets or sets number of files in the payload.
43+
/// </summary>
44+
[JsonProperty(PropertyName = "file_count")]
45+
[JsonPropertyName("file_count")]
3946
[Required]
40-
public string TaskId { get; set; } = default!;
47+
public int FileCount { get; set; }
4148

4249
/// <summary>
43-
/// Gets or set the correlation ID.
4450
/// For DIMSE, the correlation ID is the UUID associated with the first DICOM association received.
45-
/// For ACR, use the Transaction ID in the original request.
51+
/// For an ACR inference request, the correlation ID is the Transaction ID in the original request.
4652
/// </summary>
4753
[JsonProperty(PropertyName = "correlation_id")]
4854
[JsonPropertyName("correlation_id")]
4955
[Required]
5056
public string CorrelationId { get; set; } = default!;
5157

58+
/// <summary>
59+
/// Gets or set the name of the bucket where the files in are stored.
60+
/// </summary>
61+
[JsonProperty(PropertyName = "bucket")]
62+
[JsonPropertyName("bucket")]
63+
[Required]
64+
public string Bucket { get; set; } = default!;
65+
66+
/// <summary>
67+
/// Gets or sets the service that received the original request.
68+
/// </summary>
69+
[JsonProperty(PropertyName = "trigger")]
70+
[JsonPropertyName("trigger")]
71+
public DataOrigin DataTrigger { get; set; } = default!;
72+
73+
/// <summary>
74+
/// Gets or sets the data origins that were involved in triggering this workflow request.
75+
/// </summary>
76+
[JsonProperty(PropertyName = "data_origins")]
77+
[JsonPropertyName("data_origins")]
78+
public List<DataOrigin> DataOrigins { get; private set; } = new List<DataOrigin>();
79+
80+
/// <summary>
81+
/// Gets or sets the time the data was received.
82+
/// </summary>
83+
[JsonProperty(PropertyName = "timestamp")]
84+
[JsonPropertyName("timestamp")]
85+
[Required]
86+
public DateTime Timestamp { get; set; }
87+
88+
/// <summary>
89+
/// Gets or sets the workflow instanceID generated by the Workflow Manager.
90+
/// </summary>
91+
[JsonProperty(PropertyName = "workflow_instance_id")]
92+
[JsonPropertyName("workflow_instance_id")]
93+
[Required]
94+
public string? WorkflowInstanceId { get; set; } = default!;
95+
96+
/// <summary>
97+
/// Gets or sets the export task ID generated by the Workflow Manager.
98+
/// </summary>
99+
[JsonProperty(PropertyName = "task_id")]
100+
[JsonPropertyName("task_id")]
101+
[Required]
102+
public string? TaskId { get; set; } = default!;
103+
52104
/// <summary>
53105
/// Gets or set the list of artifacts.
54106
/// </summary>

src/Messaging/Events/WorkflowRequestEvent.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ public class DataOrigin
5454
[JsonPropertyName("destination")]
5555
public string Destination { get; set; } = default!;
5656

57-
[JsonProperty(PropertyName = "fromExternalApp")]
58-
[JsonPropertyName("fromExternalApp")]
59-
public bool FromExternalApp { get; set; } = false;
57+
[JsonProperty(PropertyName = "artifactType")]
58+
[JsonPropertyName("artifactType")]
59+
public ArtifactType ArtifactType { get; set; } = ArtifactType.Unset;
6060

6161

6262
public override int GetHashCode()

src/Plugins/RabbitMQ/Subscriber/RabbitMqMessageSubscriberService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ private EventingBasicConsumer CreateConsumer(Func<MessageReceivedEventArgs, Task
188188
["@messageId"] = eventArgs.BasicProperties.MessageId,
189189
["@applicationId"] = eventArgs.BasicProperties.AppId,
190190
["@correlationId"] = eventArgs.BasicProperties.CorrelationId,
191-
["@recievedTime"] = DateTime.UtcNow
191+
["@receivedTime"] = DateTime.UtcNow
192192
});
193193

194194
_logger.MessageReceivedFromQueue(queueDeclareResult.QueueName, eventArgs.RoutingKey);

0 commit comments

Comments
 (0)