Map to Schema for Rest API not working
I am trying to map the response from my rest api to a data entity and it is not working. The data is not showing up on the data entity. And when I go check if the application ran I get this: Failed to publish InvokeSetCustomAttrEventHandlers, event=UpdatingCustomAttributes, before=<?xml version="1.0" encoding="utf-8"?><ArrayOfNameValue xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><NameValue><Name>eForm</Name><Value xsi:type="xsd:string">Form Library,choose data</Value></NameValue><NameValue><Name>eForm_Start Task.1_A9D9BC9B41466E1D11998DFF30074CC2</Name><Value xsi:type="xsd:string">Form Library,choose data</Value></NameValue><NameValue><Name>//</Name><Value xsi:type="xsd:string">&lt;pd:AP xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pd="http://www.ascentn.com/bpm/XMLSchema"&gt;&lt;pd:processFields /&gt;&lt;pd:formFields&gt;&lt;pd:DropdownList1&gt;Event id&lt;/pd:DropdownList1&gt;&lt;/pd:formFields&gt;&lt;pd:dataSource&gt;&lt;pd:APDataEntity&gt;&lt;pd:plzwork&gt;&lt;pd:EventData__u&gt;&lt;pd:EventID__u /&gt;&lt;pd:ID /&gt;&lt;pd:NumberofAttendees__u /&gt;&lt;pd:TotalRevenue__u /&gt;&lt;/pd:EventData__u&gt;&lt;/pd:plzwork&gt;&lt;/pd:APDataEntity&gt;&lt;/pd:dataSource&gt;&lt;/pd:AP&gt;</Value></NameValue></ArrayOfNameValue>, after=<?xml version="1.0" encoding="utf-8"?><ArrayOfNameValue xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><NameValue><Name>//</Name><Value xsi:type="xsd:string">&lt;pd:AP xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pd="http://www.ascentn.com/bpm/XMLSchema"&gt;&lt;pd:processFields /&gt;&lt;pd:formFields&gt;&lt;pd:DropdownList1&gt;Event id&lt;/pd:DropdownList1&gt;&lt;/pd:formFields&gt;&lt;pd:dataSource&gt;&lt;pd:APDataEntity&gt;&lt;pd:plzwork&gt;&lt;pd:EventData__u&gt;&lt;pd:EventID__u&gt;62229666608&lt;/pd:EventID__u&gt;&lt;pd:ID /&gt;&lt;pd:NumberofAttendees__u /&gt;&lt;pd:TotalRevenue__u /&gt;&lt;/pd:EventData__u&gt;&lt;/pd:plzwork&gt;&lt;/pd:APDataEntity&gt;&lt;/pd:dataSource&gt;&lt;/pd:AP&gt;</Value></NameValue></ArrayOfNameValue>,exception=System.InvalidOperationException: <AgilePointServerException>Value was either too large or too small for an Int32.</AgilePointServerException> ---> System.OverflowException: Value was either too large or too small for an Int32. at Ascentn.Workflow.Data.WFDataAccessLayer.ConvertToType(Object source, WFPropertyMetadata propertyMetadata, WFEntity ent) at Ascentn.Workflow.Data.WFDataAccessLayer.<>c__DisplayClass65_0.<InsertEntity>b__2(KeyValuePair`2 p, WFEntityColumn c) at System.Linq.Enumerable.<JoinIterator>d__38`4.MoveNext() at Ascentn.Workflow.Data.WFDataAccessLayer.InsertEntity(WFEntity ent) at kg.CreateEntity(WFCreateEntityRequest createEntity) --- End of inner exception stack trace --- at kg.a(Exception A_0, WFEntityFrameworkRequest A_1) at kg.CreateEntity(WFCreateEntityRequest createEntity) at AgilePoint.AgileExtender.DataSources.APEntityDataSourceExtender.AgilePoint2DataEntityEx(Object sender, WFUpdateCustomAttributesEventArgs args) at AgilePoint.AgileExtender.DataSources.APEntityDataSourceExtender.OnUpdatingCustomAttributes(Object sender, EventArgs e) at Ascentn.Workflow.Base.WFProcessPluggableAdapter.OnUpdatingCustomAttributes(Object sender, EventArgs e) at an.s(cn A_0, String A_1, WFProcessInstance A_2, WFCustomAttributes A_3, WFCustomAttributes A_4, IWFActivityInstance A_5, NameValue[] A_6, String A_7, String A_8, String A_9, String A_10, WFUserContext A_11).--->Core.RaiseInvokeSetCustomAttrEventHandlers
Please Help
-
Max length of 1000 seems to be correct configuration for storing the Event ID '62229666608’. I gave a try now to set the same value '62229666608’ to a Data Entity column of length 1000 and worked.
Can you elaborate on the process model design and configuration of the activities. It would help us to analyse more on the observation.
Also, can you give a quick try to insert a record directly in the Data Entity with just the value for Event ID and confirm if that works?
-
It does work when I insert a record directly in the Data Entity.
The process-based app is triggered by e-forms. The first process is going through an eform, and it's just a dropdown list with event id being the first value and I just click submit so the next process can run. The next process is the rest api where i am using the GET action and I am 100% certain that the rest api is connected to eventbrite. When i go to 'Map to Schema' i make sure the 'id data from eventbrite is mapped to EventID_u, but for some reason it is not transferring eventbrite data to agilepoint
-
Leo,
Thank you for the application and Data Entity structure over the emails. Our Team figured out the missing part, You Entity is designed to have 'Eventbrite Data' as primary key which means this value cannot be empty. For experimenting we connected the Event name text value to 'Eventbrite Data' and verified that Application and DataEntity design works together fine. I am attaching screenshots for you reference.
Regards.
Your DataEntity design has mandatory field due to Primary Key column.
This column doesn't have a mapping and the values are getting in as empty.
Mapped to event name for verifying.
After publishing and testing, DataEntity has the record of your EventBrite data.
-
Hi,
Can you please explain to me how did you save REST data into the DataEntity? I have created a process flow where I have first mapped REST Data to my data entity using REST activity then I am using an eForm activity to display REST Data on the form. But my data is not being saved in the data entity, so I am stuck here.
Please help me.
Thanks,
-Manoj
Please sign in to leave a comment.
Comments
9 comments