VMware Cloud Community
GaryLBoone
Contributor
Contributor
Jump to solution

User Interaction object in a workflow

Hi, hoping someone can assist with my VM build workflow that uses a pre-defined XML file as an input.

I want the end user to confirm the XML values before the build commences so I've dropped in a User Interaction object which essentially just relays the attributes back to the user. There is an extra boolean attribute here asking the user if the values are correct or not.

First of all I want to make the presentation fields read-only, is this possible?

Secondly how do I control the workflow from the result of the boolean attribute - Yes, these values are correct - continue with build, or No, there is an error - cancel the workflow with an error.

Annoying if you click the Cancel button on the user interaction it still sits there in the background waiting for Input - can you change what buttons are visible (or what they do?)

Thanks very much in advance.

0 Kudos
1 Solution

Accepted Solutions
Burke-
VMware Employee
VMware Employee
Jump to solution

As for presenting the inputs in a Read Only fashion, the other guys already mentioned there is no Read Only type of attribute... but, the work-around to this is to use those Inputs as part of the description of a Presentation Step or Group in this format:

${variableName}

The values get presented as part of the description which means they see the values, but cannot modify them Smiley Happy

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 vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter

View solution in original post

0 Kudos
12 Replies
cdecanini_
VMware Employee
VMware Employee
Jump to solution

-Read only : Where is the workflow started from ? vCO client, vSphere web client, vCAC ?

For the vCO client there is no out of the box read only properties for a type

As for validating the inputs you do it in the workflow using a decision / custom decision box and in the presentation layer using a custom validation presentation property (that returns "" if OK and "error message" if not.

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
0 Kudos
tschoergez
Leadership
Leadership
Jump to solution

Hi,

it’s not possible to make a field read-only. The only thing you can do is to copy the value to a separate attribute, and show that attribute in the user interaction (but don’t use this attribute later). So even if the user changes something, it will just not matter.

To end the workflow, just use a decision element right after the user interaction, bind it to the boolean, and end the workflow in case the boolean is false.

And: There is no way to hide the cancel button, that’s by design. In general, it depends on the UI that presents the user interaction to the user, what sort of features it provides.

For example, if I remember right in the form designer of vRealize Automation Advanced Service Designer it IS possible to mark fields as read-only.

CHeers,

Joerg

From: communities-emailer

Reply-To: communities-emailer

Date: Wednesday 28 January 2015 17:06

To: Jörg Lew

Subject: New message: "User Interaction object in a workflow"

VMware Communities<https://communities.vmware.com/index.jspa>

User Interaction object in a workflow

created by GaryLBoone<https://communities.vmware.com/people/GaryLBoone> in VMware vRealize Orchestrator - View the full discussion<https://communities.vmware.com/message/2471131#2471131>

0 Kudos
Burke-
VMware Employee
VMware Employee
Jump to solution

As for presenting the inputs in a Read Only fashion, the other guys already mentioned there is no Read Only type of attribute... but, the work-around to this is to use those Inputs as part of the description of a Presentation Step or Group in this format:

${variableName}

The values get presented as part of the description which means they see the values, but cannot modify them Smiley Happy

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 vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
GaryLBoone
Contributor
Contributor
Jump to solution

Thanks for the quick responses.

It's the ambiguity (especially when viewed through a webview) of the buttons...Reset, Cancel, Submit - so the only way I can control the result is to tell the user to explicitly select Yes/No and click Submit?

While on the subject is it possible to show the end user of a webview the progress of the workflow (or is this just the Business Status field?)

Thanks again.

0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

On your question about showing the progress of the workflow - how would you calculate the progress value? It is easy if the workflow is linear, but if the workflow contains conditions/loops, it is theoretically impossible to determine not only the progress value but even whether the workflow will ever finish or continue to run forever. So it is left to the user to explicitly set business state field as an approximation for workflow progress/state.

0 Kudos
GaryLBoone
Contributor
Contributor
Jump to solution

Hi Burke, thanks for this - the workaround works great. Is there any other formatting I can do on the General Tab in Presentation? The workaround looks fine through the client, but when viewed through a Web View it's unformatted with lots of /n remarks...

Any help would be appreciated.

0 Kudos
Burke-
VMware Employee
VMware Employee
Jump to solution

Try using some basic html tags such as br, ul, b, ol, li, i - I don't recall whether or not they carry over to the Web client so let me know how that turns out.

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 vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

There is a property which gives some control on HTML escaping in Web View presentations.

com.vmware.o11n.webview.htmlescaping.disabled = true|false


Set this property value (to true or false) in vmo.properties file. You may need to restart the Orchestrator service for this property to take effect.

0 Kudos
GaryLBoone
Contributor
Contributor
Jump to solution

The tags work in the Orchestrator client but when viewed via a Web View I just see the tags <b> ... </b> - it doesn't appear there's any other way to present it better...

0 Kudos
GaryLBoone
Contributor
Contributor
Jump to solution

Thanks for that, however it doesn't appear to change anything - my <b> </b> remain visible through the web view. Is that for a particular version of the appliance? The line wasn't there at all, I had to add it manually...

0 Kudos
qc4vmware
Virtuoso
Virtuoso
Jump to solution

I know this is going to sound like a huge hassle, and it is, but I have started creating "wrapper" workflows for things I am hosting in a web view since there is so much variation in how the java client handles things and the way that things are rendered in the web views.  Both have things I like and dislike.  I have just never been able to get any of my workflows that have any significant sort of intelligence in them to perform to my satisfaction in both methods of presentation.  I have yet to explore vRA for a method of letting my customers consume these but since web views are officially deprecated I don't know if it is worth too much time and effort at this point trying to tweak things for that method of interacting with things.  I have seen posts here that also suggest to use WaveMaker as a web view replacement but I really don't see anyone on here commenting much on it.  It looks interesting but maybe overkill for our needs.  Its just one more link in the chain to break.  For many vCO users minor tweaks to the java client would probably satisfy most of our interactive use needs.  vRA is likely not an option for many unless front ending vCO with it is considered a "free" license.

0 Kudos
Czernobog
Expert
Expert
Jump to solution

Just wanted to piggyback on this post and say, that if you plan on passing a read only value from a user interaction presentation to a vRA form, you will have to put the ${variableName} in the Display Groups or the Input Parameters general tab. If you put the ${variableName} in the Presentation root or New Step general tab, it will not display in the form.

0 Kudos