Anonymous_User Absent Member.
Absent Member.
290 views

How to query a database from UserApp Workflow


Hi All,

How can we query a database from UserApp workflow? We do not have a web
service involvement here.
We need to query a database real time when performing a user
registration and populate a drop down list in the workflow. PFB the
queries:

1. Where in the workflow should we include the query and how to do it?
2. Details on how to create and connect to database connection?

Thanks in advance.


--
sai86
------------------------------------------------------------------------
sai86's Profile: https://forums.netiq.com/member.php?userid=9596
View this thread: https://forums.netiq.com/showthread.php?t=53879

Labels (1)
0 Likes
3 Replies
Knowledge Partner
Knowledge Partner

Re: How to query a database from UserApp Workflow

On 7/14/2015 6:54 AM, sai86 wrote:
>
> Hi All,
>
> How can we query a database from UserApp workflow? We do not have a web
> service involvement here.
> We need to query a database real time when performing a user
> registration and populate a drop down list in the workflow. PFB the
> queries:
>
> 1. Where in the workflow should we include the query and how to do it?
> 2. Details on how to create and connect to database connection?


Out of the box, I am not aware of any specific functionality.

In Form it would be hard, since you run in the Users' web browser context.

In the Workflow, you can call out to Javascript or Java, find a sample
of how to connect and query in Java/JS and use that in a workflow at any
point you have ECMA/JS that executes. In a Map, in a Entity Action, or
whatever makes sense.


0 Likes
rrawson Honored Contributor.
Honored Contributor.

Re: How to query a database from UserApp Workflow


You are not going to be able to do that without some "proto-matter" (if
you don't know what that is watch Star Trek 3 The Search for Spock)...

To get serious, while Geoff is correct you can do this from Workflow,
you are actually asking to do it from a form. In the workflow, the ECMA
is running from the server, so you can try to load any java class you
wish, in the form, you are running everything from the browser. You must
do this with a SOAP or REST service, and you must adhere to or work
around the Same Origin Policy built into every browser. The most simple
way to do that is to integrate a web service with the UA's web
application server so that it's at the same base URL.

It can be done (I have done it). But it's far from trivial.


--
rrawson
------------------------------------------------------------------------
rrawson's Profile: https://forums.netiq.com/member.php?userid=403
View this thread: https://forums.netiq.com/showthread.php?t=53879

0 Likes
dhanarajn Absent Member.
Absent Member.

Re: How to query a database from UserApp Workflow


I've done similar call from user app form to database with the help
AJAX/Jquery. I've explined in another post, please have a look..

http://tinyurl.com/ooawm6b

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=53879

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.