Skip navigation
1 2 3 4 Previous Next

Jive Developers

169 posts

Just a friendly note because this is the second time (at least) that I've run into this problem and it is very frustrating and unintuitive to resolve.

 

We are on a hosted instance (7.0.3) and have several custom macros built. These load some javascript to do their thing (display a video player, dynamic tables, etc.). I was just refactoring our code and extracted some javascript out from being generated in the Macro Java class to loading from a js file because it was soooo much easier to debug and tweak etc.

 

Well, then we noticed that our Overview Pages would fail to load the Layout/Widget Panel when editing and instead would just get stuck on the 'Loading' spinner graphic.

 

I narrowed it down to only when a document which contained the macro I just modified was being loaded in a View Document widget. Not just that, but only when MULTIPLE of these macros were in that document.

 

Very curious I thought.

 

So after flailing around for a while, having a good yell at the computer, it finally dawned on me that I had seen this happen before with another macro that I also "simplified" a year or so ago.

 

What I recalled then, was that it was a problem with how the widgets are loaded "safely" when in Overview Page edit mode. What this does is extract all the scripts  and then load them dynamically or something weird. The problem is that if it hits the same script src url twice, it chokes and fails silently. What a nice "safe" feature.

 

Problem is that the Widget Panel is waiting on that safelyLoad call to return before removing the loading placeholder.

 

Now for the solution. Instead of loading this js file with the macro itself, I added a reference to it in header.soy. Lame, that means it will be loaded on every page, but it fixes the problem. Downside is that it loads a few more KB on each page that doesn't need that javascript, but because of what is in the js file, there is no detrimental effect to functionality.

 

Anyway, hope this helps you not struggle for a couple hours like I did (multiple times). And hopefully, it will help me not do the same next time.

 

Cheers,

Scott

Hack_Tour_Bus_austin.png

 

This is our LAST Developer Days event for the year, and to make sure as many people can attend as possible that might have missed out on prior events—and the success we felt from The European Dev Days event—we will be making this one hosted virtually on GoToMeeting. We'll be covering our Jive middleware-less stories and best practices in a lecture + hands-on hack session where we'll create integrations together that solve real business use cases, and answer your questions along the way.

 

Event Details

Since we want to be able to reach as many organizations as possible and seating is limited, we are capping registration to 4 per organization and anyone beyond that will be placed on the waitlist. After registration closes, if there's space available, they'll be moved to be a registrant.

 

  • November 17, 2016 — 1p.m.-3p.m. CST
  • November 18, 2016 — 1p.m.-3p.m. CST
  • via GoToMeeting — URL will be sent after registration closes.
  • Attendee limit of 25
  1. You must register yourself, and yourself only. You cannot register in someone's behalf. It not only keeps it fair for everyone, but also ensure we have a way to communicate and everyone has access to all the tools we'll be using (e.g. Jive Sandbox).
  2. Since we want to be able to reach as many organizations as possible and seating is limited, we are capping registration to 4 per organization and anyone beyond that will be placed on the waitlist. After registration closes, if there's space available, they'll be moved to be a registrant.

 

What You'll Gain

 

Prerequisites

Everyone must have all the required software installed prior to joining the session. (See: Jive Developer Days Installfest )

 

How To Register

  1. Make sure your e-mail address in your profile is up-to-date and correct
  2. Please comment below with your firstName + " " + lastName + ", " + company

 

 

Registered

NameCompany/Organization
Saurabh SinghCharles Schwab & Co., Inc.
Almore Cato IICox Automotive
Rachit Chaudhary
Oracle India Pvt Ltd
Jordan ENSFELDEROrange
pushpendra.paliwal
Orange Business Services
Amit Shah
IonIdea
Kranthi Kiran Chiluveru
S&P Global
Samee K STechMahindra
Micah MarkmanReingold
Daniel ShiferawReingold
YOU!

 

Waitlist

You will be placed on the waitlist if we reach capacity of 25, or if more than 4 individuals are registered with your company. If there is space after registration closes, your status will change to registered and you'll be e-mailed event details. If you really really want to go and are on the waitlist, send me an e-mail and I'll see what we can do.

NameCompany/Organization

For some time now, we've been wishing for an easy way to update the URLs for Places. Sometimes we name a Place in a hurry and later come up with a better name. Jive allows us to change quite a bit about a Place, but currently, changing the "displayName", the name that appears at the end of the Place's URL, is impossible through Jive's web interface and the Admin Console. It is only possible via the Jive REST API which, frankly, isn't quite that convenient for busy Community Administrators.

 

To fix this problem of inconvenience, I've created a .NET app (code included below) that allows administrators to quickly update a Place's displayName using Jive's .NET SDK. To update a Place, one must simply log in to their Jive account through the app, select the Place whose URL they would like to change, and provide a new displayName for the Place.

 

When we implemented this functionality for our Jive instance, we wrapped this app in an ASP.NET Web API controller, hosted the code on a web server, and created a web app that makes requests to the hosted app. This allowed us to build a UI that further simplified the process of updating Places. For the sake of simplicity, here I am only sharing the C# code for the app. But note that this can be easily built on top of.

 

Here is the code for the .NET app:

 

using System.Collections.Generic;
using Net.Pokeshot.JiveSdk.Models;
using Net.Pokeshot.JiveSdk.Clients;
using System.Net;
using System;


