Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
Oas155

New Member
Registered:
Posts: 1
Reply with quote  #1 
I am guess I probably know the answer to this having trawled through this and other forums during the week and not found a solution but I thought I'd post just to clarify. Having seen jerome's posting this week also on tips and tricks it suggests the better practice now in 9.0 is to do this all within Metastorm and using an admin form but before starting this sequence off and closing this one I thought I'd post. 

Anyway, another developer in our firm using 7.0 had previously created a lookup feature in his Metastorm app, which was in actuality a standalone .Net application that was called from a button on a form. The requirement was to replicate this in 9.0.

This called a javascript function to display the app(site) in a popup using the window.showModelDialog function assigning the result to a variable. The last part of the function populated a Metastorm form field with the value of the variable. Further processing then within metastorm happens using this value.

The app itself had a javascript function in it that when a button was pressed a value was got from a selected item in a control, assigned to the window.returnVariable() method and then window.close() called to remove the popup. We have tried to replicate this functionality using the same js methods but have encountered problems returning a value back to Metastorm. And I wondered if this was now still achievable or relevant in 9.0 - and if so, my present failure down to my choice of js methods, handling of postback in Metastorm, etc. 

For the record, I can successfully replicate opening a popup, retaining focus (using jscript in metastorm), and closing the window (using js in .Net). If I create a dummy parent page instead as an aspx page this also opens, closes, sends and recieves the value fine. 

I have tried opening the window using:
  • showModalDialog
  • Window.Open

I have tried returning the value and closing the window using:
  • Window.ReturnValue
  • Window.dialogArguments.callback
  • Window.opener.document.getElementById(

Using both a selected item value and a hard coded value. Each time the window closes, so the javascript does get called from the child.
 
Within metastorm to check I am setting the right name of the field (as I noticed the id is slightly different in 9 - suffixed by _Editor - in view source), I hardcoded the value using setField, and it worked.
 
I am now guessing this is something to do with postback or just 9.0 isn't built in the same way.
 
Can anyone shed any light on any of these issues, or if it is not achievable anymore let me know ?   

0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #2 
I'm not going to be able to help, but I can say that all such hacks will fail at some point, just as these have done. Because of this, we strongly recommend not doing them.

If anything at all relies on the underlying and unsupported functionality that Metastorm have built, it cannot be guaranteed to change. The one guarantee I can give you is that it will change, however!

I have yet to see an implementation of any lookup functionality that uses supported functionality. Ours uses cookies, and even that had to be changed in version 9! We also put us such dependencies inside libraries so that the code using it does not have to be changed, only the library in one place. This is essential when relying on any implementation over which you have no control (and is just standard programming practice).

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!