Error publishing workflow.

  • 19 August 2022
  • 7 replies
  • 245 views

Hello Everyone,

I'm setting up a simple, simple flow .. shown below.

 

25299iCE37E80B5A8CE351.png

 

When I try to publish it, I get this message:

Error publishing workflow. Unable to cast object of type 'System.Activities.InArgument`1[System.String]' to type 'System.Activities.InArgument`1[Microsoft.Activities.DynamicValue]'.

 

25300i5630429A13FE5A1A.png

Is it because I'm out of memory or something else? .. syntax? .. configuration?

 

Thoughts?

Thanks!

 

 

 

 


7 replies

Userlevel 5
Badge +13

This message usually points to a data type mismatch. What type of field is the "Portfolio - Choice" field?


 


Check out this post to see if it helps: Solved: Error Publishing Workflow - Nintex Community

Ok. Let me check that link out. Thanks!
Userlevel 5
Badge +13

I'm guessing the "Portfolio - Choice" field is a multi-select field. The results of a multi-select field are stored in a collection. So the equals configuration in the Run If won't work and causes the error.


 


Try adding a "Set Variable Value" action before the Run If action. Configure the "Set Variable Value" action by creating a text variable and setting the Value to the "Portfolio - Choice" field. Then configure the Run If expression with the "contains" operator and the workflow variable.


 


Yes.  You're correct about the multi-choice column.  I'll look at your suggestion now.  I've have a feeling you're right on.


 

Userlevel 6
Badge +16

Hi @Underdog 


 


Just to comment on the coding structure. Use a For-Each loop to process the value from your multi-select Choice control



 

Hi @bamaeric,


I thought I'd develop on your line of thinking while I await Garrett's additional input (Garrett, btw, has been unbelievably helpful).


 


So .. just to reiterate, the SPO Column "Portfolio Choice" is a multiple selection column.  You were correct.  As advised, I've established 13 variables and have set the variables (right away) in a "Set Variable" Control.  See below:


 


(this is the first, second & third variables in the flow - the other 10 having the same logic)






 


Next, I established a Switch, with the 13 Departments listed in the Switch.  (Something tells me this may not be the right next step.)



 


Thus, looking like this below, referencing "Portfolio Choice" and listing the 13 Departments (exactly copied from the SPO Column List).



 


Followed by a "Run If" Control, then a "Send E-mail" Control.  Conceptually, am I correct in my flow set up and details within each Control?



Thanks!


 


 


 


 


 


 


 


a


 


 


 


 


 


 


 


 


 


 


 


 


 


 

Userlevel 6
Badge +16

Hi @Underdog 


 


1. The Switch will evaluate one path. The first correct path will end the flow. so your program will only send 1 email and <END>.


2. Better to replace the Switch with a Parallel Block.

Reply