Wednesday, September 7, 2011

Scripting --> How to PopUp Applet Using scripting

Using below code we can pop up applet using scripting



case "MyTest":
var oServiceAF = TheApplication().GetService("SLM Save List Service");
var inputPropAF = TheApplication().NewPropertySet();
var outputPropAF = TheApplication().NewPropertySet();
inputPropAF.SetProperty("Applet Name",);
inputPropAF.SetProperty("Applet Mode", "6");
oServiceAF.InvokeMethod("LoadPopupApplet", inPropAF, outPropAF);
return(CancelOperation);

Thursday, July 14, 2011

drilldown on ActivityType in Activity Applet. It doesn’t take you to the record you have clicked on but takes you to the firs

Thanks Bhavesh for sharing below info

When on Home Page, and drilldown on ActivityType in Activity Applet. It doesn’t take you to the record you have clicked on but takes you to the first record in activities.

à What was done to fix it.

Go to the Activity Home Page Applet. Check for all drilldown objects on ActivityType

Add ‘Id’ (specifically) in Source & Destination fields

Compile n release the SRF

Siebel v7.7 has a different query than v8.1..

Sample Thick Client Not working .IE showing Page Cannot be displayed

Thick client is not working for sample in IE 7 .

I tired below things
  • Put the site under Trusted Site
  • Checked for the ODBC Connection
  • tried to open from debug mode [Still not working ]
At last i did two changes i dont know which helped me in resolving it .

--> Client CFG >> EnableFQDN Changed to False
Siebel Mobile Web Client. To use FQDN for this client type, configure the following parameters in the Siebel application configuration file, such as uagent.cfg for Siebel Call Center, on each local client machine.

[Siebel]
EnableFQDN = TRUE

EnableFQDN is set to TRUE by default for the Siebel Mobile Web Client.

If you do not also specify the FQDN parameter, the system constructs the URL automatically. For example, the system might construct the FQDN for CCHENG as ccheng.corp.oracle.com. Optionally, you can explicitly provide similar information below, using the FQDN parameter.

CAUTION: When you explicitly configure an FQDN for use with the Siebel Mobile Web Client, you must specify the local machine name. The localhost string from the default Siebel Mobile Web Client URL (which is used when EnableFQDN = FALSE) cannot be used as an element in an FQDN. The localhost string is only functional when used by itself, with no additional qualifying elements.

FQDN = hostname.primaryDNS.domainsuffix

where:

* hostname is the name of the local client machine
* primaryDNS is the primary part of the domain name (such as siebel)
* domainsuffix is the domain type (such as com)

For example, you might set FQDN to ccheng.corp.oracle.com.
---> Reinstall IE 7

after doing tht it starts working

thanks and regards
Joseph (Joju)
joju2002@gmail.com

Tuesday, July 5, 2011

Calc the working days between two days including the public holidays

Using below code we can find the number of working days between two dates inculding the public holidays . I wrote this code long back for one POC .I guess it will work :-) .

Req : I have to find working days between two dates ie : i have to remove weekends/ Public Holidays between two dates



