Quantcast
Channel: Siebel Unleashed
Viewing all 68 articles
Browse latest View live

Behind the scenes – Workflow debugging

$
0
0

I was trying debug an error in a workflow created by someone. This particular workflow was failing validation and giving a very odd message given below:

Validation failed for the workflow process ‘Customer Inquiry WF: 1′ for the branch ‘Y3′ The ‘WF Branch Criteria Value’ – field such as LO_.. or HI_.. for the respective data type is null or empty.

Since this was around a 30 step workflow in which no proper naming convention was followed (at least 5 connectors were named Y). The error message also didn’t mention any step name to make things easier. As the error message mentioned ‘WF Branch Criteria Value’ I assumed it must be some condition in a decision step. Looking at decision steps didn’t help either and everything seemed in order. So, before moving to the last resort of either deleting all the decision steps and recreating them I decided to do some digging.

So, to find exact step name I went behind the scenes created the following query to get a simplified data for the workflow.

select w.name “Workflow Name”,
s.name “Step Name”,
s.type_cd “Step Type”,
b.name “Branch Name”,
c.name “Condition Name”,
vl.name “Condition Value Name”
from siebel.S_WFR_STP s,
siebel.S_WFR_PROC w,
siebel.S_WFR_STP_BRNCH b,
siebel.S_WFR_COND_CRIT c,
siebel.S_WFR_COND_VAL vl
where w.row_id = ’1-22M8QD’
and s.process_id = w.row_id
and b.step_id = s.row_id
and c.branch_id = b.row_id
and vl.cond_crit_id = c.row_id

This gave me the culprit step and the connector name and only after deleting and recreating the particular connector the error message went away. I stil couldn’t figure the actual root cause of the error and I guess probably some thing got messed up during deployment. As this was an unusual thing that I encountered, I figured this might help someone else also.

Anybody else faced something like this ? Comments welcome!


Question and Answers – Siebel EAI

$
0
0

Siebel SWSE Stats to identify performance issue

$
0
0

Yesterday came across this Oracle support Article Doc ID 478027.1 while trying to debug performance issue. This article provide details about Stats.swe page that can help you provide valuable information to troubleshoot some hang issues with the application.

To visit the stats page you need to open following URL

http://<webserver>/<application>/_stats.swe?verbose=high

It shows all kind of stats and the most important section is Current Operations Processing. The “Current Operations Processing” section contains a table which shows all current requests that are in progress. The table in this section shows the Operation running in the left column and the Duration in right column. Requests that are highlighted in bold have been running for more than 10 seconds. A request that is highlighted in bold with a large duration value is another indication that this request may be hanging. If the request never completes then it has effectively hung.

Both application and database server hangs can exhibit the above behavior in the stats page. Typically if the stats page cannot be accessed, then this is an indication that the web server itself may have hung.

Below is the screenshot of how the page looks like:

image

This gives one more tool in application teams arsenal. Instead of waiting for Admin they can use this page to quickly identify areas suspected of Performance issues.

Happy Debugging!!

Top 5 Strategies Every Siebel Customer Must Consider – Webinar

$
0
0

J. Bruce Daley a renowned Siebel Expert is going to present a webinar that can help you assess where you stand with Siebel and the top 5 strategy options you must consider to determine the direction of your Siebel implementation.

In this webinar, Siebel experts will discuss findings from the Constellation Siebel report1. They will offer pragmatic advice to help you make the right decisions for your business and your career, including the use of independent support providers.
Learn:

  • The real position Siebel technology holds in the market
  • Why the conventional wisdom about the product is often wrong
  • What trends are driving misconceptions in the market
  • How to assess your Siebel implementations and a move-forward strategy

When: Thursday, Nov 14, 2013, 10:00 am PT / 1:00 pm ET

How to Register: Registration Form

Debugging Task Based UI

$
0
0

Recently I was working on TBUI and my experience was not very pleasant (more on that later). It is cumbersome (also boring) to develop TBUI and even more difficult to debug it. In my quest to find more about TBUI I came across couple of things that can make task debugging easier.

  • Debug Mode

You can setup a parameter in CFG file that allows you debug task and view task properties, Contextual BC in a separate window. This window is very similar to Workflow Watch Window. You can find the details of this approach on Siebel Essentials blog.

  • Log Level

