Hey All.
I have requirement to manipulate the process variables receiving in process model as a parameter. I am using 3 script task node to manipulate the PV ,as the output of 1st node is using in 2nd node and output of 2nd in 3rd node. Can I minimize that? Because I want that the process model takes very less time to execute(performance should be good).
See the below scenario:
1st Script Task Node:- Expression= cond(pv!a) Output:- pv!op1
2nd Script Task Node:- Expression= cond(cond(pv!op1)) Output:- pv!op2
3rd Script Task Node:- Expression= rule!ABC(cond(pv!op2,cond(pv!op3))) Output:- pv!op3
Thanks in advance
Discussion posts and replies are publicly visible
You can try to achieve the same in a single Expression Rule within load and some local variables . This way it will become single node .
If the only PV you require at the end is pv!op3 (in other words, you don't actually need to keep any values in pv!op2 or pv!op1), then mohamedt808 's idea is the best bet. In fact you can even use local variables in an output expression in a script task, without necessarily even creating a new expression rule.
/* For Example... */ with( local!op1: cond(pv!a), local!op2: cond(cond(local!op1)), local!op3: rule!ABC(cond(local!op2)), /* return output from local!op3 */ local!op3 )