namespace PlaceUpdaterConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            string jiveUrl, username, password;


            // Get User/Site Info.
            Console.Write("Jive Community Url: ");
            jiveUrl = Console.ReadLine();


            Console.Write("Jive Username: ");
            username = Console.ReadLine();


            Console.Write("Password: ");
            password = Console.ReadLine();
            Console.WriteLine();
            Console.WriteLine();


            var creds = new NetworkCredential(username, password);


            // Get a list of places available.
            PlacesClient p = new PlacesClient(jiveUrl, creds);
            var places = p.GetPlaces(count: int.MaxValue);
            printPlaces(places);


            var selectedPlace = selectPlace(places);
            Console.WriteLine("Current URL for {0}:\n{1}", selectedPlace.name, selectedPlace?.resources?.html?.@ref);


            string url = selectedPlace?.resources?.html?.@ref;
            int lastSlash = url?.LastIndexOf('/') ?? 0;
            Console.Write("\nNew URL:\n{0}", url.Remove(lastSlash + 1, url.Length - lastSlash - 1));
            string displayName = Console.ReadLine();


            // Update the display name of the place the user selected.
            selectedPlace.displayName = displayName;


            Console.Write("\nChange {0}'s URL? (y/n): ", selectedPlace.name);
            var isCorrect = Console.ReadLine();
            if (isCorrect != "y" && isCorrect != "Y")
            {
                Console.WriteLine("\nOperation Canceled");
                return;
            }


            // Send the newly updated Place back to Jive.
            p.UpdatePlace(int.Parse(selectedPlace.placeID), selectedPlace);


            Console.WriteLine("\nSuccessfully Updated");


            Console.ReadLine();
        }


        private static GenericPlace selectPlace(List<GenericPlace> places)
        {
            string isCorrect;
            GenericPlace selectedPlace;
            do
            {


                Console.Write("\nSelect a PlaceId from the list above: ");
                string placeId = Console.ReadLine();
                selectedPlace = places.Find(x => x.placeID == placeId);


                Console.Write("You selected {0}. Is this right? (y/n): ", selectedPlace.name);
                isCorrect = Console.ReadLine();
            } while (isCorrect != "y" && isCorrect != "Y");
            Console.WriteLine();


            return selectedPlace;
        }


        private static void printPlaces(List<GenericPlace> places)
        {
            int columnWidth = 26;


            Console.WriteLine(" {0,-" + columnWidth + "} | {1,-" + columnWidth + "} | {2,-7} | {3, -7} ", "Place Name", "Display Name", "Type", "placeId");
            Console.WriteLine(new String('-', columnWidth * 2 + 7 + 6 + 11));
            foreach (var place in places)
            {
                Console.WriteLine(
                    " {0,-" + columnWidth + "} | {1,-" + columnWidth + "} | {2,-7} | {3, -6} ",
                    place?.name?.Length > columnWidth ? place.name.Remove(columnWidth - 3, place.name.Length - columnWidth + 3) + "..." : place.name,
                    place?.displayName?.Length > columnWidth ? place.displayName.Remove(columnWidth - 3, place.displayName.Length - columnWidth + 3) + "..." : place.displayName,
                    place?.type,
                    place?.placeID
                    );


            }
        }
    }
}

 

I hope someone else finds this useful.

 

Intro

To start a new initiative and provide examples for developers, we're going to start putting out some Jive integrations that we believe provide some benefit to our customers and you—the developers. These are open source projects under the apache 2.0 license and free to be used as they stand or as a baseline for your integrations. We'll be keeping these projects in the jiveapps/addons at master · jivesoftware/jiveapps · GitHub repo.

 

So what is LiveStream? It's a event video platform that's used by companies both big and small to provide event coverage. So a natural use case for it is a company event (like JiveWorld17!) to provide coverage to anyone who can't be at the event in person; or even for company-wide meetings.

 


 

GitHub Repos:


 

Data Flow:

This project integrates Livestream API's to bring a LiveStream live feed feed into Jive. It has the following core functionalities and data flow:

 

 

Custom View Tile (Middlewared)

Screen Shot 2016-09-26 at 6.18.25 PM2.png

Screen Shot 2016-09-26 at 5.17.53 PM.png

  • Middleware Fetches LiveStream Upcoming Events API and pushes the array of events to Tile Config
    • Can be set for other endpoints—was developed and tested on the Private Events endpoint
  • Tile Configuration window displays event to be selected to be displayed on the view window
  • Tile Configuration window has optional field to place the Simple Stream Integration's (SSI) listener URL
  • Middleware reads the saved configuration and if any event has their "isLive" parameter set to true AND a SSI listener URL was entered in the tile's configuration, it generates an activity with the SSI
  • Comments are pulled in from the activity that is related to the event being displayed in the tile and displayed
    • Comment text has link back to the comment itself in the external object
      • The user can see the all comments and continue collaboration and participate in the communication
    • If there is no activity generated, no comments are displayed

 


 

Simple Stream Integration w/ App (non-Middleware)

Screen Shot 2016-09-26 at 6.17.39 PM.png

Screen Shot 2016-09-26 at 6.17.17 PM.png

 

  • The middleware from the Custom View Tile generates activities for each event that goes live
  • The activity has an associated external object
    • The external object has an embedded app
    • External object video is larger and has full collaborative Jive experience (like, comment, share, mark for outcome)
  • App shows the live video that's associated with the video event that generated the activity

 


 

Extra

  • There is an extra file for getting an authentication token at your service's /tokens endpoint by performing a GET request—should you build something that needs to do more with LiveStream's API's

 


 

Considerations

  • This was written using mostly ES6 JavaScript, so it will only work on newer browsers
  • LiveStream currently doesn't offer webhook's so the custom middleware service is a necessity
  • Jive's Node.js SDK's jive.util.base64Encode() method does not work for API key/string only authentication
  • There are two archive files to install into Jive! This is because one service requires middleware and the other doesn't
  • I would have really liked to split up my services.js into three separate classes—LiveStream API's, Custom View Tile data pusher, SSI Activity Generator—if you have the free time or desire to make a pull request, I'll review and commit.

 


 

Initial Setup Requirements

