Friday 29 May 2015

Executing a workflow asynchronously . .

Hi all, while using siebel workflow i had a requirement where i need to call a workflow asynchronously. The exact requirement was to capture some login user information and add the information in other table but this was to be done so that the performance was not degraded  since the first approach we were using was based on calling a workflow in the write event of BC  but this was taking time as the execution was synchronous so we used the following approach.

1. Wrote script on write record event of BC to call workflow asynchronously.
2. Used Asynchronous Server Request business service to call the workflow.

Sample script looked like

var svc;
var child;
var input;
var output;
var rowid;
var bo = TheApplication().ActiveBusObject();
var bc = bo.GetBusComp("Opportunity");
svc = TheApplication().GetService("Asynchronous Server Requests");
input = TheApplication().NewPropertySet();
child = TheApplication().NewPropertySet();
output = TheApplication().NewPropertySet();
input.SetProperty("Component", "WfProcMgr");
rowid = bc.GetFieldValue("Id");
child.SetProperty("ProcessName", "HW Device Tracking Workflow");
child.SetProperty("RowId", rowid);
input.AddChild(child);
svc.InvokeMethod("SubmitRequest", input, output);


Note: please refer bookshelf for the exact syntax 

the advantage of calling WF asynchronously is that the control is returned to the main process instantly after submitting the request and it does not wait for the execution of the workflow, the request is submitted on the server and is executed in background.

this process can also be done without using scripting by calling a workflow using Run Time Event on BC event and define the process of calling workflow asynchronously in the created workflow. 
for more details about Synchronous workflow execution please refer the following link


 cheers..

Controlling execution of a script from List of Values. .

Hi all,  i had a requirement where i had to control the execution of script on many business component's. The exact requirement was that client had deployed a new Mobility application for iphone and ipad and wanted to capture the usage of the application and details of users but he wanted to track the usage for some period of time only. We had the solution ready but were struck at the point of how to stop execution of code (we wrote script on BC which called a wf asynchronously) without making any srf change.
So we thought of using the following approach.
1.Created 2 LOV's with value On and Off.
2. In the script block added a condition to check the value of LOV before executing script.
3. If value of LOV was On then only script was fired else not.

Sample script looked like

If(LookupValue('DEVICE_TRACKING'),'ON')
{
Custom script here
}
else
{
Do not execute script
}

Note: please refer the exact syntax from bookshelf

So this was completely handled with LOV values ,client was given the access to change the value of LOV once he was done with tracking or if he ever wanted to capture the tracking. He could just set the value to On to start the tracking which led to execution of script or set it to Off if he wanted to bypass the process.

This approach helped me use lov's as switch . . :-)     . . cheers.

I will share details of how to call a workflow asynchronously and difference between Synchronous and asynchronous workflows in upcoming posts.

Thursday 28 May 2015

Field Value Appearing in Drill down Label rather than label on Form Applet ..

