VMware Cloud Community
pabloramos
Enthusiast
Enthusiast

Retrieving workflows execution details

I would like to build some sort of Workflow Monitoring into my Orchestrator operations. So, I have found several existing examples that get me some of what I am looking for, but still need a little help.

1. Workflow execution details WF: http://www.vcoteam.info/articles/learn-vco/176-how-to-retrieve-workflow-execution-details.html

this wf prints to the System.log the data I need. However, I would like to have the contents emailed by using the built in "scheduled workflow" capability. I believe to email the contents I need to change out code to something like below.

I just not sure how to get it sent via email. change the System.log entries to something like:

body = ""; body += [enter your system log content here] // For example:

body += key + ": " + value + " ("+System.getOb jectType(value) +")";

2. I also found this other example : Workflow failure monitor https://communities.vmware.com/docs/DOC-23862

I configured the attributes per the notes from Bobby, but when I run it it's not finding any "failed" workflows of which there are some.

0 Kudos
1 Reply
iiliev
VMware Employee
VMware Employee

There are a few locations in 'Workflow failure monitor' example that you need to check in order to find why it doesn't find the failed workflows.

First, check if the failed executions are returned by action getSortedExecutionsForWorkflowList() on the first line.

Then, the failure might have occurred before the last start date, and thus they will be skipped by the logic in the second 'if' statement.

I'd suggest to add additional System.log() statements to your workflow to dump more information about the execution variables being processed (eg. the name/id of the execution, its start/end date, state, etc.)

0 Kudos