Skip to content

Comments

FOUR-29250 End Event – External URL with Mustache Support#1963

Open
gproly wants to merge 6 commits intodevelopfrom
feature/FOUR-29250
Open

FOUR-29250 End Event – External URL with Mustache Support#1963
gproly wants to merge 6 commits intodevelopfrom
feature/FOUR-29250

Conversation

@gproly
Copy link
Contributor

@gproly gproly commented Feb 10, 2026

Description:
feat(end event): support Mustache in external URL for element destination

  • Resolve Mustache expressions in end event "External URL" when the token reaches the end event, using the same context as scripts/screens (APP_URL, _request, _user, process variables).
  • Add getElementDestinationMustacheContext() to build context via DataManager with fallback; normalize to plain array for Mustache.
  • Add resolveElementDestinationUrl() to decode HTML entities and render URL template with MustacheExpressionEvaluator. FEEL is not supported.
  • Apply resolution only for externalURL type; conditional redirect URLs also go through Mustache when destination is external URL.
  • Harden getElementDestinationAttribute(): ensure conditionalRedirectProp and elementDestinationProp are never null (json_decode ?? [], pass ?? []).
  • Modeler: allow URL validation when string contains {{ (Mustache); update helper and error copy to document _request.id, _user.id, process vars.

Related tickets:
https://processmaker.atlassian.net/browse/FOUR-29250

Description:
feat(end event): support Mustache in external URL for element destination

- Resolve Mustache expressions in end event "External URL" when the token
  reaches the end event, using the same context as scripts/screens
  (APP_URL, _request, _user, process variables).
- Add getElementDestinationMustacheContext() to build context via DataManager
  with fallback; normalize to plain array for Mustache.
- Add resolveElementDestinationUrl() to decode HTML entities and render
  URL template with MustacheExpressionEvaluator. FEEL is not supported.
- Apply resolution only for externalURL type; conditional redirect URLs
  also go through Mustache when destination is external URL.
- Harden getElementDestinationAttribute(): ensure conditionalRedirectProp
  and elementDestinationProp are never null (json_decode ?? [], pass ?? []).
- Modeler: allow URL validation when string contains {{ (Mustache); update
  helper and error copy to document _request.id, _user.id, process vars.
Related tickets:
https://processmaker.atlassian.net/browse/FOUR-29250
@cypress
Copy link

cypress bot commented Feb 10, 2026

modeler    Run #1765

Run Properties:  status check passed Passed #1765  •  git commit b19671ea7e: FOUR-29250 End Event – External URL with Mustache Support
Project modeler
Branch Review feature/FOUR-29250
Run status status check passed Passed #1765
Run duration 06m 07s
Commit git commit b19671ea7e: FOUR-29250 End Event – External URL with Mustache Support
Committer Roly Rudy Gutierrez Pinto
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 83
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 310
View all changes introduced in this branch ↗︎

…pector to display element configuration data (formData) as key-value pairs with keyboard-accessible toggle.
- Treat non-strings and empty/whitespace as invalid in isValidURL; use type-safe isEmpty in getValidationErrorForURL
- Accept Mustache only when full {{ ... }} pattern matches (reject "{{", "{{invalid", etc.)
…he examples outside $t() so {{APP_URL}}, {{_request.id}}, {{_user.id}} display correctly.
@pmPaulis pmPaulis changed the title FOUR-29250 End Event – External URL with Mustache/FEEL Support FOUR-29250 End Event – External URL with Mustache Support Feb 17, 2026
@processmaker-sonarqube
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants