Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 7376
  • Last Modified:

How to write to a text file using Siebel workflow

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
talltk
Asked:
talltk
  • 3
  • 2
1 Solution
 
srihariramadasCommented:
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
 
talltkAuthor Commented:
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
 
srihariramadasCommented:
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
 
talltkAuthor Commented:
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
 
srihariramadasCommented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now