@@ -78,18 +78,17 @@ protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient cli
78
78
String workflowId = request .param (WORKFLOW_ID );
79
79
String [] validation = request .paramAsStringArray (VALIDATION , new String [] { "all" });
80
80
boolean provision = request .paramAsBoolean (PROVISION_WORKFLOW , false );
81
- final List <String > validCreateParams = List .of (WORKFLOW_ID , VALIDATION , PROVISION_WORKFLOW );
82
81
// If provisioning, consume all other params and pass to provision transport action
83
82
Map <String , String > params = provision
84
83
? request .params ()
85
84
.keySet ()
86
85
.stream ()
87
- .filter (k -> !validCreateParams .contains (k ))
86
+ .filter (k -> !request . consumedParams () .contains (k ))
88
87
.collect (Collectors .toMap (Function .identity (), request ::param ))
89
88
: request .params ()
90
89
.entrySet ()
91
90
.stream ()
92
- .filter (e -> !validCreateParams .contains (e .getKey ()))
91
+ .filter (e -> !request . consumedParams () .contains (e .getKey ()))
93
92
.collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue ));
94
93
if (!flowFrameworkSettings .isFlowFrameworkEnabled ()) {
95
94
FlowFrameworkException ffe = new FlowFrameworkException (
@@ -105,7 +104,7 @@ protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient cli
105
104
params .keySet ().stream ().forEach (request ::param );
106
105
request .content ();
107
106
FlowFrameworkException ffe = new FlowFrameworkException (
108
- "Only the parameters " + validCreateParams + " are permitted unless the provision parameter is set to true." ,
107
+ "Only the parameters " + request . consumedParams () + " are permitted unless the provision parameter is set to true." ,
109
108
RestStatus .BAD_REQUEST
110
109
);
111
110
return channel -> channel .sendResponse (
0 commit comments