As most of you already know that you can enable logs for dedicated client using Environment Variables but enabling Siebel log doesn’t help in task debugging especially if you are trying to debug a moderately complex task (forget about extremely complex tasks). I came across a My Oracle Support article that describes the method enabling log only for tasks. You can follow steps given below to enable logs only for TBUI

    • Open Environment Variable Window
    • Create a new user variable with following detail
      • Name: SIEBEL_LOG_DIR
      • Value: Your path where you want log files to be stored
      • Name: SIEBEL_LOG_EVENTS
      • Value: TskNav =3, TskExec=3, StpExec=4, TskPresInfo=4

This article also describes method of enabling task logs for Web Client also which is basically increasing log level for following components

  • Workflow Definition Loading – 3 or 5
  • Task Execution – 3 or 5
  • Task Navigation – 3 , 4, or 5
  • Workflow Process Execution – 4
  • Workflow Step Execution – 4
  • Task Presentation Information – 4 Task UI Object Manager Log
  • Task UI Conflict Log
  • Task UI Union Sql Log

Example of a log file:
The following is an example of a log file with TskExec, TskNav, and TskPresInfo log events enabled.

TskExec TskState 3 0000000243fc1350:0 2006-02-22 23:49:49 Task state transition changes : Action invoked: ‘Navigate’, Current State: ‘Navigate’, Next State: ‘Navigate’.
TskNav Oper 3 0000000243fc1350:0 2006-02-22 23:49:49 Task engine requested to navigate to next view.
TskNav Oper 3 0000000243fc1350:0 2006-02-22 23:49:49 Task engine requested to navigate to next step: ‘Task View 1′.
TskNav PathChange 3 0000000243fc1350:0 2006-02-22 23:49:49 Pushing frame to stack : ’1*05*Start0*1*00*’.

Note:  You can also use this information to get logs for selective sub components of object manager.

Happy Debugging!!

How Siebel handles multiple updates to a record?

$
0
0

A lot of times you must have encountered the error mentioned below

SBL-DAT-00523 : The selected record has been modified by another user since it was retrieved.

This error message signifies that somebody else was quicker than you and has already modified the record, so you need to perform the update again. This is common occurring scenario where lot of updates are happening either thorough Policy Workflows or Asynchronous requests in addition to synchronous updates either on UI or scripting. This article attempts to explain How Siebel Applications handle the concurrent attempts to update a record?.

When a user accesses a record via business component either from UI or scripting, both Row Id and Modification Number field values are retrieved by Siebel through SQL for example:

SELECT ROW_ID,MODIFICATION_NUM, OTHER_COLUMNS,…. FROM SIEBEL.S_OPTY

Now let’s assume that Row Id retrieved from above SQL is 1-12345 and Modification Number is  1

When user modifies something on the UI or scripting an Update statement is triggered and the where clause of the UPDATE statement has both ROW_ID and MODIFICATION_NUM column in it. Also in update statement Modification number is incremented by one for example:

UPDATE SIEBEL.S_OPTY SET MODIFICATION_NUM = 1+1,OTHER_COLUMNS = ‘ABC’,…. WHERE ROW_ID = ’1-2345′ and MODIFICATION_NUM = 1;

If another user access the same record between query and update they would get the same modification number ‘1’ along with ROW_ID ‘1-12345’

Now lets assume that update by other user happened before our update which means that now the modification number on DB has already been update to ‘2’. Therefore where clause would fail as there wouldn’t be any record with MODIFICATION_NUM = 1 and we would get SBL-DAT-00523 error.

When you re-query the record next time you would get modification number as 2 and your update this time will succeed (provided your are fast enough :) )

XSLT – How to Sort – Group By and Sum

$
0
0

XSLT is really powerful language when it comes to XML transformations but as we already know transformation is not the only thing that XSLT does. It can do a lot more than that. I had chance to experience the power of XSLT while working on requirement that needed data to be Sorted, Grouped and Summed on the fly based on user choice. Below is the detailed requirement:

Requirement:

You have a list of Invoices which has following attributes

  • Invoice Number
  • Invoice Amount
  • Invoice Date
  • Customer Number
  • Serial Number
  • Purchase Order Number

These invoices need to be Sorted and Grouped by Serial Number, Customer Number or Purchase Order Number depending on user selection and they should display the sub totals followed by grand total in the end in a doc format. The example below would explain the requirement:

Raw Data:

