VMware Cloud Community
pizzle85
Expert
Expert

Non required blueprint inputs from service broker custom form

I have built a dynamic type in vRO and imported it into cloud assembly and attached the CRUD workflows to it. When a consumer requests a new thing be built there are optional inputs and i would like to have some hidden/read only fields depending on input. So i created a custom form in the service broker for the CA BP. However if i specify the input property in the BP it becomes required in SB. If i leave out the input on the BP then the data for the field in SB is not sent to CA. Is there a way to pass non required input values from the service broker to cloud assembly?

Reply
0 Kudos
4 Replies
siglert
Enthusiast
Enthusiast

Two separate fields.  Make a field for your BP and one for the Custom form.  Set the Value for your Blue print to match the value from the field from Custom Form.  The fields in the custom form would need to be mapped as an input to a VRO workflow but you do not have to do anything with them.  Then they will show as a matchable field.

Reply
0 Kudos
pizzle85
Expert
Expert

I'm not sure what you're saying. Could you give me an example?

All of the below examples have an input with name description in the service broker custom form.

What i have tried is:

This results in a required field named inputs in the service broker custom form. It works but the field is required and cannot be changed in the custom form.

inputs:

     description:

          type: string

          title: Description

resources:

     resource:

     properties:

          description: '${input.description}'

This results in the value passed to vRO being and empty string

inputs:

resources:

     resource:

          properties:

               description: ''

This results in the value passed to vRO being null

inputs:

resources:

     resource:

          properties:

               description:

This results in a YAML error sating there is no input named description

inputs:

resources:

     resource:

          properties:

               description: '${input.description}'

This results in nothing being passed to my vRO workflow

inputs:

resources:

     resource:

          properties:

Reply
0 Kudos
pizzle85
Expert
Expert

Perhaps this is what you were talking about. Its ghetto as all get out but i guess it works...

In the service broker custom form i have two inputs.

1. The "description" input attached to the cloud assembly blueprint.

2. "descriptionForm" input that only exists in the custom form.

I then set the description input to be hidden and to match the value of the descriptionForm field. When i submit the request the value of the descriptionForm field is sent to my workflow.

My CA BP looks like:

inputs:

     description:

resources:

     resource:

          properties:

               description: '{$input.description}'

and my vRO workflow as an input named description.

Reply
0 Kudos
siglert
Enthusiast
Enthusiast

That is pretty much it.  Some times you just have to work around the limitations of custom forms.

Reply
0 Kudos