function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
if (MethodName=="Working Days")
{
//MM DD YYYY format
var StartDate = Inputs.GetProperty("StartDate");
var EndDate = Inputs.GetProperty("EndDate");
var start= new Date(StartDate);
var end = new Date(EndDate);
var abc=0;
// On application fill the Public Holidays from Application
// Under Adm-Service update all the public holidays

var sBO=TheApplication().GetBusObject("Shift");
var sBC=sBO.GetBusComp("Shift Exception Hour");

with(sBC)
{
SetViewMode(AllView);
ActivateField("Exception Id");
ActivateField("Start Date");
ClearToQuery();
SetSortSpec("Start Date(DESCENDING)");
SetSearchSpec("Exception Id","1-1JJB");
// Row id is the Schdule name
//Better give the Name instead of rowid .
ExecuteQuery(ForwardBackward);
var irec=FirstRecord();


while(irec)
{
var Holiday =GetFieldValue("Start Date");
var Holiday1=new Date(Holiday);

if(Holiday1.getDay()!=0 && Holiday1.getDay()!=6 )
{
if(Holiday1.getTime() >= start.getTime() && Holiday1.getTime() <= end.getTime())
{
abc=abc+1;
}

}
if (Holiday1.getTime() < start.getTime())
{
break;
}
else
{
irec=NextRecord();
}

}


}

sBC=null;
sBO=null;


var diffDays= Math.floor((end-start)/1000/60/60/24);
var weeksBetween=Math.floor(diffDays/7);
var startDay=start.getDay();
var endDay =end.getDay();
if(start.getDay()==end.getDay())
{
var adjust=0;

}


else
{
if (start.getDay()==0 && end.getDay()==6)
{
var adjust=5;

}

else
{
if(start.getDay()==6 && end.getDay()==0)
{
var adjust=0;
}
else
{
if(end.getDay()==6 || end.getDay==0)
{
var adjust=5-start.getDay();
}
else
{
if (start.getDay()==0 || start.getDay==6)
{
var adjust=end.getDay();
}
else
{
if(end.getDay()>start.getDay())
{
var adjust=end.getDay()-start.getDay();
}
else
{
var adjust =5+end.getDay()-start.getDay();
}
}


}

}

}


}


var workingDaysCalc=(weeksBetween*5)+adjust-abc;



Outputs.SetProperty("workingDaysCalc",workingDaysCalc);

// TheApplication().RaiseErrorText("Start Date :"+start +"End Date :"+end +"ABC:"+abc+"Working "+workingDaysCalc);
return(CancelOperation);
}

return (ContinueOperation);
}


Wednesday, June 22, 2011

Siebel Configuration Best Practices

  1. Adding System Columns as BusComp Field Objects Definitions

System columns are exposed as BusComp fields. These columns can be exposed as controls or list columns on applets without explicitly defining them in the BusComp definition.


System Field

System Column Name

Description

Id

ROW_ID

Primary key for the table

Created

CREATED

Creation date and time of the row

Created By

CREATED_BY

User logon ID of the person who created the row

Updated

LAST_UPD

Date of last update of the row

Updated By

LAST_UPD_BY

User logon ID of the person who last updated the row

Consequence

The fields Id, Updated, Updated By, Created, and Created By are available system fields that can be exposed and presented in the user interface or used in script without explicitly defining them as BusComp fields.

This introduces a data integrity issue, if such a field is exposed in the UI and the user enters data into it, the data will not be saved to the database. The application will ignore the user’s data and use the system data. When a user enters a value in such a field and later accesses the same record, they will not see the value entered.

Recommendation

Do not create BusComp fields mapped to system columns, as they are available for use in configuration and scripting without being explicitly defined, and doing so may introduce the type of issues indicated above in the consequence section.

Where such fields have been created, remove them from the BusComp definition and remap any existing references, such as list columns, controls, joins, and so forth to the supplied system column. Do not forget to verify that any script that references the custom fields is also updated.

  1. Join Specifications on S_PARTY Extension Tables

Join specification to Party extension table has been created with the destination column property set to ROW_ID.

Consequence

Only the PAR_ROW_ID column should be used as the destination column in join specifications to S_PARTY extension tables. This is because the PAR_ROW_ID column contains the proper foreign key relationship to S_PARTY.

Although ROW_ID and PAR_ROW_ID is equivalent in most cases for party extension tables, configuring a join in this manner is not recommended, and this unexpected behavior may not be the case in future releases and this accidental success may not be the case in future releases if the table structures change.

Recommendation

When creating joins to S_PARTY extension tables such as S_ORG_EXT, S_CONTACT, S_POSTN or S_USER make sure that the join specification has a destination column of PAR_ROW_ID. Perform a search in the Siebel Tools and look for the Base table property to identify the S_PARTY related tables. The screenshot below shows some of the S_PARTY tables in the customer repository.

3. Non-Indexed Search / Sort Specifications

