Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82367

Mendix model api error in modeler when using microflowCallParameterMapping

$
0
0

 

I used the model api to generate code for creating a microflow. The code included:

        var microflowCallParameterMapping1 = microflows.MicroflowCallParameterMapping.create(model);
        microflowCallParameterMapping1.argument = "'CodeGenerator.NavigateToWelcome'";

        var microflowCall2 = microflows.MicroflowCall.create(model);
        microflowCall2.microflow = model.findMicroflowByQualifiedName("Component_PageView.ChangeCurrentPage");
        microflowCall2.parameterMappings.push(microflowCallParameterMapping1);


The code run's, but after updating in de Modeler I get the error:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Mendix.Modeler.Microflows.MicroflowCallParameterMappingBase`4.CollectUsages(UsagesInfo usages) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Core\Microflows\Common\MicroflowCallParameterMapping.cs:line 61
   at Mendix.Modeler.Common.Usages.<>c__DisplayClass1_0.<Collect>b__0(IHasUsages usageProvider) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Core\Common\Usages\Usages.cs:line 38
   at Mendix.Modeler.Storage.Operations.TypeWalk.ForEachObjectDo(IStorageObject root, Func`2 work, Boolean skipExcludedObjects) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Storage\Operations\TypeWalk.cs:line 87
   at Mendix.Modeler.Storage.Operations.TypeWalk.ForEachObjectDo(IStorageObject root, Func`2 work, Boolean skipExcludedObjects) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Storage\Operations\TypeWalk.cs:line 92
   at Mendix.Modeler.Storage.Operations.TypeWalk.ForEachObjectDo(IStorageObject root, Func`2 work, Boolean skipExcludedObjects) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Storage\Operations\TypeWalk.cs:line 92
   at Mendix.Modeler.Storage.Operations.TypeWalk.ForEachObjectDo(IStorageObject root, Func`2 work, Boolean skipExcludedObjects) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Storage\Operations\TypeWalk.cs:line 92
   at Mendix.Modeler.Storage.Operations.TypeWalk.ForEachObjectDo(IStorageObject root, Func`2 work, Boolean skipExcludedObjects) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Storage\Operations\TypeWalk.cs:line 92
   at Mendix.Modeler.Storage.Operations.TypeWalk.ForEachObjectDo(IStorageObject root, Func`2 work, Boolean skipExcludedObjects) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Storage\Operations\TypeWalk.cs:line 92
   at Mendix.Modeler.Storage.Operations.TypeWalk.ForEachObjectDo(IStorageObject root, Func`2 work, Boolean skipExcludedObjects) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Storage\Operations\TypeWalk.cs:line 92
   at Mendix.Modeler.Storage.Operations.TypeWalk.ForEachObjectDo(IStorageObject root, Func`2 work, Boolean skipExcludedObjects) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Storage\Operations\TypeWalk.cs:line 92
   at Mendix.Modeler.Storage.Operations.TypeWalk.ForEachObjectDo(IStorageObject root, Func`2 work, Boolean skipExcludedObjects) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Storage\Operations\TypeWalk.cs:line 92
   at Mendix.Modeler.Storage.Operations.TypeWalk.ForEachObjectDo(IStorageObject root, Func`2 work, Boolean skipExcludedObjects) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Storage\Operations\TypeWalk.cs:line 92
   at Mendix.Modeler.Common.Usages.Collect(IStorageObject obj) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Core\Common\Usages\Usages.cs:line 35
   at Mendix.Modeler.Common.Problems.Check(IProject project) in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Core\Common\Problems\Problems.cs:line 68
   at Mendix.Modeler.Common.BackgroundChecker.DoCheck() in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Core\Common\Problems\BackgroundChecker.cs:line 116
   at Mendix.Modeler.Common.BackgroundChecker.Check() in C:\jenkins\workspace\Modeler-Build\modeler\Mendix.Modeler.Core\Common\Problems\BackgroundChecker.cs:line 86

And after this the project is unable to be used.

Full project is available at https://github.com/JAM-IT-NL/MendixModelAutomater

Anybody now a fix?


Viewing all articles
Browse latest Browse all 82367

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>