Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
7 subscribers
Views
3343 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
Web API to Update Data of DB
aloks0189
Certified Lead Developer
over 8 years ago
Hi,
I have a requirement where i need to Update the data of the Database using Web-API, for that i created a Web API using POST method having a!writeToDataStoreEntity() function configured.
Problem Statement:- when i pass the JSON Format data into body field of Web API, it works Well, but whenever i am trying to do the same using an Expression rule where i have defined a rule input of type text where specified value is the same JSON which i used earlier, then nothing gets Update in database and also no log informations about it, and it returns Writer Type followed by following Value
[name=httpwriter_appian_internal, parameters=http://localhost:port/suite/webapi/storeEmployee; POST; ; ; [username=[externalSystemKey=mycredentials, fieldKey=username, usePerUser=false], password=[externalSystemKey=mycredentials, fieldKey=password, usePerUser=false], preemptive=true];followed by Data
...
OriginalPostID-244534
Discussion posts and replies are publicly visible
Parents
0
aloks0189
Certified Lead Developer
over 8 years ago
@stefanh791 Actually i was pulling the Complete Employee Details from DB using Web API in Json Format, which contains DOB as well as JoinDate of Type Date , also created a WEB API to update the Employee details, and i was needed to send the Data also in JSON format to Web API in order to get updated, so in such case my existing DOB and Join Date was getting convert into 'yyyy-mm-dd' format while using toJson() which was causing the issue. So the requirement was finally in need to send the Whole CDT in form of JSON where the Existing Date Values must be in Appian format, so for that i created a plugin which did my Job, And Not only for this requirement but also in Any case if we have a Json and need to convert any Date type property value to some other format this can be useful.
Thanks
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
aloks0189
Certified Lead Developer
over 8 years ago
@stefanh791 Actually i was pulling the Complete Employee Details from DB using Web API in Json Format, which contains DOB as well as JoinDate of Type Date , also created a WEB API to update the Employee details, and i was needed to send the Data also in JSON format to Web API in order to get updated, so in such case my existing DOB and Join Date was getting convert into 'yyyy-mm-dd' format while using toJson() which was causing the issue. So the requirement was finally in need to send the Whole CDT in form of JSON where the Existing Date Values must be in Appian format, so for that i created a plugin which did my Job, And Not only for this requirement but also in Any case if we have a Json and need to convert any Date type property value to some other format this can be useful.
Thanks
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data