SELECT
queries, for example, in order to use the results in process conditions.CONNECTION_NAME
parameter, which corresponds to the connection name, and the QUERY
parameter, which corresponds to the query to execute.
CMDx_
, where x
corresponds to the command number (e.g. CMD1_
).
SELECT
, INSERT
, UPDATE
, DELETE
, SCALAR
, and PROCEDURE
.
CONNECTION_NAME
parameter with CMDx_
. It is not possible to use a global connection and a local connection (e.g. CONNECTION_NAME
and CMD2_CONNECTION_NAME
).
TRANSACTION
parameter with CMDx_
. It is not possible to use a global transaction and a local transaction (e.g. TRANSACTION
and CMD2_TRANSACTION
). It's necessary to define a global connection to be able to define a global transaction.
ExecSqlLogLevel
parameter in the web.config
file to 0
to deactivate logs, 1
for error logs, 2
for information logs, or 3
for debug logs; the default value is 0
.CONNECTION_NAME
web.config
file.QUERY
TYPE
SELECT
(default)INSERT
UPDATE
DELETE
SCALAR
PROCEDURE
TRANSACTION
Y
, the application triggers a SQL transaction before the request execution and will perform a commit or rollback based on the result.
Default: N
ON_ERROR
CATCH
, the application will not return errors to WorkflowGen. This allows an error message to be stored in the ERROR_MESSAGE
parameter and to continue the execution.
Default: THROW
TIMEOUT
30
FORM_DATA
FORM_DATA
file containing the XML process definitionFORM_DATA_GRIDVIEW
FORM_DATA
RESULT_CSV_SEPARATOR
,
(comma)FORM_DATA_GRIDVIEW
parameter, the contents of FORM_DATA
must contain at least the XML schema.
FORM_DATA
, with the definition of the schema.QUERY_PARAM
prefix or by using an at sign (@
).QUERY_PARAM_MyParam
or @MyParam
, where MyParam
corresponds to the name of the parameter defined in the query.QUERY
SELECT * FROM USERS WHERE LASTNAME = @UserLastname
QUERY_PARAM_UserLastName
/ @UserLastName
Doe
ERROR_MESSAGE
CATCH
and an exception is thrown during executionRESULT_COMMIT
commit
was performed on the transaction
Possible values:Y
or N
SELECT
queryRESULT_ROWx_fieldName
fieldName
column for row x
fieldname
with your column name (e.g. LASTNAME
) and x
with the row number (e.g. 2
).RESULT_ROW_fieldName
fieldName
column for the first row returnedRESULT_JSON
JSON
formatRESULT_JSON_FILE
JSON
format stored in a .json
fileRESULT_XML
XML
formatRESULT_XML_FILE
XML
format stored in an .xml
fileRESULT_CSV
CSV
formatRESULT_CSV_SEPARATOR
parameter.RESULT_CSV_FILE
CSV
format stored in a .csv
fileRESULT_CSV_SEPARATOR
parameter.SCALAR
queryRESULT
SCALAR
type querySELECT
queryCONNECTION_NAME
MainDbSource
QUERY
SELECT LASTNAME, FIRSTNAME, USERNAME FROM USERS
RESULT_JSON
{ "TABLE":[ { "LASTNAME":"Administrator", "FIRSTNAME":"WorkflowGen", "USERNAME":"wfgen_admin" }, { "LASTNAME":"Doe", "FIRSTNAME":"John", "USERNAME":"john.doe" } ] }
RESULT_JSON_FILE
result.json
RESULT_CSV
"LASTNAME","FIRSTNAME","USERNAME" "Administrator","WorkflowGen","wfgen_admin"
"Doe","John","john.doe"
RESULT_CSV_FILE
result.csv
RESULT_ROW_LASTNAME
Administrator
RESULT_ROW1_FIRSTNAME
WorkflowGen
RESULT_ROW2_USERNAME
john.doe
CONNECTION_NAME
MainDbSource
QUERY
SELECT LASTNAME as REQUEST_GRID_LASTNAME, FIRSTNAME as REQUEST_GRID_FIRSTNAME, USERNAME as REQUEST_GRID_USERNAME FROM USERS
FORM_DATA
FORM_DATA
FORM_DATA_GRIDVIEW
REQUEST_GRID
FORM_DATA
data containing the schema of the array, as shown in the example below:INSERT
queryCONNECTION_NAME
MainDbSource
QUERY
INSERT INTO WFCATEGORY (ID_CATEGORY,NAME,DESCRIPTION) VALUES (@IdCategory, @Name, @Description)
QUERY_PARAM_IdCategory
1
QUERY_PARAM_Name
CategoryName
QUERY_PARAM_Description
Description of the category
CONNECTION_NAME
MainDbSource
TYPE
INSERT
QUERY
INSERT INTO WFCATEGORY (ID_CATEGORY,NAME,DESCRIPTION) VALUES (@IdCategory, @Name, @Description)
@IdCategory
1
@Name
CategoryName
@Description
Description of the category
UPDATE
queryCONNECTION_NAME
MainDbSource
QUERY
UPDATE WFCATEGORY SET NAME = @Name WHERE ID_CATEGORY = @IdCategory
QUERY_PARAM_IdCategory
1
QUERY_PARAM_Name
NewCategoryName
DELETE
queryCONNECTION_NAME
MainDbSource
QUERY
DELETE FROM WFCATEGORY WHERE ID_CATEGORY = @IdCategory
QUERY_PARAM_IdCategory
1
CONNECTION_NAME
MainDbSource
TYPE
PROCEDURE
QUERY
INSERT_CATEGORY
QUERY_PARAM_ID_CATEGORY
1
QUERY_PARAM_NAME
CategoryName
QUERY_PARAM_DESCRIPTION
Description of the category
PROCEDURE
query type does not return a value. If you want to return a value, you must use the SELECT
type.CONNECTION_NAME
MainDbSource
TYPE
SELECT
QUERY
EXEC GET_USER @USERNAME = @User
QUERY_PARAM_User
wfgen_admin
SCALAR
queryCONNECTION_NAME
MainDbSource
TYPE
SCALAR
QUERY
SELECT COUNT(*) FROM USERS
RESULT
2
CONNECTION_NAME
MainDbSource
CMD1_TYPE
INSERT
CMD1_QUERY
INSERT INTO WFCATEGORY (ID_CATEGORY,NAME,DESCRIPTION) VALUES (@IdCategory, @Name, @Description)
CMD1_QUERY_PARAM_IdCategory
1
CMD1_QUERY_PARAM_Name
CategoryName
CMD1_QUERY_PARAM_Description
Description of the category
CMD2_QUERY
SELECT NAME FROM WFCATEGORY WHERE ID_CATEGORY = @IdCategory
CMD2_RESULT_ROW_NAME
CategoryName
CONNECTION_NAME
MainDbSource
CMD1_TYPE
INSERT
CMD1_QUERY
INSERT INTO WFCATEGORY (ID_CATEGORY,NAME,DESCRIPTION) VALUES (1, "Name", "Description")
CMD1_TRANSACTION
Y
CMD1_ON_ERROR
CATCH
CMD1_COMMIT
Y
CMD1_ERROR_MESSAGE
NULL
CMD2_TYPE
INSERT
CMD2_QUERY
INSERT INTO WFCATEGORY (ID_CATEGORY,NAME,DESCRIPTION) VALUES (1, "OtherName", "Other description")
CMD2_TRANSACTION
Y
CMD2_ON_ERROR
CATCH
CMD2_COMMIT
N
CMD2_ERROR_MESSAGE
Cannot insert duplicate key in object 'dbo.WFCATEGORY'. The duplicate key value is (1).