Skip to content

Commit fdfe70b

Browse files
committed
Reply to interapp message
1 parent 87a7afb commit fdfe70b

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

QAction_9990990/FlowProvisioningExecutor.cs

+20-9
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,31 @@ public override bool TryExecute(object dataSource, object dataDestination, out M
2323
// Flow engineering
2424
var flowEngineering = FlowEngineeringManager.GetInstance(protocol);
2525

26-
switch (Message.ActionType)
26+
try
2727
{
28-
case ActionType.Create:
29-
var addedFlows = flowEngineering.RegisterProvisionedFlowFromInterAppMessage(protocol, Message);
28+
switch (Message.ActionType)
29+
{
30+
case ActionType.Create:
31+
var addedFlows = flowEngineering.RegisterProvisionedFlowFromInterAppMessage(protocol, Message);
3032

31-
break;
33+
break;
3234

33-
case ActionType.Delete:
34-
var (provisionedFlow, removedFlows) = flowEngineering.UnregisterProvisionedFlowFromInterAppMessage(protocol, Message);
35+
case ActionType.Delete:
36+
var (provisionedFlow, removedFlows) = flowEngineering.UnregisterProvisionedFlowFromInterAppMessage(protocol, Message);
3537

36-
break;
38+
break;
3739

38-
default:
39-
throw new InvalidOperationException($"Unknown action: {Message.ActionType}");
40+
default:
41+
throw new InvalidOperationException($"Unknown action: {Message.ActionType}");
42+
}
43+
44+
// in reality this should be done after polling and validating the configuration
45+
Message.ReplySuccess(protocol);
46+
}
47+
catch (Exception ex)
48+
{
49+
Message.ReplyFailed(protocol, ex.ToString());
50+
throw;
4051
}
4152

4253
optionalReturnMessage = null;

0 commit comments

Comments
 (0)