Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How to pass in shared objects to room after creation with server2server api

Avatar

Level 3

Any tips or code examples are welcome.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Hi There,

The feature which does this for you is templating. You can set up that

sharedProperty once, at developer time, then save it in an application

template (from the Room Console or Dev Portal), which you use as the second

parameter in createRoom. Then all new rooms come pre-provisioned with the

sharedProperty. Even values entered in there are saved.

see : http://learn.adobe.com/wiki/display/lccs/6.3Templatingrooms

Hope that helps,

nigel

View solution in original post

4 Replies

Avatar

Former Community Member

Tip : Spend more time explaining the problem.

nigel

Avatar

Level 3

Thanks

Essentially, I just want to pass in a few variables that will be shared by all the clients in the room.

At the moment I do this with the first client that accesses the room by doing a remote call for the value:

sharedVar = new SharedProperty();

sharedVar.sharedID = id;

sharedVar.subscribe();

If I could define this via the server when creating the room it would be more elegant I believe, sg like this on the server:

$lccs->createroom(....

$lccs->declare_shared_stuff (....

Avatar

Correct answer by
Former Community Member

Hi There,

The feature which does this for you is templating. You can set up that

sharedProperty once, at developer time, then save it in an application

template (from the Room Console or Dev Portal), which you use as the second

parameter in createRoom. Then all new rooms come pre-provisioned with the

sharedProperty. Even values entered in there are saved.

see : http://learn.adobe.com/wiki/display/lccs/6.3Templatingrooms

Hope that helps,

nigel

Avatar

Level 3

Much appreciated Nigel.

Once someone gets around the terminology this thing is a piece of cake

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----