Closed rdesantis closed 4 years ago
Better than the above would be to make PROCESS a data source. Then you could do things like:
UPDATE var1, var1 FROM PROCESS 'name' arg1, arg2
...or...
FOR var1, var2 FROM PROCESS 'name' arg1, arg2
This would be an opportunity to genericize the RUN command to accept any data source that is capable of not returning a result, including an enhancement to the new EMAIL data source to make it capable of taking actions without returning a result.
When invoked from the command line, the only supported return value type is Integer.
When invoked from another process, any return type is supported including TABLE.
Invocation syntax might be:
RUN PROCESS 'name' arg1 [, arg2 ... ] RETURNING variable
Within the process itself, there's no strong requirement that the return type be declared. I think it's good enough to just implement a "RETURN expression" task that terminates the process returning the evaluated expression.