Flow Versioning

By default, your widget is set to show the most recently-published version of the flow from Janrain. However, with each publish, your flow is given a new version number, giving you the ability to use a specific flow version in your implementation and manually change the version, rather than having it update when a new publish happens.

For some, using the default HEAD setting works just fine. This way, any updates to labels, requirements, or functionality made by Janrain will happen automatically once Janrain publishes those changes on the production server. On the other hand, some prefer to apply any flow updates to their own site at a very specific time. For example, to coordinate with a larger set of website revisions, or at the launch of a new product or service.

Setting a Flow Version

The JavaScript setting that dictates the flow version for your Registration widget is called janrain.settings.capture.flowVersion. In the .zip file given to you by Janrain, you can find the flow version setting in the janrain-init.js file.

Checking a Flow Version

If you want to see what the setting value for your janrain.settings.capture.flowVersion is, you can (while looking at a page hosting your widget) open your browser’s development console, type janrain.settings.capture.flowVersion, and press Enter. You should then see the value for that setting.

If the setting is set to HEAD, you were not given a precise flow version. However, there is a way to grab the current flow version number.

Again, in your development console in your browser, you can run the following script:


janrain.events.onCaptureRenderComplete.addHandler(function(result){
    if(window.console && window.console.log){
        if(result.flow != ""&& typeofresult.flow != "undefined"){
            if(result.flow.flow != ""&& typeofresult.flow.flow != "undefined"){
                console.log("Flow Name: "+ result.flow.flow);
            }
            if(result.flow.version != ""&& typeofresult.flow.version != "undefined"){
                console.log("Flow Version: "+ result.flow.version);
            }
        }
    }
});

You can also use the Configuration API to find all the flow versions available for a specific flow.