Thursday, July 30, 2009

Limitation in "PRM ANI Utility Service" business service

I was working on one requirement which I was trying to implement using Workflow, where I need to perform the following :
a) Query on Account using EAI Siebel Adapter
b) Get the contact name for the very first child under the accounts.

requirement sounds very simple, same the case with me and I thought of using PRM ANI Utility Service to achieve the purpose with the help of just two steps in the workflow. So here is how these two steps looks like :

Process Properties:
Step1 : Query AccountBusiness Service : EAI Siebel Adapter
Business Service Method : Query
Step2 : Get Contact IdBusiness Service : PRM ANI Utility Service
Business Service Method : GetProperty

As per my expectation, I didn't get the "First Name" into process property "Name", but instead I was getting the error :

Error invoking service 'PRM ANI Utility Service', method 'GetProperty' at step 'Get Contact Id'.(SBL-BPR-00162)--Error Running Method 'Execute'.(SBL-PRM-00104)

I was getting crazy as not able to figure it out what exactly the root cause of it, but after some hit and trials it worked fine for me when there was only one single child record (Contact) under the Account for which I was querying. So let me tell you the reason why I was getting the error :



This is the snapshot from the watch window, where you can see there were actually 3 records under the accounts for which I was querying and due to this PRM ANI Utility Service was not able to figure it out for which record I need the First Name. So this is the limitation of this business service and you need to make sure while using "GetProperty" and "SetProperty" of this business service that there should not be more than one child in the propertyset.

I tried with querying for the Account having single Contact associated and it worked fine. So the only workaround is to write a customize business service if you want to get/set a property value of any child record.
Give it a try !!
.

How to call "Asynchronous Server Requests" business Service?

Sometimes there is a requirement we need to run few processes that should not stop the user on the screen to go further and do next steps when Siebel is processing something in the background. That is the place when Asychronous processes come into the picture and the solution that Siebel provides for these kind of scenarios is to give a call to "Asynchronous Server Requests" business service.

There are only two ways (that I know my past experience, please add if anyone know more) by which you can call "Asychronous Server Requests" Business Service :

a) Via e-Script : easy way to do that and most people know this.
b) Via Workflow : this is bit tricky
Lets see each one of them in detail. Taken an assumption that you need to invoke a workflow (asynchronously). Assume the workflow name is "Send Email Opportunity Sales Rep", which just sends an email to the Sales Person on the Opportunity and the Input Agrument to the workflow is : "OpptyId" (1-XR45)

Via e-Script :
Here is the piece of code that you can to achieve the above requirement :
var svc = TheApplication().GetService("Asynchronous Server Requests")
var input = TheApplication().NewPropertySet();
var child = TheApplication().NewPropertySet();
var output = TheApplication().NewPropertySet();
input.SetProperty("Component", "WfProcMgr");
child.SetProperty("ProcessName", "Send Email Opportunity Sales Rep");
child.SetProperty("OpptyId", "1-XR45");
input.AddChild(child);
svc.InvokeMethod("SubmitRequest", input, output);
very simple, isn't it. We just need to make sure that the Input Argument of the calling Workflow (Send Email Opportunity Sales Rep) should be the properties of the Child Property Set.

Via Workflow :
Here is the example below in which I have used this and you can accomodate the below two steps in any of the workflow you are using :

Process Properties :
Name : Inputs
Type : Hierarchy

Step1: Set Input Arguments
Business Service : Workflow Utilities
Business Service Method : echo


Step2: Call Asynchronous Service
Business Service : Asynchronous Server Requests
Business Service Method : SubmitRequest


Thats it, you are done. Just to add it here, I tried doing the same stuff with the help of runtime events but it is limitation there and we cannot do that.

.

Friday, July 24, 2009

How to Pass arguments between Workflow & Customize Business Service?

Generally what happens is whenever we create any Customize Business Service, we rarely create "Methods" for it under "Siebel Tools -> Object Explorer-> Business Service -> Business Service Method". What we do is we directly start coding in "Service_PreInvokeMethod" like :
Today I am going to tell you how we can pass arguments of type "String" and "Hierarchy" in the call to Customized Business Service (which don't have any methods specified in "Business Service Method" also don't have any Input/Output arguments specified). If you have worked on the similar requirement earlier, you might be knowing the trick here but for the new people this might be useful.

Lets take the "String" arguments first :


Assuming a requirement to create a workflow where we need to call a customized business service which contains the complex logic and return back the Service Request's status. Please cosider this a requirement for an example here.

Input to Customized Business Service : Service Request Number
Output from Customized Business Service : Status

Here is the Workflow :

So, this seems very simple, right, whatever the "property name" I am setting in the Business Service, the same name should be used in the "Output Argument" of the step.

Lets see what extra need to do in case you are passing a Hierarchy as Input/Output arguments.

