Summary
Running mdl-examples/doctype-tests/10-odata-examples.mdl against a project leaves the project in a state that crashes Studio Pro's background project checker with a System.NullReferenceException in Mendix.Modeler.Integration.CallExternalAction.get_SchemaAction().
The crash blocks all in-IDE error reporting (the checker dies before reporting any problems), so the project appears 'silent' even though Studio Pro is actually unable to evaluate it.
Stack trace
System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.)
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Mendix.Modeler.Integration.CallExternalAction.get_SchemaAction() CallExternalAction.cs:35
at Mendix.Modeler.Integration.ExternalActionParameterMapping.get_SchemaParameter() ExternalActionParameterMapping.cs:23
at Mendix.Modeler.Integration.ExternalActionParameterMapping.Check(IProblems problems) ExternalActionParameterMapping.cs:40
at Mendix.Modeler.Storage.TypeWalks.TypeWalk.ForEachObjectDo[TObject](...)
...
at Mendix.Modeler.Core.View.Problems.BackgroundCheckRunner.Check(IProject project, CancellationToken)
Root cause
The example file's Level 9.1 generates a microflow OdTest.ACT_CallExternalAction containing two call external action activities against OdTest.SalesforceAPI:
$Result = call external action OdTest.SalesforceAPI.GetAccounts(status = 'active', Region = $SelectedRegion);
call external action OdTest.SalesforceAPI.NotifyUpdate(AccountId = $AccountId) on error continue;
OdTest.SalesforceAPI is created in Level 8.1 with MetadataUrl: 'https://api.salesforce.com/odata/v4/$metadata' — a placeholder URL that doesn't actually return an OData $metadata document. After CREATE ODATA CLIENT, the resulting Rest\$ConsumedODataService BSON has:
{
\"Metadata\": \"\",
\"MetadataHash\": \"\",
\"Validated\": false,
\"MetadataReferences\": [0],
\"ValidatedEntities\": [0],
...
}
i.e. the cached \$metadata schema is empty.
When Studio Pro's ExternalActionParameterMapping.Check() runs, it walks via Action.SchemaAction.Parameters[…]. SchemaAction is computed by looking up Name against the consumed service's cached schema actions — with an empty cache, the lookup returns null. Studio Pro then dereferences null instead of reporting a missing-action problem, and the entire background checker aborts.
By contrast, TripPinClient.TripPinApiClient (also in the file, Level 10.1) points at the reachable TripPin RW service, so its Metadata field holds the full $metadata XML, and any actions called against it would resolve correctly.
Two responsible parties
- The MDL example file references actions on a service whose
\$metadata never resolves. Even if Studio Pro null-checked, the resulting model would still be broken-but-checkable.
- Studio Pro (
CallExternalAction.get_SchemaAction / ExternalActionParameterMapping.Check) should null-check and report a real problem (e.g. "schema action `GetAccounts` not found in service `OdTest.SalesforceAPI`") rather than NREing and killing the checker. This is an upstream robustness gap — would be useful to file with Mendix support.
Scope of this issue
Fix the example file (rewrite Level 9.1 to use TripPinClient.TripPinApiClient and real TripPin schema actions: GetNearestAirport for the parameterised variant, ResetDataSource for the on error continue variant). The Studio Pro NRE is tracked separately as something to escalate upstream — this issue does not block on it.
Steps to reproduce
- Open any blank Mendix 11.x project.
- Run
mxcli exec mdl-examples/doctype-tests/10-odata-examples.mdl -p <project>.mpr.
- Open the project in Studio Pro.
- Wait for background project check to run.
- Observe
System.NullReferenceException aborting the checker.
Expected behaviour
The example file should produce a project that opens cleanly in Studio Pro and yields valid model checks (possibly with warnings, but no NRE).
Environment
- mxcli version: tip of
main (commit cf0ab070)
- Mendix version: 11.x (test6 fixture at 11.10.0)
- Reference data:
/workspaces/ModelSDKGo/mx-test-projects/test6-app
Summary
Running
mdl-examples/doctype-tests/10-odata-examples.mdlagainst a project leaves the project in a state that crashes Studio Pro's background project checker with aSystem.NullReferenceExceptioninMendix.Modeler.Integration.CallExternalAction.get_SchemaAction().The crash blocks all in-IDE error reporting (the checker dies before reporting any problems), so the project appears 'silent' even though Studio Pro is actually unable to evaluate it.
Stack trace
Root cause
The example file's Level 9.1 generates a microflow
OdTest.ACT_CallExternalActioncontaining twocall external actionactivities againstOdTest.SalesforceAPI:OdTest.SalesforceAPIis created in Level 8.1 withMetadataUrl: 'https://api.salesforce.com/odata/v4/$metadata'— a placeholder URL that doesn't actually return an OData$metadatadocument. AfterCREATE ODATA CLIENT, the resultingRest\$ConsumedODataServiceBSON has:{ \"Metadata\": \"\", \"MetadataHash\": \"\", \"Validated\": false, \"MetadataReferences\": [0], \"ValidatedEntities\": [0], ... }i.e. the cached
\$metadataschema is empty.When Studio Pro's
ExternalActionParameterMapping.Check()runs, it walks viaAction.SchemaAction.Parameters[…].SchemaActionis computed by looking upNameagainst the consumed service's cached schema actions — with an empty cache, the lookup returnsnull. Studio Pro then dereferencesnullinstead of reporting a missing-action problem, and the entire background checker aborts.By contrast,
TripPinClient.TripPinApiClient(also in the file, Level 10.1) points at the reachable TripPin RW service, so itsMetadatafield holds the full$metadataXML, and any actions called against it would resolve correctly.Two responsible parties
\$metadatanever resolves. Even if Studio Pro null-checked, the resulting model would still be broken-but-checkable.CallExternalAction.get_SchemaAction/ExternalActionParameterMapping.Check) should null-check and report a real problem (e.g. "schema action `GetAccounts` not found in service `OdTest.SalesforceAPI`") rather than NREing and killing the checker. This is an upstream robustness gap — would be useful to file with Mendix support.Scope of this issue
Fix the example file (rewrite Level 9.1 to use
TripPinClient.TripPinApiClientand real TripPin schema actions:GetNearestAirportfor the parameterised variant,ResetDataSourcefor theon error continuevariant). The Studio Pro NRE is tracked separately as something to escalate upstream — this issue does not block on it.Steps to reproduce
mxcli exec mdl-examples/doctype-tests/10-odata-examples.mdl -p <project>.mpr.System.NullReferenceExceptionaborting the checker.Expected behaviour
The example file should produce a project that opens cleanly in Studio Pro and yields valid model checks (possibly with warnings, but no NRE).
Environment
main(commitcf0ab070)/workspaces/ModelSDKGo/mx-test-projects/test6-app