How to get options that work in SharePoint workflows

I am trying to create my own workflow action with an output parameter for error handling. Working from different examples, I cannot get the Direction = "Out" parameter to work. Everything seems to be correct, but when I try to assign the output to the error variable in SharePoint Designer, it places asterisks around it and places it as a workflow error. Here's what the XML action looks like:

<Action Name="Create Folder" ClassName="ActivityLibrary.CreateFolderActivityTest" Assembly="ActivityLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxx" AppliesTo="all" CreatesInList="ListId" Category="Custom"> <RuleDesigner Sentence="Create a folder %1 in the %2 base folder. If an error occurs it will be output to %3."> <FieldBind Field="FolderName" Text="folder name" Id="1" /> <FieldBind Field="BaseFolderPath" Text="folder path" Id="2"/> <FieldBind Field="OutError" DesignerType="ParameterNames" Text="out error" Id="3"/> </RuleDesigner> <Parameters> <Parameter Name="FolderName" Type="System.String, mscorlib" Direction="In" /> <Parameter Name="BaseFolderPath" Type="System.String, mscorlib" Direction="In" /> <Parameter Name="OutError" Type="System.String, mscorlib" Direction="Out" /> </Parameters> </Action> 
+4
source share
3 answers

I think you might need Direction = "InOut" from the appearance of the binding

+1
source

Are you sure that the problem is with the parameters and, possibly, with the variable in SPD? Of course, nothing works with your XML.

I always hated the way SPD and workflows force you to create a variable in the workflow and another on the page to assign the same value as the workflow variable.

0
source

Did you handle this? I suspect the problem is more likely with your boolean code than with this xml (.actions) file. It looks quite acceptable to me.

0
source

Source: https://habr.com/ru/post/1276363/


All Articles