Several search and sort specifications were identified as keying off non-indexed columns. When specifying search and sort specifications it is important to use fields mapped to indexed columns, whenever possible.

Sorting or searching on non-indexed fields can have detrimental effects on database performance, especially on large tables, as it will produce table scans and temporary tables in the SQL execution plan.

Keep in mind that pre-defined queries where the filter or sort is based on a non-indexed column will also result in a performance impact.

How to update the Query fired in UI [this.GetSearchExpr();]

Req: I have to catch the Query before firing in UI .

Solution : this.GetSearchExpr(); In BC Server Script PreQuery

Code


function BusComp_PreQuery ()
{
/
try
{

var sSearchExpr;
var sActiveViewName;
sSearchExpr = this.GetSearchExpr();
//If u want to update query for a particular view
sActiveViewName = TheApplication().ActiveViewName();

//add the validation
if(TheApplication().GetProfileAttr("EEEE")>="Value"&& (sActiveViewName == "DSDS" || sActiveViewName == "XCDD" || sActiveViewName == "ZXXX"))
{
//SearchBuild Method is a custom method for creating Custom Query
var SearchString = SearchBuild();

if(sSearchExpr!="" && SearchString !="")
sSearchExpr += " AND (" + SearchString + ")";
else if (sSearchExpr!="" && SearchString =="")
sSearchExpr = sSearchExpr;
else
sSearchExpr = SearchString;

}

// If u need this Query in somewhere else put it in Profile attribute

this.SetSearchExpr(sSearchExpr);
this.ExecuteQuery(ForwardOnly);
}
catch (e)
{
var dbg = e.errText;
TheApplication().RaiseErrorText(e.errText);
}

return (ContinueOperation);
}


Note: GetSearchExpr returns the current search expression for the business component.

Returns
A string containing the current search expression. An example of a returned search expression string is "Revenue > 10000 AND Probability > .5".

Usage
GetSearchSpec retrieves the business component state, not the values. The business component state does not change until the query is executed. Note that it may never change to the original value if the user input is invalid.

When using GetSearchExpr in a browser script and the Applet_PreInvokeMethod, GetSearchExpr returns a null value even if a query filter has been added.

Used With
Browser Script, COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, Server Script

Tuesday, June 21, 2011

10 Ways To Access Blocked WebSites

Copy Paste from Another Site .But it is useful :-)

Websites like facebook, twitter and other social networking sites are generally blocked in schools, colleges and offices. There exist some tricks by which you can bypass the restrictions and access blocked sites, the most obvious is the use of proxies or Anonymizer websites. But using proxies doesn’t always works as they gets blocked by firewall as well. Here I am listing some other methods to access blocked contents.

1. Use IP instead of URL
Each website has its equivalent ip address. This method works best when blocked sites are stored as a list of URLs. You can use ip address to access blocked contents . For example to access facebook you can use ip address 69.63.189.11 in your address bar. You can use ip-address.com to find the ip address of other websites.

2. Use Google Cache
All major search engines like Google yahoo and Bing stores cached pages of websites themselves. You can access blocked websites by viewing their cached copy on search engines.



3. Translations services
Translation services like Google Translate, translate a website from one language to another and display the translated results on their own page. You can access the blocked website by re-translating blocked url using such online translation services.

4. Retrieve web pages via Email
Web2Mail is a free service that sends any websites into your inbox. All you need to do is send an email to www@web2mail.com with the URL as subject title.

5. WayBack Machine
Wayback machine periodically keeps a copy of almost all websites on the internet from the date they have started. You can access your blocked site by fetching its latest copy from archives.

6. Screen-Resolution.com
Screen-Resolution.com allows you to view any website in a different resolution. This could be an interesting tool to access blocked websites.

7. Google Mobile Search
Google Mobile Search displays a web page as if you are viewing it on a mobile phone. You can use it to access blocked websites but javascript and css will be disabled.

8. Redirect with Short URL service
Short URL service are used for converting a long URL in a shorter one. You can convert your blocked url into a shorter one and use it to access blocked websites. This trick dont always works. The two popular url shortening service are bit.ly and adf.ly

