Send Persistent Parameters Via RestApi
Closed this issue · 4 comments
Hi,
I am trying to send parameters to /workflowapi/executecommand api but couldn't find the way. Documentation says that it is possible to send parameters via "parameters" json data at request body (https://workflowengine.io/documentation/workflow-server/workflow-api/).
Thanks
Hello.
Did you try to add parameters to request's parameters in URL or the body?
Hello.
Did you try to add parameters to request's parameters in URL or the body?
Hi, I tried both of them and didnt work. Finally found the solution. When I create parameter and define this parameter as any transition's command it works.
Hi,
Finally I solved the problem when I create parameter and define this parameter in as command.
Hi, you can send initial process parameters. If you want these parameters to be saved, that is, to be persistent, then you need to explicitly declare them in the schema. Look at the parameters documentation https://workflowengine.io/documentation/scheme/parameters/. Then you can pass these parameters using POST or as part of the json request body, or as fields in the form. The first method is described in the swagger file, which describes the API. https://workflowengine.io/downloads/assets/workflowserverapi.yaml Look at the CreateInstanceWithParameters method. How to work with the second method can be found in the SoapUI project. https://workflowengine.io/downloads/assets/soapuitests.zip A look at the test, which is called ParametersTestScheme, when the process is initialized, the amount parameter is passed to it. All described things are available for download from the page https://workflowengine.io/downloads/server/