Question


Sopra Steria
FR
Last activity: 8 May 2017 3:28 EDT
How can I map an attached file (CSV) to a page? (with a Service File)
Hello,
I need to create a Case Type with the following steps :
- Attach a file
- Process a file (Technical step)
- Verify process
I can not process the file one attached.
I want to map it into a PageList thanks to a Service File.
How can I do it in a Flow?
Thanks,
Damien
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!


Pegasystems Inc.
IN
Hi
What do you mean by Process a file ? Can you please elaborate a little about this technical step ?


Sopra Steria
FR
Hi,
By Process a file I mean map it in a page.
Like Service File or other.
When a file is attached to a case that created a a pyAttachments.
I want to map file content to a page like XML parse rule but for a CSV file (with a Parse Delimited rule?).
Thanks


PEG
PL
I dont know whether i understand it correctly or not but what i felt is you have an attachment and you want to parse that file. (Attachment is in csv format.)
If this is the case, you can do following step :
1. Write an activity to download the attachment.
2. From that activity call a parse delimiter rule.
3. This will parse the file and create a page.
Use this page as per your need.
Let me know if your requirement is different?


Sopra Steria
FR
Thanks for the answer.
The attachment is already on my work object.
I have to download it anyway?
After that operation where the file is saved? (in a page?)
Thanks


PEG
IN
If you are using File-Listener to process the files, file will get stored in completed folder of file listener.


Virtusa IT Consulting
AE
For the question
How can I do it in a Flow?
Presuming that you want to attach a file to a case, You can use any of the smart shapes to that like 'AttachContent' however not sure what PRPC version you are working with.


Sopra Steria
FR
Yes I already use the 'AttachContent' smart shape, but I don't know how to parse my file attached with a Service File then.
FYI : I am working on PRPC 7.1.10
Updated: 9 May 2016 15:00 EDT


PEG
IN
One approach you could use is of using parsing techniques applicable for Service-File rule. Depends on your requirement you could use either of the one in below screenshot.
https://community.pega.com/sites/default/files/help_v72/procomhelpmain.htm
Map To |
Enter the action to take in a parse step. Select one of these keywords or a function:
Or enter the name of a function in the |
P.S: I did not test in house.


Sopra Steria
FR
So I found a solution in part.
- I attach a file thanks to an AttachContent control
- Then I used the Data Page D_AttachmentContent which retrieve the content of the file
- I decode the content thanks to the function Base64Decode
- I use a Parse Delimited rule to parse my file content in a page list
One more obstacle to reach is when I used the Parse Delimited rule the parsing is done on only one line.
The content is saved in a property and I need to parse all the content and not just one line.
I think that is possible to save each line in a value list for example.
If anyone can help me on that.
Thanks,
Damien
Updated: 10 May 2016 9:56 EDT


Virtusa IT Consulting
AE
I think 'value list' is a good idea, you can set the processing method as 'build value list' and map to clipboard to a value list property as map to key. Also you have Field format as 'custom definition' right?


Sopra Steria
FR
So to do it I finally choose to use 2 Parse Delimited rules.
One to save each line in a value list.
Another one to parse each line when I loop on the value list.
The only problem that I have to size the number of step in function of my file size


PayPal
IN
Pare Delimited Rule can be used to parse only single in the csv. how can i parse multiple lines in my csv...could you please elaborate on the above ?.Thank you.


Virtusa
SG