9. USB Browsing
You can use this method if you have access to usb port, you can load usb with your own portable Firefox, with the portable Tor plugin or you can directly use tor-firefox.

10. Proxy Websites
This is the generally known method to access blocked websites. There are thousands of online proxies you can use to surf anonymously or to access blocked websites. Here is 90+ Proxy Websites To Access Blocked Websites.

Monday, June 20, 2011

3 buttons with same method as “Show Popup” for showing popup applets

This Req/Solution i got it from Karthik . Thanks Karthik

Issue: We have 3 buttons with same method as “Show Popup” for showing popup applets, but the buttons need to enable/disable based on the conditions. It would be difficult to enable/disable button as the all buttons are sharing the same method name.

Solution:

Inputs taken from another Siebel blog.

Give different method names for 3 buttons.

Alternative way to invoke the show popup using browser script

Write the below Browser script to invoke the “Show popup” method, when the button is clicked.

function Applet_PreInvokeMethod (name, inputPropSet)

{

// code to enable the buttons as show popup

try

{

if(name == "XXX" || name == "YYY" || name == "ZZZ")

{

inputPropSet.SetProperty("SWEMethod","ShowPopup");

this.InvokeMethod("ShowPopup",inputPropSet);

return("CancelOperation");

}

}

}

Write the server script in Pre Can Invoke method as usual to disable/enable button based on conditions.

function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)

{

try

{

var pstntype = TheApplication().GetProfileAttr("Primary Position Type");

if((MethodName == "XXX" || MethodName == "YYY") && (pstntype == "CCC" || pstntype == "DDD"))

{

CanInvoke = "FALSE";

return(CancelOperation);

}

else

{

CanInvoke = "TRUE";

return(CancelOperation);

}

}

catch(e)

{

TheApplication().RaiseErrorText(e.tostring());

}

finally

{

pstntype = null;

}s

return (ContinueOperation);

}

Thursday, June 16, 2011

Some more Business Component Methods

ActivateMultipleFields
Property set containing a collection of properties representing the fields that are to be activated

SetMultipleFieldValues assigns a new value to the fields specified in the property set for the current row of the business component.

GetMultipleFieldValues returns values for the fields specified in the property set.

Code
var ContactBO = TheApplication().GetBusObject("Contact");
var ContactBC = ContactBO.GetBusComp("Contact");
with (ContactBC)
{
SetViewMode(AllView);
var fieldsPS = TheApplication().NewPropertySet();
var valuesPS = TheApplication().NewPropertySet();
fieldsPS. SetProperty("Last Name", "");
fieldsPS.SetProperty("First Name", "");
ActivateMultipleFields(fieldsPS);
ClearToQuery();
ExecuteQuery();
if (FirstRecord())
{
GetMultipleFieldValues(fieldsPS, valuesPS);
var slName = valuesPS.GetProperty("Last Name");
var sfName = valuesPS.GetProperty("First Name");
}
}




GetFormattedFieldValue Method

A string containing the value of the requested field, in the same format as displayed in the user interface, or an empty string ("") if the field is inactive or empty.


Usage
GetFormattedFieldValue is useful for code that is used in multiple countries with different formats for currency, date, and number. This method can be used only on fields that have been activated using ActivateField.

Some special behavior is associated with particular data types.

Monday, June 13, 2011

PreWriteRecord to fire only for New Records being saved [Method : isNewRecordPending]

I got this information from my friend Pranoj . Thanks Pranoj ..

Scenario: User wants a few validation written on the PreWriteRecord to fire only for New Records being saved
Solution :
A Vanilla Method “isNewRecordPending” can be used to achieve the required functionality

This method can be invoked by using a script in the PreWriteRecord event to determine if the current record is newly created. If the record is a new record, this method returns the value TRUE

Sample Code :

function BusComp_PreWriteRecord ()