Workflow Requirement :
1. Query via EAI Siebel Adapter to get the SiebelMessage for Service Request Number.
2. Pass the Siebel Message as Input Argument to Customized Business Service to update something in it.
3. Get the updated Siebel Message as Output from Customized Business Service.
4. Update the Service Request via EAI Siebel Adapter.


Here is the workflow :


I think you need to try it out at your end to actually understand the trick here. Check it out !!

.

Thursday, July 23, 2009

Apply / Activate make Siebel Tools hang ??

Something strange happened with me today and it seems to be a issue with the Siebel Tools that whenever I tried "Apply/Activate" a table into my Siebel Local Database, Tools gets hanged. Frustration !!! I can not continue with my work as I need to add a new field into the business component and see it on the UI.

Checked the support web for this kind of behaviour and found that during "Apply/Activate" Siebel create a table with name "D_U_M_M_Y" into the local database and we need to drop that table from local database before doing any more "Apply/Activate".

I tried connecting to the Local Database via DBISQLC and ran the below query :
select * from siebel.D_U_M_M_Y

but I got the error saying "Table siebel.D_U_M_M_Y not found".
So not able to find the correct resolution as of now.

So, the only workaround I can think of is applying the physical database changes manually. Here is below I did:

1. I need to add one column in S_EVT_ACT_X table of Varchar2(15 Char).
2. Added the column in Siebel Tools under S_EVT_ACT_X table.
3. Ran the following command in DBISQLC (after connecting to the local database) :

alter table S_EVT_ACT_X
add NEWCOLUMN VARCHAR(15)

This way I achieved what I was trying to do. There is something more of it I would like to tell you here which might be useful in case you want to apply/activate a complete new customized table.

Consider a scenario, one of your colleague (Siebel Developer) has created a new Customized table for some requirement and put in his changes into the Siebel Database and now you to have that table available into your local database as well. You can "GET" the project to see the logical schema for the table into the Local Database but the problem is "Apply/Activate" is not working. So here is one workaround I can suggest :

1. Get the DDL for the table via connecting Oracle SQL Developer or TOAD or any other database client you use.
2. Open DBISQLC and run the "Create Table" command (some modifications needs to apply before running the query)


Here below is the example that might be helpful for the modifications required :
I got the below DDL for one of the table :

CREATE TABLE "SIEBEL"."CX_NEW_TABLE"
( "ROW_ID" VARCHAR2(15 CHAR) NOT NULL ENABLE,
"CREATED" DATE DEFAULT sysdate NOT NULL ENABLE,
"CREATED_BY" VARCHAR2(15 CHAR) NOT NULL ENABLE,
"LAST_UPD" DATE DEFAULT sysdate NOT NULL ENABLE,
"LAST_UPD_BY" VARCHAR2(15 CHAR) NOT NULL ENABLE,
"MODIFICATION_NUM" NUMBER(10,0) DEFAULT 0 NOT NULL ENABLE,
"CONFLICT_ID" VARCHAR2(15 CHAR) DEFAULT '0' NOT NULL ENABLE,
"NEWCOLUMN1" DATE, "NEWCOLUMN2" CHAR(1 CHAR),
"NEWCOLUMN3" VARCHAR2(250 CHAR),
"NEWCOLUMN4" VARCHAR2(50 CHAR),
)


but if you try running this query directly into DBISQLX you might get errors. So below are the changes required :

a) Replace VARCHAR2(15 Char) to VARCHAR(15)
b) Replace CHAR(1 CHAR) to CHAR
c) Replace Number(10,0) to Integer
d) Replace sysdate to getdate()
e) Remove "Enable" from the query.

Finally the new query will look like :

CREATE TABLE "SIEBEL"."CX_NEW_TABLE"
( "ROW_ID" varchar(15) NOT NULL,
"CREATED" DATE DEFAULT getdate() NOT NULL,
"CREATED_BY" varchar(15) NOT NULL ,
"LAST_UPD" DATE DEFAULT getdate() NOT NULL ,
"LAST_UPD_BY" varchar(15) NOT NULL ,
"MODIFICATION_NUM" Integer DEFAULT 0 NOT NULL ,
"CONFLICT_ID" varchar(15) DEFAULT '0' NOT NULL,
"NEW COLUMN 1" DATE, "NEW COLUMN 2" CHARACTER,
"NEW COLUMN 3" varchar(250),
"NEW COLUMN 4" varchar(50),
)


After making all the changes mentioned above run the query in DBISQLC and it works fine.
As I already mentioned this is just a workaround that I can think of, if you have some better idea for this, please let me know as well :). Your comments are most welcome !!
.

Tuesday, July 21, 2009

"Invalid or Missing Encryption Key" error ??

This is the error you might see if you are working on Siebel 8.0 or higher and trying connecting to the Local Database via System DSN or DBISQLC.