Screen Shot 2016-09-26 at 9.58.50 PM.png

  1. Have a LiveStream account and some videos set to go live in the future
  2. In /jiveclientconfiguration.json, you'll see an object called "livestreamCredentials"—fill in all the fields
    • Look here Livestream Developers | API Dashboard for Client ID & API Key (dashed lines in the picture above)
    • Account ID can be retrieved via API or from your Livestream Video dashboard in the URL of your browser
  3. Update your middleware service URL in /tiles/LiveStreamTile/public/javascripts/configuration.js
  4. In terminal, run npm update
  5. In terminal, run node app.js to start your service and generate a new .zip for your Custom View Tile
  6. Install the zip for both the Tile and the Simple Stream Integration into your Jive Instance
  7. Install and setup the SSI into your page first and copy the URL
  8. Install the tile to your page and paste the URL and select your upcoming public event
  9. Use the LiveStream desktop app and go live in your event and see your video feed in the tile and activity get generated

So we just concluded the Jive Developer Days series' first remote/virtual event based on a European audience and here's what happened!

 

We had a lot of people register and fill out the seats from small to large companies and organizations (Jive Developer Days 2016: European Edition — Register Today!). There was so much demand that we actually went ahead and extended our original seat limit of 25 to fit the extra 5 on the waitlist. Where the past two other events were in person and that makes developing much easier and we could dedicate several hours to working together without losing interest or feeling TOO overwhelmed, we thought we should change it for the remote event to two days and half the time per day — I think that was still a good call. But overall, I think everyone learned a lot, I enjoyed some of the laughs, saw some great questions and engagement from the attendees.

 

tl;dr

  • Presented the Jive Developer Platform story
  • Made the example App Reference app using jive-sdk create app
  • Made a RSS News Feed Custom View Tile (see attachment)
  • Made a Simple Stream Integration with the App Reference App embedded (see attachment)

 

Screen Shot 2016-09-16 at 11.08.39 AM.png

 

First Day

We started the first day by introducing the high level Jive Developer Story—the Add-on Framework, Mobile solutions, External Storage Framework, and the Jive Analytics Platform. What we wanted out of this is to expose both new and seasoned Jive Developers to the full gamut of platform offerings. Since awareness is sometimes the biggest obstacle, we hoped to open the doors to all the possibilities for developers to fully realize the Jive as a organization's Hub story.

 

Following after the overview, Ryan Rutan used the Jive Node.JS SDK to create the Introducing the Jive Developer App Reference "App" on the Developer Sandbox example app, and get an understanding of app action contributions to filter where an app can go and also see the context (where, the person viewing, and content being viewed) that is available for use to enrich the experience of the community.

 

Second Day

Screen Shot 2016-09-16 at 1.37.47 PM.png

The second day took the foundations we laid down the first day and expanded on them. We started off by creating a Custom View Tile that makes a OSAPI HTTP Get request to the sample Yahoo Query Language RSS feed URL and displays the 10 most recent news articles in the tile with links to the source. We also showed how to speed up our integration development times with Ngrok.

 

Screen Shot 2016-09-16 at 1.34.33 PM.png

After that, we created a basic Simple Stream Integration from our Simple Stream Integration Builder and demonstrated a simulated Activity being generated within Jive in minutes of starting the developing. After that, we embedded the App from the session prior into the generated activity's external object and also passed in all the request data that created the Simple Stream Activity that can be used to make a richer collaborative experience. There were some hiccups that we uncovered and are going to patch our SDK shortly (this is part of why we're doing these events—make sure everything is solid).

 

What's Next?

More developer days virtual events coming soon! We are taking feedback from this pilot event and we're going to provide better ways for people to follow along and try the material out in better detail at a later time.

Introduction

 

Webhooks are a powerful Jive feature that allow you to subscribe to events that occur in the system. For example, you can subscribe to all user account creations, or all the new documents that are created in a particular Place. The subscription basically tells Jive to send a JSON object (of the content you want) to whatever endpoint you've specified.

 

The Jive documentation mentions creating some kind of add-on/extension and subscribing using a Tile, but it's actually possible use a tool like Postman to talk to the Webhook REST API to register a hook, or manage all the webhooks that are set up on your Jive instance.

 

Note; we run our community in a /community sub-folder.. so if you're following this guide, take that into account for any URLs you're copying.

 

oAuth2 Add-On

 

The first thing you need to do is install a pretty generic oAuth2 add-on. This was originally provided in this document, but I've altered meta.json to have a callback URL linked to Postman. I've attached the add-on to this document.

 

Note; uninstalling the add-on will remove any webhooks you set up against it.

 

 

oauth1.png

 

Setting Up Postman

 

Next, you need to follow these steps to set up Postman to use an OAuth 2.0 access token.

 

oauth2.png

 

oauth3.png

 

PHP Debugger

 

As you can see, in step (9) I'm telling the webhook to talk to a PHP page. This is a dead simple debug page I set up to see what the webhook payload looked like, and to test that the whole thing was working. It'll send the contents of any request to a log file.

 

Here's the code;

 

<?php
    $todays_date = date("Y-m-d G:i:s");
    $requestBody = array2string($_REQUEST);
    $entityBody = file_get_contents('php://input');
    
    $fp = fopen("webhooks.log", "at");
    fwrite($fp, "$todays_date -> $requestBody --> $entityBody\n\n");
    fclose($fp);

    function array2string($data){
        $log_a = "";
        foreach ($data as $key => $value) {
            if(is_array($value))    $log_a .= "[".$key."] => (". array2string($value). ") \n";
            else                    $log_a .= "[".$key."] => ".$value."\n";
        }
        return $log_a;
    }    
?>

 

 

Further Reading

 

Webhooks API documentation

https://developers.jivesoftware.com/api/v3/cloud/rest/WebhooksService.html

 

The post which set me on the right track to get Postman to talk to Jive

https://community.jivesoftware.com/message/1588488

 