Invoice Number Invoice Amount Invoice Date Serial Number Customer Number Purchase Order Number
1000 1000 1/1/2013 123456789 123456789 12345
1001 1001 1/2/2013 123456789 123456789 12345
1002 1002 1/3/2013 123456789 123456789 12345
1003 1003 1/4/2013 123456792 123456792 12346
1004 1004 1/5/2013 123456792 123456792 12347

Expected Output (Word Doc Format):

Customer Number Invoice Number Invoice Date Invoice Amount
123456789 1000 1/1/2013 1000
1001 1/2/2013 1001
1002 1/3/2013 1002
Total of Customer 123456789 3003
123456792 1003 1/4/2013 1003
1004 1/5/2013 1004
Total of Customer 123456792 2007
Grand Total 5010

 

This data needs to be in a doc file and attached to the record.

Now you can imagine the complexity of the code that needs be written if this was to be done using traditional eScript. Where as use of XSLT gave us a script less solution (sort of if we consider XSLT scripting as non scripting).

With the help of XSLT it became a Four step process

  1. Accept user input and create a search spec
  2. Query using EAI Siebel Adapter and get Invoice List as Siebel Message
  3. Use Appropriate XSLT template and get the required HTML file
  4. Save the HTML file with Doc extension and attach the file.

Below is the XSLT used to sort by Amount, Group and Total by PO Number. You just need to replace the Customer Number with Serial Number or PO Number as per user choice.

<?xml version=”1.0″ ?>
<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform” >
<xsl:key name=”cust” match=”FS_spcInvoice” use=”@Customer_spcNumber”/>
<xsl:template match=”/” >
<html>
<head>
</head>
<body>
<div id=”container”>
<div id=”InvoiceHeader” style=”font-size:25px; color:gray;font-weight:bold”>Invoice Summary</div>

<div id=”invoicelist”>
<table style”border:solid; width:100%”>
<thead style=”font-size:18px;color:gray”>
<tr><th>Customer Number</th><th>Invoice Number</th><th>Invoice Date</th><th>Invoice Amount</th></tr>
</thead>
<tbody>
<xsl:apply-templates select=”PropertySet/SiebelMessage/ListOfInvoice_spcSummary/FS_spcInvoice[generate-id(.)=generate-id(key('cust',@Customer_spcNumber)[1])]”>
<xsl:sort select=”@Gross_spcAmount” order=”descending” />
</xsl:apply-templates>    <!– end of view –>
<tr><td colspan=”4″ style=”text-align:right; font-weight:bold;font-size:15px”>GRAND TOTAL</td><td colspan=”2″ style=”text-align:center; font-weight:bold;font-size:13px”><xsl:value-of select=”format-number(sum(PropertySet/SiebelMessage/ListOfInvoice_spcSummary/FS_spcInvoice/@Gross_spcAmount),’0.00′)”/> $</td></tr>
</tbody></table></div></div></body></html>
</xsl:template>

