Monday, July 28, 2014

Siebel Nostalgia: 5 Years Ago

It has become a habit of mine to provide you with some 'blasts from the past' from time to time. This is not because I have grown lazy (believe me, there's a lot of writing these days ;-) but to serve the 'younger' generation of Siebel Essentials followers who might not have had the opportunity to read all the posts (does anyone ever scroll down that far to the blog archive?).


5 years can make a big difference in the IT world and there's much that becomes obsolete. But when I was looking for a nice article from July 2009, I had a hard time deciding which one I should elicit for a re-post.

So I thought I let you pick and choose from a list of well-ripened articles from the summer of 2009 and let you decide which you like best. I picked the ones which are still relevant today (most probably).
happy reading

@lex

Thursday, July 24, 2014

Asynchronous Business Service Invocation in Siebel Open UI

With Innovation Pack 2013, the Siebel Open UI API provides the possibility to invoke business service methods (and methods in general) asynchronously.



This is documented (here too) and my friend Neel from Siebel Unleashed was the first to blog about this exciting feature.

Today I would like to share with you how I put this new feature to good use. Do you remember the "Sortable Screen Tabs" series from last summer (has it really been one year already)?

Recently, I was revisiting the code and the way it invoked the business service which modifies the Tab Layout data. This is the "original" code to instantiate and invoke the service.

var oSvc = SiebelApp.S_App.GetService("AHA Tab Layout Service");
var inPS = SiebelApp.S_App.NewPropertySet();
var outPS = SiebelApp.S_App.NewPropertySet();
inPS.SetProperty("sTabs", tabarray.toString());
outPS = oSvc.InvokeMethod("SetTabLayout", inPS);

When I look at the above code today, I must confess it is pretty traditional. The code wouldn't be any different in a browser script from 2002, and even in eScript, the concept is the same albeit with some minor differences.

My latest code version looks like this:

var oSvc = SiebelApp.S_App.GetService("AHA Tab Layout Service");
var inPS = SiebelApp.S_App.NewPropertySet();
inPS.SetProperty("sTabs", arrTabs.toString());
//nothing new until here, but where's the output PS?
if(oSvc){
   var config = {async:true,scope:this,selfbusy:true};
   //wait a minute, what's this?
   oSvc.InvokeMethod("SetTabLayout", iPS, config); //but how?
}

Needless to say, it still works but the user can continue to work even while the business service is still running. The new and exciting stuff is the configuration object which we can use to pass runtime information to the Open UI proxy layer which sends the AJAX request to the server.

This config object has the following properties (Bookshelf documentation here):

  • async: this is the magic one. When set to true, the invocation will be done asynchronously, allowing us to continue with the remaining code immediately. When set to false, we will have to wait (synchronous invocation) until the service returns.
  • scope: set to 'this' always (so says bookshelf).
  • selfbusy: display the 'busy cursor' on the screen (false) or not (true).

As you can see I used the above properties in my code to invoke the business service method asynchronously without displaying a 'busy cursor' so end users do not notice anything.

Call Back Later

But the goodness does not stop here. My example business service does not return anything. But what if you have to pick up the output property set and process it? Clap your hands for the callback functions.

Let's have a look at the following config object:

var config = {};
config.async = true;
config.scope = this;
config.cb = function(){
   var outPS = arguments[2];
   if (outPS!== null){
      //parse output property set
}

The cb ('callback') property defines a function which will be invoked when the method invocation is complete. For business service method invocations we can pick the output property set from the arguments array (it's the third array item, hence the [2] index).

And there's even more...

For error handling, use the errcb property (similar to cb) to specify a function which will be invoked when the AJAX call fails.

The documentation also mentions an opdecode property but is pretty stumm about what it does exactly (decode or not decode the AJAX reply).

Finally, there's the mask property which (when selfbusy is set to false) allows us to control the screen masking during the method invocation.

Summary

Applet methods, business service methods, you name it. The Siebel Open UI framework is truly innovative and allows developers to gain complete control over what happens when.

have a nice day

@lex

Monday, July 21, 2014

BI Publisher Advanced RTF Techniques

Whenever I have the opportunity of teaching BI Publisher, be it the "stand-alone" BI Publisher Fundamentals class or the Siebel BI Publisher Reports class, I especially enjoy the chapters on RTF Templates.

As an extra service to my students (and now to the greater public), I have put together a simple RTF template which showcases more advanced RTF template techniques. This file and other hopefully useful examples are available here.

Ever wanted to have a BIP report with table of contents?

When you download the archive and open it, you might want to start with the BI Publisher Advanced Template Formatting.rtf file and open it in MS Word. If you have BI Publisher Desktop (aka Template Builder for Word) installed, you can load the sales.xml sample file and start generating previews (see the PDF output above).

The RTF file contains several examples and explanations such as:
  • Table of contents / bookmarks
  • Sub-templates for header and footer (uses the HeaderFooter.rtf file which must be reachable)
  • Working with shapes
  • Checkboxes
  • Conditional formatting
  • Page totals
  • Dynamic Excel output
  • Variables
The archive also contains example output files in case you don't have access to BI Publisher Desktop. In addition, you will find several other example files in the archive.

Make sure you also check out the splendid BI Publisher tutorials and other resources which I compiled here.

have a nice day

@lex

Thursday, July 17, 2014

Siebel Open UI Developer's Handbook - Announcement

It is not without some parental joy that we announce a new Siebel CRM book to be published this winter.

Together with three of the most distinguished Siebel Open UI experts, this humble writer is currently working on putting together useful information and case studies for the upcoming book:

In this book, you will:
  • Learn all about the Siebel Open UI Architecture
  • Learn to create custom Presentation Models and Physical Renderers
  • Learn advanced techniques for Open UI customization
  • Understand how to apply custom styles and themes
  • Customize and deploy Siebel Mobile Applications
  • Integrate Siebel Open UI with external applications
  • and more (see below)
As a frequent reader of this blog, you know that the book authors are truly committed to sharing information:
  • Duncan Ford
  • Alexander Hansal
  • Kirk Leibert
  • Jan Peterson
We expect the book to be published in Winter 2014/2015 and plan to align it with Siebel CRM Innovation Pack 2014. We are happy to announce as well that you can participate in shaping the book's content and get notified when it is available by filling in a simple form.

Please feel encouraged to grab this opportunity and create a book designed by and for the Siebel developer community.

have a nice day

@lex

Tuesday, July 15, 2014

Siebel CRM Patchset 9 is Available

Last Friday, Oracle has made Siebel Patchset 9 (8.1.1.11.9/8.2.2.4.9 - IP 2013) for July 2014 available on My Oracle Support.

The "Readme" document (Oracle Support login required) lists the bugs resolved which are/were in the following areas:
  • Open UI
  • Mobile Applications
  • Marketing
  • UCM
  • Others
Naturally, Open UI and Mobile Applications got a lot of attention from the good people at Oracle. So if you're missing some functionality or encounter bugs: Time to patch!

have a nice day

@lex

Monday, July 14, 2014

ec4u Releases Application Composer for Siebel Open UI

Earlier this year, I have been invited by ec4u expert consulting AG Germany to take part in a workshop. My job was to deliver Siebel Open UI training as well as discuss a new tool that ec4u planned to implement.

The tool should enable administrative users to quickly change the appearance of list and form applets in Siebel Open UI without having to use Siebel Tools. I was intrigued and inspired by the presentation of the tool during the workshop.

Just recently, ec4u has released the new tool, which now goes by the name 'Application Composer for Siebel Open UI'.


As we can learn from the fact sheet, the Application Composer provides an administrative view (and underlying data model) to store personalization/customization metadata for list and form applets.

Administrators can for example define which applet controls shall be hidden for certain responsibilities, positions, languages or organizations.

It is also possible to make fields mandatory, read-only or change the labels at runtime.

Form applet with changes made by ec4u Application Composer
ec4u makes the solution available to Siebel CRM customers and packages it with a deployment tool and consulting services.

For more information, please contact Markus Schneeweis.

have a nice day

@lex

Friday, June 20, 2014

Holiday Break

Siebel Essentials celebrates its 6th year(!) with a recreational break as it has become kind of a tradition.

A big "Thank You" goes out to all readers, fellow bloggers and supporters.

See you again soon.


have a nice day

@lex

Thursday, June 19, 2014

Oldie but Goldie: Siebel Quick Print

This is another "blast from the past" moment, when we look at an old post from 2008. But Siebel Quick Print is too good to forget (and yes, it works in Siebel Open UI too).


***

Introduced in Siebel 7.7 and greatly enhanced in 7.8, the Quick Print feature allows end users to bring the data they see in the Siebel view to paper (or Excel, HTML or - if a pdf writer is installed - to PDF).

Quick Print seems to be somewhat neglected in most projects, as it comes with default settings that are not very attractive. The screenshot below shows the result of pressing the Quick Print toolbar button in the Account > Orders view.


Not very impressive indeed, but let's set the user preferences for Printing as follows (note that we use HTML output which also allows to print form applets; Excel output is only supported for list applets).

Now you're talking

As we see, Quick Print is capable of producing a fully featured report-style printout of the entire view, even if it contains HTML icons or side-by-side applets.


Hierarchical list in quick print


Side-by-side applets in quick print


Have fun

@lex

Monday, June 16, 2014

Oracle BI Mobile App Designer Release 2

A while ago, Oracle has made the second release of BI Mobile App Designer (BIMAD) available. The official version name is 11.1.1.7.10-BIMAD-PS1 and it can be downloaded as BI patch 18794832 from My Oracle Support.

Here at Siebel Essentials, we're always fond of new features, so we took the new BIMAD for a test drive.

BIMAD sample app showcasing the new map feature
Here is the short list of new features:

  • UI Redesign
  • New Map component
  • New Exploration page
  • Global filters
  • Calculated fields
  • Support for multi-select
  • Plugin SDK and Gallery

The complete list of new features and enhancements can be found on the What's New page of the official user guide.

UI Redesign

The first thing that strikes the eye - apart from the new overall Skyros theme -  is that the designer got redesigned.

BIMAD Release 2 Designer UI. Click to enlarge.
One of the major changes is the removal of the ribbon-style navigation, replacing for example the component selection with a plus (+) icon. In addition, the properties of the selected element are now edited on the right side.

New Map Component

The screenshots above shows the new map component. Of course the underlying data must contain geographic data which could be the name or three-letter code of a country (e.g. "France" or "FRA"), state or county of the US or latitude/longitude information.

New Exploration Page

This is a new page type which adds sophisticated filtering and prompting capabilities for tablet applications (not available for phone apps).

Global Filters

The new global filters feature allows app developers to specify reusable filter definitions which can be applied to components to limit the data set available to the end user.

Calculated Fields

Developers can now create calculated fields and use them in the components. The screenshot below (from the user guide) shows the expression editor for calculated fields.



Support for Multi-Select

BIMAD cannot deny its BI Publisher heritage. The List component (formerly known as "Filters") now supports multi-select as well.

Plugin SDK and Gallery

BI Publisher (and the first version of BIMAD) support custom plug-ins to be added as new data visualization components. In release 2 of BIMAD, the good people at Oracle have added an SDK for easier development of custom plug-ins.

If you are inclined to create custom plugins, you will have to install Node.js(!). Then you can use the plugin gallery to define and download an initial set of files with sample data.

Once the plug-in is developed, it must be uploaded so it becomes available in the gallery.

Summary

As fellow blogger Christian Screen put it eloquently: "BI got MAD and you should be happy." The latest release of BIMAD provides a welcome round of enhancements and new features. So don't get MAD, get BIMAD ;-)

have a nice day

@lex

Thursday, June 12, 2014

Google Maps in Siebel (Open UI): The Penultimate Edition - Part 2

Welcome to the second part of our 'penultimate' edition of Google Maps in Siebel Open UI.

In the first part, we focused on the scaffolding, used templates to create a custom PM and PR for the SIS Account Entry Applet and downloaded and registered the colorbox plugin.

Today we will look at the actual implementation, starting with some requirements:
  • As stated in part 1, the code should be generic enough to work with all form applets that display address data
  • The solution should be SRF-independent.
  • A clickable map icon should be displayed next to the address fields.
  • When the icon is clicked, the map of the address displayed in the applet should be shown in a colorbox iFrame.
So, let's get to work:

4. Implement the Presentation Model

The purpose of a presentation model is to capture the business logic behind the scenes. In our example, the PM's task will be to extract the address information and create the link which leads to the map vendor's web site.

The following screenshot shows the custom PM's Init method and two "event handlers":

Click to enlarge.
The above code does the following:
  • Declare a new property "sMapHTML" to hold the HTML code for the link.
  • Declare handler methods for the ShowSelection and FieldChange API methods. Remember that "sequence:false" means "post".
  • Declare a custom method CreateMapHTML
  • The two "post" event handler methods simply invoke the CreateMapHTML function which returns the link HTML and then set the sMapHTML property value.
And here is the CreateMapHTML function in all its glory (see below for details):

Click to enlarge.
The above function does the following:
  • Declare the map base URL and parameters.
  • Get the controls for the current applet
  • Declare an object addressControls to hold the address related controls. Initialize each element with a "search string" such as "addr" or "postal". These search strings are meant to be used to locate address related controls in the applet. This is an experimental SRF-independent alternative to applet user properties and is of course problematic when address controls have "meaningful" names such as "HTML Text 2" or similar...
  • Iterate through the controls of the applet and compare the name of each control to the "search string". If the control name contains the search string, the control object will be added to the addressControls object.
  • Store the addressControls object as a property for easy access from within the PR.
  • Verify that we actually have an address using the control representing the street address.
  • Concatenate all address fields to a full address string to be used on the map page.
  • Generate the image link HTML using the full address string.
As discussed above, this educational example tries to demonstrate SRF-independency. If the names of the applet controls do not contain the "search strings", the above solution will not work. I have demonstrated how to use applet user properties to "broadcast" information from the repository to the PM in an earlier post.

In addition, one might want to consider externalizing all hardcoded stuff such as the map base URL, its parameters and the HTML snippets. Using constants similar to the as-delivered Open UI API would be a good idea.

The example presentation model file can be downloaded here.

5. Implement the Physical Renderer

Now it's time for the PR code. First, we modify the line which calls the define function to resemble the following (modifications in bold font).

define("siebel/custom/GoogleMapBoxPR", ["siebel/phyrenderer","siebel/custom/colorbox/jquery.colorbox-min"], function(){

This modification ensures that the colorbox library is always loaded with the physical renderer. This is an alternative to registering the library with the manifest and ensures that the colorbox code is only loaded when it is really needed.

The following screenshot shows the remainder of the PR code (explanation below):

Click to enlarge.
The above code does the following:
  • In the PR's Init method, use the AttachPMBinding method to attach the local ShowMapIcon method to the sMapHTML property. This ensures that the ShowMapIcon method is invoked every time the property is altered.
The ShowMapIcon method does the following:
  • Get the HTML generated by the PM
  • Remove any current instances of the image link using the anchor's name attribute.
  • Get the addressControls object from the property.
  • Obtain the object representing the street address control.
  • Get the value of the control's name attribute.
  • Insert the HTML string after the control.
  • Call the colorbox method upon the link. Note the iframe:true specification which is required for Google maps.
The example physical renderer file can be downloaded here.

6. Test

The result of the above code is a map icon displayed next to the street address control in a form applet:


The icon will only be displayed if there is an address available.
When the icon is clicked, a colorbox iFrame will open and display the map:

Click to enlarge.
To test the genericity of the code, register the PM and PR with other form applets (such as the Contact Form Applet) which display address data. Again, the code is experimental and not production-ready. Using applet user properties to specify the address field names might be a much safer way but alas is SRF dependent.

Summary

Thanks again to Mattias for the inspiration to bring the Google maps example to IP 2013 (or higher). I took the liberty of tweaking the requirements hoping to trigger some out-of-the-box thinking.

As a courtesy, you can download the PM and PR code (code examples provided on Siebel Essentials are for educational purposes only! Do not use this code in production! If you do so, it is at your own risk!) here:

The example PM can be downloaded here.
The example PR can be downloaded here.

What is your approach to the "maps requirement"? Please find the comments.

have a nice day

@lex