Original oauth2 add-on.

https://community.jivesoftware.com/docs/DOC-97348

Hack_Tour_Bus_Europe.png

 

When we were first kicking around the idea of Developer Days, we got a tremendous response and inquiry from the folks across the pond. We actually had no idea that would be the case, so we were trying to figure out how to take this content over there, and before we did that, we wanted to make sure we had a quality that was worthy of your requests. After our NYC and Bay Area, CA, USA events, we think we've got it. Thanks to the digital age, we've come with a solution and format that Ryan Rutan and I believe will work great.

 

This two day, two hours per day event will be webcast via GoToMeeting and is geared towards our European counterparts where we'll be covering our Jive middleware-less stories and best practices in a lecture + hands-on hack session where we'll create integrations together that solve real business use cases, and answer your questions along the way.

 

How To Register

  1. Make sure your e-mail address in your profile is up-to-date and correct
  2. Please comment below with your firstName + " " + lastName + ", " + company

(ha ha, get it? )

 

If your organization's internal policies do not allow you to post on public forums, please feel free to message/e-mail me or Ryan Rutan and we'll take care of it.

  1. You must register yourself, and yourself only. You cannot register in someone's behalf. It not only keeps it fair for everyone, but also ensure we have a way to communicate and everyone has access to all the tools we'll be using (e.g. Jive Sandbox).
  2. Since we want to be able to reach as many organizations as possible and seating is limited, we are capping registration to 3 per organization and anyone beyond that will be placed on the waitlist. After registration closes, if there's space available, they'll be moved to be a registrant.

 

Event Details

  • 13th September, 2016 — 1p.m.-3p.m. GMT
  • 15th September, 2016 — 1p.m.-3p.m. GMT
  • via GoToMeeting — URL will be sent after registration closes.
  • Attendee limit of 25

Registration closes 9th September, 2016 @ 7p.m. GMT

 

Prerequisites

Everyone must have all the required software installed prior to joining the session. I will be posting up a document detailing everything with instructional video to make it as easy for everyone as possible & all registrants will get a reminder link.

 

What You'll Gain by Attending:

 

Registered

NameCompany/Organization
Neha UniyalAccenture
Shipra SinghAccenture
Sowjanya GonuguntlaAccenture
Danil BogomolovANROM
David HickeyCiti
Mike CulshawCiti
Powell TruslerCiti
Swaran SinghCiti
Chris RymerElement14
Dudley NelsonElement14
Matt CollingeElement14
Georgiana Adelina PopaEuropean Commission
Gopi GorantalaEuropean Commission
AxxxxxGoldman Sachs
GxxxxxxGoldman Sachs
Jiban PatroInfosys
Christian ReischlMetafinanz
Oliver ReeceMillward Brown
Stephan LeuendorffPokeshot///SMZ
Sven KroschwaldPokeshot///SMZ
Gareth JamesPwC
Matt DickensPwC
NelsonRobert Anthony DassScope
Lars KreiszT-Systems Multimedia Solutions GmbH
Mirko SwillusT-Systems Multimedia Solutions GmbH
YOU!

 

Waitlist

You will be placed on the waitlist if we reach capacity of 25, or if more than 3 individuals are registered with your company. If there is space after registration closes, your status will change to registered and you'll be e-mailed event details. If you really really want to go and are on the waitlist, send me an e-mail and I'll see what we can do.

NameCompany/Organization
Pierce CurridCiti
Akhila ShivakumarInfosys
arpan bansalPwC
Madhusudhanan VaradarajanCognizant
Gareth FerrierSurevine

developer-icon-crop-png.png

When Aron Racho first had the idea for a Jive SDK using Node.js back in 2013, he did an exceptional job at building a solid platform for Jive developers to build add-on solutions.  It's been a while since the original Jive SDK (Node.js) has received any substantial love.  If you've used it anytime in the past 1.5 years, you've probably seen the growing list of deprecation warnings, even the SDK worked just fine.  So we thought it was time to change the perception of this awesome tool.  But this update wasn't just about a fresh coat of paint, we also wanted to apply some of the feedback we've gathered over the years to work to try and make things a better.

 

We hope you like the work we've put into improving the SDK, and hope it will help get many of your started on many of the Common Jive Add-On Use-Case Patterns we've identified for the Jive platform.

 

Thanks for being such awesome developers to work with, and happy coding!

If you have questions about the SDK, you can ask them below in the comments ... or here:

Questions about the Jive-SDK v0.2 Release

To install the SDK, check out this document
Getting Started > Installing the Jive Node SDK

or, if you already have npm installed

npm install -g jive-sdk

 

Updated Node v4.4.7 - 6.3.1 Support

In the previous version, we ran Node v0.10.32, which is a bit dated.  As part of this upgrade, we want to make sure that the SDK would work on modern Node.js production environments.  As such, we did some digging and re-worked some of the dependencies, and we are now functional (and tested) on Node v4.4.7, v6.0.0 and v6.3.1.  Support for versions in-between the is possible (and in some cases likely); however, we have not extended the testing beyond these two versions for the time being.  If you have feedback around supported environments or issues, please us know and we will do our best to address.

Note:  We are currently testing 6.3.x but have noticed a few issues ... stay tuned for updates.

Note:  The last version of the original Jive SDK v0.1.219 will only work on Node v0.10.32

 

Updated to Express x4.0

One of the biggest issues we faced in this upgrade were the massive changes between Express 3.x and 4.x.  Given that express is such a critical piece of the SDK, touching it meant affecting the entire SDK.  Thankfully, the differences weren't too crazy to map out and we are now running the latest version of Express and should be good to go!

 

Changed community.json ID ID Key

In previous versions of the Jive SDK, when a community registered with Jive, it stored the information in the db/community.json file (or equivalent persistence structure).  While we still do this, we have changed the key on the community entity from the jiveUrl to the tenantId to be more resilient.  We still offer the same methods to locate the community data, such as jive.community.findByJiveURL and jive.community.findByTenantID ...

 