{

var isNewRecord = this.InvokeMethod("IsNewRecordPending");

if(isNewRecord == "TRUE")

{

************Code Goes Here***********
}

return (ContinueOperation);

}

Syntax :
BC.InvokeMethod(“isNewRecordPending”)

Advantage : This method reduces the overhead of Setting and Resetting the Global Variable captured at the NewRecord Event

Note : This method can be used across Events and is not specific only to PreWriteRecord

How to make your cell phone Not Reachable

First of all Thanks for visiting our Siebel Musings Blog .Actually this is an Siebel Technical blog [Siebel Musings].But this time i am giving a tip to avoid Work related calls in weekends. As we have to give importance to our personal life some times it is necessary to use this trick .

There are times when you wished you should be in the mountains away from mobile network reach.

Or sometime you wanted to avoid a call but did not want the caller to know you are not picking calls intentionally?

Definitely you will not switch-off the mobile. The caller will hear a message saying your mobile is switched off. That means you intentionally switched it off! and some phones got features like offline mode .but still the end user will hear mobile switch off message. Excuses like your phone charge went off ..you didn’t take the charger wont make any sense .So we need some good excuse .

So what if the caller hears a message like “the phone is not reachable”, or “out of network”?

‘Mobile not reachable’ is a good excuse for everything you wanted to avoid. Now see how easily you can do it. After all it was the operator’s fault. Not yours!

Problems being not reachable on cell phone:

Yes, there could be problems. You never know when you miss a very important call.

Pre-requisite

--Call your family , Gal frd /boy frd.[Otherwise thy will get afraid] :-)

Step

1) This trick is very simple . Without switching it off remove the Battery of ur mobile.WE normally do it when our phone got hang ,Do the same . And don’t switch it on .

Nw if someone is trying to call you thy will hear Mobile not reachable message .. ;-) Cool naaa

Tested in Sony ericsson and Nokia

2) If the end user is intelligent .they will drop a sms with delivery report on . that means whn u switch it on message will get delivered and the end user will get the Delivery report and he will come to know tht ur phone is on .

For this .. Go to message setting in your fone >>Text Message >> Message Centers >> find the correct SMS Center for ur service operators .

there will be a number note that number some where and remove the number and save it .Once you back from your cover you can update the number back.

Now you wont receive any sms and the end user wont get any delivery report .if there is any emergency you can switch on your Phone .Make the call and again switch it off .. ;-)

Note : I wont be responsible for any personal or professional issues by using this trick .:-)

Joseph Thomas (joju)

Wednesday, June 1, 2011

Runtime versus Compiled Business Services with same name

If you define a business service called MyService as a runtime business
service and as a compiled business service, the compiled version executes and
the runtime version is ignored. For clarity, if you migrate a business service
from a runtime version to a compiled version, you should inactivate or delete
the runtime version so that it is clear to all developers that the runtime
version is no longer being used.

Business services may be defined in Siebel Tools and compiled with the .srf
file, or created as runtime business services in the client user interface. The
decision on whether to make a business service compiled or runtime has no
hard and fast rules. It ultimately depends on what you intend the service to
do and how frequently you expect the code in the business service to change.
Runtime business services are not compiled into the .srf file.

The database stores them as records and you can change them at any time. The next time a
runtime service executes, it uses the changes to the definition. This makes
them useful for logic that changes frequently and logic that you need to
change without deploying a new .srf file.

The drawback to a runtime businessservice is that anyone with access to the Business Service Administration view
can see the code. This can pose a security issue.Runtime business services can be useful in a development environment to test frequent changes to scripts by using the business service simulator. Since no
compiling is required, code development may be faster in the runtime
environment. Once the code is complete and tested through the simulator,
the developer can choose whether the business service should remain as a
runtime service or if it should be migrated to Siebel Tools.
Compiled business services are defined in Siebel Tools and represent a
functionality that needs more security and is not likely to change. You must
compile and implement a new .srf file to implement any changes. Because
these business services are compiled, they provide more security than
runtime services and they are faster to load.

Saturday, May 28, 2011

Performance Tuning SOS !



