Author Message
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
I'm having a strange issue and can't seem to figure out where to implement a fix.

Scenario I have an enabled PDC and have added it to a data node. Within the same data node, I have a simple variable named 'temp'. In the properties window for my PDC, I select the variable 'temp' in one of my options drop-downs. I then save the data node and subsequently delete the variable named 'temp' and save the data node again. I can the variable is still identified in the workbench display. However, when I select my PDC, nothing is displayed in the properties window. In the error log, I see the following:


java.lang.NullPointerException
at com.avaya.sce.callflowitem.ui.editor.FlowItemTreeEditPart.getLocalVariableFields(FlowItemTreeEditPart.java:465)
at com.avaya.sce.callflowitem.ui.editor.FlowItemTreeEditPart.getVariableFields(FlowItemTreeEditPart.java:478)
at com.avaya.sce.callflowitem.ui.editor.FlowItemTreeEditPart.addVariablePropertyDescriptors(FlowItemTreeEditPart.java:1195)
at com.avaya.sce.callflowitem.ui.editor.FlowItemTreeEditPart.addVariablePropertyDescriptors(FlowItemTreeEditPart.java:1150)
at ...SetLanguageEditPart.addPropertyDescriptors(SelectLanguageEditPart.java:44)
at com.avaya.sce.core.ui.gef.GraphicalTreeEditPart$1.getPropertyDescriptors(GraphicalTreeEditPart.java:142)
...


I know this stack trace is post variable deletion, so implementing some sort of catch here doesn't really fix the problem. How can my PDC be notified when a variable is removed from the node/project so I can remove the variable from my PDC if it's being used?

Thanks,
Michael

NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
In your plugin.xml for your PDC, did you use the dataConnector ext point to model your data?
<extension
point="com.avaya.sce.callflow.dataConnector">


If you did, it will be taken care of for you if you set it up correctly. Otherwise, you will have to do manually.
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
Apparently I haven't set it up correctly. I use the dataConnector extension point, but still have the problem. Can you clarify what you mean by "you set it up correctly"?
NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
In the dataconnectorui portion, you would point to your edit part:

<extension
point="com.avaya.sce.callflow.ui.dataConnectorUI">
<dataConnectorUI
ContextHelpID=""
EditPartClass="com.avaya.sce.pdc.notification.ui.email.callflow.EmailEditPart"


in that class, you can add a variable proper descriptor for any variables you have. This will handle removal for you.
protected void addPropertyDescriptors(List<IPropertyDescriptor> list) {
addVariablePropertyDescriptors(list,
new PropDescData(EmailFlowItem.PROP_TO_VAR, "To Variable","The variable for to address."),
new PropDescData(EmailFlowItem.PROP_TO_FIELD, "To Variable Field", "The variable field for to address."),
null);
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
This is the same code that I've included in all of my PDC's, and it still doesn't work.



@Override
protected void addPropertyDescriptors(List<IPropertyDescriptor> list) {
addVariablePropertyDescriptors(list,
new PropDescData(AuthFlowItem.PROP_EMAIL_VAR, AuthFlowItem.PROP_EMAIL_DESCR.concat(" Variable"), "The name of the variable containing the email address"),
new PropDescData(AuthFlowItem.PROP_EMAIL_VARFIELD, AuthFlowItem.PROP_EMAIL_DESCR.concat(" Variable Field"), "The name of the complex variable field, if needed"),
null);
...
}


Just tested it again, and throws the exact same error. The problem comes when the variable is deleted from the project. The properties of the PDC aren't updated. When I select the PDC to change the variable, none of the properties are displayed because the variable doesn't exist, and the aforementioned NullPointerException occurs. This is for OD version 7 & 7.1, JDK 1.7.
NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
You may have to send me your PDC (neilg@avaya.com) if that is feasible. It's very tough to debug it over the forum.
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
Just sent a simple PDC example of the issue. It doesn't do much, but it does show the problem I'm having.

Thanks for looking at this.
Michael
Go to:   
Mobile view