However, if you are using either of the following snippets:

  • jive.community.findByID or jive.persistence.findById('community','xxxxx')
    Your results will be different see the table, below.

 

Old Result
New Result

"https://sandbox.jiveon.com" : {

   "jiveUrl" : "https://sandbox.jiveon.com",

   "tenantId" : "xxx-xxx-xxx-xxxx-xxx",

   ....

}

"xxx-xxx-xxx-xxxx-xxx" : {

   "jiveUrl" : "https://sandbox.jiveon.com",

   "tenantId" : "xxx-xxx-xxx-xxxx-xxx",

   ....

}

 

Simplified Jive App and Custom View Tile Boilerplates

For those of you that have seen the Introducing the Jive Developer App Reference "App" on the Developer Sandbox and have followed the tutorial Getting Started > Creating an App with the Jive Node SDK, you'll notice that the code it creates was a bit daunting.  While OpenSocial does a good job at abstracting integrations, it is a bit cumbersome to grok the first time out.  So we put some work into making a better re-usable abstraction JavaScript file to simplify developers access to the Apps and Custom Tile environments.  By no means are developers required to use these abstractions, but they are easy to get started and tweak as needed.

At a high-level, we've boiled down App and Custom View Tile development down to it's core.  The ability to know Who is the Viewer, Where is the View (and How is it being Viewed) and Any Data/Configuration which might be needed to render a solid embedded experience in Jive.  Now to get started, simply follow the pattern from the SDK and use the following JS methods ... and you should be good to go!

 

Apps (Simplified).js
Custom View Tiles (Simplified).js

var ACTION_IDS = [

  "example.app.content.document.action",

  "example.app.content.discussion.action

];

function onReady(env) { ... }

function onViewer(viewer) { ... }

function onView(context) { ... }

function onAction(context) { ... }

function onData(data) { ... }

 

See these files for the full source code:

function onReady(tileConfig,tileOptions,viewer,container) { ... }

function onConfig(tileConfig,tileOptions) { ... }

function onContainer(container) { ... }

function onViewer(viewer) { ... }

 

 

 

 

 

 

See these files for the full source code:

jive-sdk create app

Getting Started > Creating an App with the Jive Node SDK

jive-sdk create tile-app-external

Creating Custom View Tiles

 

Added Automatic Cache Busting Timestamps

This is pretty straight forward.  Whenever you do a build with the jive-sdk build add-on command, the SDK will timestamp every tile and the app.xml reference URL.  This should help developers working with instances that may cache harder than normal, and make it easier to iterate development between builds.

 

Old Tile Definition (Easily Cachable)
New Tile Definition (Cache Busted per Build)

{ ....

    "action": "http://localhost/test/action

    "id": "a289e089-c9eb-4fad-9842-89d1ac0d0356",

    "definitionDirName": "test",

    "config": "http://localhost/test/configure

    "unregister": "http://localhost/unregister",

    "register": "http://localhost/registration"

}

{ ....

    "action": "http://localhost/test/action?ts=1469731909988",

    "id": "a289e089-c9eb-4fad-9842-89d1ac0d0356",

    "definitionDirName": "test",

    "config": "http://localhost/test/configure?ts=1469731909988",

    "unregister": "http://localhost/unregister",

    "register": "http://localhost/registration"

}

 

 

Easier Explicit Service Route Definitions

If you've ever defined an explicit route using the SDK, such as here.  You'll notice that the exported object only supports a singular verb; however, now that object also supports an array of HTTP verbs to register multiple verbs to using a single reference.  The old way will still work as well.

 

Old
New

exports.myservice = {

   verb : "post",

   jiveLocked : true,

   path : '....',

   route: function (req,res) {

       ....

   }

}

exports.myservice = {

   verb : [ "post", "get", "put", "delete" ],

   jiveLocked : true,

   path : '....',

   route: function (req,res) {

       ....

   }

}

 

Added Default HTTP Method Override Support

The problem of having a platform only being able to use limited HTTP verbs (perhaps only GET/POST), but needing to invoke some of the newer ones (such as PATCH) is quite common.  As such, we've added in some standard support for known method-override headers coming from some of the following platforms.

 

  • X-HTTP-Method (Microsoft)
  • X-HTTP-Method-Override (Google)
  • X-Method-Override (IBM)

Note: If you'd like to submit additional method overrides headers to be included into the SDK, please contribute here.

I'm sure there are some more general improvements we've made, but this is a pretty good starting point.

KICKSTARTER FUNDED! We are set to have this event on July 13th at Plex Systems Northern California Offices!

Hack_Tour_Bus_bay_area.png

 

After having a great turn out at our first stop in NYC at Social Edge Consulting , we're ready to take some votes on our next stop — The Bay Area at Plex Systems' Northern California Office! We are limited in capacity to 22 attendees, so we're going to put a limit of 3 individuals per organization/company for now. This is a meetup/workshop that is geared more towards beginning development in Jive and to try out the newer add-on framework that's available in Jive 8 & Cloud—as such, priority may be given to individuals who fit this criteria. Please put your name and organization if you can commit to being at the event and joining us for the installfest.

 

BTW, if you haven't already checked out this blog that Social Edge put out of the last event, be sure to have a look for what to expect: NYC Hackathon Fun - Now with Pictures!

 

 

Event Details:

When: July 13th, 2016 — From 1pm, to 5pm

Where: Pleasanton, CA (Full address and entrance details will be given to attendees prior to event)

Cost: $0 thanks to Plex Systems

 

Installfest Details:

What: We go over all the items you need to have installed and make sure you have access to everything you need in order to get to the event and be able to work through your ideas without issues.

