Default scripts inside Workflow
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2007 12:01 PM
Hi everyone,
I was wondering if is possible to call default scripts (like the ones in "Company Home > Data Dictionary > Scripts") into a process definition so that the same workflow, calling the same script, has different behaviours depending on what I locally wrote in the script (for example, I may want to create folders with slightly different names).
Thanks in advance.
I was wondering if is possible to call default scripts (like the ones in "Company Home > Data Dictionary > Scripts") into a process definition so that the same workflow, calling the same script, has different behaviours depending on what I locally wrote in the script (for example, I may want to create folders with slightly different names).
Thanks in advance.
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2007 01:13 PM
Hi,
I think it's easy to do : In your workflow, we will have JavaScript code that will read the content of your script file and will eval it (JavaScript is an interpreted language that can evaluate a piece of code dynamically).
Try something like this (not tested):
I hope it will help you.
Regards,
Andre
I think it's easy to do : In your workflow, we will have JavaScript code that will read the content of your script file and will eval it (JavaScript is an interpreted language that can evaluate a piece of code dynamically).
Try something like this (not tested):
function evaluateScript(scriptPath){ var result; var scriptContent = companyhome.childByNamePath(scriptPath).content; try{ result = eval(scriptContent); } catch(exception){ result = "error"; } return(result);}
I hope it will help you.
Regards,
Andre
