Search found 7 matches

by marbledaemon
Mon Dec 30, 2013 8:01 am
Forum: Scripting
Topic: Scripting in PowerSwitch suffers from memory leaks
Replies: 1
Views: 1166

Scripting in PowerSwitch suffers from memory leaks

Hello guys, Have you guys ever noticed that the ScriptExecutor suffers from memory leaks if we run a same script periodically after some time? It can be reproduced by writing a script which contains a long function and set it run by an interval of 10 secs. We can observe that the memory reserved by ...
by marbledaemon
Tue Jun 25, 2013 7:17 am
Forum: Scripting
Topic: Please make eval less evil
Replies: 5
Views: 3514

Please make eval less evil

Hello, I was moved out of our workflow team for a while. Now let me come back with the answer. I used 'eval javascript' in order to achieve what we don't have in Power Switch: include / import libraries and dynamic scripts. I created a generic workflow which accepted customer files in various and dy...
by marbledaemon
Mon Feb 04, 2013 5:08 am
Forum: Scripting
Topic: Please make eval less evil
Replies: 5
Views: 3514

Please make eval less evil

Hello, With the lack of ability to call another script from within a script, we had to read the script from a file then execute it using "eval". However, if the syntax is bad, it would lead to a crash of Script Executor. Could you fix that by making it only throw exceptions instead? This i...
by marbledaemon
Tue Oct 02, 2012 4:58 am
Forum: Scripting
Topic: Escape
Replies: 11
Views: 7386

Escape

It's true.



The 's.log' and other text-related functions will treat %[number] as a wildcard parameter. As you can see here, your %2B falls in that category as %2 is treated as the job folder.



You might want to write that text to a binary file to read it.
by marbledaemon
Thu Sep 27, 2012 9:25 am
Forum: Scripting
Topic: Error: Communication was aborted...
Replies: 4
Views: 3513

Error: Communication was aborted...

Hello, Exactly almost all our input folders are UNC (intranet). The injection of 500 files are done by Inject Job element that is position right after the XML parsing script. All that the script does is to create dummy job containing the full path of the file to inject. Then the Inject Job element w...
by marbledaemon
Thu Sep 27, 2012 4:30 am
Forum: Scripting
Topic: Error: Communication was aborted...
Replies: 4
Views: 3513

Error: Communication was aborted...

Hello Robert, Thank you for replying. Most of the paths in our flows are network path. We did not have problems with slashes before because Switch 9 automatically converted them to /. It surprised us upon upgrading to Switch 11 and what we worry is whether we have to manually fix all the paths in ou...
by marbledaemon
Tue Sep 25, 2012 10:17 am
Forum: Scripting
Topic: Error: Communication was aborted...
Replies: 4
Views: 3513

Error: Communication was aborted...

Hello, Recently after upgrading from Switch 9 to Switch 11, some of my scripts encounter a random error: Communication was aborted: Failed to parse the received command data: expected command size xxxx, expected data size yyyy, received data size zzzz. After some monitoring, I noticed that the error...