Mandatory: YES. Some exceptions may be made.

When: July 12th, 2016

Time: 12:30pm

 

How to Sign-Up:

This is mostly first come first served until we get a total of 22 people, 3 people maximum per organization (until June 30, 2016—if there are spots open, then we'll consider taking more from one single company). Please leave your name and company in the comment below. Each member must comment individually—you cannot add others on your behalf. Registration ends July 8, 2016 12pm PST!

 

Please leave your NAME and COMPANY in the comments below. You must include both.

 

Priority Seating:

Registration for the event is mostly first come, first served. But, since there is a very limited number of seats, we're going to impart some priority seating policies. However, know that we're being truly transparent about how we're doing this.

  • Those who have shown interest from the beginning or have been proactively trying to host/sponsor the event will automatically get priority of attendance.
  • Individuals new to Jive development will also get priority since this is specifically the audience we're gearing the event towards, doesn't mean existing developers can't go, just throwing this out there as a possible factor.
  • Developers. This event is welcome to business XXXXXXX individuals with some coding experience as well, but priority is given to Developers as it is a developer centric event.

 

If I haven't added you to the registration list yet, it's because I'm waiting for those priority individuals/organizations to respond with a yes/no first.

 

What You'll Gain by Attending:

 

Our Sponsor:

This event is made possible because of the time and dedication that Plex Systems and Mahal Torres has had to their Jive instance and the overall Jive Community. They are graciously providing the location, snacks, drinks, and the all important WiFi for this event.

 

Registered

AttendeeOrganization
Mahal TorresPlex Systems
Ashley WolfYahoo!
Honish JosephYahoo!
anisha patelYahoo!
Eva HsiehYahoo!
Sumeet GuptaCisco
Reena DsouzaCisco
Siddharth GuptaHitachi Data Systems
Shawn WilsonIntuit
Dishant MehtaTavant Technologies
Michael KongSunrun Inc.
Keith ShawQualys, Inc.
Susan LeeFireEye
Nagendra BalachandraJCS Consulting
You!

 

Waitlist

Attendee

Organization

 

 

Please leave your NAME and COMPANY in the comments below to sign up. You must include both. Registration will end July 8th, 2016.

Hello all,

 

At ThoughtWorks we have created the custom tile which is  created using jive's tile feature. We have developed the tile to show the key members with their roles and images which is called 'Featured Team Members'.

 

Features:

1. Add items by selecting members and their respective role.

Screen Shot 2016-06-14 at 3.39.48 PM.png

We have used autocomplete for selecting members.

Screen Shot 2016-06-14 at 4.02.20 PM.png

2. Once you save configuration of the tile with members and their roles, you can see view on the same page.

Screen Shot 2016-06-13 at 2.28.19 PM.png

 

3. You can rearrange the elements of the tile with drag and drop feature.

Screen Shot 2016-06-14 at 3.41.08 PM.png

 

4. You can delete the items using the trash icon.

 

Please find the code under :GitHub - ThoughtWorksInc/key-member-tile – licensed under AGPL.

 

References:

https://community.jivesoftware.com/docs/DOC-124346

https://community.jivesoftware.com/docs/DOC-113609

https://community.jivesoftware.com/docs/DOC-141800

A JavaScript library for building user interfaces | React

 

cc: Ryan Rutan Rashed Talukder Laura Gough

 

Thanks,

Manali

Hi all,

    We had a situation where we wanted to import members from multiple groups so as we can have members of all those groups into one unified group which will reduce manual members adding process. For this problem we came up with a solution; we designed an app called Import Members which will import members from other groups.

 

Add-on provides following features:

1) Migrating memberships from multiple groups to one.

As the member from source groups should be a member in target group

2) Associate selected stream(s) of members with the new group.

To get the updates.

 

How the app works?

The scope of this app is restricted to groups and it will appear under action tab.

The app shall be opened into the group which should be target group in which user wants to merge the other groups.

 

Steps followed to perform the same operation:

1.Click on Import Members from group's action section, it will open an app in popup as below

Screen Shot 2016-06-02 at 2.59.49 PM.png

2.Select the source groups from the place picker that will be invoked once you click on 'Select Source Group(s)'.

Screen Shot 2016-06-06 at 2.50.03 PM.png

User can select upto 10 groups to be merged into one.

 

3. Select the stream(s) which you want members to associate with the new group.

Screen Shot 2016-06-02 at 3.00.36 PM.png

In our app Email Watches is the custom stream which is used for getting email notifications for activities.

You will find some more examples of custom streams here : Examples of Custom Streams

 

4. Submit the import request.

    Once process is submitted user gets notification about report of the process.

    Whenever the process is done, the user is sent all report in email. (which might take some time depending on number of members to import)

Screen Shot 2016-06-02 at 3.04.33 PM.png

 

Once user click on 'Submit request' we do request to node server to process the request:

Screen Shot 2016-06-02 at 3.06.52 PM.png

 

In app.xml we have added a jive connects api setting to call the service in above file.

Screen Shot 2016-06-07 at 10.30.27 AM.png

as you could see; we have used custom service named importService as a middleware for request and response to the app.

 

code snippet from server side:

Screen Shot 2016-06-02 at 3.08.02 PM.png

 

Access Levels:

Only superAdmins and groupAdmins will have access to this app.

 

 

Logger:

We have added logger to log all the operations which includes: operation done, group name, successIds, failureIds, User Id, Time etc

 

As part of the merge operation, the target group will have all the content type enabled.

 

Please find the code under :GitHub - ThoughtWorksInc/import-members licensed under AGPL.

 

References:

For getting started with Jive node sdk:  Getting Started with the Jive Node SDK

 

cc: Ryan Rutan Rashed Talukder Laura Gough

Hi all,

           We came across a situation where we had to merge the groups into one so as to provide collaborative place to look for same domain. As a solution to this problem, we designed an app which will merge the groups with the data and members into the target group; app named 'Merge Groups'.

