Solved

How to write to a text file using Siebel workflow

Posted on 2009-05-12
5
6,631 Views
Last Modified: 2012-05-06
Hi All,

I need to extract some values from a .txt file for example
1234,5678,1234
These values are stored ina text file. Then i need to see if there are any duplicate numbers.
In the example it means that 1234 is a duplicate.
I know this is possible using server script in siebel but is there any way i can use Siebel workflow to perform this?

Also at the end i also need to write to file that for example "1234 is a duplicate".
Does Siebel workflow has this functionality (to do IO operations on txt file)?
I am using Siebel Tools 8.0.

Thanks.
0
Comment
Question by:talltk
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:srihariramadas
Comment Utility
There are Vanilla Siebel Business Services that can be used to read .csv and .xml files. The same Business Service can be used to write into a file too.
If you are using Integration Objects you will want to use "EAI XML Read from File" and "EAI XML Write to File". For pure flat files there are Business Services like "Read CSV File"
Thanks
Srihari Ramadas
0
 

Author Comment

by:talltk
Comment Utility
Hi SriHari Ramadas,

Nope i am not using Integration Objects. So which Business Service should i use? I just need to read a file and write to a file in Siebel Workflows?

You mention that there are "Vanilla Siebel Business Services can be used to write into a file too". Does it write to a .txt file? Because from what i read and ask around they say that it can only be use for .csv or .xml.

I am quite new in Siebel and would appreciate it if you could elaborate more or point me to the direction where reading and writing to a .txt file could be done using workflows.

Thank you
0
 
LVL 2

Accepted Solution

by:
srihariramadas earned 500 total points
Comment Utility
Hi,
I don't think Siebel will be able to read a .txt file. Reason being, Siebel either needs a predefined hierarchy (possible from xml when using Integration Objects) or  it  should know number of property sets it should define for assigning file values. In your case, you can have each of the values as different rows in csv, assign these to a property set single row at a time. You can have another property set for comparison.
You should get the .txt converted to a .csv file and feed it to the workflow.
On Vanilla BS, "Read CSV File" BS has the following methods - "CsvToPropSet" and "PropSetToXml". The former will do the trick for you. On writing back, try using "EAI XML Write to File" BS with the method "WritePropSet". You need to provide the file path here.
FYI - Clib.getcwd() method in server script will return you the current working folder (always BIN folder in Siebel)
Thanks
Srihari Ramadas
0
 

Author Closing Comment

by:talltk
Comment Utility
Thanks Srihari Ramadas.
You mention that i need to convert ".txt converted to a .csv file and feed it to the workflow". In Siebel can we do that? Is there any way or how do we do that in server scripts or workflows in siebel?
0
 
LVL 2

Expert Comment

by:srihariramadas
Comment Utility
Siebel doesnt have the capability of converting .txt to .csv. Manually this can be done by opening the .txt file in Excel and use "Save As" option to store it in .csv format. I have seen projects using Java application to do the same conversion.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Creating and Managing Databases with phpMyAdmin in cPanel.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now