Highlighted
Anonymous_User Absent Member.
Absent Member.
487 views

How to import data from csv file to Workflow?


Hi,
I need to edit a workflow to include a list of items in the user
registration workflow. I have the list with me in .csv format.

Iam planning to pull this list into IAM through a csv bulk upload
process, but where should I put this list?
And, how can i isplay this list in my registration workflow?
The intention is to provide a new drop down list to select an item from
it when a new user is
registered.


Thanks in advance
Devika


--
Devika_Nandakumar
------------------------------------------------------------------------
Devika_Nandakumar's Profile: https://forums.netiq.com/member.php?userid=8444
View this thread: https://forums.netiq.com/showthread.php?t=53873

Labels (1)
0 Likes
7 Replies
dhanarajn Absent Member.
Absent Member.

Re: How to import data from csv file to Workflow?


Hi Devika,
You can implement this by using AJAX/JQUERY call during the on load
event. I've done similar drop downs in the form which will query
database table. Please refer the following Cool-solution article for
your reference.

http://tinyurl.com/lpey663

Regards
Nirmal Dhanaraj


--
dhanarajn
------------------------------------------------------------------------
dhanarajn's Profile: https://forums.netiq.com/member.php?userid=4357
View this thread: https://forums.netiq.com/showthread.php?t=53873

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: How to import data from csv file to Workflow?


Thanks Nirmal,

But here I have a csv file as input. we dont have permission to connect
to database.
What am looking for is where shall I upload my csv file to (should it be
in the DAL?) and how to pull this list into the form.
Can you please guide me?


--
Devika_Nandakumar
------------------------------------------------------------------------
Devika_Nandakumar's Profile: https://forums.netiq.com/member.php?userid=8444
View this thread: https://forums.netiq.com/showthread.php?t=53873

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: How to import data from csv file to Workflow?


Also, this csv file is not static. we are planning to upload the csv
file daily into IAM using a new driver and read from this file and
populate a drop down list in the Userapp user registration form

So the major questions here are:
1 where can we upload this file to? Should any specific objects be
created and mapped or shall we create a new container and place the file
there?
2. The mechanism to lookup the data from this file and populate in the
drop down.

Cheers,
Devika


--
Devika_Nandakumar
------------------------------------------------------------------------
Devika_Nandakumar's Profile: https://forums.netiq.com/member.php?userid=8444
View this thread: https://forums.netiq.com/showthread.php?t=53873

0 Likes
abergvall1 Absent Member.
Absent Member.

Re: How to import data from csv file to Workflow?


Hello,

I would do a normal delimited text driver and have that read the file
and create objects out of whatever values you have in there. You can
create your own objectclass for this. Then add that to the DAL and then
utilize this in the workflow. Then you can also create queries etc.

br
/A


--
abergvall
------------------------------------------------------------------------
abergvall's Profile: https://forums.netiq.com/member.php?userid=278
View this thread: https://forums.netiq.com/showthread.php?t=53873

0 Likes
dhanarajn Absent Member.
Absent Member.

Re: How to import data from csv file to Workflow?


Devika,
My suggestion would be to use a file upload portal either you can go for
custom file upload portal or you can use the outbox file upload portal.
Once It is available you can upload the required file daily and it will
be copied into User App server.

Now, you can come with a user registration form (PRD)where you can
define all your required controls ( preferably drop down to show the
details from the file )
then you can follow the article: http://tinyurl.com/lpey663
in the JSP file you've to write a logic to grab the information from the
text file on the specified directory and parse and you can set the
values to form field from js script. Finally you'll end up with two
files one for js and another one for (jsp) which would be used to write
all your java stuff to parse the csv file, make a war file and put it
along with IDMProv.war( no need to open the war file ).. and refer the
js file in your prd as mentioned in the cool solution article.

As I mentioned earlier, I've fetched values from the table using the
same logic now you are trying to grab the information from a file.

I've included my source code which I had derived from the above cool
solution.. its so aster since its using jsan/ajax functions. Still if
you are not able to understand, please download the cool-solution's zip
and deploy into your test and test it yourself .. then you can try the
similar logic.

Regrds
Nirmal Dhanaraj


+----------------------------------------------------------------------+
|Filename: ajaxjqueradbfromprd.zip |
|Download: https://forums.netiq.com/attachment.php?attachmentid=310 |
+----------------------------------------------------------------------+

--
dhanarajn
------------------------------------------------------------------------
dhanarajn's Profile: https://forums.netiq.com/member.php?userid=4357
View this thread: https://forums.netiq.com/showthread.php?t=53873

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: How to import data from csv file to Workflow?


Hi Nirmal,

Thanks a lot!!
I was trying to implement the sample you provided. Can you please
provide the jquery that you used for your sample? It would be really
helpful

Thanks in advance


--
Devika_Nandakumar
------------------------------------------------------------------------
Devika_Nandakumar's Profile: https://forums.netiq.com/member.php?userid=8444
View this thread: https://forums.netiq.com/showthread.php?t=53873

0 Likes
wschreiber1 Absent Member.
Absent Member.

Re: How to import data from csv file to Workflow?

If you're just trying to read a file into a form field, why not simply
use a few lines of Java code in a pre-activity mapping and directly fill
the field with your CSV data?

Why bother with drivers etc?


To give you an idea, here's a simple example that I use to read the last
100 lines of the JBoss server log into a form text field.

Reading a CSV would even be easier - get the relevant fields and return
them as Vector.


Wolfgang
_________________________

logTail( 100 )

function logTail( iLines )
{
var sLineSeparator = "\r\n";
var result = "";
var arLines = [];
var sPath = "../server/IDMProv/log/server.log";
try {
var jbossLog = new Packages.java.io.File( sPath );
var reader = new
Packages.org.apache.commons.io.input.ReversedLinesFileReader( jbossLog );
for ( var i=0; i<iLines; i++ )
{
arLines.unshift( reader.readLine() );
}
}
catch ( e )
{
arLines.push( sLineSeparator + e );
}
return( arLines.join( sLineSeparator ) );
};

_________________________







On 13.07.2015 14:24, Devika Nandakumar wrote:
>
> Hi,
> I need to edit a workflow to include a list of items in the user
> registration workflow. I have the list with me in .csv format.
>
> Iam planning to pull this list into IAM through a csv bulk upload
> process, but where should I put this list?
> And, how can i isplay this list in my registration workflow?
> The intention is to provide a new drop down list to select an item from
> it when a new user is
> registered.
>
>
> Thanks in advance
> Devika
>
>

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.