Showing posts with label Xcelsius Connectivity. Show all posts
Showing posts with label Xcelsius Connectivity. Show all posts

Monday, January 28, 2008

Xcelsius Templates

Here is the full collection of Xcelsius templates from this blog. You can always access the templates using the top navigation bar.

Xcelsius Connectivity

Passing Data from a Parent to Child SWF -Passing data from a parent Xcelsius file to a nested SWF.
Source Files

Connect Xcelsius to RSS/XML- Point and click connection to XML using XML maps.
Source Files


Xcelsius Logic Examples

Dynamic Xcelsius Ranking Logic- Dynamically rank information in your dashboard using logic.
Source Files

Dynamic Excel Lookup -An Excel logic-based approach to looking up multiple rows from a selection.
Source Files

Calculating the Current Quarter in Xcelsius- Use basic logic to calculate the current quarter within your SWF.
Source Files


Xcelsius Workarounds and Best Practices

List Builder Best Practices- Making the best of the Xcelsius list builder component.
Source Files

Multi-Series Graph Drill Down- Workaround for using drilldown feature with a multi-series chart.
Source Files

Special Characters in a Table- Using trend arrows and other special characters in a table or scorecard view.
Source Files

Calendar Component- How to leverage the calendar component dates.
Source Files

Create a Reset Button - A simple work around for re-setting a range of cells.
Source Files

Embed a SWF in Excel - Step by step instructions for embedding an Xcelsius model back into Excel.
Source Files

Friday, January 25, 2008

Xcelsius CEWebServiceURL and Life Cycle Management

The final part on my dissection of the Xcelsius OBJECT is a variable called CEWebServiceURL. This Flash Variable is used specifically with the Live Office component and overwrites the “Live Office Web Services URL.

Regardless of what you enter inside the input box shown above, when the SWF is loaded inside of Infoview, the Live Office connector component will dynamically consume a webservice URL originating from the CEWebServiceURL flash variable. In this case, you do not need to do any configuration of Flash Variables for this to work, similar to CELogonToken.



What does this mean for Life Cycle Management?
For quite some time, I have heard Xcelsius users complain about the inability to bind the Live Office component URL, and how that makes life difficult for migrating Xcelsius objects between BOE repositories. The good news, is with the CEWebServiceURL, the bindable URL is no longer needed. *Note, that this option is only available with BOE XIR2 SP2 and up.

What about QaaWS?
The bad news is a Web Service connector is not configured by Xcelsius to consume the CEWebServiceURL. The good news, is that since the URL for this component is bindable, you can easily leverage the CEWebServiceURL to provide the system name. I have mocked up a simple Excel sheet that evaluates the CEWebServiceURL, then matches it to the correct system name. For those of you not using SP2, you could just as easily use the CELogonToken, since it also contains the server name. All you need to do is declare and bind the Flash Variable inside of Xcelsius then use similar logic that you can download here.

Another Option for QaaWS
If you always plan on using your Xcelsius dashboard inside of BOE, you can drop the system name and port number from the URL. This will work, assuming you don’t use a reverse proxy or some non-standard application server configuration. I have used this method many times since it alleviates the need for any fancy logic or consumption of Flash Variables.


I hope that this 3 part series has helped you in gaining better understanding of how Xcelsius generated SWFs leverage basic Flash variables and BOE.

Monday, January 21, 2008

Xcelsius Single Sign on with CELogonToken

This week we are going to talk about a session token that an Xcelsius dashboard (SWF) consumes when it is loaded inside of Infoview or Dashboard Builder (Business Objects XIR2). The CELOGONTOKEN is the variable name that is assigned to a session token that BOE creates when you successfully login.

How does Xcelsius consume this token?
As you notice, inside of the <OBJECT> tag, there is a Flash Variable called CELOGONTOKEN. When BOE renders the HTML page, it dynamically inserts the current logon token as the CELOGONTOKEN. Any SWF that uses a Query as a Web Service or Live Office connection will automatically consume the CELOGONTOKEN Flash Variable.