<xsl:template match=’FS_spcInvoice’>
<xsl:for-each select=”key(‘cust’, @Customer_spcNumber)”>
<tr>
<td><xsl:value-of select=”@Customer_spcNumber” /></td>
<td><xsl:value-of select=”@Invoice_spcNumber” /></td>
<td><xsl:value-of select=”@Invoice_spcDate” /></td>
<td style=”text-align:center”><xsl:value-of select=”@Gross_spcAmount” /> $</td>
</tr>
</xsl:for-each>
<tr><td colspan=”4″ style=”text-align:right; font-weight:bold;font-size:15px”>TOTAL for Customer<xsl:value-of select=”@Customer_spcNumber” /></td><td colspan=”2″ style=”text-align:center; font-weight:bold;font-size:13px”><xsl:value-of select=”format-number(sum(//FS_spcInvoice[@Customer_spcNumber= current()/@Customer_spcNumber]/@Gross_spcAmount),’0.00′)”/> $</td></tr>
</xsl:template>

</xsl:stylesheet>

Explanation of the XSLT in next post.

Note: I had to manually modify the XSLT in order to post it to Siebel Unleashed so in case if you encounter any issue while getting it to work, Please do let me know.

How to Calculate 18 years age flag- Scriptless Siebel

$
0
0

This article has been contributed by Praful Desai a reader of Siebel Unleashed.

Requirement:

You need to calculate if a person is underage or not i.e less than 18 years of age or not. You need to return Y if they are less than 18 years (Underage) and N (Not Underage) if they are more than 18 years. It should also take care of people born in leap year.

Solution:

On the first look it typically looks like solution that can be achieved with minor scripting but Praful Desai shows us how we can use ToChar functions in side calculated fields to achieve the solution without any scripting.

  1. Create Calculated Field of todays date in YYYYMMDD Format:
    e.g: Formatted Today Date : ToChar(Today(),’YYYY’) + ToChar(Today(),’MM’) + ToChar(Today(), ‘DD’)
    Field Type: DTYPE_NUMBER
  2. Create another Calculated Field Birth date in YYYYMMDD Format:
    e.g: Formatted Birth Date : ToChar([Birth Date], ‘YYYY’) + ToChar([Birth Date], ‘MM’) + ToChar([Birth Date], ‘DD’)
    Field Type: DTYPE_NUMBER
  3. Set the Calculated Age Under 18 Flag as mentioned below:
    Age Under 18 Flg : IIf(([Formatted Today Date] – [Formatted Birth Date]) < “180000″, “Y”, “N”)
    Field Type: DTYPE_TEXT

 

This should give you an idea how to powerful calculated fields can be.


MVG Add All Button -Siebel Open UI

$
0
0

This article has been shared by Tirumalesha Dadige a reader of SiebelUnleashed.


Requirement:
You need to show Add All button on the MVG Applet in OpenUI.

Problem:
This feature was removed in OpenUI.

Solution:

Button can be added in the OpenUI by changing the SWT file and the same functionality will work.

  1. Go to WEBTEMPL/OUIWEBTEMPL in Siebsrvr folder.
  2. Open the CCPopupListMvg.swt and Add the following line after –> <div class=”siebui-popup-btm siebui-mvg-btn-modifier”>
    <swe:control id=”3002″><!– Add All, 3002 –><span class=”siebui-popup-button”><swe:this property=”FormattedHtml” hintMapType=”Control” hintText=”Other”/></span></swe:control>
    So this line is added to show the Item Identifier 3002 which is for Add All button.
  3. So now your div tag should look like below:
    <div class=”siebui-popup-btm siebui-mvg-btn-modifier”>
    <swe:control id=”3001″><!– Add, 3001 –><span class=”siebui-popup-button”><swe:this property=”FormattedHtml” hintMapType=”Control” hintText=”Other”/></span></swe:control>
    <swe:control id=”3002″><!– Add All, 3002 –><span class=”siebui-popup-button”><swe:this property=”FormattedHtml” hintMapType=”Control” hintText=”Other”/></span></swe:control>
    <swe:control id=”3003″><!– Delete,3003 –><span class=”siebui-popup-button”><swe:this property=”FormattedHtml” hintMapType=”Control” hintText=”Other”/></span></swe:control>
    <swe:control id=”3004″><!– Delete All, 3004 –><span class=”siebui-popup-button”><swe:this property=”FormattedHtml” hintMapType=”Control” hintText=”Other”/></span></swe:control>
    <swe:include file=”CCButtons_Popup_oui.swt”/>
    </div>
  4. Save the Web Template file and fire up your dedicated client (restart server in case of web client).

You should see Add All button in the MVG Popup now.


Please rate this post and show appreciation to Tirumalesha for sharing this cool information with us!

Siebel Applets in Tabs- Siebel Open UI

$
0
0

@lex in his blog has been exploring various jQuery UI widgets and showing their application in Siebel Open UI. While going through them jQuery Tabs caught my attention and I wondered how can they be implemented in Siebel Open UI. So, going one step ahead of @lex I went on to abuse the whole Opportunity List View :) (instead of just an applet) and below is output that I got:

image

image

Opportunity List View was manipulated at run time to display the Applets in tabbed format instead of sequential applets.

Solution:

There are two approaches to achieve the tabbed layout. This post discusses about using pure JavaScript/jQuery technique to achieve the tabbed layout and in next post I will share the web template approach.

Standard Disclaimer:

This code is not a production Ready code and is for educational purposes only. Use this on your own personal risk

As explained by @lex earlier the best place (till now) to manipulate the whole view is postLoad.js which is executed after every view load. So, I went ahead and put modified code in postLoad.js file and this is how my postLoad.js finally looked like.

[code language="javascript"]
if (typeof (SiebelAppFacade.Postload) == "undefined") {
Namespace('SiebelAppFacade.Postload');
(function(){
SiebelApp.EventManager.addListner( "postload", OnPostload, this );
function OnPostload( ){
try{
console.log("Loaded");
//start of custom code
var view = SiebelApp.S_App.GetActiveView();
var viewName = view.GetName(); //get the active view name
if(viewName == "Opportunity List View"){ //if my intended view then
//define all the variables
var tabHTML = "";
var theApplet;
var appletId ="";
//you can invert the condition if you want to
if($('#tabList').length > 0){
//already tabified don't do anything
//you can also remove and then tabify again
}
else{
var arrApplets = view.GetAppletMap(); //get array of applets
//prepare you tabs div
tabHTML = "<div id=\"tabs\"><ul id=\"tabList\">";
for(var a in arrApplets){ //run loop around applets
theApplet = arrApplets[a];
appletId = theApplet.GetFullId();
//to display applets as tabs wrap them in li and a tag
//use title of applet as tab title
tabHTML = tabHTML + "<li><a href=\"#" + appletId + "\">" + $("#s_" + appletId + "_div").attr("title") + "</a>";
}
tabHTML= tabHTML + "</ul></div>";
$('#_sweview').prepend(tabHTML); //attach the html to view div
$('#_sweview').tabs(); //tabify the applets
}//end of else
}//end of view if
}//end of try
catch(error)
{
//No-Op
}
}
}());
}
[/code]
I think the code has been commented well enough to understand but here is high level explanation

  1. GetAppletMap –> provides you with array of all the applet objects in view
  2. GetFullId –> gives you the value of id attribute div that can be used for jQuery selector
  3. _sweview –> is the value of the id attribute of the view rendered by siebel (container of applets)
  4. $(‘#_sweview’).tabs() -> jQuery function to initialize Tabs.

Comments and Questions are welcome!!

Single Applet as Tabs – Siebel Open UI

$
0
0

As I explained in the my last article how convert a Siebel view into tabbed view to display applets as tabs. Thanks to an idea by Jason I was able to take this a step further. Interested??

The idea is to convert a single form applet into tabbed applet to display different fields in different tabs. This could be very useful in achieving requirements where you need to show mutually exclusive fields or categorize data (currently using Form Sections)  by dividing a single applet into sections and display each section as tabs.

Below is how it looks like when fully functional.

image

image

This is a single form applet with 10 fields divided (divs) into two sections of 5 fields each.

Solution:

jQuery Tabs require your HTML structure to be something like this:

  • Container DIV for the tabs
  • Un-orderd List (UL) containing links with href as id of the DIV that you would like to use for tab contents
  • DIVS containing conent

Technically this structure could be achieved at run time using jQuery but that would result into complicated PR for that applet. But if this structure is already present then you need JavaScript only to initialize the tab which is basically one line script.

Now to achieve the required structure we need to dive into web templates and create a template that suits our need.  Once, the web template is ready you just need to configure your applet in tools as usual and initialize the tabs using jQuery at run time.

Solution:

This is how the web template looks in Tools

image

To achieve the tabification you can either use postLoad.js or an Applet PR all you need to do add this line of code

[code language="javascript"]
$('#add-tabs').tabs();
[/code]

And with that your tabs are functional .

While working on this I realized that to truly exploit the Open UI potential you will have to modify web templates at some point, so it would help to start early. You can go through Siebel Developers bookshelf to get basic knowledge of swe tags and that should be enough to get you up and running.

Interested in the Web template? Drop a comment below. I will make the web template available for download based on public demand.

Enjoy!!!

Expand – Collapse Siebel Applet – Siebel Open UI

$
0
0

You must have seen lots of web apps where you are able to collapse a section of website by clicking on a plus icon or something similar to that. So, not waiting further I dived right in and started researching how we can do that in Siebel Open UI.

First I tried to find the a jQuery plugin that will help me accomplish that but that seemed too much for this type functionality. After further research the solution that I found was too simple to implement in Siebel 2013 Innovation Pack (Siebel 8.1.1.11).

The Solution in 8.1.1.11 turned out to be just couple of Applet User Properties.

Yes, that’s right. To turn any applet into a collapsible applet  you just need to create two user properties.

  1. ClientPMUserProp
  2. Default Applet Display Mode

Below are the details of the user properties

  • Name: ClientPMUserProp
    Value: Default Applet Display Mode
  • Name: Default Applet Display Mode
    Value: Expanded

In case if ClientPMUserProp user property is already define on the applet then you can just add “Default Applet Display Mode” to the value by putting a comma at the end. As soon as you create these two user properties you start to see an icon at the far right corner of the applet as shown below

List Applet:

Screenshot_010414_080348_AM

Form Applet:

Screenshot_010414_080120_AM

That’s it you are done. As soon as you click the icon the applet will collapse and you will only see the header and clicking that icon again will expand the applet.

Since we have provided “Expanded” as value to the user property the applet by default is Expanded. You can also provide value as “Collapsed” to change the default behavior of the applet to be collapsed. In the below screenshot you can see the collapsed form applet in action.

Screenshot_010414_081240_AM

and here is teaser preview for the next post

Screenshot_010414_081457_AM

Yes, I did find a custom solution for people still on previous version of Open UI 8.1.1.9/10 but with this you can go a step further and group applets as sections and expand/collapse complete section on clicking the icon.

Happy New Year!!

Custom Expand Collapse Applet – Siebel Open UI

$
0
0

As promised in the last post, I am back with the Expand/Collapse Functionality implemented in custom way. But as expected the implementation is bit more complex than vanilla functionality and involves customizing View Web Templates. The basic idea for this solution is to enclose the applet inside a custom div and then use jQuery to derive the expand collapse functionality.

Before diving into the solution I would like to share few advantages/disadvantages of implementing expand/collapse functionality in custom way.

Advantages

  1. You can group applets into section and make multiple applets expand and collapse together
  2. You can customize the look and feel such as icon, UI through CSS
  3. You can provide section headers for better usability

Disadvantages

  1. This makes the solution Complex
  2. Web template changes would need server restart to take effect.

Below is the way on how you can implement this functionality.

1. Customize View Web Template

Open the view web template of the view where you want to implement expand collapse functionality. It would be a better idea to copy the View Web Template and use that for your view so that all the views are not impacted.

Each applet in View Template is placed using “swe:applet” tags. You might have to make educated guess for the place holder of the applet for which you would like to implement expand/collapse functionality.  Below is before and after of how your view web template should look like.

Before:

[code]

<swe:applet hintMapType="Applet" id="1" hintText="Parent Applet" property="FormattedHtml" var="ParentWithPointer"/>

[/code]

After:

[code language="html"]

<div class="div-exp-col-border"><img id="img-info" class="down" src="images/collapse-icon.jpg"/></div>
<div class="content">
<swe:applet hintMapType="Applet" id="1" hintText="Parent Applet" property="FormattedHtml" var="ParentWithPointer"/>
</div><!--end of content –>

[/code]

2. CSS for persentation

Below are the CSS Rules that I used for modifying the look and feel

[code language="css"]

.div-exp-col-border{cursor: pointer; padding: 5px 10px; color: green;font-family: Arial, Verdana;font-size: 16px;line-height: 18px;background: #345674; overflow: hidden;}
.div-exp-col-border img{float:left;height:20px;width:20px}

[/code]

Now the last part is to make it functional. Which means attaching click event to the div and perform hide/show of the div. I struggled with finding the right place to put the code and ended up using script tag inside the view web template itself. It doesn’t feel right but haven’t been able to find a better way to do it.

3. jQuery for functionality

Below is the jQuery code to actually make the expand/collapse functional. In the web template itself put the following code.

[code language="javascript"]

<script>
$('.div-exp-col-border').click(function(){
$('.content').slideToggle(500);
if($('#img-info').hasClass('down')){
$('#img-info').removeClass('down').addClass('up').attr('src','images/expand-icon.png');
}
else{
$('#img-info').removeClass('up').addClass('down').attr('src','images/collapse-icon.jpg');
}
});
</script>

[/code]

Here are screenshot of showing the expand collapse functionality with multiple applets in action.

Screenshot_010414_022301_PM

Screenshot_010414_022355_PM

That’s it!! Now you have functional expand collapse functionality for applets. In case if you would like to group applets just enclose each swe:applet tag in content div.

Have Fun!!

Error exporting Workflow Process in 8.1.1.10/11

$
0
0

We recently patched our environment to Siebel 8.1.1.11 and started getting following error while trying to export workflow process records in Siebel Tools.

Error writing XML to file ‘D:\2-N93ZIX.xml’.
(SBL-EAI-04262)

File could not be created as the directory specified for the file creation is not valid.(SBL-EAI-50228)

The reason for this error is enhanced security settings introduced in these patches that allows you write files only in the directories specified with the help of EAIFileTransportFolders parameter. You can read the following My Oracle Support article to find detail about this. What is surprising is that it effect Siebel Client (Thin/Thick) as well as Siebel Tools.

In order to fix this problem for Siebel tools and Siebel Thick Client you need to create following entry in Siebel Tools CFG (tools.cfg) and you application cfg

[EAIFileTransportConfigSubsys]
EAIFileTransportFolders = c:\temp;d:\users\temp

You will only be allowed to export Workflows only at the specified paths which in above example means only temp folder in C drive and only in users temp folder in d drive.

But where there is will there is way. In order to make it behave normally you can create and entry like this.

[EAIFileTransportConfigSubsys]
EAIFileTransportFolders = c:\;d:\

This will allow export to any directory in C Drive and D Drive (not recommended).You can follow instructions in article for Thin Client. Some might see this as nuisance but I believe this has now become a necessity. You may ask why?

Here’s Why?
Pre Open UI era customer facing applications (SI) were limited in capability and feature access was controlled based on HI/ SI Mode. With Open UI HI and SI applications have been merged these setting have been introduced to provide us with greater control on what is allowed/disallowed in customer facing applications. As Open UI matures as a product I expect to see many more settings to be introduced to enhance security and control access to features on application basis.

Fetching Ownership of a record on which user is working

$
0
0

This article has been submitted by Prashant Varshney reader of Siebel Unleashed.


Requirement:

Check the ownership of a record on which user is working and based on ownership, BC record should be either editable or read-only. Ownership means the record on which user is working is either assigned to user or user is the manager of that record. This kind of requirement usually exist in a scenario where it is required to give both My and All views to one responsibility and it is required that the records on which user has access can only be editable to the user, rest records should remain read only.

Solution:

There are two parts of this solution which I have mentioned in part A (editable to user and managers) and B (read-only for others):
Fetching IS Manager value in a calculated field:

  1. Create a join on S_CONTACT table having join spec as
    Destination Column=PAR_ROW_ID
    Source Field=Primary Owner Id of the record (OWNER_PER_ID)
  2. From this join (S_CONTACT) fetch the PR_HELD_POSTN_ID and name this field as say Primary Owner’s – Primary Position Id
  3. Create a link between Parent BC and Party Reporting Relationship on which it is required to check if the record on which user is working is the manager (User position exist in the Parent position of that record) having below spec:
    Source Field=Primary Owner Primary Position Id
    Destination Field=Party Id
  4. From this link create a MVL on the Parent BC having following spec:
    Name=Manager Positions
    Destination Bus Comp=Party Reporting Relationship
    Destination Link=Link created in step 3
    Source Field= Primary Owner Primary Position Id
  5. From this MVL create a MVF using below specs:
    Name=Manager Position Id
    MVL=Manager Positions
    Field=Parent Party Id
  6. Create a calculated field having below specs:
    Name=IsManager
    Calculated Value=IIf(EXISTS([Manager Position Id] = PositionId()), ‘Y’, ‘N’)
  7. Now this calculated field will give value as Y if the Parent Position of the record on which user is working equals to the logged on user position.Fetching IS Owner value in calculated field:
  8. Create a calculated field having below specs:
    1. Name=IsOwner
      Calculated Value=IIf([Primary Owner Primary Position Id]=PositionId(),’Y',’N')
    2. Finally created another calculated field as:
      Name=Ownership
      Calculated Value=IIf([IsOwner]=”Y” OR [ISManager]=”Y”,”Y”,”N”)

This ownership field can be used in either BC user property, Applet User Property, eScripting, state models etc and the requirement can be achieved.

Note: I haven’t been able to implement and test the validity of solution (due to unavailability of time) but it seemed logically correct hence posting it. Please feel free to point out if something is missing or out of place.

I will be back soon with bigger and better Open UI post please stay tuned. Thanks for your continued support.


Real World Experience – Siebel Open UI

$
0
0

How to learn Siebel Open UI?

$
0
0

A lot of people have asked me this question or a variation of this question which goes like.

  • How do I learn Open UI?
  • How do I start with Open UI?
  • I want to learn Siebel Open UI, should I start with bookshelf?

You get the drift. I thought it might help to share the answer that I give them.

My Answer:

Learning Open UI is bit different from traditional Siebel. In normal circumstances one would be asked to read bookshelf or visit Siebel Essentials or Siebel Unleashed ;) to learn Siebel but not in case Open UI (although that would certainly change in future). I will not ask you to touch bookshelf until much later.

As we all know Siebel Open UI is a new layer of UI based on HTML 5.0 standards that provides browser independence and great many other features. These other features (commit on step off, Notifications, Tiles Layout) are achieved by use AJAX, jQuery Plugins (JQ Grid for list applets) and Proxy JavaScript classes designed by Oracle (buscomp.js, view.js).

Above information means that in order truly understand and develop in Siebel Open UI we first have to understand the technologies that make it tick. In other words you have to primarily understand following technologies

  1. HTML
  2. CSS
  3. jQuery
  4. AJAX

When I learnt about Open UI for the first time I knew that jQuery will be integral part of it and I started honing my jQuery skills by reading about it. Reading was OK but what really helped me setting myself a target to build small application that used all of these technologies. It could be a really simple project such a building a sign-up form.

For HTML & CSS learn about frameworks such as Bootstrap. For AJAX you can setup WAMP  (web server and MySQL DB). Get your hands dirty with jQuery and AJAX and try to implement simple things such as Accordian.

I would give around 2-4 weeks for this phase of learning. Once you are comfortable with terms like selectors, filters, parent, delegate, bind, closest, overflow, font-family, border, display block/inline then you know you are ready for next part. Now, the basic structure of PM and PR would start making sense. One thing that you can do to test if you got the basics right or not is to un-minify any Oracle class file such as buscomp.js, view.js etc and see if the code there makes any sense. Don’t expect to understand much but even if you are able to make sense of few things that means you are in right direction.

Next step is then to move to Open UI bookshelf (yes, you can start it finally) and start implementing basic PR and PM. I can assure that this additional effort to understand the basics would go a long way in saving time and effort later.

In case you have already been asked to start developing in Open UI then I would suggest start following Siebel-Essentials closely there are really good examples and basics to get you started and keep learning these technologies parallely.

Have different thoughts or have something to add? Head to the comments section below and make the difference.

Siebel Open UI- Areas to lookout for

$
0
0

Siebel OUI Presentation Model- What you see is what you get!

$
0
0

Siebel Open UI – asynchronous call in PM-PR

$
0
0

Prior to Open UI you could only call workflows in asynchronous mode. Well technically it was possible to call a business service asynchronously by wrapping it in a workflow. With Open UI Oracle has provided us with a way to call Business Service, Business Component Methods, Applet Methods and of-course workflows asynchronously. The icing on the cake is ability to associate a call back method that will be executed once the request is complete.

Excited????  Now imagine that you have implement following requirement.

You have to implement a search functionality with following features:

  • User should be able to click search image to initiate search.
  • While the search is happening page should get a nice Web 2.0 style “Please Wait” message.
  • UI should be blocked so that user cannot do anything (except for closing the browser window) funny while waiting for search to complete.
  • Once the search is complete everything should return to normal and UI should be unblocked.

There are three parts to this requirement:

  1. To be able to search by clicking on an image
  2. Block the UI Show a “Please Wait” message.
  3. Perform Search, Unblock UI and remove the message.

In this post I will only be discuss third part that involves invoking search functionality asynchronously. So, what are we waiting for let’s get started!!

Siebel has introduced another parameter in BS and BC method calls, named AI (Additional Input) that can run an AJAX calls. You define AI as JavaScript Object and it have following arguments

  • async : True or False. If True then method the call will be made asynchronously
  • cb: Define a callback function that should be called once the method is complete
  • scope: the value should be “this” (without quotes)
  • errcb: Have a error callback function if AJAX call fails
  • opdecode: Decode or not decode the AJAX call
  • mask: Mask the screen or not
  • selfbusy: Display busy cursor or not

Now back to the 3rd part of the requirement. On click of image a method define applet to perform search should be called in async mode using AI parameter.

Below is how would define the AI object

var configObj = {}; //define an empty object

configObj.async = true; //this is key argument. if set to false then method will be called in usual way.
configObj.scope = this; //always set as "this"
config.cb = function(){ //method to execute as callback function.
//write any code here that you would like to execute
//after the call is complete
}

To call method in Physical Renderer following code is used to invoke the method

var inPS= SiebelApp.S_App.NewPropertySet();
this.GetPM().ExecuteMethod("InvokeMethod","ExecuteSearch", inPS, configObj);

To call method in Presentation Model following code will be used to invoke the method:

var inPS= SiebelApp.S_App.NewPropertySet();
this.ExecuteMethod("InvokeMethod","ExecuteSearch", inPS, configObj);

In next post we will discuss blocking the UI part and finally the how the whole solution works.
Stay tuned!!!

Viewing all 68 articles
Browse latest View live