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)