FOUR-27111 | Implement Backend Logic to Call API → Submit Document for Extraction #8620
+5
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.




Summary
This PR adds configuration support for Smart Extract API variables, making them available as environment variables to scripts running in the Script Microservice Runner.
Solution
1. Configuration (
config/app.php)smart_extract_api_hostconfiguration option with default value'extract-api.processmaker.net'smart_extract_api_tokenconfiguration option (empty string by default)2. Script Runner Environment Variables (
ProcessMaker/ScriptRunners/ScriptMicroserviceRunner.php)SMART_EXTRACT_API_HOSTto the environment variables passed to scriptsSMART_EXTRACT_PM_API_TOKENto the environment variables passed to scriptsAPI_TOKEN,API_HOST, etc.How To Test
SMART_EXTRACT_API_HOSTandSMART_EXTRACT_PM_API_TOKENas environment variablesCode Review Checklist
Note
Adds Smart Extract API host/token config and injects them as
SMART_EXTRACT_API_HOSTandSMART_EXTRACT_PM_API_TOKENenv vars to scripts.app.smart_extract_api_host(defaultextract-api.processmaker.net).app.smart_extract_api_token(default empty).ProcessMaker/ScriptRunners/ScriptMicroserviceRunner.php):SMART_EXTRACT_API_HOSTandSMART_EXTRACT_PM_API_TOKENin script environment variables alongside existingAPI_*vars.Written by Cursor Bugbot for commit 34840d3. This will update automatically on new commits. Configure here.