Admiral
Admiral
1197 views

How to migrate an old Form to FormBuilder in IDM 4.8.2.1

Dear all,

now one year has passed and I was thinking of starting to get my hendy dirty with the new Form Builder introduced with IDM 4.8.

The first form, providing only some filed wich could be read and moved to flowdata was not such a big deal, but the next one is really driving me creasy.

I want to setup a form providing a dn lookup and some fields. After selecting a user with the dn lookup, I want some attributes from the selected user read from the IDVault and out the fields of that form.

In the legacy form thgis was not a big deal: I simply configured the onchange event of the dnLookup field to run some idvault.get() and filed.set commands and I was done.

But I can not find really the spot where to do this in the new form bulider, and I am guessing a new functions have to  be used as well.

 

Can anybody provide some hint, please?

 

BTW: Am I too blind or is there simply close to no documentation on this new IDM module available? 

 

Kind regards,

 

Thorsten

 

 

 

20 Replies
Knowledge Partner Knowledge Partner
Knowledge Partner

You are not blind.  The docs at best, do a 'thing'. I disagree with the definition of the 'thing' they do. But they meet the requirements of the 'thing'. 

Try this link:

https://www.netiq.com/documentation/identity-manager-48/FormioHelp/userguide/form-components/

It is something at least.

 

Do report back with whatever you learn.

 

Knowledge Partner Knowledge Partner
Knowledge Partner

Keep in mind that form.io itself is not something Micro Focus developed. So much of the useful documentation is surely elsewhere on the net.

Haven’t played with this at all, but are you asking how to replicate hooking into the onchange event on an a specific field?

Does this stack overflow answer give you any clues: https://stackoverflow.com/questions/61472366/form-io-how-to-trigger-custom-validation-on-blur
Alex McHugh - Knowledge Partner - Stavanger, Norway
Who are the Knowledge Partners
If you appreciate my comments, please click the Like button.
If I have resolved your issue, please click the Accept as Solution button.
0 Likes
Commodore
Commodore

So again we have a beast where code is scattered everywhere and to maintain a nightmare. I vote for as minimal action code or something remotely connected to logic on one single place, as much reusable as possible. Something hardly found on all kind of PRDs nor in any workflow logic.

Michiel Los
0 Likes
Vice Admiral
Vice Admiral

I started to look at this a while back but have not had to build a PRD in a little while. I've built many over the years and have much reusable code. It's possible here too.



The paradigm is so different, however, conversion of an existing PRD is a fool's errand. Start over. I am expecting the first few forms.io based projects to take me 2-3x time but eventually I think it will get better.


0 Likes
Admiral
Admiral

Thanks everybody for the hints and suggestions.

I found the Form Builder Admin guide, but this proviedes only a kind of overview to the elements of the formbuilder. It would be great to get some more examples on how to use it!

The general forom.io dokumentation provided some insights as well,, but this does not descripe the missling link between Forms an IDM or better eDirectory.

So far I got a new form providing a dn lookup and I can put the dn found to another field or variable. I  can access and change  the values of fields by Jasvascript as well, but I cannoot access eDirectory/DAL data from a form.

I need the information on how to implemet siomthing like this in a field script:

var telephone = IDVault.get('cn=jd0815,ou=active,ou=user,ou=data,o=maintainet','idmuser','TelephoneNumber');

This does not work - I do not receive en error, but the field is shoeing only something like  [object]

event the .toString() method does not change anything.

 

For me it is hard to beleve, that noone else started working with the new forms so far? 

BTW: I have an open SR on this issue/question and noone is taking care of it, so event @micro Focus no one seams to understand this "new" feature/module 😞

 

 

 

0 Likes
Admiral
Admiral

Thanks everybody for your hints and suggestions so provided far - I post this one instead of adding a reply to the other posts here.

 

I found the admin guide to form builder and this really provides a great overview on the elements /objects available in form builder. 

 

I found the forms.io documentation as well, but this does not provide any details on the functions to interact with the DAL/eDirectory.

 

It is quite easy and convenient to setup a simple request formular, as long as the formular can be initialized by the data-mapping option within the workflow definition. So if there is no scripting needed in the form we can use the pre-activity mapping to add a value to a field and the post-activity mapping to put the value to the flowdata object.

 

Working with those formulars is quite convenient and updates are available as soon as the new form definition is deployed from Designer.

 

I managed to introduce a dnlookup field, which is working different compared to the legacy forms and store the found dn in another field of the form. This is indeed not a big deal, if you understand, a field value an be accessed by data.[fieldname]. If you want to assign a new value to a field a script can be defined for the given filed like value = some javascript

 

The thing which is not working for some reason is to access data through the DAL by IDVault.get().

 

I cannot get this function to work – for example IDMVault.get(dn,entity-key,attribute) will not return the attribute value of the object in eDirectory but an Object. In the form I am receiving [object]. And this is not changing if I add a toString() method or something.

 

I know, my script is executed, because if I replace the IDVault function by a static vale I can see this value in my form.

 

The strange thing is, that this new forms are available for over one year and nobody seams to have started working with them. I even have an SR now open for over one week with no response 

 

0 Likes
Commodore
Commodore

When you open the debug option of your browser and execute the same invault.get what do you get. I presume it is a array because i think telephonenumber is multivalue. So you cannot do toString but need to walk through the array.

Michiel Los
Admiral
Admiral

Hi Michiel,

thanks for your hint! Can you be more specific, what I shall do? 

When I am using "inspect" in the browser menu, I  do not see any thing special.

The only thing I see is that the value is set tu "[object Promise]" - which does not mean anything to me.

Bildschirmfoto 2020-12-12 um 15.55.30.png

The attribute I am reading in this case is only providing one value in in a legacy form the same IDVault.get() is working as expected.

 

Kind regards,

Thorsten

0 Likes
Commodore
Commodore

Inspect is to see html code, go to console in stead and enter your code here and you can see what is returned. I normally use mozilla developer edition but it should work in any browser.

Best regards
Michiel Los

Best regards
0 Likes
Admiral
Admiral

I guess the console hint is the first thing providing some (useful) data:

According to what I am seeing here, there the form is trying to receive data from https://servername:8600 but nothing is returned.

In console I am seeing some Bad Gateway, 404 and 500 Errors.

Entering IDVault.get() is not working at all there ....

In my system NGnix is using a self-signed certificate - the same Tomcat is using. But since all other IDm Applications are working I hope I can rule this one out .....

To bad, that there is not a better documentation .....

 

Knowledge Partner Knowledge Partner
Knowledge Partner

The way they have new forms exposed, it has to stay on 8600 right now (Bug I think) and does not like being proxied/front ended.

It basically does a OAuth connection to OSP for auth. So if DNS name is not matching the ism-configuraton.properties file, nor the certificates SAN then it won't work either.

 

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.