I have a node where I want to update process variable at runtime.
This is the expression I have written
a!save(pv!Schedule_1_Temp_Value,pv!Schedule_1_Temp_Value + 1)
but, I am getting this page (below) when I run this process model in debug mode.
Discussion posts and replies are publicly visible
There's likely two problems here. First, you can only use a!save() in an interface. If you want to save into a process variable, you should use a script task and add a Data > Output. Using the output you can create any expression and save the results into a process variable. The second issue is that whatever node you're using doesn't have the correct kind of form. If you truly are just updating a process variable directly, you shouldn't have a form at all.
If you still have questions, can you provide more information about your configuration? Where did you configure that expression? What does your process do? Can you share screenshots of what you configured?
Are you using a Script Task as your node? If so, you can just put "pv!Schedule_1_Temp_Value + 1" in the script and store the value to the pv!, like this:
Hi Peter Lewis,
Actually, I am using MS Word 2007 Doc From Template smart service. At one of its tag (i.e Schedule_1) I and trying to writer expression which can dynamically update process variable so that each time the control comes at that tag it gets updated value from process variable which I am trying to update dynamically.
MS Word 2007 Doc From Template :
Schedule_1 tag expression editor :
This is not a valid place in which to try to update your PV. You'd need to do it in your Data / Output tab at least, though if it were me I'd leave it out of the MS Word from Template node altogether and update the value in its own script task afterwards in the style Stewart Burchell already illustrated in another comment here.
Is there any way I can identify how may times this tag (Schedule_1) was invoked in one complete process flow. Or which instance is running currently (at runtime) ?
Like I found tp!instanceindex under Task Properties which gives me how may tasks have been / has to be executer.
I agree with Mike's point above, but in general I'm also not sure you're thinking about these tags correctly. "Schedule_1" is just an input - it determines what value to insert into your Word doc, but it isn't truly a variable. So there's no way to get information about when it was invoked or used - if you complete this node whatever value you provide is always inserted.
Are you trying to create multiple documents at once? Why are you trying to track information like this?
© 2022 Appian. All rights reserved.