Processing a Service RequestPreconditions:
Example: Processing a Service Request for the Ticket Creation using the JSON data format. Processing a Service Request follows this pattern:
Accepting a RequestTo send a service requests from your client application which is accepted by Valuemation you have to set the following:
Logging in a User with Provided CredentialsThe following parameters in the request body involve a successful user login into Valuemation:
{ "accessToken":"abc+-123!?", "username": "wstest", "password": "6AD6509DB447B03C1CAAF7D3C40DAE08", "encrypted":"Y", "service": "CreateTicket", "params": { "ticketclass": "Incident", "tickettype": "Complaint", "statementtype": "Information", "tckShorttext": "Monitor is broken", "description": "Only shows a black screen.", "persnoReqBy": "P-90007" } } Note: The password encryption is managed by the 'runCrypto' application which can be found in the root folder of the Valuemation installation.
Validating the Service RequestWhen Valuemation validates the service request, it determines the web service client by the provided 'access token' and checks for the correctly assigned user and the web service. The following parameters are involved:
{ "accessToken":"abc+-123!?", "username": "wstest", "password": "6AD6509DB447B03C1CAAF7D3C40DAE08", "encrypted":"Y", "service": "CreateTicket", "params": { "ticketclass": "Incident", "tickettype": "Complaint", "statementtype": "Information", "tckShorttext": "Monitor is broken", "description": "Only shows a black screen.", "persnoReqBy": "P-90007" } } For reference, see the following matches between the parameters and the definitions in Valuemation: See also the Web Service Client in the Edit View topic.
Applying the Authorization ModeIn this step, Valuemation checks if the special 'Web Service' roles or the standard roles have to be used during the service execution. Note that this definition is not a part of the service request body but it is part of the web service assignment and the web service client context. See also the Web Service Authorization section.
Starting the Workflow Associated with the ServiceFinally Valuemation starts the workflow associated with the Web Service. Once the workflow has been executed, it will send some responses. See the Sending a Response topic.
Sending a ResponseIf the service request was processed successfully, the correct result would look as follows: { "result": { "score": "success", "data": { "ticketno": "IN-0000070", "id": "Ticket-216170#" }, "id": "WS_REST_CreateTicket_0", "locale": "en_US" }, "returnCode": "00", "timing": { "total": 1275, "authByLogin": 164 } } In case of the service request failure, variety of return codes can inform you about the exact cause of the problem. See the Return Codes topic for details.
| ||||||||||||