If you are in a Siebel project and in the midst of performance issues firefight, we can help you !!!
Post in your performance issues to Siebel Musings !
You can use the comments section to provide details !

Monday, May 2, 2011

Some Facts on Data Visibility

Some Facts on Data Visibility

Fact 1

clicks on the "Generate Reporting Relationships" button :

Records in the S_PARTY_RPT_REL are created when a new record is inserted in S_POSTN, or when a user clicks on the "Generate Reporting Relationships" button in the Position administration view.

It would be extremely difficult to describe an unknown number of iterations of the position/parent position relationship with a single SQL statement. Siebel solves this problem by writing each position's reporting relationships to a table called S_PARTY_RPT_REL

Fact 2

Error

SBL-DAT-00309: You do not have the privileges required to view detailed information for this record. Please contact your systems administrator if you would like access to this record.

Corrective Action

Corrective Action

1. Inspect the record where the user receives the error:

a. Determine if the user is on the access list for the record. To determine what controls the visibility of the record, review the BusComp View Modes set up for the business component and check the Visibility Field and Visibility MV Field properties.

b. Make sure there is at least one user on the access list for the record, especially if the record was imported using EIM or if you have customized the visibility settings for the related objects.

c. If the drilldown is on the same buscomp, any constraint on the original context of the buscomp, such as a query executed by the user, will be maintained.

2. In Siebel Tools, check the configuration of the drilldown, drilldown view and applet, and related business component to determine why the user does not have visibility to the drilldown record.

a. On the destination view, check the Visibility Applet and Visibility Applet Type properties. Check for a default PDQ, or a Search Specification defined on the driving applet or destination business component, which would prevent the user from seeing the drilldown record

b. On the Drilldown Object, check the following:

i. Visibility Type property on the Drilldown Object. For more information, refer to Siebel Bookshelf version 8.1 > Siebel Security Guide for Siebel eBusiness Applications > Configuring Access Control > Additional Access Control Mechanisms > Configuring Drilldown Visibility.

ii. Business Component setting on Drilldown Object

iii. Make sure the Hyperlink property is set.

iv. If you have defined the Source Field and Destination Field properties, make sure the field values will be an exact match. For example, if you use a non-System field that defaults to a Row Id, ensure that records created through EIM will have this field set appropriately.

3. If you have configured a dynamic drilldown, check the following in Siebel Tools:

a. The logic in the configuration of the dynamic drilldown must ensure that users will drill down to a view where they can see the records in question.

b. The parent Drilldown Object should have Sequence = 1.

c. The destination view defined for the parent Drilldown Object should be available in the user's responsibilities.

d. The Field property on the Dynamic Drilldown Destination object must be active in the buscomp instance.

e. Check the Value property defined in the Dynamic Drilldown Destination object

For more information on the above suggestions, refer to Siebel Bookshelf version 8.1 > Object Types Reference > Siebel Object Types for the Drilldown Object, View, BusComp View Mode, Business Component, and Applet object types. Also refer to Siebel Bookshelf version 8.1 > Configuring Siebel eBusiness Applications > Configuring Screens and Views > About Drilldowns.

4. If you have customized the Calendar Drilldown behavior,

5. You must extract a mobile client before you can drill down on the mobile client name.

6. Create bookmarks from list views instead of detail views.

7. When registering a Partner, you need to check the Organization flag.

Fact 3

Why does my -Pick Applet- display all records for a user who does not have -All- visibility?.

When the Popup Visibility is set to FALSE, no visibility is applied to Pick and Association Applets.

For example, in the standard Siebel configuration, the ‘Popup Visibility’ for ‘Account’ Business Component is set to FALSE. Hence, any Pick Applet or Association Applet based on the ‘Account’ Business Component will display all the Account records irrespective of whether the user has visibility to ‘All’ Accounts or not.

Setting the Popup Visibility of a Business Component to TRUE, should limit the records displayed in Pick Applets and Association Applets to only those records that are displayed in a ‘My’ view of that Business Component.

