Hello!
I have a complex situation that needs to be resolved or worked around regarding Nintex internal variable {Common:ApprovalUrl}.
Situation:
There is a library that contains data. Data is written into the library by an external application. At arrival (when data row in library is created) a main workflow is started.
There are 7 sub workflows that can be started from the main workflow, according to current item data. Only one is started per time the main workflow is started. The sub workflows contains 1-6 approval steps (a "zero" step is also supported, therefore 7 different sub workflows).
Inside the sub workflow, mail templates (text) are fetched from a SharePoint list into variables (headers: single line, mail bodies: multiple lines). The mail templates contains placeholders, that are changed according to current item data.
During workflow execution, there are complex replacements of the placeholders, e.g. comma replacements (because of the possibility of commas in current item's data that will interfere with fn-Replace() functionality, although we are using {TextStart} and {TextEnd}) and building of URLs. This happens before Flexi tasks are executed. The messages in Flexi task are replaced by variable content.
This is the idea of how it should work.
And it does, most of the time.
Problem:
For some reason {Common:ApprovalUrl} is not always replaced (hence, replace happens programmatically BEFORE the Flexi task is executed). The mail template contains a placeholder ¤¤ApprovalUrl¤¤ that should be replaced by the Nintex variable / placeholder {Common:ApprovalUrl}.
Mostly {Common:ApprovalUrl} IS replaced by the correct link.
Sometimes the mail contains the text {Common:ApprovalUrl} instead of ¤¤ApprovalUrl¤¤, i.e. the replace commands are working.
Sometimes the whole mail content is replaced by only a GUID (that I cannot trace back to anything). E.g. the mail normally consist of 10-15 rows of text, this last scenario replaces all the lines with only the GUID.
Question:
How can I ensure that SharePoint / Nintex really HAS filled in the URL into the {Common:Approval}- internal variable?
I have tried to add "Wait for 1 minute" tasks right before the Flexi tasks (before using the mail variables in Flexi tasks, but after the complex replace executions) and I've noticed some improvements. But occasionally the problem still remains.
Can anybody help me with this?
Greetings,
Sören,