Execute Forms Keeping State v2

post

/v2/appstack

Execute stateful calls to applications including flows from one form to another.

Request

Supported Media Types
Header Parameters
Body ()
Used to request an application stack operation.
Root Schema : ApplicationStackRequest
Type: object
Used to request an application stack operation.
Show Source
  • Allowed Values: [ "open", "execute", "close" ]
    The operation to perform on the stack.
  • ActionRequest
    After an Application Stack has been opened use the action request to invoke events on the open form.
  • Specify whether alias names should be used for field names. A value of true prevents Data Dictionary overrides from changing the field names.
  • Specify whether cache should be used if available for the transaction.
  • Override the default server Cache Time To Live in milliseconds.
  • An identifier for the device making the service call. If not provided, the requesting IP address is used.
  • For Data Service requests only. A flag to indicate if a next page link will be returned.
  • Specify the environment to use for login. If not specified, the default environment configured for the AIS Server will be used.
  • If cache is enabled, this tells the request to ignore the cache and execute the request.
  • FormRequest
    The FormRequest class is the expected input class to the jderest/formservice AIS service.
  • Specify whether timing information should be included in the response. The timing information shows how long the formservice/dataservice ran and the total processing time.
  • The HTML (JAS) Server to use for login. If not specified, the default HTML Server configured for the AIS Server will be used.
  • For Data Service requests only. A number in milliseconds for how often records are fetched in the background before the next request is received.
  • Allowed Values: [ "<blank>", "VERSION1", "GRID_DATA", "VERSION2", "ORACLE", "XML", "XMLSIMPLE" ]
    The format of the output. GRID_DATA is the default value.
  • The JD Edwards EnterpriseOne password, which is required if other authentication methods are not being used.
  • Used for logging in with psToken. Primarily used by the HTML Server to establish a session with the AIS Server.
  • Used for execute or close. The unique id of the stack to be operated on. This must be equal to the RID in the response after opening the stack.
  • The role to use for login. If not specified, the default role configured for the AIS Server will be used.
  • Specify whether to delete the data currently stored in the cache for the request. This does not execute the request. This forces the next execution to fetch from the database.
  • Specify whether action controls such as buttons, row, and form exits should be included in the response.
  • Used for execute or close. The stack id to operate on . This must be equal to the stack id returned in the previous response.
  • Used for execute or close. The state id of the stack to operate on. This must be equal to state id returned in the previous response.
  • The AIS token, which is required if other authentication methods are not being used.
  • JD Edwards EnterpriseOne username, which is required if other authentication methods are not being used.
  • A flag to indicate if UTIME values should be returned in the user preference format and time zone. Only available with GRID_DATA output type.
