Linkar Framework
Linkar Web Services
Linkar REST API (deprecated)
Linkar Clients (deprecated)
This subroutine is for the database admin use. It gets executed in two cases:
All the available Client functions have a "customvar" argument. The programmer can insert all that he needs on it to manage his own Business Rules in a string or MV buffer format.
The subroutine will execute in all the client Requests, although there is no assigned “customvar”.
The "customvar" argument together with other variables will go to this subroutine and the administrator will be able to make changes or abort the operation if wished.
Example:
A user connects to Linkar from his ERP using his user and password. For it, we use the Login function and add the "CHECK" text in the "customvar" argument. When it reaches the database, before executing the Login function, it jumps to this subroutine, where the user can check, for example, if the user is temporally disabled. If this is so the admin will return an error dialog and the Login operation will abort.
The subroutine must be catalogued in the MV Account.
SUBROUTINE PARAMETERS: SUB.LK.MAIN.CONTROL.CUSTOM(CUSTOMERROR,ID.SESSION,BF.SESSION,METHOD,CUSTOMVAR,OPTIONS,MAT INPUTDATA,STOPSWITCH)
•CUSTOMERERROR: This is the output argument with the error that the admin wants to send to the client. If this variable is not null the requested operation will abort. •ID.SESSION: This is the Session code from the client who wants to make the petition. If the Function used is not persistent this code will be "VOLATILE". •BF.SESSION: This is the MV Buffer session. These buffer fields are defined in the source code SESSION BUFFER Section. •METHOD: This indicates the Operation Requested by the Client. The Operations List is located in the LIST OF METHODS Section. •CUSTOMVAR: This is the argument that comes from the client, for free use by the administrator. •OPTIONS: This is the MV buffer with the Client Function options. Some options or others will appear depending on the function. For example, if the output format is MV, XML or JSON. This buffer attributes list is in the ATTRIBUTES OF OPTIONS source code section. •MAT INPUTDATA: This is a matrix with all the MV Component input data. For example, in an Execute function, the 15th element of the Matrix is the query to execute. The Matrix list of elements is in the MEANING OF EACH ELEMENT OF MATRIX INPUTDATA source code section. •STOPSWITCH: This is an output argument. If its value is 1, the operation will abort without throwing an error message. |
SUB.LK.MAIN.NEWRECOVERRECORDID.CUSTOM
This subroutine executes in the following cases:
•In the New function, Object newRecordIdType •In the Delete function, Object recoverRecordIdCustom
This allows the administrator to keep his own Record codes join/cancel method.
In the New Function case, this subroutine executes before the recording just in case there is no code associated with the record.
In the Delete Function case, the subroutine executes after the effective deletion and if this has not occurred due to an error.
The subroutine must be catalogued in the MV Account.
SUBROUTINE PARAMETERS:
SUB.LK.MAIN.NEWRECOVERRECORDID.CUSTOM(CUSTOMERROR,ID.SESSION,BF.SESSION,TYPE,CUSTOMVAR,FILENAME,RECORD,RECORDID)
•CUSTOMERROR: This is the output argument with the error that the admin wants the client to receive. If this variable is not null, the requested operation will abort. •ID.SESSION: This is the Session code of the client who wants to make the petition. If the used Function is not persistent this code will be "VOLATILE". •BF.SESSION: This is the MV Buffer session. These buffer fields are defined in the source code SESSION BUFFER Section. •TYPE: Input Argument with NEW or RECOVER options. •CUSTOMVAR: This is the argument that comes from the client, for free use by the administrator. •FILENAME: This is the operation file name. •RECORD: This is the MV Buffer record to write or delete in the file. •RECORDID: In the case of the entry for the New function, this is the exit argument where the new registry code is located. In the case of the Delete function, the deleted registry code is included in this argument. |
SUB.LK.MAIN.WS.IDENTITY.RESOURCES
This subroutine is only useful if Linkar Web Service is used under OAuth 2.0 au-thentication mode. In Identity Resource section of this mode is where users, as well as their claims and scopes, are defined.
Linkar Web Services permite gestionar la autenticación y autorización de los usuarios desde el Identity Resource o desde esta Subrutina Basic.
The subroutine must be catalogued in the MV Account.
SUBROUTINE PARAMETERS: SUB.LK.MAIN.WS.IDENTITY.RESOURCES(ERROR,ID.METHOD,USERNAME,INFODATA,INDATA,OUTDATA)
•ERROR. This is the output argument with the error that the Admin wants to send to the client. •ID.METHOD. This is the method that has to be executed: oLOGIN. To authenticate the user. oGET.USER. To obtain user data needed by Linkar Web Services. Similar to LOGIN. oREGISTER. This is where all data ends when a user is created in Client. oFORGOT.PASS. To manage password change. oCHANGE.PASS. To manage password change. •USERNAME. User code that access from Client. •INFODATA. Buffer MV with the following information: clientid, in Identity Resource, scopes requested by client, call url and call body. •INDATA. Input Buffer MV containing specific information about every method. More information in the routine itseld, where all equate sentences are coded. •OUTDATA. Output Buffer MV containing information of the method called. There is specific information as well through equates in the subroutine source code.
|
This subroutine is only used for demonstration purposes. It has 3 arguments:
•SECONDS: The time to create a waiting time with SLEEP. With this argument, we can see the function of the asynchronous calls, which allows other operations to be made while this is running. A timeout can also be forced to see how the errors appear in the Client. •DOWN. Any String. •UPPER. Output variable that returns the capital letters of the DOWN argument.
SUBROUTINE SUB.DEMOLINKAR(SECONDS,DOWN,UPPER) SLEEP SECONDS UPPER=OCONV(DOWN,"MCU") RETURN |
|