OData metadata error

On premise orchestrator version v2020.10.7
I believe odata metadata information returned by https://baseOrchestratorUrl/odata/$metadata have error in them

I’m trying to call API that enables/disables Trigger - UiPath.Server.Configuration.OData.SetEnabled
Using Simple.OData.Client.V4 I’m getting error with the request, that it is unabled to map parameter. Looking into metadata

For SetEnabled action mapped to ProcessScheduleDto

<Action Name="SetEnabled" IsBound="true">
<Parameter Name="bindingParameter" Type="Collection(UiPath.Server.Configuration.OData.ProcessScheduleDto)"/>
<ReturnType Type="Edm.Boolean" Nullable="false"/>
</Action>

for SetEnabled action mapped to TestSetScheduleDto

<Action Name="SetEnabled" IsBound="true">
<Parameter Name="bindingParameter" Type="Collection(UiPath.Orchestrator.TestAutomation.Dto.TestSetScheduleDto)"/>
<Parameter Name="enabled" Type="Edm.Boolean" Nullable="false"/>
<Parameter Name="testSetScheduleIds" Type="Collection(Edm.Int64)" Nullable="false"/>
<ReturnType Type="Edm.Boolean" Nullable="false"/>
</Action>

2 lines difference

<Parameter Name="enabled" Type="Edm.Boolean" Nullable="false"/>
<Parameter Name="testSetScheduleIds" Type="Collection(Edm.Int64)" Nullable="false"/>

Creating custom metadata file and adding 2 lines

<Parameter Name="enabled" Type="Edm.Boolean" Nullable="false"/>
<Parameter Name="scheduleIds" Type="Collection(Edm.Int64)" Nullable="false"/>

and loading this custom metadata file into Simple.OData.Client settings, will make it work properly as expected.

So I think these 2 lines are missing in the metadata file. Can this be manually edited on our side in Orchestrator files somehow?

Just to confirm I’m understanding correctly, the two lines were added to the ‘SetEnabled’ action node:

Old action node (doesn’t work):

    <Action Name="SetEnabled" IsBound="true">
    <Parameter Name="bindingParameter" Type="Collection(UiPath.Server.Configuration.OData.ProcessScheduleDto)"/>
    <ReturnType Type="Edm.Boolean" Nullable="false"/>
    </Action>

New (does work):

    <Action Name="SetEnabled" IsBound="true">
    <Parameter Name="bindingParameter" Type="Collection(UiPath.Server.Configuration.OData.ProcessScheduleDto)"/>
    <Parameter Name="enabled" Type="Edm.Boolean" Nullable="false"/>
    <Parameter Name="scheduleIds" Type="Collection(Edm.Int64)" Nullable="false"/>
    <ReturnType Type="Edm.Boolean" Nullable="false"/>
    </Action>

Is this correct?

Also, can you confirm it’s only process schedule that appears to be affected (and not testSetSchedule)

Hi,

Yes, adding those two lines to SetEnabled action for ProcessSchedules makes it work with Simple.Odata.Client.

I did not test SetEnabled for TestSchedule. But its pattern lead me to adding those two lines.

Looking into API documentation and TestSchedule SetEnabled action I believe it is correct

I can confirm this is a bug. If you reach out to me in a private message or to customer support, we can include a fix in the next 20.10 patch.