Cannot access callflow varable within custom component

Status
Not open for further replies.

SWSDEV

Forum User
Joined
Feb 23, 2008
Messages
256
Reaction score
0
The ivr log is showing this erro:

ReferenceError: callflow$ is not definedline1linetxttokentxt

This seems like a huge bug. Not being able to access the callflow variable from within a custom component. This additionally makes it so I can't get error message information from within the error handlers of a component.
 
Thanks again for your feedback.
The fix will be included in the next release.
Regards,
 
Hi,

We were thinking more about this, and this is not a bug. The custom component can be included in many callflows, so you can't be sure that the callflow variable will exist. If you need to access a callflow variable, then you should send that value as an input parameter to the custom component, and then it will be available.

Other option is defining that variable as a project level variable. Then, it will be visible to all the callflows and components into the project.

Regards,
 
The main problem is that when an exception happens, I cannot get the error information to log.

Also either way, the 3cx IVR log is still logging an error. If it's not a bug then that needs to be removed or clarified.
 
Hi,

When an exception happens, you can log the error using the project properties (project$.CurrentErrorName$ and project$.CurrentErrorDescription$). But in the error log you mentioned, you're using callflow$. Those properties are project variables, and not callflow variables.

In order to get the error you previously mentioned, you need to manually enter "callflow$.XXXX" as a javascript expression, where XXXX is an invalid property name. If you choose a variable name from the Expression Editor you will probably avoid that kind of errors.

The expression editor allows entering any javascript expression, and it can not evaluate it at compile time, so you may get that kind of runtime errors if you enter an invalid expression there. You need to be very careful when entering that kind of expressions.
 
OK, I'll go try that.

Please try this though, create a custom component and create something in the error handler of that component.

Now put the component into a main call flow.

Make sure the component will throw an error that will get trapped inside the component and not kick back to the main callflow.

Now run it and then debug.

Are you able to see in the debugger the values or the error name and error description?

In my experience, the only times those errors actually show up is if you're debugging in the top level call flow.
 
I will try this and let you know.
Thanks,
 
Hi,

I did the suggested test, and works as expected. I see the error name in the error handler into the custom component.

My test was the following:
- I created a new project with the Main callflow
- I created a custom component
- I added the custom component into the Main callflow
- Into the main flow of the custom component, I added a Variable Assignment component which throws an error.semantic error
- Into the error handler flow of the custom component, I added a branch to handle the error. When debugging, Into that branch I see the error name.

Please, if you have problems seeing the error name into the error handler of a custom component, then send me a sample project reproducing this and we'll verify it.

Thanks,
 
OK, I will clarify the steps to reproduce.
 
Status
Not open for further replies.

Forum statistics

Threads
112,320
Messages
591,865
Members
165,463
Latest member
ICTSupport@bedfordgirlssc