19
Views
7
Comments
Solved
Extension returning a record
Application Type
Service
Service Studio Version
11.10.6 (Build 37198)

Hi everyone!

We are creating an extension that receives some simple inputs and returns a record.

We are getting an error in the ToXml procedure in "Records.cs".

These are the steps we took.

In the Integration Studio, we defined a structure. With the purpose to simplify the scenario, we created a simple structure.

The action was defined as follows:

After pressing "edit source code", this was the code generated for the action: 

When we build the project, we get the following error:

ErrorCS1503Argument 1: cannot convert from 'OutSystems.NssRulesEngine.RCStr_OutputRecord' to 'OutSystems.NssRulesEngine.Object'RulesEngineC:\Users\nuno.guedes\AppData\Local\Temp\75a812cf-7beb-461d-a92c-27c654adbc21\Source\NET\Records.cs163Active

The error is in "Records.cs", as I understand it, this file is created automatically by OutSystems and should not be changed. Even because all changes are lost when we try to publish.

What are we missing?
Has anyone encountered the same issue?

Thank you for your help.

Nuno Guedes



Rank: #4371
Solution

I was analyzing the project and I realized that there was an incorrect class with the name "Object" used to deserialize an xml. Renaming the class solved the problem.

Thanks for your help.

Hi Nuno,

Good morning!

What does thw structure looks like?

Kind regards,

Chris

Rank: #4371

Hi Chistopher, the structure used for this scenario is very simple, it has 3 text attributes (see the first image).

Best regards,

Nuno Guedes

Rank: #297

Hi Nuno

I tried to reproduce your problem, but no success.

The extension file attached, It successfully published without any issue. Can you check it?

If no difference, maybe your development environment somehow goes wrong.

Can you share the extension file and tell us about your development environment information?

Such as version of Integration Studio, Outsystems Platform, Visual Studio, etc.

Kind Regards


Extension.xif

Hi Nuno,

Tom's suggestion makes sense, I just looked at the C# code of Tom's extension and yours and it seems the codes generated are very much different. 

I tried at my end as well and I'm encountering the same issue as yours.

As Tom mentioned, I think this is a Integration Studio issue.

This is the version that I installed in my laptop.

Hope this helps,

Kind regards,

Chris

Rank: #4371

Hi Tom

I downloaded your extension and compared file by file, I found no differences.

I created a new extension and it worked correctly.

I was analyzing the project and I realized that there was an incorrect class with the name "Object" used to deserialize the xml. Renaming the class solved the problem.

Thanks for your help.


Rank: #297

Hi Nuno

I'm glad to hear you solved the problem.

Kind Regards,

Rank: #4371
Solution

I was analyzing the project and I realized that there was an incorrect class with the name "Object" used to deserialize an xml. Renaming the class solved the problem.

Thanks for your help.