FOUR-32305: Export assets referenced in scripts using environment variables#8918
FOUR-32305: Export assets referenced in scripts using environment variables#8918caleeli wants to merge 5 commits into
Conversation
|
QA server K8S was successfully deployed https://ci-8568b9d751.engk8s.processmaker.net |
|
QA server K8S was successfully deployed https://ci-8568b9d751.engk8s.processmaker.net |
|
Exporting the process with linked environment variable: part1.movImporting the process with linked environment variable: part2.mov |
| { | ||
| foreach ($this->getDependents(DependentType::ENVIRONMENT_VARIABLE_ASSET, true) as $dependent) { | ||
| $asset = $dependent->model; | ||
| if (!$asset) { |
There was a problem hiding this comment.
🔴 A discarded or unresolved asset (Custom Import) can be returned as an empty model. The truthiness check at line 55 passes, then the importer saves asset_uuid = null and an empty numeric value. The fallback at line 66 is therefore bypassed, leaving scripts with a broken environment variable after Import or DevLink. Only use a persisted dependent asset; otherwise fail clearly or restore a deliberately unlinked value without persisting a half-link.
There was a problem hiding this comment.
This scenario is covered and tested in this PR: #8928
| { | ||
| class: "ProcessMaker\\Package\\PackageDecisionEngine\\Models\\DecisionTable", | ||
| label: "Decision Table", | ||
| apiPath: "decision-tables", |
There was a problem hiding this comment.
🔴 This point to nonexistent APIs. Decision Tables use decision_tables; FlowGenies use package-ai/flow_genies. Because AssetLinkFields.vue (line 192) silently converts request failures into an empty list, both advertised asset types are unusable without any visible error.
| { | ||
| $fields = ['name', 'description']; | ||
| if ($request->filled('value')) { | ||
| $data = $this->prepareAssetLinkInput($request->all()); |
There was a problem hiding this comment.
🟠 If asset_uuid is retained, update validation does not actually guarantee both-or-neither. It validates only the incoming payload, so clearing one link field while omitting the other can persist an inconsistent pair. Validate the merged resulting state or update both fields atomically.
…e related logic to use only value for asset linking
|
QA server K8S was successfully deployed https://ci-8568b9d751.engk8s.processmaker.net |
|
|
QA server K8S was successfully deployed https://ci-8568b9d751.engk8s.processmaker.net |







Issue & Reproduction Steps
As process architect I require us export/import assets referenced in script code same as we do in other places.
Solution
How to Test
Related Tickets & Packages
ci:deploy