Nested Schema : ActionRequest
Type: object
After an Application Stack has been opened use the action request to invoke events on the open form.
Show Source
Nested Schema : FormRequest
Type: object
The FormRequest class is the expected input class to the jderest/formservice AIS service.
Show Source
  • AggregationInfo
    Provide information about the requested aggregation.
  • Specify whether alias names should be used for field names. A value of true prevents Data Dictionary overrides from changing the field names.
  • Specify whether cache should be used if available for the transaction.
  • A flag to indicate if this is a batch data request (used for data requests only).
  • A flag allowing the caller to indicate if the form service event in FDA ER should execute.
  • Override the default server Cache Time To Live in milliseconds.
  • Used to allow orchestrator to process all rows of a result set
  • An identifier for the device making the service call. If not provided, the requesting IP address is used.
  • Usually business functions called in event rules for form services are executed synchronously. Pass a value of true in this field to execute those asynchronously. (Tools Release 9.2.2.4 +)
  • For Data Service requests only. A flag to indicate if a next page link will be returned.
  • Specify the environment to use for login. If not specified, the default environment configured for the AIS Server will be used.
  • A flag indicating the service should not return summary rows in grids indicated by a sigma character in the row header.
  • Allowed Values: [ "true", "false" ]
    Indicates that the Find button should be pressed.
  • If cache is enabled, this tells the request to ignore the cache and execute the request.
  • formActions
    An array of actions to be performed in a specified order on a particular form.
  • The form data structure values (for example |6001|M30|00007|).
  • The form data structure template (for example |1|2|3|).
  • formInputs
    An array of FIStructure (id,value) pairs for values that should be passed into the form interconnect data structure.
  • The name of the EnterpriseOne application and form with an underscore between (for example P01012_W01012B).
  • A character value of C (Create), R (Read), U (Update) or D (Delete), which can be accessed in FDA Event Rules when the form executes.
  • Allowed Values: [ "true", "false" ]
    Request only a demo version of the form to view all the fields without actual data.
  • Allowed Values: [ "true", "false" ]
    A flag allowing the caller to indicate if the application should not use the FDA setting for find on entry.
  • Specify whether timing information should be included in the response. The timing information shows how long the formservice/dataservice ran and the total processing time.
  • The HTML (JAS) Server to use for login. If not specified, the default HTML Server configured for the AIS Server will be used.
  • Allowed Values: [ "true", "false" ]
    When requesting formServiceDemo (Demo Mode) to prevent event rules execution send a value of true in this field.
  • The maximum number of records that should be returned. The default value is 100. A value of 'No Max' will return all records. This value does not apply to aggregation requests.
  • For Data Service requests only. A number in milliseconds for how often records are fetched in the background before the next request is received.
  • Allowed Values: [ "<blank>", "VERSION1", "GRID_DATA", "VERSION2", "ORACLE", "XML", "XMLSIMPLE" ]
    The format of the output. GRID_DATA is the default value.
  • The JD Edwards EnterpriseOne password, which is required if other authentication methods are not being used.
  • Used for logging in with psToken. Primarily used by the HTML Server to establish a session with the AIS Server.
  • Query
    The query portion of a data service or form service request.
  • The object name of a saved query to be executed on the form.
  • The returnControlIDs string is bar delimited, without a starting or ending bar. Form fields are just a single value. Grid fields are indicated with a grid id, followed by a bracketed list of grid columns. Subform fields are indicated with subform id underscore field id. For example: 33|34|17[24,26,28]|50_45|50_53|50_9[35,39,41].
    Data request fields have two possible formats. There are no form fields so brackets ([]) are not used. For tables use only the field alias (AN8|ALPH). For business views, use table.alias (F4101.ITM|F4101.DSC1).
    Release 9.2.8.3 and later, business views with the same table multiple times use table-instance.alias, you do not need to include instance for the first table (zero) only for instance of 1 or more (F4101.ITM|F4101-1.ITM).
  • The role to use for login. If not specified, the default role configured for the AIS Server will be used.
  • Specify whether to delete the data currently stored in the cache for the request. This does not execute the request. This forces the next execution to fetch from the database.
  • Specify whether action controls such as buttons, row, and form exits should be included in the response.
  • Allowed Values: [ "true", "false" ]
    A flag allowing the caller to indicate if warnings should be ignored or not.
  • The AIS token, which is required if other authentication methods are not being used.
  • A flag indicating the service should run in Turbo Mode, which reduces processing time by not processing unrequested grid columns and associated descriptions in the grid.
  • JD Edwards EnterpriseOne username, which is required if other authentication methods are not being used.
  • A flag to indicate if UTIME values should be returned in the user preference format and time zone. Only available with GRID_DATA output type.
  • A list of variable names to correspond to the returnControlIDs. Used by Orchestrator only.
  • The version of the application to execute. If not provided, the default (ZJDE0001) version runs.
Nested Schema : formActions
Type: array
The list of events to invoke, in order.
Show Source
Nested Schema : FSREvent
Type: object
An individual action to perform on a form.
Show Source
  • Allowed Values: [ "SetQBEValue", "SetControlValue", "SetRadioButton", "SetComboValue", "DoAction", "SetCheckboxValue", "SelectRow", "UnSelectRow", "UnSelectAllRows", "SelectAllRows", "ClickGridCell", "ClickGridColumnAggregate", "NextGrid" ]
    The command or action to perform.
  • The control to perform the action on. This a form level object. It is not applicable to individual grid rows.
  • GridAction
    Holds actions to perform on grid rows.
  • The value to use, if the action is to set a value.
