Dictionary getting null value

I am initializing a dictionary in my process and set it as an output argument ( i checked that the direction is out)

this is the value it gets in the process workflow

however, as soon as we leave the process, the value is set to null

i don’t understand why as i did not modify it

this is my assign value :

out_DictOutput = New Dictionary(Of String, Object) From {{“Id”, in_TransactionItem.SpecificContent(“Id”).ToString()},{“SM”, “NOK”}, {“Inv”, AbArray}, {“Fact”, “NOK”}, {“Trs”, “”}, {“Trsb”, “”}, {“Message”, “”}, {“Url”, “”}, {“Progress”, “”} }

thank you

Hi @adext ,

Could you also maybe show the value from Debug Panel once the control is out of the Process workflow ?

Also, Make sure there are no variables with the same name present in the Main workflow or outside the Process workflow.

hello

here is the value as soon as i leave the process

(my output value = “DictValue” parameter in process)

  • I assign my out_dictouput in beginning of process
  • my process throws an exception during the process
    is that the reason why it won’t pass the output value ?

Have you checked that the direction for your argument out_DicOutput is “Out” and not “In”?

image

yes it is out

@adext ,

Yes. The values are not returned which are assigned within the workflow. For cases with Business Exception, we can pass the values to the Exception variable as a Dictionary but for System Exceptions as it is not known/unexpected, we won’t be able to retrieve the values.

For a Business Exception case, we can do the below :

Hi! Sorry, I missed the part where it throws an exception. When an exception occurs, nothing is returned.

To get around you need to initialize the object first before Invoke workflow and then pass the object to the workflow. Inside the workflow, you can modify the object.

the dictionary will be sent to another app in the set transaction status, i need to have this data

should i put the whole directionary in exception data ?

also open to any other suggestion

Initiate the dictionary before the Process workflow and pass it as In/Out argument. Then it will be passed correctly back even if there are exceptions.

perfect, worked thank you

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.