Hi All in my previous post (http://siebelfoundation.blogspot.com/2015/05/configuring-drill-down-on-form-applet.html?spref=bl) i have explained how to configure drill down on form applet ,but there is a limitation to this configuration.

This works fine with siebel HI application where Drill down is shown on label but in Open UI the label shows the field value as hyperlink.
After searching for some solution for the issue i found a work around.
1.Create a calculated field on the BC with calculate value as the value to be shown as label of drill down.


2.On Applet Create a control based on the New created calculated field.

3.Create a new drill down object with value of  Hyperlink Field as new created control and provide the Destination view and Source Id field.



 (Here Add the value Contact Info in Hyperlink field)



compile the changes and now the drill down works fines and on label field value is shown as we have made it calculated field and provided the label in calculated value so it always shows the Label rather then field value.
Note: This is just a workaround for the issue not a permanent fix.

Cheers..

Siebel Foundation: Configuring Drill down on Form Applet ..

Siebel Foundation: Configuring Drill down on Form Applet ..: Hi All ,Recently i had a requirement where i had to configure Drill down on form applet. Unlike Dill down on list applet where we only con...

Tuesday 26 May 2015

How to change the Default Scale of Currency in Siebel

In Siebel Application most of the currencies are defined by default and you can add one if its not present or change the definition of already existing one.

To Define a currency follow the below steps


1.Navigate to the Administration - Data screen, then the Currencies view.

2.Create a new record, and complete the necessary fields.
              

 Some fields are described in the following table.
Field
Comments
Code
Type the three-letter code for the currency.
Name
Type the name of the currency.
Issuing Country
Select the country that issues the currency.
Symbol
Type the symbol for the currency, such as $.
Scale
Type the number of places after the decimal for displaying currency in the interface. For example, U.S. Dollars has a scale of 2 to accommodate the cents, so an amount appears as $10.50. If the scale were 1, this same amount appears as $10.5.
Smallest Denomination
Type the smallest unit of currency available. For instance, the smallest unit of currency for the U.S. Dollar is one cent, or .01 dollars. If there were no cents, the scale would still be 2, but the smallest denomination would be $0.05.

as mentioned in table Scale defines the number of places after the decimal(right side), it can be set to any number depending on the requirement or the smallest unit of  currency. For example one Rupee has 100 paisa so the smallest denomination can be set to .01 to define the value of 1 paisa.
recently i had a requirement while implementing siebel loyalty project where i had to define the value of loyalty points in terms of money and one point was equal to .025 USD , so when i was trying to set this value it got roundoff to .03 as scale was defined to 2 and smallest denomination set to .01 USD so to get the things done i had to set the scale to 3 and smallest denomination to .001 now the value is being set to .025

Cheers. . . 

Monday 25 May 2015

Configuring Drill down on Form Applet ..

Hi All ,Recently i had a requirement where i had to configure Drill down on form applet.
Unlike Dill down on list applet where we only configure a drill down object ,in this case we have to also create control of type Link and define method as Drill down and expose this in applet web layout.



Please see the screenshot below illustrating the configuration steps.
















The Outcome looks Like.










Clicking on hyperlink Contact Info takes user to the destined view.
Thanks hope this was helpful..
Note : In Open UI Application this Drill down method behaves differently where field value is shown in place of Drill down label(will explain the fix in upcoming post)

Thursday 7 May 2015

How to configure a Dynamic Drilldown in Siebel and Importance of Thread Applet ..

Hi All ,

Recently i had a requirement to configure a Drilldown based on Service Request Type.
The condition was that user should be redirected to different view on clicking SR Number depending on the Type of Service Request.
so to achieve this i had to configure a dynamic drilldown.
To summarise the condition,

Field SR Type View
SR Number HR HR Detail View
SR Number QMS QMS Detail View
SR Number Procurement Procurement Detail View
SR Number Finance Finance Detail View
SR Number Legal Legal Detail View

Steps to follow:
1. Configure a Default Drilldown Object and Define other Drilldown Objects as shown below.


I used QF Human Resource as default Drilldown and specified the views to which it should redirect, also created other drilldown objects here and had defined the conditions to invoke them as Dynamic drilldown destination.

2.Under the default Drildown Object select Dynamic Drilldown Destination and define the condition specifying which Drilldown Object to Invoke if the field value matches to the value of record.


 here field value of SR Type is being matched and id it matches to any Drildown Destination object , that pariculat drilldown object is called ,if the value does not matches then default drilldown is executed.

Compile the changes and your dynamic drilldown should work perfectly fine.

I encountered some issue the configuring the drilldown, after i clicked on the Hyperlink field it always navigated me to same record irrespective of the SR Type. So  had to do a bit of investigation to understand the actual thing that happens when a drilldown is executed. The navigation after clicking on a hyperlink to the view is controlled by the thread applet and thread applet field defined at the view level , the Id of current record is matched against the Id of thread Applet field and if the id matches then the user is navigated to right record else the user will be navigated to the first record in the database for the entity.











Hope this was helpful ,Thank you..



Siebel GoTo View - Handling Realtime cases

 Hello All,  We all must have used GoTo view functionality of siebel to navigate to a particular view from current view. What if the require...