This documentation supports the 22.1 version of Action Request System.
To view an earlier version, select the version from the Product version menu.

Defining Service actions to replace the customized Direct SQL actions in an active link

BMC Software has replaced all out-of-the-box Direct SQL actions in active links with a service framework to avoid potential security vulnerabilities such as an SQL injection attack.

If you are using customized Direct SQL actions in the active link, replace that with Service actions.



Important

We do not recommend using custom Direct SQL actions in active links. However, if you are using a custom Direct SQL action in an active link, use the BMC provided framework and replace the Direct SQL action with a Service action.


The following video (1:25) shows an overview of replacing a Direct SQL action with a Service action.


https://youtu.be/iJtByGhoPmE


Use the SQL query to obtain the list of active links that include Direct SQL actions. Before running the query, ensure that you have access to the  BMC Helix Innovation Suite database.

For example, a database administrator runs the following query on the database to obtain a list of Direct SQL action active links:

select al.resolvedname, al.overlayprop, als.fieldid, als.assignshort from actlink al, actlink_set als where al.actlinkid = als.actlinkid and als.assignShort like '107\\%'
  1. In Developer Studio , open AR System Navigator ><server name> > All Objects > Active Links.
  2. Select the Active link that has the Direct SQL action.
  3. Right click If Actions, select Service.
  4. In Data Source, select SERVER.
  5. In the Server Name field, select the server name.
  6. In Form Name, select a form name.
  7. Perform input and output mapping.
  8. Save the Service action.


The following examples show how to perform different tasks by defining a Service action.


The following screenshot shows input and output mapping to obtain the AR Schema details:


Use the GETSCHEMA service key to return the Schema ID and Next ID based on the schema name. 

The following table describes the details about input and output mapping:

ValueMethodParameter nameDescription
GETSCHEMAInputInput_ServiceKey 

A mandatory input to trigger the service.

Returns Schema ID and Next ID based on the input schema name Input_SchemaName. 

Input_SchemaName 

A mandatory input to trigger the service.

Passes the schema name as dynamic or hardcoded value.  

OutputOutput_SchemaIdReturns the Schema ID.
Output_SchemaNextId Returns the  Next ID.


The following screenshot shows input and output mapping to obtain the record count of a form:

Use GETSCHEMACOUNT service key to obtain the record count of any form based on the input form name or form view name, and input qualifications.

You must provide either the  Input_SchemaName or Input_SchemaViewName parameter. You can convert Count(*) or count(<fieldname>) to this service key. 

The following table describes the details about input and output mapping:

ValueMethodParameter nameDescription
GETSCHEMACOUNTInputInput_ServiceKey 

A mandatory input to trigger the service.

Returns the Record Count based on other input parameters.

Input_SchemaName 

Pass the schema name as dynamic or hardcoded value.  

Input_SchemaViewName 

Pass the schema view name as dynamic or hardcoded value.  

Input_SchemaFieldName 

Field to obtain the count.

Input_AdditionalQual 

Define the qualification criteria.

OutputOutput_SchemaCount Shows the record count result.


The following screenshot shows the input and output mapping to obtain the details:

Use the GETSCHEMAFIELD service key to obtain details such as Field ID, Field name, Default value, and Data type, based on the input qualification and field name. 

The following table describes the details about input and output mapping:

ValueMethodParameter nameDescription
GETSCHEMAFIELD



InputInput_ServiceKey  

A mandatory input to trigger the service.

Returns the details about the form field based on other input parameters.

Input_SchemaFieldId 

Pass the schema field ID as dynamic or hardcoded value.  

Input_SchemaFieldName 

Pass the schema field name as dynamic or hardcoded value.  

Input_SchemaId 

Pass the schema ID as dynamic or hardcoded value.

OutputOutput_SchemaFieldName Form field name.
SchemaFieldIdField ID.
Output_SchemaFieldDefaultValue Default value of the field.
Output_SchemaFieldDatatype Field data type.


The following screenshot shows the input and output mapping to obtain the details:

Use the GETENUMID service key to obtain details about the Field ENUM ID based on the input qualification and Field Name. 

You must provide the Input_FieldEnumValue parameter. 

The following table describes the details about input and output mapping:

ValueMethodParameter nameDescription
GETENUMID



InputInput_ServiceKey  

A mandatory input to trigger the service.

Returns the details about Field Enum ID details  based on other input parameters.

Input_FieldEnumValue 

Pass the Set Field ENUM value as an input.   

Input_SchemaFieldId 

Pass the schema Field ID as dynamic or hardcoded value as an input  

Input_SchemaFieldName 

Pass the schema Field Name as dynamic or hardcoded value.

Input_SchemaName 

Pass the schema Name as dynamic or hardcoded value. 

OutputOutput_FieldEnumId The Form Field Enum ID. 
Output_FieldEnumValue The Form Field Enum Value. 


Use the GETSCHEMASORT service key to obtain details about form sorting such as listIndex and sortOrder from the schema_sort table based on input qualification.

You must provide the Input_AdditionalQual parameter. 

The following table describes the details about input and output mapping:

ValueMethodParameter nameDescription
GETSCHEMASORT



InputInput_ServiceKey 

A mandatory input to trigger the service.

Returns the details about list index and sort order based on other input parameters. 

Input_AdditionalQual 

Enter the qualification criteria.

OutputOutput_Sort_SortOrder Enter the form sort order.
Output_Sort_ListIndex Enter the form sort list index.


Was this page helpful? Yes No Submitting... Thank you

Comments