Nested Schema : GridAction
Type: object
Holds actions to perform on grid rows.
Show Source
Nested Schema : gridRowInsertEvents
Type: array
The list of events for adding grid rows.
Show Source
Nested Schema : gridRowUpdateEvents
Type: array
The list of events for updating grid rows.
Show Source
Nested Schema : GridRowInsertEvent
Type: object
Contains actions to apply to a newly added grid row.
Show Source
Nested Schema : gridColumnEvents
Type: array
The actions to apply to the new grid row.
Show Source
Nested Schema : GridColumnEvent
Type: object
Action to be applied to a grid cell.
Show Source
  • The control id for the grid column. Pass only the column id here, a single number without separators. The grid must already be identified by including the gridID field at the root of GridAction.
  • Allowed Values: [ "SetGridCellValue", "SetGridComboValue", "ClickGridCell" ]
    The operation to perform on the grid cell.
  • The value to use in the operation.
Nested Schema : GridRowUpdateEvent
Type: object
The actions to apply to an existing grid row.
Show Source
Nested Schema : gridColumnEvents
Type: array
The actions to perform on the existing grid row.
Show Source
Nested Schema : AggregationInfo
Type: object
Provide information about the requested aggregation.
Show Source
Nested Schema : formActions
Type: array
An array of actions to be performed in a specified order on a particular form.
Show Source
Nested Schema : formInputs
Type: array
An array of FIStructure (id,value) pairs for values that should be passed into the form interconnect data structure.
Show Source
Nested Schema : Query
Type: object
The query portion of a data service or form service request.
Show Source
Nested Schema : aggregations
Type: array
The list of aggregations requested.
Show Source
Nested Schema : CurrencyProcessing
Type: object
Details for instructing the service to format the results for currency (currency decimals).
Show Source
  • If you would like different currencies in the table to be converted to a single currency, indicate it here. You must have conversion rates in the currency conversion table for the currencies involved.
  • Specify the date to be used for the currency conversion. If not provided, today's date will be used.
  • If not using a specific type of processing, specify a specific currency code to use for formatting.
  • currencyCols
    Specify the columns to be formatted. You only need to add a column here once, even if you have several aggregations over that column. Identify each distinct column to which the currency processing should apply. If you do not identify currency columns here, then currency processing will be applied to all columns identified as currency columns in the data dictionary. A currency column is defined in the data dictionary with class CURRENCY.
  • keyCols
    Specify the columns to be used as the key based on the type of processing. (For example for COMPANY processing, which field in the table will have the company value.)
  • Rounding Mode override.
  • Allowed Values: [ "CO", "CRCD", "MCU", "AID", "LT_CO_CRCD", "LT_CRCD", "STATIC" ]
    The type of currency processing to use.
Nested Schema : groupBy
Type: array
The list of fields to group the results by.
Show Source
Nested Schema : orderBy
Type: array
The list fields to order the results by.
Show Source
Nested Schema : AggregationItem
Type: object
Information provided for the aggregation of a specific column.
Show Source
  • Allowed Values: [ "SUM", "MIN", "MAX", "AVG", "COUNT", "COUNT_DISTINCT", "AVG_DISTINCT", "SUM_DISTINCT" ]
    The aggregation to perform.
  • The column to perform the aggregation over.
  • If this is set the associated description will be returned as part of the group by results.
  • Allowed Values: [ "ASC", "DESC" ]
    If this is a group by, indicate the order.
  • Allowed Values: [ "USER", "CALQTR", "<SimpleDateFormatString>" ]
    If this is a group by for a date field, indicate the simple date format for the dates. The result will be grouped and formated based on the input. 'USER': Uses the EnterpriseOne user's preferred date format. 'CALQTR': Uses the four digit year and one digit quarter format, for example 2020-1. SimpleDateFormat: Uses the simple date format that you supply, such as yyyy-MM-dd.