How is the CELogonToken used during SWF runtime?
SWF files that contain a QaaWS or Live Office connectors will automatically search for the presence of a logon token when the connector is executed. With each transaction from the dashboard to BOE, this token is passed back to BOE. If the SWF does not detect a CELOGON token, (when it is loaded outside of Infoview or Dashboard Builder) it will display a login dialogue box.

So now that we have de-mystified the magic that is Xcelsius, let’s think about how we can leverage this knowledge. First, we use Flash Variables and the login token to solve the single sign on issue for multi-layer or nested SWF files within a dashboard. The second use is an Xcelsius dashboard using single sign with BOE outside of Infoview. While I have seen several implementations of this, unfortunately I do not have anything that I can share at this point. Hopefully those of you who are BOE SDK gurus run with this new understanding of how Xcelsius consumes the logon token. If anyone is interested in working together to put something together, I am more than interested to provide the Xcelsius knowledge…

Later this week, I will finish up this 3 part analysis of the Xcelsius <OBJECT> with the CEWebServiceURL and how it helps to improve life cycle management.

Wednesday, January 16, 2008

Xcelsius Flash Object Basics

by Ryan Goodman

The first and most obvious observation that you make when reviewing this example code is the presence of all attributes twice; one set within the <OBJECT> and one set within the <EMBED>. <OBJECT> is used for Internet Explorer to support the Flash player, which is an Active X control. <EMBED> is for other browsers that support other Flash Player installs. There is a wealth of content on the internet about these methods and using attributes, but I will move on to the 2 most important one to us: SWF source file path and Variables.
Below is the code I will be elaborating on…



SWF Source Path
In this case I am referring to the physical location where your SWF file reside, relative to the HTML page that it is loaded inside. In this scenario where we are using of BOE XIR2, they use a relative path using “opendoc/documentdownload” which uses the same syntax as opendoc.jsp. The document download syntax declares an iDocID to identify the SWF source file. You can re-use this code when loading Multi-Layer (Parent/Child)dashboards inside of BOE.



Variables
An Xcelsius generated file is capable of consuming variables from HTML using the Flash Variables feature. When loading flash variables you want to separate each variable with an “&” symbol, and individual values should be comma separated. If you look at the code below the syntax is slightly different in the <OBJECT> from the <EMBED>. The next tow blog articles will discuss not only how the SWF leverages these variables, but how you can take this new knowledge further when you plan your dashboard project.

Wednesday, September 26, 2007

Flash Variables in Xcelsius

by Ryan Goodman

Within a Adobe Flash application, or in this case Xcelsius, you can bind variables that are utilized through out the application during runtime. The benefit of Flash variables within an Xcelsius generated SWF is an ability to push values into the model when embedded inside of a HTML page. In most use cases, you would want to use Flash Variables to push global session variables that you may want to consume and re-use. Examples include: Session tokens, user IDs, and parameters passed from other embedded scripts or controls.

First we will define a variable within Xcelsius.

  1. Once Xcelsius is loaded, go to File>Export Settings.
  2. Click on the “Define Variables” button. In this case, I named my value sessionID.
  3. Define your variable name and bind it to a cell
  4. Generate your SWF.
    Now your SWF file is configured to consume a Flash variable

There are two ways to push the variable into the SWF.

  1. The Adobe Flash player enables a SWF to consume data directly from the HTML for which it is loaded. In a scenario where you are dynamically generating your HTML page, you can pass variables into the SWF on load. You can also use Javascript to dynamically change the variables during runtime, enabling other HTML embedded controls to pass data into the SWF without reloading the HTML page. An HTML nested flash variable would look something like this within an OBJECT tag:




2. The Adobe Flash player also enables a SWF to consume data directly from defined parameters within a browser or path for which it is loaded. This works great for passing parameters from one SWF to another if they are loaded on separate HTML pages.