After the launch of Siebel version 8.0 the local database is now encrypted, if you have not provided some specific parameters while Local Database Extract.

The point to be noted here you can successfully login into the Siebel Tools / Client using the same local database without any issues. But you cannot, if want to play with it via backend. Sounds strange but this is how it actually works.

The only solution that I found is to specify few extra parameters apart from what we generally specify during the Local Database Extract and after that it worked fine. So here is the complete list of Parameters that you can use while database extract to avoid this kind of error.

1. Navigate to "Administration-Server Management -> Jobs".
2. Create new record with "Component/Job" = "Database Extract".
3. Under Job Parameters, add the following :

a) Client Database encryption method = None
b) Client Name = "Your Login Name"
c) Database Init Method = Sql Anywhere
d) Database template file name = sse_utf8.dbf
e) Encrypt client Db password = False
f) Extract all Repository Tables = False

4. Click on Submit Job.
5. Once completed, rename the "sse_data.dbf" in "SiebelSrvr/Tools/Local" folder and connect to the Local database again to initialize the local database again.
6. Do a "Full-Get" to get all the necessary repository objects.
7. Try connecting to the Local Database via System DSN or DBISQLC, it should work fine. Make sure you use the Username and password in CAPS.

Hope it helps !!!!

Saturday, July 18, 2009

How to Change the Oracle/Siebel Logo in Client application?

Whenever you do a fresh Siebel Implementation, your client (for whom you are developing the application) may ask to change the Siebel/Oracle Logo displayed on the upper right corner in the application. Well, everybody wants to flaunt the name :)


Alright then, lets see how we can do that.

1. Open the client cfg file to check which application you are using. You can find "ApplicationName" parameter under [Siebel] section. I am using "Siebel Financial Services".
2. Go to Siebel Tools -> Object Explorer -> Application, query for your application name.
3. Scroll to right side to the view and you will see Container Web Page. I can see the value : "FINS Container Page".
4. Copy the container web page name and query in Object Explorer->Web Page. Scroll to right to see the Web Template name it is using. I can see : "FINS Page Container"
5. Copy the web template name and query in Object Explorer->Web Template. Click on the plus (+) sign to open the "Web Template File" and check for the File Name. I can see : "FINSPageContainer.swt"
6. So, now you know the SWT file which is actually responsible for giving you a layout what you see when Siebel client opens.
7. Go to \Client\WebTempl folder and search for the SWT file and open it.
8. You will find various sections inside it and the same set of SWT files is getting repeated again and again. The SWT file responsible for rendering the Logo is banner swt which is "CCFrameBanner.swt".
9. Go to \Client\WebTempl folder and search for the CCFrameBanner.swt file and open it.
10. Search for "www", you may find "
www.oracle.com" OR "www.siebel.com" depending upon which Siebel version you are using. This is the URL that get invoked once you click on Logo in the application. It has been changed to "www.oracle.com" after Oracle bought Siebel.
11. You will see the Image Name = "POWERED_BY" and Category = "HTML Control Icons", this is actually the name of Bitmap and Bitmap Category respectively.
12. So, navigate to Object "Explorer->Bitmap Category" and query for "HTML Control Icons", expand the bitmap category to see Bitmaps and query for "POWERED_BY".
13. And finally you can see the file which is being displayed as the Logo. I can see the filename as "ebus.gif". So this is the file that I need to replace with the file which contains my logo.
14. You can find this file in "\Client\PUBLIC\enu\IMAGES". Just change the file name to something else to keep the backup and put your new file as "ebus.gif".

hhhhooooo.... finally you are done. Just refresh the screen or restart the session after deleting all cookies and you will see your desired logo on the UI.


ENjoyyyy !!!

Thursday, July 9, 2009

"Page Cannot be displayed" in Siebel Tools ??

We generally see this error message in Internet Explorer when somehow IE is not able to connect to the URL that user is trying to access. But today when I just see this message in Siebel Tools, it was really a surprise for me as this is something new I am seeing for the first time.

Let me tell you what exactly I was trying to do : I just wanted to place a new Control on "Contact Form Applet". So queried for "Contact Form Applet" and right clicked and select "Edit Web Layout". What generally we see is the new window being opened in the right side with form layout of the applet where all the controls is displayed and we can change their position or add new. But this was not the case with me and I can see "Page Cannot be displayed" message in that window.

Amol Tandon (one of my colleague) found the reason for it. This happens when "WebClientSiteDir" parameter in Tool's CFG is not pointing to the correct path. You can see this parameter in Tool's CFG :

WebClientSiteDir = C:\Siebel\8.1\Tools_1\public\enu

The reason I was getting this error, I got the Siebel installed in "D Drive" and used the old Tools cfg and forget to change the C: to D: everywhere in the CFG.

So just change the parameter and everything worked fine.

WebClientSiteDir = D:\Siebel\8.1\Tools_1\public\enu

.