Nested Schema : currencyCols
Type: array
Specify the columns to be formatted. You only need to add a column here once, even if you have several aggregations over that column. Identify each distinct column to which the currency processing should apply. If you do not identify currency columns here, then currency processing will be applied to all columns identified as currency columns in the data dictionary. A currency column is defined in the data dictionary with class CURRENCY.
Show Source
Nested Schema : keyCols
Type: array
Specify the columns to be used as the key based on the type of processing. (For example for COMPANY processing, which field in the table will have the company value.)
Show Source
Nested Schema : FIStructure
Type: object
A form interconnect value to send into a form request.
Show Source
Nested Schema : complexQuery
Type: array
The array of complex query fragments if this is a compex query.
Show Source
Nested Schema : condition
Type: array
The array of complex query fragments if this is a complex query.
Show Source
Nested Schema : ComplexQueryFragment
Type: object
The class used to join multiple queries into a complex query.
Show Source
Nested Schema : Condition
Type: object
A condition within a query.
Show Source
Nested Schema : value
Type: array
The value(s) used for data comparison based on the operation.
Show Source
Nested Schema : QueryValue
Type: object
The value used in a query comparison.
Show Source
  • The value to be compared if it's a literal, or the value to be used in conjunction with the special value operation.
  • Allowed Values: [ "LITERAL", "LOGIN_USER", "TODAY", "TODAY_PLUS_DAY", "TODAY_MINUS_DAY", "TODAY_PLUS_MONTH", "TODAY_MINUS_MONTH", "TODAY_PLUS_YEAR", "TODAY_MINUS_YEAR" ]
    The special value id (see allowed values). Specify LITERAL if using the constant value only.
Back to Top

Response

Supported Media Types

200 Response

Successful Execution

400 Response

Bad Request - Invalid JSON Input

403 Response

Authorization Failure

415 Response

Invalid Content-Type Header - Must use application/json

500 Response

Server Failed to Process Request
Body ()
Root Schema : ServiceErrorResponse
Type: object
Error Response
Show Source
Back to Top

Examples

This example shows how to use the next/link capability to fetch data in easily manageable data sets over several successive service calls. This capability is available with v2 services, which you can access by including v2 in the URI. The token value is from a prior call to the tokenrequest service to establish a session. An application stack response may include one or more grids. If any of the grids indicate more records are available ("moreRecords" : true), then the response will include a links section. It is important to note that the size of each data set is determined up front in the first request to the form/grid. The maxPageSize input parameter indicates the number of records to return with each call. For example, setting this value to 10 means that you will receive 10 records in the first call and up to 10 more in every subsequent link call. To request the next page of data, use the link provided and perform a POST operation for that URL. To request the last page of data, use the link provided and perform a POST operation for that URL. Finally, you must handle the possibility that the result set will time out and throw an exception when calling the next link.. In the case of a timeout, you will have to start over and re-run the original fetch to refresh the data set.

Example Request VERSION2 Output

Request - Open the stack and filter for address book number(1[19]) and find (15) one record.

curl -i -X POST -H "Content-Type:application/json" "http://ais_server_url/jderest/appstack -d"
{
    "token": "044yEp/A21Dtw3cyOT1EaSeKcH4pub8pjQUxnUhRKeuhPY=MDE5MDA4NDE3MzA3NzAyMzMzMzI0MDk2ME15RGV2aWNlMTQ3ODEyMjcwNjM5Mw==",
    "deviceName": "MyDevice",
    "formName": "P01012_W01012B",
    "version": "ZJDE0001",
    "action": "open",
    "outputType": "VERSION2",
    "formRequest": {
        "maxPageSize": "5",
        "returnControlIDs": "54|1[19,20]",
        "formActions": [
            {
                "command": "SetQBEValue",
                "controlID": "1[19]",
                "value": "6001"
            },
            {
                "command": "DoAction",
                "controlID": "15"
            }
        ],
        "formName": "P01012_W01012B",
        "version": "ZJDE0001",
        "formServiceAction": "R",
        "bypassFormServiceEREvent": true
    },
    "stackId": 0,
    "stateId": 0
}
        

