VMware Cloud Community
ericr999
Enthusiast
Enthusiast
Jump to solution

Scripting workflows validations

Hello all,

I was wondering if there's a way to script workflow validations and generate an output ? Out of the GUI it doesn't seem there's an option to run that on a specific folde rand sub folders.

And in the API Explorer, can't seem to find a method that could do that on workflows and get the results.

I want to do this, because from time to time people work in the environnement and they forget to run the validation or ignore the warnings and I'd prefer to have all workflows be validated from time to time, just to make sure that everything is always ready to be run.

Is there a way to do this ?

1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

I don't think this can be done via a command-line tool or scripting code.

View solution in original post

Reply
0 Kudos
7 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Launch vRO client, go to Workflows inventory tree, right-click on some folder, and select Validate workflows context menu entry.

Reply
0 Kudos
ericr999
Enthusiast
Enthusiast
Jump to solution

Hi Illian,

Oups, I forgot to mention that I want to do it automatically and generate some sort of email with the ones that failed, but I don't think its possible.

But so far I've been using the method you are proposing, but I sometimes forget... hehe

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

I don't think this can be done via a command-line tool or scripting code.

Reply
0 Kudos
ericr999
Enthusiast
Enthusiast
Jump to solution

Yeah that's what I thought!

Thanks Ilian!

Reply
0 Kudos
egonzben
Contributor
Contributor
Jump to solution

We have just experimented this issue:

  1. Comment an action call in a Workflow script ( // System.getModule....)
  2. Remove the action
  3. The workflow is not loger valid (validation raises a warning) but you won't notice unless you edit the workflow again

In a continuous integration environment, it'd we very nice to have a way to validate a Workflow (via scripting API, or REST API), so you can detect things like this.

Is this in the product roadmap? Is there a way to validate a Workflow using an Orchestrator plugin?

iiliev
VMware Employee
VMware Employee
Jump to solution

I don't think there is a command-line tool or plug-in to validate workflows. One of the problems is that the current validation code is coupled with the workflow designer UI, and it will require some work to be properly extracted.

Agree that such standalone tool will be helpful, but currently it is not very high on product roadmap.

BTW, what type of integration in CI environment do you have in mind? Are you building a vRO plug-in/package, and want to do package content validation on every continuous build?

Reply
0 Kudos
egonzben
Contributor
Contributor
Jump to solution

Yes.

We have an scheduled job that exports a package to a repository (using the REST API) so it can be delivered at any time to another instance (REST API again) with some kind of code analysis to detect possible bugs and bad practices (thanks to SONAR, althought it is not perfect, but it helps)

We'd like to have a package validation on every build to minimize problems, stopping the build if validation fails.

Reply
0 Kudos