cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Script using Create Rule in v.1.3

dvanberg
Champ in-the-making
Champ in-the-making
I'm working with the 1.3 version and it's great! Smiley Very Happy 

I'm trying to create a rule which uses a script.  I cannot figure out how to store the script such that it is selectable from the drop-down of available scripts in the rule creation wizard.

The wiki for the new Java Script feature mentions that a script can be run as part of a rule, but doesn't say how to save/access the script. 

Any help will be greatly appreciated.

Dave
11 REPLIES 11

csiege
Champ in-the-making
Champ in-the-making
hi, have been working a little with 1.3 and like it too. 🙂

Did you place the script you want to execute in…

Company Home > Data Dictionary > Scripts ?

Chris

dvanberg
Champ in-the-making
Champ in-the-making
Chris,
Thanks for the tip.  That did the trick!

Dave

kevinr
Star Contributor
Star Contributor
Please let us know how you get on with the scripting support. It's one of the most flexible new features for 1.3 so we'd appreciate any feedback.

Thanks,

Kevin

csiege
Champ in-the-making
Champ in-the-making
Kevin,

Quick question…  I can see that the new scripting feature could really be powerful.  Especially for some worflows I need to put together.

Ideally I would want to be able to add (selective to certain spaces/files and for certain groups) new action buttons that would execute scripts in the context of those spaces/files.

Does this sound possible in v1.3.

Again, great feature.

thanks.

Chris

kevinr
Star Contributor
Star Contributor
Yes it should be possible. You can construct URLs to the command servlet that execute scripts at a known location and attach those URLs to your buttons. Of course you could also code up action handler methods for your buttons which call the script service directly (which may be preferable if you want to store your scripts on the classpath rather than in the repo).

Thanks,

Kevin

csiege
Champ in-the-making
Champ in-the-making
Not wanting to do to much custom coding just yet… would rather keep it at a scripting / configuration level.

I am correct in understanding the event handler must be a compiled java class and can't be defined another way in the system, right?

Thanks for this info, its going to be very useful!

Chris

kevinr
Star Contributor
Star Contributor
I am correct in understanding the event handler must be a compiled java class and can't be defined another way in the system, right?

At the moment that's true - but thinking about it, now we have externally configurable actions in 1.3, it wouldn't be hard to add the ability to specify a script in the configuration to execute instead of a code based event handler! I'll see how much effort that would be to add for 1.3 final.

Thanks,

Kevin

dvanberg
Champ in-the-making
Champ in-the-making
Kevin,
That would be very useful!

We would need to be able to limit the action to a specific document or space.  Would that also be possible?

Dave

csiege
Champ in-the-making
Champ in-the-making
I agree, having this in place would put the pieces at hand to really fill a wide variety of custom situations quickly, easily… and outside the coding layer…