[JSMODELS-46] Backend live actions - jsAction ValueContext handling causes reduced functionality Created: 05/Oct/22  Updated: 10/Oct/22

Status: Open
Project: Magnolia Javascript Models
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Andreas Syrmas Assignee: Scot Rhodes
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

While trying to use the javascript actions for the magnolia in order to create some integrations we run upon the issue that info.magnolia.module.backendlive.actions.JavascriptAction binds to the content variable the unwrapped content of ValueContext<?> item, in fact the method getSingleOrThrow is used which is causing issues in the following scenarios

  1. It fails to instantiate on the root level of a workspace if I want to create a dialog to do something without having a node selected
  2. By unwrapping the item the dialog context and functionality is lost so each action has to be split in two parts (create with a simple dialog or app/publish to external system)

On a first look passing the ValueContext<?> item in the script whatever that may be would increase the use cases for jsActions exponentially 



 Comments   
Comment by Scot Rhodes [ 10/Oct/22 ]

Hi Andreas,

We can have a chat about suggestions to resolve this. Please let me know when you have time for a chat.

Sincerely,

Scot

Comment by Andreas Syrmas [ 10/Oct/22 ]

Hi Scot,

having a chat sounds great. How does Tue 11 Oct around 11AM Athens time sounds, or would you prefer something in the evening like 16:00 Athens time?

 

All the best,

Andreas

Generated at Mon Feb 12 05:59:06 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.