-
Re: How do I include initial configuration in an App?
Ryan Rutan Dec 17, 2013 12:34 PM (in response to Scott A Johnson)1 person found this helpfulThere are a couple of ways to do this. 1 way is via App Settings, but I would recommend Add-On configure experiences.
Check out the TODO SDK Example:
or use the jive-sdk:
jive-sdk create todo
Specifically, you will have the "config_url" setting in jiveclientconfiguration.json - Definition that will trigger the "add-on" installation configuration experience. Does this help?
-
Re: How do I include initial configuration in an App?
Scott A Johnson Dec 17, 2013 2:10 PM (in response to Ryan Rutan)Is the add-on configure experience applicable to Apps? or just Tiles?
-
Re: How do I include initial configuration in an App?
Ryan Rutan Dec 17, 2013 2:20 PM (in response to Scott A Johnson)Its actually higher-level. It is done via the Add-On. Depending on how you want to write your add-on, you could configure it's behavior with the Add-On configure page, and have your Add-On dynamically service up your app.xml with the configuration information inline/referenced...depending on the exact use-case. Does that makes sense?
For apps, the app.xml contract is just a GET. It can be rendered any which way under the covers. Does that help?
-
Re: How do I include initial configuration in an App?
Scott A Johnson Dec 17, 2013 2:24 PM (in response to Ryan Rutan)I guess I have a lack of understanding about add-ons. How does including/installing an add-on differ from an app or tile? What additional functionality does an add-on give?
-
Re: How do I include initial configuration in an App?
Ryan Rutan Dec 17, 2013 2:29 PM (in response to Scott A Johnson)The Add-On framework is the means by which Apps/Tiles are installed. All Apps, Tiles, Cartridges, ESF Providers, etc... are deployed through add-ons. Think of the Add-On is single deployable element, that has multiple components inside. Check out this presentation for more information:
-
Re: How do I include initial configuration in an App?
Scott A Johnson Dec 17, 2013 4:35 PM (in response to Ryan Rutan)Ok, watched the video, had a look around. Its kinda making more sense now. So the Add-on config experience is defined by the config_url which if I understand loads a custom workflow defined by the add-on developer?
Does this mean the config workflow needs to be hosted externally? Or is it hosted by Jive itself?
Where/how does the configuration get stored and how is it accessed by Tiles and Apps?
-
Re: How do I include initial configuration in an App?
Ryan Rutan Dec 17, 2013 6:31 PM (in response to Scott A Johnson)The config is stored and serviced from whereever your addon is hosted. So most likely not on Jive.
The TODO example has a good set of implementations you can raid to understand the ins and outs, but basically you create a service endpoint for your configure endpoint (usually a get.js) in a routes folder. From there you tell you addon the URL of that configure action and you have autonomy to define that experience (with HTML, JS, CSS) and store/pass along any information you seem fit.
-
Re: How do I include initial configuration in an App?
ztenerowicz Jun 24, 2014 4:24 AM (in response to Ryan Rutan)It's been a while since this thread was active, but I have a question about an important detail in here.
The TODO example reads a config variable and saves it back. It doesn't use it anywhere though.
If I decide to store anything in config and save it
jive.tile.close(config, {});
How do i access this config from anywhere except the current tile? Is it accessible anywhere else?
-
Re: How do I include initial configuration in an App?
Ryan Rutan Jul 22, 2014 10:57 PM (in response to ztenerowicz)1 person found this helpfulSorry for the delay here. The configuration information is persisted to the TileInstance, which receives a "new instance" registration when a Tile has been configured. Once you receive this registration, you should have access to the configuration from your service side and can use it to control the data pushes/content etc... Hope that helps.
-
-
Re: How do I include initial configuration in an App?
hmitchell Feb 2, 2016 8:41 AM (in response to Ryan Rutan)Ryan Rutan wrote:
The config is stored and serviced from whereever your addon is hosted. So most likely not on Jive.
If the app is Jive hosted (jive-sdk build add-on apphosting="jive"), how does the app install config work? Can we include a static page?
-
Re: How do I include initial configuration in an App?
Scott A Johnson Apr 12, 2016 5:00 PM (in response to hmitchell)Ryan Rutan, Rashed Talukder, Aron Racho,
Any answer to this question? Is it possible to create and retrieve add-on configuration for jive hosted add-ons?
Thanks,
Scott
-
Re: How do I include initial configuration in an App?
jussi.heikkolaOct 5, 2016 7:49 AM (in response to Scott A Johnson)
Scott A Johnson here's what I ended up doing for a jive hosted custom view tile add-on
- Reference your addon config page in meta.json with "config_url": "/public/config.html"
- In config.html, you get current config with jive.tile.onOpen(function(config) { ... }) callback, and you can save with jive.tile.close(config, {})
- In custom view tile, get config with REST API (I dont think there's a javascript API wrapper for this). You'll get this: osapi.jive.corev3.AddOn entity
osapi.jive.core.get({
v: "v3",
href: "/addOns/[addon id from meta.json]"
}).execute(function(addon) {
console.log(addon.config);
});
-
-
-
-
-
-
-
-
-
Re: How do I include initial configuration in an App?
david.pinn Sep 24, 2014 8:49 PM (in response to Ryan Rutan)The config_url does not appear to be called in sandbox.jiveon.com. I'm just wondering if the version of Jive that is running at sandbox.jiveon.com is one that supports the config_url setting?
-
Re: How do I include initial configuration in an App?
nilsheuer Sep 25, 2014 12:33 AM (in response to david.pinn)Ryan and I have discussed this for a bit, but I find the config_url setting pretty useless. It seems that calling a jive.tile.close(config, {}); does not actually send the configuration object you might have created to the backend service when the addon is configured (in contrast to the behaviour when configuring a tile).
This dialog would be perfect for initial configuration (entering a license key, asking the installer about configuration options, etc), but since the request is unsigned at that point (remember this gets called before the addon is registered with your service) and the later requests that registers the add-on does not include the config object, I really don't know what you are supposed to do with this option.
Ryan Rutan Aron Racho am I missing something here?
-
Re: How do I include initial configuration in an App?
aron.racho Sep 25, 2014 7:44 AM (in response to nilsheuer)You are meant to make a signed callback to your system via osapi.http.post or get, specifying authz, if necessary. Jive will supply the security headers and you can validate the incoming calls.
-
Re: How do I include initial configuration in an App?
aron.racho Sep 25, 2014 7:48 AM (in response to aron.racho)The config_url is useful for launching a UI at addon configuration time for several usecases:
- initiate an oauth access token dance with Jive to acquire a token for Jive API calls, and send that to your backing service for its use
- give the admin a way to configure service parameters, or even set extended props (for controlling app behavior or even backend service behavior)
- acquire a license as you intimated
... and many other addon global configuration cases. hth
aron
-
Re: How do I include initial configuration in an App?
nilsheuer Sep 25, 2014 8:33 AM (in response to aron.racho)Thanks, Aron. Still confused though. My understanding was that the config_url dialog, is loaded before the registration information of the Jive instance (client id and secret, etc) is being sent to the endpoint defined at register_url.
So I don't really have a way to validate the signed osapi request from the configure_url dialog. Or am I mistaken in the order things are exectured in
-
Re: How do I include initial configuration in an App?
aron.racho Sep 25, 2014 8:37 AM (in response to nilsheuer)Typically the config_url is available after registration with the backend service. there is a way to make it happen even *before* you register, but I have to check on how that is done.
-
Re: How do I include initial configuration in an App?
david.pinn Sep 25, 2014 10:10 AM (in response to aron.racho)Does the config_url actually get accessed? My experiments in the sandbox.jiveon.com have been suggesting otherwise.
-
Re: How do I include initial configuration in an App?
nilsheuer Sep 25, 2014 11:15 AM (in response to aron.racho)OK, in that case that's different to what I thought. I'll check that out.
Nils
-
-
-
-
-
-