Skip to main content
Nintex Community Menu Bar

Issue is related to the on prem K2 product / Nintex Automation

When Looping through a list reference we receive no values.

 

Above is the list that we are looping through. I can confirm that this list has values in it as below is the smart object tester result:
 


I can also see that they system by some capacity recognizes the size of the array/List because during the loop I have set it to send an email for each of the items in the array. of which I receive 2.


 

So the data is there, its just not being read correctly

 

are there any work arounds or plans to fix this? your help is much appreciated 

Can we also see how your metro rule result smartobject rule that presumably gets the list reference is setup?


@tbyrne777 thanks for the reply, 

the setup is as follows:

there are two smart objects involved getting this rules results list. the first one below takes an input  and makes an API request to our system. It then returns a result list. 

The result list looks like this initially 

{"$type":"K2_STG.k2RESTidentifier_MetroRuleEngineResulte], K2_STG, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","$values":u{"$type":"K2_STG.k2RESTidentifier_MetroRuleEngineResult, K2_STG, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","ruleName":"testRule","property":"PropertyBacked","successEvent":"green"},{"$type":"K2_STG.k2RESTidentifier_MetroRuleEngineResult, K2_STG, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","ruleName":"PropertyBacked_EQ_False2","property":"PropertyBacked","successEvent":"red"}]}

so then we have a second smart object which should de-serializes this into its correct K2 usable format
 

above we input the wall of text, and output a reference since that's what it seems like the loop is primarily built to handle.

then in the loop we input the reference 
and create an indexed list item

 

and for that item we print some property of that item that we know has a value (see wall of json above)

 



still, unfortunately. No values come through. But the length of the array is recognised!


What function does that Deserialze Typed Array call? Is that something you control, like a web service, our out-of-box K2 function? My thoughts from what I see here is that is the problem spot, it would be helpful if more logging could be implemented there to see what exactly it is parsing out.


Deserialze Typed Array is one of K2s built in object methods

 


The reason we are using this method is because the K2 data type that is returned in this json and parsed into the Deserialze Typed Array method is:

{"$type":"K2_STG.k2RESTidentifier_MetroRuleEngineResultu], K2_STG, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","$values":s{"$type":"K2_STG.k2RESTidentifier_MetroRuleEngineResult, K2_STG, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","ruleName":"testRule","property":"PropertyBacked","successEvent":"green"},{"$type":"K2_STG.k2RESTidentifier_MetroRuleEngineResult, K2_STG, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","ruleName":"PropertyBacked_EQ_False2","property":"PropertyBacked","successEvent":"red"}]}

and this is of type: MetroRuleEngineResults]

so I would assume we have to use this method to deserialize it. 

I am sure this works to some degree because when using the smart object tester on the server if I pass this json into the Deserialze Typed Array method I get back the expected result

 



I am also sure that this is indeed the value that gets passed into the method as I have done some logging (by means of sending myself an email) of the variable that gets passed in. see below:

 

 

assigning rulesEngineResults


 

sending myself rules engine results:


 

receiving rules engine results:
 



now if I pass this json text into the smart object tester it works.

if I pass the variable (containing the json) into the smart object (the one on the workflow) it doesn't

 

 

 


You are definitely going through the same motions I would do to trouble shoot this! One thing to try is if you hardcode that json you are sending instead of using the variable to see if you get a different result. Maybe storing it in a variable is stripping some value needed to parse the individual property values.


unfortunately @tbyrne777 no luck with that test,


still no values

 


@tbyrne777  are you able to replicate this issue on your end? I think there are many public swagger docs that you will be able to create smart objects from. eg. https://petstore.swagger.io/#/

I think this may need to be raised as a bug otherwise, unless there are some more external factors effecting our workflow that we aren't recognising 


I’ll see if I have time to reproduce it, but I would go ahead and open a ticket with Nintex and see if there is some small thing we are missing. Please report back here if you get any results from the ticket


thanks for your help,
where should I open that ticket at? do you have a link to their support portal 


You should be able to do so here, though you’ll need a valid customer account: https://customer.nintex.com


Reply