I'm trying to troubleshoot a "problem compiling script.
Josh Beall (Customer) asked a question.
Hi All,
I'm trying to troubleshoot a "problem compiling script" error that I'm getting, and I'm rather perplexed as to the source. The stacktrace I've got looks like this:
There was a problem compiling the script. Please refer to the Exception Log.
StackTrace Information
*********************************************
at Aptify.Framework.Scripting.ScriptEngine.CompileExecutable()
at Aptify.Framework.BusinessLogic.ProcessPipeline.AptifyEventFire.ExecuteScript(String EventDefinitionName, AptifyGenericEntityBase GE, String ScriptToExecute)
That looks to me like there's an event handler that's firing a process flow that has a bad script in it. Right?
But here's the thing: I've disabled every single one of the event handlers as I tried to figure out which event handler was triggering this!
You can see this behavior here in this video:
What else might be triggering this error, besides an active event handler?
-Josh
Comments
Robert Kihm, while you're here... what about hooking up a precompiled assembly to be the event definition instead of having to use the script? I know the intent is to keep those slim but there are advantages in some projects of being able to manage those with the rest of the code.
Adding support for a .NET plug-in is possible. Submit it as a Feature Request. Creating a post in the Group to get people talking about the value of having a Filter Trigger that is .NET code vs Script would be interesting. As you mention, Filter Triggers need to be light weight because they are executed to determine whether or not an Event should fire. My concern would be that having it in a .NET assembly may encourage people to build more expensive Filter Triggers and the cost may be less apparent because the code is less visible.
If there's no other exception logged along with that one, I don't think that information is captured. In the next release, we have added more information to the exception logged by ExecuteScript to include things like the EventDefinitionName, Entity, RecordID and Script.
Please sign in to leave a comment.