Hi,
I have observed many a times that in a script task with multiple inputs or outputs, that have some complex operations like queries, each input/output of the script task is stored in certain pv!. During execution only few pv! hold values and rest remain null, but if I use two script tasks instead of one and split the work among both the script tasks it works as expected. What could be the issue, is there any limit on processing a script task?
Discussion posts and replies are publicly visible
I'd suggest taking a look at this page: docs.appian.com/.../Process_Node_and_Smart_Service_Properties.html
In general, it isn't guaranteed that your activity class parameters will evaluate in a certain order, so you should make sure that your parameters don't depend on each other and that you aren't saving to the save variable on both the inputs and the outputs tabs.
Saahil Mulla said:During execution only few pv! hold values and rest remain null
I've never experienced this. My only guess is an issue rooted in what Peter already mentioned - there is no guaranteed or even inherent ordering in the execution of the inputs or the outputs (you should assume all inputs will execute simultaneously, and then all outputs will execute simultaneously).
As a matter of habit, I avoid doing *any* particular processing, expecially processing requiring any level of expressionable complexity, in Data Inputs - at least until Appian fixes the "collapsed down to a single line of code upon saving" issue, which I've been begging for years now to have them address, but thus far has never been addressed or even really acknowledged.
I know what you are saying. If you are saving into a PV and need to use the updated PV value in another PV in the same script task, it won't work. For that you can use AC in the "input" tab and then use the AC into output tab to populate PVs.
It's not like there are dependencies on the ac! even if the inputs of the script tasks are independent and say I have 10 inputs which perform complex operations like queries and loopings there are scenarios that few of the input execution for that script task skips. And if these operations are distributed into say two script tasks then we get the results as expected.
I think we'd have to see an example of what you're doing to get a good sense of what would be expected.
Agree with Peter, we need the examples.