MS SQL Stored Procedure Process Event Script not executing on either GET,POST [RESOLVED]

Hello.

Great product, love it!

Process Event Scripts don’t appear to be executing on either GET,POST, pre or post process for Stored Procedures.
Admin Application Version: 2.0.6 DreamFactory Version: 2.0.4

I have a role defined and API an SCRIPT permissions enabled. When I add some post_process code for a SQL table with GET for example, the Process Event Script is executing fine. But I cant get any code to execute for either GET or POST for Stored procedures. The dataset result of stored procedures calls all works and is returned in JSON/XML as expected. I also have an API key for the application and role which I’m currently using.

[POST] {service}._proc.{procedure_name} {service}._proc.{procedure_name}.post.post_process
[GET] {service}._proc.{procedure_name} {service}._proc.{procedure_name}.get.post_process

Any help would be greatly appreciated.

Regards, Kieren.

This is a bug that I believe was resolved in the 2.1 release.

1 Like

Thanks for your reply.

I updated to the latest version.
Admin Application Version: 2.1.0
DreamFactory Version: 2.1.0
running on Red Hat Enterprise Linux Server release 7.1

I’m now receive the following message in the dreamfactory.log when setting up a v8js post process script event

The script only had one line containing the following
var_dump(“Lets code ArnoldC”);

[2016-02-02 21:31:10] local.DEBUG: Resource event: {service}._proc.{procname}.get.pre_process
[2016-02-02 21:31:10] local.DEBUG: Resource event: {service}.proc.{procname}.get.post_process
[2016-02-02 21:31:10] local.ERROR: Exception executing javascript: {service}.
{procname}.get.post_process:8: SyntaxError: Unexpected token ;
[2016-02-02 21:31:10] local.ERROR: * Script did not return an array:
[2016-02-02 21:31:10] local.DEBUG: Resource event: {service}._proc.{procedure_name}.get.post_process

Any help would be greatly appreciated.
Regards, Kieren.

Try running a “php -m | grep v8” to see if v8js is installed or not. That might be the problem there.

i think var_dump requires an object or array.
Try
var_dump(event);

And see if the event object is written to the log.