You can try the example below by entering a value, then launching another HMTL page where we consume the variable. You will be launching a URL that looks something like this:
http://ryangoodman.net/blog/flashvar.swf?sessionID=test


Monday, April 16, 2007

Xcelsius Salesforce.com Widgets in Business 2.0 Magazine

by Ryan Goodman

Before boarding a plane to head over to Europe, I purchased my usual Business 2.0 magazine (April 2007) and found an interesting article on widgets. This article reported recent advancements in desktop widgets in the enterprise space. To my delight, they had a great image of an Xcelsius generated revenue tracker widget designed for Salesforce.com. I sat back and asked myself one question... At what point will this desktop widget craze materialize into something valuable or just roll up into the next big thing: Rich Internet Applications on the desktop?

Desktop widgets were the first iteration of what Adobe and other industry players have coined rich internet applications. It was the combination of Yahoo widgets and Apple desktop that propelled this cool technology into a desktop widget craze, as seen in Business 2.0, Wall Street Journal, and other publications. The draw for end users is the demand for a streamlined, customized, and aesthetically pleasing mini application that exists outside of the browser. There were three descriptors missing in the previous sentence that in many cases still restrict widgets from really catching fire.
  1. A strong security model- While existing frameworks are wonderful in displaying and rendering content, they are not designed to address security to satisfy enterprise requirements.
  2. Customizable content- While the technology is cool, without an ability to view customized content, widgets will always be perceived as desktop “toys.”
  3. A solid monetization strategy- It seems the path of least resistance is to make widgets free, and concentrate on using widgets as a value-add for existing software platforms, and applications.

The article in Business 2.0 indicates that enteprise software vendors are taking a stab at desktop widgets.

Tuesday, January 30, 2007

Embed Xcelsius inside of Salesforce.com

by Ryan Goodman

Salesforce.com Inline S-Control Analytics with Xcelsius
With the Winter 07 release, you now have the ability to assemble your own dashboards using the custom S Control, which serve as an IFRAME on any Salesforce.com page. While testing these new features last October before Dreamforce, I was able to quickly assemble a dashboard that can leverage the Salesforce.com API along with an inline S Control to extract information on the page.

The result was an embedded dashboard inside of every opportunity page that would display a visual history of the account. Though I am not sure how well it resonated because it was visually not that sexy compared to the full dashboard applications, the power of these nested dashboards for SFDC end users is extremely valuable if executed correctly.


Here is an overview of what I did.
1. Decide on a practical business case that would warrant a dashboard on every opportunity page:

In this case I wanted to embed a standard dashboard on every opportunity page that would allow the end user to visually digest the history of all other opportunities for a given account: won, lost, and pending. In addition, it was important to show the current opportunity in relation the historical view. Then the end would need to view high level details and navigate to any other historical opportunity with a single click. The underlying idea was to alleviate the mental juggling and repetitive clicking to access the same valuable information. I counted 10-15 clicks in some cases to obtain the same exact information.

2. Build a SAOP web service to pull down all opportunities and details from a specified account using the SFDC API. There is a good article on the Xcelsius Business Widgets Site outlining best practices.

3. Build a custom S control to expose the current opportunity information as variables, so they can be pushed to dashboard on-load, using Flash Variables. It is this S Control that will supply the information about the current opportunity that and will also define the Account parameter for our SOAP web service. Upon inserting the S control onto the opportunity page, I set the size to 1 pixel to hide it from the end user.
Example: Exposes the Session ID and Opportunity Name as variables.

sforceClient.setLoginUrl("https://www.salesforce.com/services/Soap/u/8.0");
sforceClient.init("{!API.Session_ID}", "{!API.Partner_Server_URL_80}", true);
sforceClient.init("{!Opportunity.Name}", "{!API.Partner_Server_URL_80}", true);