Response - Open the stack

        {
    "fs_P01012_W01012B": {
        "title": "Work With Addresses",
        "data": {
            "z_AT1_54": {
                "id": 54,
                "dataType": 2,
                "bsvw": true,
                "title": "Search Type",
                "staticText": "Search Type",
                "visible": true,
                "longName": "txtSearchType_54",
                "assocDesc": "",
                "editable": true
            },
            "gridData": {
                "id": 1,
                "titles": {
                    "col_19": "Address Number",
                    "col_20": "Alpha Name"
                },
                "columnInfo": {
                    "z_AN8_19": {
                        "id": 19,
                        "dataType": 9,
                        "bsvw": true,
                        "title": "Address Number",
                        "visible": true,
                        "longName": "mnAddressNumber_19",
                        "qbeEnabled": true
                    },
                    "z_ALPH_20": {
                        "id": 20,
                        "dataType": 2,
                        "bsvw": true,
                        "title": "Alpha Name",
                        "visible": true,
                        "longName": "sAlphaName_20",
                        "qbeEnabled": true
                    }
                },
                "rowset": [
                    {
                        "rowIndex": 0,
                        "MOExist": true,
                        "z_AN8_19": {
                            "internalValue": 6001,
                            "value": "6001"
                        },
                        "z_ALPH_20": {
                            "internalValue": "Original Name",
                            "value": "Original Name"
                        }
                    }
                ],
                "summary": {
                    "records": 1,
                    "moreRecords": false
                }
            }
        },
        "errors": [],
        "warnings": []
    },
    "stackId": 1,
    "stateId": 1,
    "rid": "26ff39fb3e8c32bf",
    "currentApp": "P01012_W01012B_ZJDE0001",
    "timeStamp": "2016-11-02:21.42.41",
    "sysErrors": []
}
        

Request - Select the record (1.0) and select button (14)

curl -i -X POST -H "Content-Type:application/json" "http://ais_server_url/jderest/appstack -d"
{
    "token": "044yEp/A21Dtw3cyOT1EaSeKcH4pub8pjQUxnUhRKeuhPY=MDE5MDA4NDE3MzA3NzAyMzMzMzI0MDk2ME15RGV2aWNlMTQ3ODEyMjcwNjM5Mw==",
    "deviceName": "MyDevice",
    "outputType": "VERSION2",
    "allowCache": true,
    "action": "execute",
    "actionRequest": {
        "returnControlIDs": "28",
        "formActions": [
            {
                "command": "SelectRow",
                "controlID": "1.0"
            },
            {
                "command": "DoAction",
                "controlID": "14"
            }
        ],
        "formOID": "W01012B"
    },
    "stackId": 1,
    "stateId": 1,
    "rid": "26ff39fb3e8c32bf"
}
        

Response - Select the record

{
    "fs_P01012_W01012A": {
        "title": "Address Book Revision",
        "data": {
            "z_ALPH_28": {
                "id": 28,
                "internalValue": "Original Name",
                "dataType": 2,
                "bsvw": true,
                "title": "Alpha Name",
                "staticText": "Alpha Name",
                "visible": true,
                "longName": "txtAlphaName_28",
                "editable": true
            }
        },
        "errors": [],
        "warnings": []
    },
    "stackId": 1,
    "stateId": 2,
    "rid": "26ff39fb3e8c32bf",
    "currentApp": "P01012_W01012A_ZJDE0001",
    "timeStamp": "2016-11-02:21.44.36",
    "sysErrors": []
}
        

Request - Change the Name field (28), save (11) and close (12)

curl -i -X POST -H "Content-Type:application/json" "http://ais_server_url/jderest/appstack -d"
{
    "token": "044yEp/A21Dtw3cyOT1EaSeKcH4pub8pjQUxnUhRKeuhPY=MDE5MDA4NDE3MzA3NzAyMzMzMzI0MDk2ME15RGV2aWNlMTQ3ODEyMjcwNjM5Mw==",
    "deviceName": "MyDevice",
    "outputType": "VERSION2",
    "allowCache": true,
    "action": "execute",
    "actionRequest": {
        "returnControlIDs": "54|1[19,20]",
        "formActions": [
            {
                "command": "SetControlValue",
                "controlID": "28",
                "value": "Changed Name"
            },
            {
                "command": "DoAction",
                "controlID": "11"
            },
            {
                "command": "DoAction",
                "controlID": "12"
            }
        ],
        "formOID": "W01012A"
    },
    "stackId": 1,
    "stateId": 2,
    "rid": "26ff39fb3e8c32bf"
}
        

Response - Change the name field