There is a thread which requires similar solution;  Is it possible to merge two exisitng groups into one?.

 

App features:

1) Migrating memberships from multiple groups to one.

As the member from the to be merged group should be a member in merged group so as to get the updates.

2) Associate selected stream(s) of user with the new group.

To get the updates.

3) Migrating content from multiple groups to one.

 

How the app works?

The scope of this app is restricted to groups and it will appear under action tab.

The app shall be opened into the group which should be target group in which user wants to merge the other groups.

 

Steps followed to perform the operation:

1.Click on Merge Groups from group's action section, it will open an app in popup as below

Screen Shot 2016-06-02 at 10.37.57 AM.png

 

2.Select the source groups from the place picker that will be invoked once you click on 'Select Source Group(s)'.

Screen Shot 2016-06-06 at 2.50.03 PM.png

  User can select upto 10 groups to be merged into one.

 

3. Select the stream(s) which you want members to associate with the new group.

Screen Shot 2016-06-02 at 10.41.29 AM.png

In our app Email Watches is the custom stream which is used for getting email notifications for activities.

You will find some more examples of custom streams here : Examples of Custom Streams

 

4. Submit the merge request.

Once process is submitted user gets notification about report of the process.

Whenever the process is done, the user is sent all report in email. (which might take some time depending on number of members and data to move)

Screen Shot 2016-06-02 at 10.43.48 AM.png

 

Once user click on 'Submit request' we do request to node server to process the request:

Screen Shot 2016-06-02 at 11.16.09 AM.png

 

In app.xml we have added a jive connects api setting to call the service in above file.

Screen Shot 2016-06-06 at 4.31.49 PM.png

as you could see; we have used custom service named mergeService as a middleware for request and response to the app.

 

code snippet from server side:

Screen Shot 2016-06-02 at 11.13.14 AM.png

 

Access Levels:

Only superAdmins and groupAdmins will have access to this app.

 

Logger:

We have added logger to log all the operations which includes: operation done, operation name, operation status.

 

As part of the merge operation, All the source groups will get deleted and the target group will have all the content type enabled.

 

Please find the code under : ThoughtWorksInc/merge-groups · GitHub; licensed under AGPL.

 

References:

For getting started with Jive node sdk:  Getting Started with the Jive Node SDK

 

cc: Ryan Rutan Rashed Talukder Laura Gough

Hello JiveMinds,

 

We ,at ThoughtWorks, have created the custom view tiles and like to share the learnings/implementations of the same.

 

We have used Tiles feature of the Jive to make sure the information is shared in an intuitive graphical way.

 

This particular tile is called 'Featured Items with Images'. The intent behind designing this tile is to share the important links in graphical blocks with intuitive background images.

 

More on the this tile:

 

Features:

1. Add items with according background images to make more intuitive info out of it.

Screen Shot 2016-06-06 at 12.01.28 pm.png

 

2. Once you configure the tile with items and images; visit the view of the same.

 

Screen Shot 2016-06-06 at 9.42.21 am.png

3. You can reorder the elements of the tile with drag and drop feature.

Screen Shot 2016-06-06 at 12.06.29 pm.png

4. You can delete the items using the respective row trash icon.

 

 

Tech Stack:

We have built the feature using React.

 

The tile-code is open sourced under AGPL.

The git-hub url of the codeGitHub - ThoughtWorksInc/tw-featured-grid-tile

 

References:

Some of the useful links that would help to understand more on tiles:

What are Tiles:

https://community.jivesoftware.com/docs/DOC-124346

Building custom tiles:

https://community.jivesoftware.com/docs/DOC-113609

https://community.jivesoftware.com/docs/DOC-141800

React:

A JavaScript library for building user interfaces | React

 

cc: Ryan Rutan, Rashed Talukder, Kim Nelson, John Boloian

 

Thanks,

Siddhartha

Hack_Tour_Bus_nyc.png

(Awesome photoshop skills)

 

 

Well, I'm super excited to announce that we've got our first event for Jive Developer Days and it's going to start at Big Apple and a big thank you to Social Edge Consulting for sponsoring! We are limited in capacity to 14 attendees, so we're going to put a limit of 2 individuals per organization/company for now. This is a meetup/workshop that is geared more towards beginning development in Jive and to try out the newer add-on framework that's available in Jive 8 & Cloud—as such, priority may be given to individuals who fit this criteria. Please put your name and organization if you can 100% definitely commit to being at the event and joining us for one of the install fest's.

 

Event Details:

When: June 8th, 2016 — From 1pm, to 5pm

Where: Madison & 28th, NY, NY (Full address will be given to attendees prior to event)

Cost: $0 thanks to Social Edge

 

Installfest Details:

What: We go over all the items you need to have installed and make sure you have access to everything you need in order to get to the event and be able to work through your ideas without issues.

Mandatory: YES. Some exceptions may be made.

When: June 7th, 2016

Time: TBD

 

How to Sign-Up:

