When you customize the request form for a vRealize Automation blueprint, you can base the behavior of some fields on the results of a vRealize Orchestrator action.

There are several ways that you can use vRealize Orchestrator actions. You might have an action that pulls the data from a third source, or you can use a script that defines the size and cost. This example uses a script.

Size and Cost Fields Example

In this use case, you want the catalog user to select a virtual machine size, and then display the cost of that machine per day. To do this example, you have a vRealize Orchestrator that correlates the size and cost, and you add a size field and a cost field to the blueprint custom form. The size field determines the value that appears in the cost field.

  1. In vRealize Orchestrator, configure an action, getWindows10Cost, with a deploymentSize script similar to the following example.

    Example of a vRealize Orchestrator Action with Size and Cost

    Use the following as a script example.

    var cost = "Unknown";
    
    switch(deploymentSize) {
    	case 'small' : cost = "$15";break;
    	case 'medium' : cost = "$25";break;
    	case 'large' : cost = "$45";break ;
    	
    	default : break ;
    }
    
    return cost;

  2. In vRealize Automation, add and configure a size field and cost field to a blueprint custom form.

    Configure the size field as multi select with Small, Medium, and Large values.

    In vRealize Automation, add and configure a size field and cost field to a blueprint custom form.

    On the Values tab, configure the following property values.

    • Default value = Large

    • Value options

      • Value source = Constant

      • Value definition = small|Small,medium|Medium,large|Large

  3. Configure the cost field to display the cost as defined in the vRealize Orchestrator action based on the value selected in the size field.



    On the Values tab, configure the following property values.

    • Default value = External source

    • Select action = <your vRealize Orchestrator actions folder>/getWindows10Cost

    • Action inputs

      • deploymentSize. This value was configured in the action.

      • Field

      • Size