VMware Cloud Community
poorem
Enthusiast
Enthusiast
Jump to solution

Workflow presentation action causes "processing presentation, please wait"

I have a workflow with a string field that I want to offer as a dropdown of results from a SQL database. I've created an action to query the database that is passed a SQL:Database value. The action script is below:

// DO query on MGMTDB

var results = new Array();

var SingleResult;

var query = "SELECT TemplateOS,TemplateVersion FROM TableName";

var QueryResults = MGMTDB.readCustomQuery(query);

for each (SingleResult in QueryResults)

{

    var template = SingleResult.getProperty("TemplateOS") + " " + SingleResult.getProperty("TemplateVersion");

    //System.debug("getTemplateNames:: " + template);

    results.push(template);

}

return results;

However, as soon as I add the action to a presentation property, the workflow spends an eternity "processing presentation". The action itself works quickly enough. I added it to a test workflow as part of its schema and I get the desired array of strings back instantly. It's only when it's being used for presentation that it's giving me a problem.

Anyone have any ideas what's going on?

Reply
0 Kudos
1 Solution

Accepted Solutions
cdecanini_
VMware Employee
VMware Employee
Jump to solution

Is this field then used to calculate other fields ? The issue may be that when first loading your presentation may try to calculate fields using null inputs. One way to avoid the errors is to test for null input parameters in each action and return null.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter

View solution in original post

Reply
0 Kudos
6 Replies
ChristianWehner
VMware Employee
VMware Employee
Jump to solution

Hi Michael,

did you ever tried your action within a workflow to see the result? Is it running correctly and as expected? From my side this sounds like you'r having a loop within your action or it does take really long :smileysilly:

Cheers Chris

Reply
0 Kudos
poorem
Enthusiast
Enthusiast
Jump to solution

Thanks Chris.

Yes, I tried it in a workflow and it completes very quickly. The presentation does complete if I leave it long enough.

Interestingly, I noticed that there were some errors being logged in vCO at around the same time. I’m going to dig into those and see if they’re connected.

Michael

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

There should not be a big difference in action execution time depending on whether it is executed directly in a workflow or as part of a presentation.

Could you check if there is other stuff in the presentation which could potentially take a long time to evaluate (other actions, etc.)? If possible, could you send a copy of your workflow/action and the log files, plus some info about your environment, like vCO version, plug-in version, deployment type (appliance/standalone), database version, etc.

cdecanini_
VMware Employee
VMware Employee
Jump to solution

Is this field then used to calculate other fields ? The issue may be that when first loading your presentation may try to calculate fields using null inputs. One way to avoid the errors is to test for null input parameters in each action and return null.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
Reply
0 Kudos
poorem
Enthusiast
Enthusiast
Jump to solution

There are a couple of vCAC plugin related fields that could be causing issues - I'm seeing some related errors in the logs. I'm going to re-write the workflow to separate those out and see what happens.

Many thanks.

Reply
0 Kudos
poorem
Enthusiast
Enthusiast
Jump to solution

Thanks, I did see another thread where this was an issue. I actually hadn't got as far as doing that bit yet. Looks like the culprit could be some interaction with vCAC through the plugin. I'm going to re-work the workflow a bit and see if I can rule those bits out.

Cheers.

Reply
0 Kudos