4. Build a custom S control to house the SWF file, and set the Flash Variables. You will also upload the SWF file to SFDC as part of the S Control.
Example: This example will load the SWF file, and define the Flash Variables (Param#). I also set the SWF background color to match SFDC.

‹html›
‹body›
‹object type="application/x-shockwave-flash" data="{!Scontrol.JavaArchive}" class="movie" width="100%" height="100%"›

‹param name="movie" value="{!Scontrol.JavaArchive}" /›
‹param name="bgcolor" value="F3F3EC" /›
‹PARAM NAME=FlashVars VALUE="salesforcesession={!API.Session_ID}&param1={!Opportunity.Name}&param2={!Opportunity.StageName}&param3={!Opportunity.Amount}&param4={!Opportunity.CloseDate}&param5={!Opportunity.Account}&param6={!Opportunity.Link}"›

‹img src="http://path-to/noflash.gif" width="100%" height="100%" alt="No flash installed" title="No flash installed" class="image" /›
‹/object›
‹/body›
‹/html›


5. In your Xcelsius dashboard, bind the Flash Variables based on the naming convention you used. In my case, I named them param1, param2, etc.


Hopefully, this has left you with some good ideas, of how a simple dashboard can really add value to your end users, specifically for SFDC.

I do have to give some credit to the guys at Salesforce.com, for helping me get my syntax correct for the first Inline S Control. Sorry guys, I can’t post the source files for the web service or Xcelsius file for this one. I can only help you along with how to build it.

Friday, December 15, 2006

by Ryan Goodman

With Xcelsius, you are equipped with components that will allow you to create a single parent SWF file that dynamically loads child SWFs inside of itself. The purpose of this “multi-layer” dashboard functionality is to enable designers to build large scale dashboard applications that are easier to scale and manage. One of the issues that will arise when building these applications is a need for the parent SWF to communicate with the child SWF file. While Xcelsius does not provide a means to do this, a workaround is possible for passing simple data sets from a parent to child on load.

By combining the slideshow component with a simple concatenate function, you can easily enable the parent SWF to dynamically stream single value or multiple value parameters to a child SWF (with the use of Flash Variables to consume the parameters). Below is a brief description of how I configured this example:


Download Source Files

1. Insert the slide show component and bind the source file URL to a cell (B3). In this case the name of our child SWF is “child.swf”
2. Create the parameter(s) names that we will pass on to the child SWF: “single_param”, and “multiple_values”
3. Decide where within the spreadsheet the parameters will be drawn from (user input, formula, insert in cell(s) for a selector): A1 & A2
4. Now we will concatenate a new URL so we can pass the parameters. The URL will end in cell B3, and will look like this: child.swf?single_param=A1&multiple_values=A2

In this case I created two input text boxes for each parameter and linked them to cells A1 and A2. Now we can configure our child SWF to consume the parameter values.

1. Go to File>Export Settings…, and click on the radio button labeled “Use Flash Variables.”
2. Check “CSV format,” and then click on the “Define Variables” button.
3. We want the first parameter, “single_param”, to be a single value so we name it accordingly and bind the variable selection to a single cell.
4. The second parameter, “multiple_values” will need to be configured to accept multiple values from the parent SWF so the variable selecton will be bound to a range. In this case we selected a column. In order for the SWF file to plot multiple values, they will need to be comma separated.

To illustrate the Flash Variables being populated in the model, I inserted a simple table component. Now you can place both the parent and child SWF files in the same directory and give it a try. This will also work inside of a PDF or PPT as long as the child SWF is in the same directory.

Friday, December 8, 2006

Connecting Xcelsius to an RSS Feed

by Ryan Goodman

For those of you who are not familiar with RSS, Really Simple Syndication or Rich Site Summary are web services for public consumption over the world wide web with no particular limitations on security or usage. Today, RSS feeds are syndicated from news organizations, general interest groups, blogs, and forums. The data is streamed as XML that can be easily consumed or remixed with any RSS reader or Aggregator. It is the lightweight nature and flexibility of this standard across multiple platforms that have allowed this technology to flourish. In fact, this Blog has a syndicated RSS Feed. I will save my views on re-mixing information and RSS related technologies for another article…

Since you need an RSS reader to consume XML data, why not use an Xcelsius dashboard to present context specific information. Let’s see how we can achieve this using Excel 2003 and Xcelsius to consume and present Google News RSS.



Download Source Files

For this article, I am not going to go into depth about XML Maps in Excel 2003, so for detailed info, you can download a great whitepaper on the Xcelsius learning center site: Connectivity Using XML Maps in Excel 2003

Consume the RSS feed as an Excel XML Map

  1. In the toolbar go to Data>XML>XML Source…
  2. At the bottom of the right hand side toolbar click on the XML Maps button.
  3. Click on Add to add a new XML map
  4. Instead of navigating to a file on your PC, you will paste your RSS feed URL. In our case we are using a Google news RSS feed. Lets make our default feed specific to Xcelsius: http://news.google.com/news?hl=en&ned=us&q=xcelsius&ie=UTF-8&output=rss. If you were to enter this URL into your browser, you would see the XML in your browser. It is this XML that we are going to stream to our Xcelsius model.
  5. With your XML Map added, click OK and you will notice the hierarchy displayed on your right hand side toolbar.
  6. In this case we are going to utilize 2 elements from this list: Under the Item folder, you will drag and drop Title and Link and place them next to each other in any cells. Lets use B5 and C5 as our cells.
  7. Now you have mapped the elements to Excel. Lets see what the data will look like when it is returned. Right click on cell B5, hover over XML, and click Refresh XML Data. This will force Excel to query Google news and return the data based on the RSS feed URL we specified earlier.
  8. Before we save and move to Xcelsius we want to ensure that this Feed reader will scale appropriately. To do this, you will need to expand the mapped range. You will notice a blue border around your mapped cells. Go to the lower right hand side and click on the handler to exapand the number of rows to B20 and C20. This will ensure that your reader will scale when there are more news articles.
  9. Save your Excel file

Configure Xcelsius to Show the RSS Data

  1. In Xcelsius you will first import your Excel file. Upon importing this file Xcelsius will automatically understand that the Excel file contains XML maps.
  2. In the toolbar, click on Data>XML Map Options. You will see the same URL that you defined in Excel. We can change the URL or even bind it to a cell in our model. Click OK.
    * In the final advanced model that I provide on this blog, I leverage this functionality to dynamically generate the URL based on search criteria defined in Xcelsius.
  3. Import a List Box selector component and a URL button component (located in Web Connectivity folder).
  4. For the List Box: Bind the Labels to B6:B20; Use the Insert Rows Option; Bind the Source Data to B6:C20; Bind the Insert In to B4:C4.
  5. For the URL Button: Bind the title to B4 and the URL to C4.
  6. Vuala- You now have an RSS reader
    Important Note: Do not try to preview it inside of Xcelsius: It will not work. Go to File>Export Preview

Here is a more advanced example where I take the original URL, break it apart and add a text box in Xcelsius to drive the search parameter. Then I dynamically concatenate (http://www,ryangoodman.net/blog/) the URL back together and bind that cell to the XML Map Options window (see #2). Then I add an XML map refresh button which allows me to dictate when the query is triggered. I have provided all source files so you can reverse engineer and play around.


Download Source Files

Addressing Cross Domain Access to the RSS feed
If you download and run these files on your desktop, it will work perfectly. Because of Flash security settings specific to cross domain access, you have to normally setup a cross domain policy file. This cross domain policy is applicable to scenarios where you have access to the data source.

In our case we obviously do not have access to the Google News servers. For this scenario, we will need to look at creating a PHP proxy to allow for cross domain access. To use this proxy, you will specify your RSS url as a parameter inside of the query string:
“http://your_site/xml_proxy.php?=url=your_rss_feed”

So in the our Xcelsius model we would define the concatenate formula to generate the following URL and ensure that this URL is linked within the XML Map Options window (see #2). http://ryangoodman.net/blog/../xml_proxy.php?url=http://news.google.com/news?hl=en&ned=us&q=xcelsius&ie=UTF-8&output=rss.