For example, in the standard Siebel configuration, the ‘Popup Visibility’ property on the ‘Opportunity’ Business Component is set to TRUE by default. Hence, all Pick Applets and Association Applets based on the ‘Opportunity’ Business Component will always display only those Opportunity records that are visible to a user in the ‘My Opportunities’ view.

Wednesday, April 20, 2011

Runtime Workflow

I heard this question from my colleague ..
Q) Workflow Process manager is down in the server .There is an Run time which will call the workflow on an particular event .Now the Question : If the event happened will the workflow will execute or will it fail . If yes how how it will be executing .

-->Some Hints
calling workflow from Run time

run-time environment is available both as a business service and as a server component.

The two Workflow business services are:

Workflow Process Manager
Workflow Process Manager (Server Request)
When the Workflow Process Manager business service is called, the workflow process is run in the object manager of the application called. When the Workflow Process Manager (Server Request) business service is called, the workflow process is run in the server component called Workflow Process Manager.


The Workflow Process Manager server components act as the application object manager to run workflows.
The Workflow Process Manager server components are specialized server components configured and tuned to run workflow processes. Like all server components, the Workflow Process Manager server components provide a multi-threaded environment.

The Workflow Process Manager uses the Siebel Object Manager framework and runs workflows as a business service.
The Workflow Process Manager hosts the Business Object layer and the Data Object layer. It is a scalable architecture with the ability to run multiple object managers and multiple tasks for each object manager.
NOTE: The name Workflow Process Manager refers to both the Workflow business service (referred to as the Workflow engine) and the workflow server components.



http://download.oracle.com/docs/cd/B31104_02/books/BizProcess/BizProcess_Architecture6.html

Calling workflow from the script

When invoking a workflow process from script, you can specify that the process run on the server or in the object manager:

To run a process on the server, call the service Workflow Process Manager (Server Request).
To run a process in the application object manager, call the service Workflow Process Manager.
Note that invoking a workflow process from script is performed in Synchronous mode.

Eg service Workflow Process Manager (Server Request)

//function Invoke_Process()

{

var svc = TheApplication().GetService("Workflow Process Manager(Server Request)");
var Input = TheApplication().NewPropertySet();
var Output = TheApplication().NewPropertySet();
var bo = TheApplication().ActiveBusObject();
var bc = bo.GetBusComp("Opportunity");
var rowId = bc.GetFieldValue("Id");
var accountId = bc.GetFieldValue("Account Id");
Input.SetProperty("ProcessName", "My Opportunity Process");
Input.SetProperty("Object Id", rowId);
// Pass the value of the Account Id field to the Account Id process property
Input.SetProperty("Account Id", accountId);
svc.InvokeMethod("RunProcess", Input, Output);

}

Eg: / Example: Invoking a Workflow Process through scripting
function Invoke_Process()
{
var svc = TheApplication().GetService("Workflow Process Manager");
var Input = TheApplication().NewPropertySet();
var Output = TheApplication().NewPropertySet();
var bo = TheApplication().ActiveBusObject();
var bc = bo.GetBusComp("Account");
var rowId = bc.GetFieldValue("Id");

Input.SetProperty("ProcessName", "My Account Process");
Input.SetProperty("Object Id", rowId);

svc.InvokeMethod("RunProcess", Input, Output);
}

Monday, April 18, 2011

Oracle Function --CONNECT BY PRIOR


Today i come across new oracle Function "onnect by Prior "

CONNECT BY PRIOR
Desc:-
A condition that identifies the relationship between parent rows and child rows of the hierarchy

Syntax:-
CONNECT BY =

Example :-
SELECT employee_id, last_name, manager_id
FROM employees
CONNECT BY PRIOR employee_id = manager_id;

To show Level
First to note here is a pseudo column named "level" (similar to rownum) available with connect by clause showing
where in the hierarchy is current row. We could use it to show the hierarchy in list more visible.

SQL> SELECT LEVEL, lpad(' ', LEVEL*2) || ename ename
2 FROM emp
3 START WITH mgr IS NULL
4 CONNECT BY PRIOR empno = mgr;


