Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
jfile

Avatar / Picture

Member
Registered:
Posts: 39
Reply with quote  #1 
One of our biggest problems with V9 is its inability to execute client scripts correctly on commit buttons. In previous versions, we were able to:
1. Assign a value to a field via client script when the commit button was clicked
2. This field was assigned a variable which was used as the chained action assignment
3. The chained action would run and the folder would execute the corresponding action.

I first noticed in V9 that it would commit before our client script ran. In the release notes for SR1 in section 7.9, they said they fixed this. However, with the same code, I can only get this to work properly about 1 out of 10 times. Not very consistent.

Also,  in section 2.10, they say three new client-side functions are now available. One of them being submitForm(). This also only occasionally works. And if I run any eworkGetField or eworkSetField functions before I call submitForm(), it never works. I really hope they get this straightened out soon as we need this functionality.
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #2 
It is a worry. We do not do much of this, but is has always worked when we do, so it will be missed. I hope to get the Wizard library rebuilt in v9 (I won't bother to pretend we'll 'migrate' it) and test that soon, as it does exactly that..

__________________
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
richardsavage

Avatar / Picture

Member
Registered:
Posts: 20
Reply with quote  #3 
On a related note, I am trying to run a simple form validation script (written in Vbscript) on the "On form submission" event. The script works, but Metastorm doesn't pick up the returned "true" or "false" value, so of course the form won't submit. This is a technique I used a lot in 7.6. I'm guessing it works differently now in BPM 9 because client script event handlers are used.
My question is, has anyone managed to make this work in BPM 9 ?
Thanks.

__________________
R Savage
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #4 
I have just tried submit scripts ending with a "return false;" and a "return true;" and they both work as I would have expected. I believe this answers that question, although I am not certain...

__________________
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
richardsavage

Avatar / Picture

Member
Registered:
Posts: 20
Reply with quote  #5 
Thanks for the reply Jerome. I have now managed to make it work, although I had to use jscript, instead of vbscript,  as you implied, and code the script directly in the script window that opens when I click on the "on form submission" button in the form properties, rather than referencing it as a "stand alone" script.




__________________
R Savage
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #6 
Yes, I think that script has to return the false to fail, and it must be JScript, of course. I have no idea how, or even if, you can handle any VBScript.

__________________
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
hardwarebob

New Member
Registered:
Posts: 3
Reply with quote  #7 
Quote:
Originally Posted by richardsavage
On a related note, I am trying to run a simple form validation script (written in Vbscript) on the "On form submission" event. The script works, but Metastorm doesn't pick up the returned "true" or "false" value, so of course the form won't submit. This is a technique I used a lot in 7.6. I'm guessing it works differently now in BPM 9 because client script event handlers are used.
My question is, has anyone managed to make this work in BPM 9 ?

Thanks.

I was actually having this issue recently as well, attempting to return true/false on a form submission event. Here is what I was doing:

OnFormSubmission event:

Validation();

JavaScript:

function Validation() {If x return false ...else return true;}

I then realised that I was making an incorrect call to my function, here is the tweak:

OnFormSubmission event:

return Validation();

Even though my function was returning T/F, I forgot to return that result from the submission event.




0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #8 
Good call!

__________________
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
richardsavage

Avatar / Picture

Member
Registered:
Posts: 20
Reply with quote  #9 

Nice one hardwarebob, I will definitely use that.


__________________
R Savage
0
JBudler

Member
Registered:
Posts: 17
Reply with quote  #10 
hardwarebob I would shake your hand for this. I was missing the return in form submission as well. Could not figure it. 

Thank you.
J

__________________
Regards,
Jacques
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!