charleslcso
charleslcso

Reputation: 180

Passing variables from Pre-Process to Post-Process scripts

In a DreamFactory/Bitnami instance I managed to get an Event's Pre-Process script and Post-Process script running. However, there are variables that are generated during the Pre-Process event script that need to be passed to Post-Process script for further processing.

How should I tackle this problem?

I tried to use Payload within Request object, but it is not retained between the scripts. Also after further reading I understand that Payload is not used for this purpose.

Upvotes: 0

Views: 90

Answers (1)

Incorporeal Logic
Incorporeal Logic

Reputation: 280

The two scripts should have no inherent knowledge of each other. Instead of attempting this method, which should not work without jerry-rigging, I believe your best bet would be to POST the concerned data from the first script to an endpoint that calls the second script.

Try starting with these two articles:

https://community.dreamfactory.com/t/v8js-custom-script-call-another-v8js-custom-script/3236

https://community.dreamfactory.com/t/calling-another-endpoint-from-a-custom-script/3847

Upvotes: 0

Related Questions