Friday, April 15, 2011

SRF Problem

Hi ,

For this problem i wasted one full day in it . i did one release in our dev env and as it is critical issue lead ask me to release in another env. AS this new env doesnt have local he said make the changes directly in server [Too risky] and the same time said test it using that server srf using dedicated .

First i logged into the server tools and made the changes carefully to that BS . then i took that server srf and compiled the changes to the srf . everything went fine ..

Now the testing part .. i opened the dedicated started with the testing .but it failed ..

i started with the dedug and started .. everything is fine .. in the BS there is one step where it will query for a record in a BC .. and it is not returning anything . But in my another env it is returning the record.

Then i thought there will be some issue with BC search spc in other server. i checked the search spc ..there is no change in the search spc...

then i took the spool of both the env for that query .. still it same .

then later i came to know that the srf i copied from the server was a wrong one .... whn i copied the correct one and tested it worked fine .

Dont know whats the exact issue .But issue got solved when i copied the correct SRF .

thanks and regards
Joseph Thomas (Joju)

Monday, April 11, 2011

How to create a VBC for a Pickapplet

Yes i know it is a well document section in siebel Bookshelf .But i like to share my experience in it .

My requirement was i have to create Picklist for a VBC so for this requirement i have to create below objects
1) VBC
2) Pick Applet
3) PickList
4) BS

in our requirement when the user clicks on the pickapplet icon depending on the values the user entered Pick Applet have to Query and display the values

for eg: If value A entered in the BC field X for the record then the picklist has to show values
AA, BB,CC .If values B entered in the BC field X for the record then the picklist has to show values DD,EE,FF from the external system .

It is very clear straight forward requirement . The tricky point is the picklist is on Econfigurator

**Solution ***
Created all the above objects
BC-- >when we create a VBC we are not suppose to give the table name it has to blank and class of the particular type
have to create user property as Service Property of the BS name

BS --> Created new BS with Init and Query method


Configured the picklist and pickapplet .. compile the object and when i open Picklist is not opening .

Debugging
As the picklist is on econfigurator we have to do below action before testing

As part of testing we copied below files copied to my local .But still unable to open the pickapplet

Step 0 -> Download WebTemplate from clearcase path \SIE_DEV\Webtempl and copy into local folder \web client\WEBTEMPL

Step 1 -> Download cfgclient.js, cfgui.js, customconfigurator.js from SIE_DEV\css_EVOLUTIVO and copy into local folder PUBLIC\lang_code\siebel_build_number\SCRIPTS

Replace the srf

Run genb.bat in local

Cleared the browser temp files

restarted the client .Still it is not opening the pickapplet .

After checking we come to know that there was small issue in my query and it is throwing error . After fixing the error in Query, Pickapplet start showing

Joseph (Joju)

Wednesday, February 23, 2011

Error acquiring file lock(SBL-GEN-10116)

Problem
-------

Importing a workflow in Siebel Tools 8.1.1 gives the following error
"Error acquiring file lock(SBL-GEN-10116)"

OS: Windows 7

Fix
----

Open Siebel Tools as an Administrator (right click on the Siebel Tools Shortcut and choose "Run as administrator").Import the workflow.This should work fine.

Wednesday, January 5, 2011

Interview Qt: Is BC necessary for an applet ?

Simple but not so simple.

Answer: No, BC is not necessary for an applet.

Yeah this is possible.

Here are few quick samples to look at in Siebel Tools

Applet:About SRF Applet
Class: CSSSWEFrameAboutCDFDialog

Applet:About Siebel Applet
Class: CSSSWEFrameAboutSiebelDialog

Applet:About Record Applet
Class:CSSSWEFrameAboutDialog

Applet:Change Records Popup Applet (SWE)
Class: CSSSWEFrameChangeRecordsPopup

Applet:EAI Web Service Export Popup Applet
Class:CSSSWEFRImpExp

--------------------¤OptimusPrime¤----------------------------------