AnsweredAssumed Answered

WF bulk publish issues with in-line funtions in 'build-string'

Question asked by icarus2627 on Jan 27, 2016
Latest reply on Jan 28, 2016 by philipplucas

I've got something strange going on. I’m not sure if anyone is going to be able to help me, but I might as well try.

 

This is what I have in my 'Build String' block:

fn-Length({TextStart}{WorkflowVariable:strWVBasisValue}{TextEnd})

Publishing that workflow, everything is perfect, the grass is green, my workflow works, no problems.

 

But I have to publish this on 15 subsites and this is just one of 5 workflows. Luckily I’ve got a workflows that basicly publishes that workflow where-ever I tell it to. (I didn't write that workflow, my predecessor did) and from what I gather it creates an XML from the workflow in ‘textform’ (other options are to export to inner XML or outer XML) (I’m not an XML expert just yet, and I’m not a fan of altering this workflow because we’ve published hundreds of workflows like this with success). After getting all the info where it should publish the workflow it starts a webservicecall and calls the method ‘PublishFromNWFXml’ from the webservice at “site_url/_vti_bin/NintexWorkflow/Workflow.asmx”.

 

The product of that publish is that in the workflow my code in that ‘build string’ block is changed into “34” because “{WorkflowVariable:strWVBasisValue}” are exactly 34 characters. So instead of putting the formula in the ‘build string’ block, it executes it.

 

A solution to this was given to me in the form of ‘cut the inline function apart in little variables’ so my original function becomes:

 

{WorkflowVariable:FN-}{WorkflowVariable:length}{WorkflowVariable:openbracket}{TextStart}{WorkflowVariable:strWVBasisValue}{TextEnd}{WorkflowVariable:closebracket}

 

Publishing this the normal way results in everything working perfectly.

But if I publish this using the automated way the ‘build-string’ code is yet again altered. This time in the following:

 

{WorkflowVariable:FN-}{WorkflowVariable:Length}{WorkflowVariable:openbracket}e53e721f-4dd6-4248-ba44-3163054154fd{WorkflowVariable:closebracket}

 

If I remove the {TextStart}{TextEnd} parts even automatic publishing works, but then I can’t change any choices where special signs are used.

 

While typing this question I’ve learned a few things. Originally I thought that this service of automatic publishing workflows on numerous locations was a Nintex thing, and it is, given that it’s done using a WebServiceCall, but I had no idea we had some code behind it ourselves. So now I’m thinking, I should open up one of those XML files and see how it behaves there. However, I will not be able to debug that yet. XML is still, for a big part, a mystery to me.

 

It seems I still have some information to add before this question contains enough information. However, perhaps someone else stumbled upon a similar issue.

Outcomes