This is mostly first come first served until we get a total of 14 people. 2 people maximum per organization (until May 24, 2016—if there are spots open, then we'll consider taking more from one single company). Please leave your name and company in the comment below. Each member must comment individually—you cannot add others on your behalf. Registration ends June 1, 2016 12pm PST!

 

Please leave your NAME and COMPANY in the comments below. You must include both.

 

Priority Seating:

Registration for the event is mostly first come, first served. But, since there is a very limited number of seats, we're going to impart some priority seating policies. However, know that we're being truly transparent about how we're doing this.

  • Those who have shown interest from the beginning or have been proactively trying to host/sponsor the event will automatically get priority of attendance.
  • Individuals new to Jive development will also get priority since this is specifically the audience we're gearing the event towards, doesn't mean existing developers can't go, just throwing this out there as a possible factor.
  • Developers. This event is welcome to business XXXXXXX individuals with some coding experience as well, but priority is given to Developers as it is a developer centric event.

If I haven't added you to the registration list yet, it's because I'm waiting for those priority individuals/organizations listed above to respond with a yes/no first.

 

What You'll Gain by Attending:

 

Our Sponsor:

This event couldn't be possible without Social Edge Consulting finding the space and providing snacks/beverages for attendees. Social Edge Consulting is an implementation partner and reseller of Jive, and our proud sponsor for the first Jive Developer Days event—a big thank you for making this possible.

 

 

Registered

Attendee
Organization
John ReynoldsSocial Edge Consulting
Robert HansonSocial Edge Consulting
Sergia DupouxAmerican Student Assistance
Ibrahim IbrahimAmerican Student Assistance

Andy Schedler

New York Life Insurance
Nate MillerJudge Group
Ari HalbkramChubb Insurance
Hazem El Mahmoudi
Faurecia
Munish Chopra
NBCU
Sandeep ShanuCapgemini
Lea ReznikKellton Tech

 

 

Waitlist

AttendeeOrganization

Please leave your NAME and COMPANY in the comments below to sign up. You must include both. Registration will end June 1st, 2016.

extension-128.pngAnother year, and another Stars Wars day has gone by!  I don't know how many of you chose to spend your day, but I took some time to embrace my inner-nerd and dive a bit deeper into Java SpringBoot to see just how fast I could stand up a Jive add-on project.  In part because I've been fascinated with all the work being contributed to that project, but also as a reminder to myself about the Jive SDK Your Way Initiative announced at JiveWorld16.

 

Need to learn more about the Jive SDK Your Way Initiative?

Getting Started with SpringBoot

So with the Force as my guide (a.k.a. Google), I set out to learn all that I could about Java + SpringBoot, how it differs from traditional Spring that I had become accustomed to building Jive Plugins  I'm happy to say that most of that knowledge carried over like a top, but it took a few moments to get re-adjusted to IoC after a long sabbatical.

 

In about an hour, I had a rough outline of the project structure ... and some basic components up and running as I expected them to.  Now all I needed to do was implement the Jive specific elements, which according to Building Jive Add-Ons Your Way presentation by Drew/Butch (see above), are the following:

  • Jive Signature Validation (primarily Jive Add-On Registration only)
  • Signed Fetch Validation (impacts any service that is called from an App, Tile, Webhook or other signed means.

 

When it comes to building web applications, I'm a big fan of the concept of "fail fast", which implies that if a request is going to be bad ... get rid of it ASAP.  This is the primary reason I choose to embed Jive Signed Fetch Validation into a ServletFilter.  It's an easy way to separate the concerns of validation and service execution without polluting code downstream.    Since Jive Signature Validation is mainly only used in a single instance, I decided to move that to a utility class for simple inclusion.  You'll notice that most of the code was lifted from the Jive SDK - Java & Jersey Edition ... which is what makes this doable.   Once I got these two things in place, the rest just fell into place!

Bonus - One of the pleasant surprises I ran into was just how dead simple it is to setup JPA persistence with SpringBoot.  Setting up the Entity and Repository classes (and using a little JPQL) were absolutely dead simple, and coupled with the JPA auto data/schema loading capabilities...it means that I can have a reproducible environment no matter which database I'm using (Postgres, MySql, HSQL or any other JPA compliant).

Let's See Some of the Code

Here is an example of what a web service would look like that is protected by the Jive Signed Fetch Validator ...

@RestController
@RequestMapping("/api/example")
public class ExampleSignedFetchController {
  @Autowired
  private JiveTrustedUserDetails userDetails;

  @Autowired
  private JiveInstanceDetails jiveInstanceDetails;

 @RequestMapping(method={RequestMethod.POST},value="/test")
  public ResponseEntity<String> test(@RequestBody String body) {
  StringBuilder output = new StringBuilder("Request Details:").append("\n");
  output.append(jiveInstanceDetails.getJiveInstance().getTenantId()).append("\n");
  output.append(userDetails.getUserID()).append("\n");
  return new ResponseEntity<String>(output.toString(),HttpStatus.OK);
 }

... that's it!  You can see the full code here, but there really isn't much else to it!  Very clean and to the point, and easy to abstract away the Jive nuances of the solution.

 

You can clone/fork the repo here:

GitHub - jivesoftware/jive-sdk-java-springboot: This is an example implementation of a Jive add-on server built and writ…

Conclusion

Overall, I must say that I am very pleased with the results of this exercise, and think that any Java developers out there interested in building Jive add-ons, should definitely give this a try!  Not only was the platform a quick learn, but it also keep the coding footprint extremely small (by Java standards).  It took about 12 hours to get it right, but was functioning around 6 hours in.  Most of the time spent was simply (re)learning the nuances of the SpringBoot environment.

Reminder:  With those 12 hours spent, I can now spin up a Jive + Java w/SpringBoot project in under 5-10 minutes and be read to go .. which is time well spent IMO!

Note:  I haven't had a chance to finish some of the stuff I was working on, such as Webhooks and Tile Pushers; however, there is functioning code in the jivesoftware/jive-sdk-java-jersey that can easily be ported over to complete these requirements.  My focus was to keep this time boxed to a single day.

Next Steps

  • What languages are you interested to write Jive add-ons services in?  The Jive SDK Your Way Initiative is here to help!
    Let Rashed Talukder or myself know if you are interested in putting together an example implementation in our GitHub repository to share with others.  Currently, we have basic support for:
  • Let's work co-operatively to bring our Jive expertise and your language/library knowledge together to build something awesome!
  • And as always, ...

 

 

may-the-fourth-be-with-you-the-best-of-star-wars-day-962296.gif

Filter Blog

By date: By tag: