on 11-05-2020 8:59 AM
Hi Experts,
I have a requirement to auto-complete a task if the User doesn't process the task within stipulated timelines? I want to utilize the Boundary Timer Event for this. Also, if the user doesn't process the task, I want to trigger this event and consequently call a Service Task to update the table with the status. I have implemented the functionality; but my database table is not getting updated with the value.
Here is the screenshot of the flow:
Regards,
Karan
I changed the format of status to object and it worked. Thanks tobias.breyer and archana.shukla for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This should have worked and even I see from the documentation that ${context} should also be ok, but there is another mention in the documentation: "If the request variable contains a primitive JSON type (number or string) or literal (null, true, or false), the service must accept an HTTP body following RFC 8259 instead of the older RFC 4627" - If it it does not help, please raise the ticket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried switching to the V2 OData version as well; considering my service was exposed as V4. However, the same error persists. Will raise an incident for the same; if more tries do not work out soon. Below is the error log I get.
Thanks archana.shukla for your valuable inputs.
The HTTP request to http://service/v2/installation/InstallationDetails('12350')' failed with status code 400 (Bad Request) and response body '<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Bad Request</pre> </body> </html> '.
Hello Karan,
There could be multiple reasons for it. (a) Does your service call really need XSRF token? If not then you do not have that field filled in service task configuration, (b) If your service call needs XSRF token, then you need to ensure that the response of the XSRF URL returns x-csrf-token as one of the header param. (c) Check you destination configuration once? (d) hope you API call does not have any request header params?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks archana.shukla for the response. I removed the XSRF token value and made it blank.
I am passing : ${context} in the Request Variable and ${context.response2} in the response variable.
This is the code written in the script file before the service task call is performed.
$.context.status = "abc"
However I am getting the below error and autocomplete doesn't work; Any suggestions.
response body '{"error":{"code":"null","message":"Error while deserializing payload. Value for structural type must be an object."}}'
> response body '{"error":{"code":"null","message":"Error while deserializing payload. Value for structural type must be an object."}}'
I think you are not correctly following the structural requirements of the service that you call. From the wording, I would say it expects an object but receives a primitive type. As Archana outlines below, some JSON based services accept primitive types (those implementing RFC 8259), but many, I guess, need objects (RFC 4627).
When you use ${context.status} and status is just "abc" and similar, then it is the RFC 8259 case. When you use ${context}, it is the RFC 4627 case, as the context is in this case always serialized as an object. It will probably look similar to
{
"status": "abc"
}
On topic of these two cases, a receiving service might complain about that payload when it expects "status" to be an object, like
{
"status": {
"mainstatus": "COMPLETED",
"substatus": "success"
}
}
But you need to check the requirements of the targeted service what is allowed.
Tobias,
Below payload in Postman is working fine for the PUT method of the service.
{
"Status": "Completed"
}
Any suggestions on what could be passed? The service is developed using CAPM and using HDI Instance on CF (Tables on Cloud). The status is being changed using the script task before calling the Service task; as $.context.status = "Completed"
Yeah this is because you cannot use ${context} directly. you need to use some variable inside the context like ${context.node1}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And do you have execution of that task in your workflow log in "Monitor instances" application?
If yes - was it performed correctly, or it ends up in error?
If performed correctly, then it is probably error in service itself - try to call it from GW Client and debug it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The service is created on HANA Cloud DB using HDI Service. However; I am unable to fetch the token for it. Getting the below error.
The service is running fine standalone and from postman client.
xsrferror.png; Any idea; what could be the issue?
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.