{
    "fs_P01012_W01012B": {
        "title": "Work With Addresses",
        "data": {
            "z_AT1_54": {
                "id": 54,
                "dataType": 2,
                "bsvw": true,
                "title": "Search Type",
                "staticText": "Search Type",
                "visible": true,
                "longName": "txtSearchType_54",
                "assocDesc": "",
                "editable": true
            },
            "gridData": {
                "id": 1,
                "titles": {
                    "col_19": "Address Number",
                    "col_20": "Alpha Name"
                },
                "columnInfo": {
                    "z_AN8_19": {
                        "id": 19,
                        "dataType": 9,
                        "bsvw": true,
                        "title": "Address Number",
                        "visible": true,
                        "longName": "mnAddressNumber_19",
                        "qbeEnabled": true
                    },
                    "z_ALPH_20": {
                        "id": 20,
                        "dataType": 2,
                        "bsvw": true,
                        "title": "Alpha Name",
                        "visible": true,
                        "longName": "sAlphaName_20",
                        "qbeEnabled": true
                    }
                },
                "rowset": [
                    {
                        "rowIndex": 0,
                        "MOExist": true,
                        "z_AN8_19": {
                            "internalValue": 6001,
                            "value": "6001"
                        },
                        "z_ALPH_20": {
                            "internalValue": "Changed Name",
                            "value": "Changed Name"
                        }
                    }
                ],
                "summary": {
                    "records": 1,
                    "moreRecords": false
                }
            }
        },
        "errors": [],
        "warnings": []
    },
    "stackId": 1,
    "stateId": 3,
    "rid": "26ff39fb3e8c32bf",
    "currentApp": "P01012_W01012B_ZJDE0001",
    "timeStamp": "2016-11-02:21.46.45",
    "sysErrors": []
}
        

Request - Close the stack

curl -i -X POST -H "Content-Type:application/json" "http://ais_server_url/jderest/appstack -d"
{
    "token": "044yEp/A21Dtw3cyOT1EaSeKcH4pub8pjQUxnUhRKeuhPY=MDE5MDA4NDE3MzA3NzAyMzMzMzI0MDk2ME15RGV2aWNlMTQ3ODEyMjcwNjM5Mw==",
    "deviceName": "MyDevice",
    "outputType": "VERSION2",
    "allowCache": true,
    "action": "close",
    "actionRequest": {
        "returnControlIDs": "54|1[19,20]",
        "formOID": "W01012B"
    },
    "stackId": 1,
    "stateId": 3,
    "rid": "26ff39fb3e8c32bf"
}
        

Response - Close the stack

{
    "fs_P01012_W01012B": {
        "title": "Work With Addresses",
        "data": {
            "z_AT1_54": {
                "id": 54,
                "dataType": 2,
                "bsvw": true,
                "title": "Search Type",
                "staticText": "Search Type",
                "visible": true,
                "longName": "txtSearchType_54",
                "assocDesc": "",
                "editable": true
            },
            "gridData": {
                "id": 1,
                "titles": {
                    "col_19": "Address Number",
                    "col_20": "Alpha Name"
                },
                "columnInfo": {
                    "z_AN8_19": {
                        "id": 19,
                        "dataType": 9,
                        "bsvw": true,
                        "title": "Address Number",
                        "visible": true,
                        "longName": "mnAddressNumber_19",
                        "qbeEnabled": true
                    },
                    "z_ALPH_20": {
                        "id": 20,
                        "dataType": 2,
                        "bsvw": true,
                        "title": "Alpha Name",
                        "visible": true,
                        "longName": "sAlphaName_20",
                        "qbeEnabled": true
                    }
                },
                "rowset": [
                    {
                        "rowIndex": 0,
                        "MOExist": true,
                        "z_AN8_19": {
                            "internalValue": 6001,
                            "value": "6001"
                        },
                        "z_ALPH_20": {
                            "internalValue": "Changed Name",
                            "value": "Changed Name"
                        }
                    }
                ],
                "summary": {
                    "records": 1,
                    "moreRecords": false
                }
            }
        },
        "errors": [],
        "warnings": []
    },
    "stackId": 0,
    "stateId": 0,
    "rid": "",
    "currentApp": "P01012_W01012B_ZJDE0001",
    "timeStamp": "2016-11-02:21.48.41",
    "sysErrors": []
}
        
Back to Top