Creating a Request Form for an AE Workflow
As a CA service delivery administrator or catalog administrator, you need to define a request form for each request type that is fulfilled by a CA Automic Automation Engine (AE) Workflow. The form must provide fields that are mapped to the required input parameters which the Workflow uses to process the request. You put the form among the service offerings for your CA Service Catalog users. To submit a request, they just enter values in the form for their specific request, and the rest is handled automatically.
This page includes the following:
Prerequisites
Before you begin to define a request form for a request that will be processed by AE, you must have the following ready:
- The name of the configuration that you need for the connection to AE.
If you do not define these configuration forms, then get the name of the form that you need from the administrator. For more information, see Configuring the AE Connection.
- A list of the input parameters that the AE workflow needs. For each parameter, you need the following:
- The Automic Automation variable name
- The data type
- Any restrictions to the values (such as maximum, minimum, or specific values)
Coordinate with the AE Workflow designer to find out what input parameters the Workflow needs. For more information, see Mapping CA Service Catalog Fields to AE Variables.
Creating a Service Request Form for an AE Workflow
You need one service request form for each service offering that will be fulfilled by an AE Workflow.
For full details about working with forms in CA Service Catalog, see the section "Create and Customize a Form" under "Service Catalog Management" in the "Using" part of the documentation for CA Service Management. You can find all CA documentation over https://docops.ca.com/home.
- Log into CA Service Catalog.
- Open the connection form.
- Go to Catalog, then Forms.
- In the left sidebar, right click Forms and select Add, Form from the context menu. Then enter a form name.
A space appears in the main area of the screen for the form fields and the form attributes in the right sidebar.
- In the form attributes in the right sidebar, ensure that the following attributes have the values needed for the AE Workflow.
_id: <A unique name>
Form Type: request
- Add form fields for the input parameters that the AE Workflow needs.
Get the list of workflow parameters from the AE Workflow designer. Then define a field for each of them.
- In the left sidebar, right click the new form name, and select Add and then an element type from the context menu.
The element type of a field in the form has to match the AE element type for the input parameter that AEWorkflow expects. For example, use a Text field in the form when the AE field is a Text element.
- In the form attributes in the right sidebar, ensure that the following attributes have the values needed for the AE Workflow.
_id: <The variable name that the AE Workflow needs>
Name: <an internal name for the field>
Value: <optional text to appear in the field as a hint about what to enter or the default>
- Every request form for an AE Workflow must have the following fields:
Workflow Name (Value: <name of AE Workflow>)
AE Connection Details (Value: <_id of the AE connection configuration form>)
- In the left sidebar, right click the new form name, and select Add and then an element type from the context menu.
- Hide the following fields from end users by setting the attribute Hidden: true.
Workflow Name (Value: <name of AE Workflow>)
AE Connection Details (Value: <_id of the AE connection configuration form>)
For each field do the following:
- In the left sidebar, click the name of the field. This opens the field attributes in the right sidebar.
- In the Hidden attribute, enter one of the following:
- To hide the field from all users: hidden
- To hide the field from certain user groups, such as End User: $(_.user.role == ‘enduser’)
- (Optional) Define the Permissions for the form.
- Go to Catalog, then Service Offerings.
- In the right sidebar on the Offerings tab, click the AE Connection Details form.
- In the main part of the screen, go to the Permissions tab.
- Select the Roles and/or Groups that are allowed to see this form.
- Click Save in the menu bar.
- Make the form available in the Service Offerings for the appropriate end users.
For more information, see the "Service Catalog Management" section in the "Using" part of the documentation for CA Service Management. You can find all CA documentation over https://docops.ca.com/home.
What Every Request Must Include
In addition to the request-specific parameters, every request form must include the following:
- A field that points to the AE connection details. The value in the field must contains the _id of the configuration form.
Note: If no connection form name is provided or it cannot be found, the default name ae_connection_config will be used.
For more information, see Defining a Configuration for the AE Connection and Mapping CA Service Catalog Fields to AE Variables.
- A field for the name of the AE Workflow. For this field:
- _id: workflow
- The value in the field must match the name of the AEWorkflow. Get this from the AE Workflow designer.
Both of these fields should be hidden from the end user.
Note: Every request must also include the Request ID, but you do not have to do anything to include it. CA Service Catalog generates the Request ID and it is included automatically with the other request parameters that are sent to AE.
Defining an Event-Rule-Action for a Request That Goes to AE
After you create a form for a service request that will be processed by an AE Workflow, you need to add an event-rule-action definition. The definition specifies that
- when a service request (the event)
- is submitted by a user with your form (the rules),
- then the request is sent to AE for processing (the action).
For each form that you create, you need to define an event-rule-action .
- In the CA Service Catalog, go to Administration, Events-Rules-Actions.
- In the Event Types column, scroll to and click Request Change. The Rule List page appears.
- Click the Add button. The Add Rule page appears.
Note: There are two (one in the middle of the page and one at the bottom of the Rules List). You can click either one.
- Define the Rule Information.
Enter a Name and optional Description for the new event rule. Leave Status: Enabled.
- Click the icon to the right of the Event Filter field. The Create Event Filter window appears. Under Condition Builder you can define the conditions for the event filter.
The event filter is the rule is defined by conditions. When these conditions are met, the action that you define in a later step is triggered.
- Add the first condition.
(Radio buttons for condition type): AND
Property: status (Integer)
Operator: =
Constant: 200
(200 means request submitted.)
Click the down arrow. The condition phrase moves into the Current Conditions box.
- Add the second condition.
(Radio buttons for condition type): AND
Property: name (String)
Operator: =
Constant:<the name of the form for the request, for example, New VM)
This is the name that you see in the left sidebar of the Service Offerings page and the Forms page.
Click the down arrow. The condition phrase moves into the Current Conditions box, so that the rule looks like this:
status = 200
AND name = ‘New VM’
Click the OK button. The window closes.
The Add Rule window reappears and the event conditions that you defined are in the Event Filter field.
Click the OK button. The Rule List page reappears, and your new rule is listed in the list in the bottom part of the page.
- Define the action for the rule:
On the Rule List page, click the name of your new rule. The Rule Details page appears displaying your new rule.
Click the Add button. The Add Action page appears.
Enter a Name and optional Description for the new action.
Select Type: Java
- In the Java Class field that appears in the bottom of page, enter the following text:
com.ca.usm.ruleEngine.action.ServiceRequestAction
- Click the OK button. The Rule Details page reappears, and your new action is listed in the bottom part of the page.
-
Click the Done button. The Rule List page reappears.
-
Click the Done button. The Event Type page reappears.
The Event-Rule-Action definition is complete. It basically says, "When a request is submitted for the "New VM" service offering, invoke the Java Class "com.ca.usm.ruleEngine.action.ServiceRequestAction".