Translate

Saturday, January 1, 2011

Tips on setting up Graphtalk with Oracle 10g

Setting up Graphtalk with Oracle 10g
Ensure the following are present:

Check for the following permissions for import as follows:
a) Go to "Control Panel" -> "Admin Tools" -> "Local Security Policy."
    Within "Local Policies", go to user "Right Assignment."
    Add the user to "Logon as a Batch Job."

b)In the Enterprise Manager Console, add the user who will run the Export/ImportDataPump job as an Administrator who can login to Enterprise Manager to performmanagement tasks like set Blackouts, email notification schedules.

c)- login as user SYSTEM (or user SYS) to the 'Enterprise Manager 10g Database Control'- At the top right, click on the link 'Setup'- On the page 'Administrators', click on the button 'Create'- On the page 'Create Administrator: Properties', add the user who will run the Export/Import DataPump job- Click on the button: 'Finish'- On the page 'Create Administrator: Review', click on the button: 'Finish'- On the page 'Administrators', confirm that the user has been added.- At the top right, click on the link 'Logout'. Now login as the user who will run the Export/Import DataPump job (Graphtalk),and re-create the DataPump job.

Creation of XML file from the Graphtalk instances

Pls look Below code by providing appropriate field names and class name!!!

:dom.create_document (Doc) &
Employees = x:Doc.create_element ("employees") &
create_employees (Doc, Employees) &
x:Doc.append_child (Employees) &
x:Doc.save ("c:\employees.xml") &
x:Doc.release;
create_employees (Doc, Employees) :-
 count (1, 2,Obj= m:obj.find ($contract:p_ci_prot, nil)) &

 create_employee_element (Doc, Obj, EmployeeNode) &
 x:Employees.append_child (EmployeeNode) &
fail;
create_employees (_, _) ;

create_employee_element (Doc, Obj, EmployeeNode) :-
 IdStr = get:Obj.nmbr & get_elt_data (nmbr, Obj, FamilyStr, CountFamily, SepFamily) & get_elt_data (situation, Obj, FirstNStr, CountFirstN, SepFirstN) & EmployeeNode = x:Doc.create_element ("employee") & x:EmployeeNode.set_attribute ("id", IdStr) & create_text_elt (Doc, "nmbr", FamilyStr, CountFamily, SepFamily, Fam) & create_text_elt (Doc, "situation", FirstNStr, CountFirstN, SepFirstN, FirstN) & x:EmployeeNode.append_child (Fam) & x:EmployeeNode.append_child (FirstN);
create_text_elt (Doc, Tag, Content, Count, Sep, Elt) :- Elt = x:Doc.create_element (Tag) & set_attribute_def (Elt, "count", "1", Count) & set_attribute_def (Elt, "separator", " ", Sep) & TextNode = x:Doc.create_text_node (Content) & x:Elt.append_child (TextNode);
set_attribute_def (_, _, Default, Default) :- !;set_attribute_def (Elt, Attr, _, Val) :- x:Elt.set_attribute (Attr, Val);
get_elt_data (Field, Obj, Str, Count, Sep) :- DbData = get:Obj.Field & elt_data (DbData, Str, Count, Sep);
elt_data ([List, Sep], Str, Count, Sep) :- ! & CountI = :lst.length (List) & Count = to_str (CountI) & :lst.make_str (List, Str, Sep);elt_data (Str, Str, "1", _) ;
 

Common FAQ's in Batch Architechture

Batch Architecture in Graphtalk
1)Error Message “Finalization of execution 475 aborted: uncompleted slices left”
Sol:
a) The batch controller class should be persistent, with no historical management and its parent class should be $gtbatch:c_slice_ctrl
b) Check if TMP directory is present in the location specified
c) Future date transactions
2)Error Message “An Error occurred while running the command “process_slices_” The Execution 472 has been stopped.” This occurs if number of processes is less than number of users
Sol: The number of GraphTalk processes running at the time of execution should be equal to the number of users entered plus one (the master process).
3) Error Message “Batch descriptor “Batch name” already in use.”
Sol: Batch architecture implementation doesn't allow concurrent users to execute a same batch.
4) Error Message "“Cannot find the .ini file “D:\exp_xosl2_d_b.ini””"
Sol: Suppose the batch parameter “shared_ini_files” is specified with a value of a .ini file which is not there in the specified path & if the “process_number” parameter is greater than 0 then the following error is thrown
 

More about Graphtalk

Double side printing in Graphtalk
The present print_word_management doesn’t provide an option to set the duplex printing function. This can be handled by the usage of logical printers.
Once logical printeres are installed the following code needs to be written in graphtalk to call the double side logical printer
Word = :ole.create_object("Word.Application") & if
t:ole.check_connection(Word)
then
(
x:Word.activeprinter = "Doubleside[V1] "
) &
x:Word.release
Depending on the need the above piece of code may be used before the call of print_word_management
[V1]Would be the Printer name depending on choice of duplex or single