In installed the 5.1 notification package and am getting this error when triggering a blocking task.
I suspect a problem in notification package as it seems to break before it even gets to my workflow.
TypeError: Cannot find function retrieveLostTriggerProperties in object DynamicWrapper (Instance) : [AMQPBroker]-[class com.vmware.o11n.plugin.amqp.model.Broker] -- VALUE : Broker [connection=com.vmware.o11n.plugin.amqp.model.LiveAmqpConnection@1f69e55b, factory=class com.vmware.o11n.plugin.amqp.AmqpPluginFactory @8f987a14-56d1-4dfa-ba41-f5ecdffae00a; Wed Nov 07 09:53:42 CST 2012]. (Workflow:Start a subscription listener workflow / run workflow (item2)#1)
?
Thanks. I will try to update it with the version I have ASAP.
What version of AMQP do you have installed ?
This method was not in the original AMQP plug-in.
AMQP 1.0.2.228
We recently had to upgrade to vCO 5.1 to solve an separate problem. Now having to deal with the fallout.
Forget my last comment. It was in the original plug-in and the typo was fixed after (so basically the method does not exist in the last AMQP plug-in release)
Would you still be running a policy created with a previous version of the package ?
I am not using this method anymore in the 5.1 version of the package.
I used the web perspectives interface to setup the blocking task.
Perspectives 2.0.1.101
Policy template Handle vCloud Director message notifications v 0.0.4
Hmmm here is the code in the policy template for version 5.1.
Please, check if the policy you use has the same.
var message = self.retrieveMessage(event);
//var messageProperties = self.retrieveLastOnMessageTrigger(); Deprecated
var properties;
if (message != null) { //(messageProperties != null) {
messageBody = message.bodyAsText; //messageProperties.get("body");
//messageBody = messageProperties.get("body");
System.log(messageBody);
//messageHeaders = messageProperties.get("headers");
properties = message.properties; //messageProperties.get("properties");
}
/*for each (var messageHeader in messageHeaders.keys)
{
System.log("header " + messageHeader + " : " + messageHeaders.get(messageHeader));
}
*/
System.log("Configured routing key : " + Server.getCustomProperty(self, "routingKey"));
properties = message.properties; //messageProperties.get("properties");
if (properties != null) {
for each (var prop in properties.keys) {
if (prop == "receivedRoutingKey") {
System.log("Received routing key : " + properties.get(prop));
}
}
}
System.log("***********************************************************************************************************************************");
var workflowToLaunch = Server.getWorkflowWithId("AF808080808080808080808080808080AE818080013141141566711a974a8fef8");
if (workflowToLaunch == null) {
throw "Workflow not found";
}
var workflowParameters = new Properties();
workflowParameters.put("subscription",self);
workflowParameters.put("messageBody",messageBody);
var wfToken = workflowToLaunch.execute(workflowParameters);
code is identical.
And just to clarify, I used the "Start subscription listener workflow" option in perspectives to start. Or did this change in 5.1 to some other way/method to handle blocking tasks?
So where do you see the error message ?
Have you upgraded from the v 1.5 of the notification package ?
If so delete this workflow and reimport from package.
BTW the package offers 2 ways to listen for AMQP events : the policy (that you are not using) and the workflow (where you have the error).
We installed from scratch on standalone box and thought we got the current version from:
http://communities.vmware.com/docs/DOC-20446
I seem to have got it working by changing something in your flow:
I saw that the error handler decision maker you have is set to "equals" rather than "contains". I set it to contains and set the string to look for
"Cannot find function retrieveLostTriggerProperties in object DynamicWrapper"
and it now flows to the alternate wf execution.
This is odd since I do not have the same version of the workflow here. Maybe the community one has a problem but then I am surprised you are the first to comment on it.
I definitely need to check this and update the package if it is not at the right version.
Christophe.
Thanks. I will try to update it with the version I have ASAP.
It is now updated.