Skip to main content
nguyenb6532
June 14, 2024
Solved

input and output of a 'user input task'

  • June 14, 2024
  • 8 replies
  • 0 views

When the same process variable is updated by both the input and output of a 'user input task' what will be the result? From what I have tested, the input takes precedence. As implemented in the attached photo, the initialization set in the output (setting to NULL) does not execute.

/resized-image/__size/640x480/__key/communityserver-discussions-components-files/14/_B930AF30EA30FC30F330B730E730C330C830_-2024_2D00_06_2D00_14-153006.png

Best answer by sriramk5349

Hi [mention:292bb21fb8eb45c2ae8bc9d5cfd8c374:e9ed411860ed4f2ba0265705b8793d05] ,

As far I know, The execution order will be 

1) Value in input

2) outputs

3) Save into in inputs

So first the value are saved in activity class parameters and then outputs are executed and in the save into fields are executed.

In your example, whatever the value in form is saved into ac!errMsg first, then output is executed i.e, null is saved into pv!errMsg and then again ac!errMsg is saved in pv!errMsg

8 replies

jayaprakashr0001
June 14, 2024

can you provide some more info about the issue and what are you trying to achieve.

nguyenb6532
June 14, 2024

 [mention:44bed26f1d96482687e4003414c7d8ec:e9ed411860ed4f2ba0265705b8793d05] Ultimately, I expect 'errMsg' to be NULL. If I do not set SaveInto for INPUT, I can achieve this, so it is probably a mistake in my implementation, but I asked the question because I wanted to know the root cause and the relationship between INPUT and OUTPUT.

sriramk5349
June 14, 2024

Hi [mention:292bb21fb8eb45c2ae8bc9d5cfd8c374:e9ed411860ed4f2ba0265705b8793d05] ,

As far I know, The execution order will be 

1) Value in input

2) outputs

3) Save into in inputs

So first the value are saved in activity class parameters and then outputs are executed and in the save into fields are executed.

In your example, whatever the value in form is saved into ac!errMsg first, then output is executed i.e, null is saved into pv!errMsg and then again ac!errMsg is saved in pv!errMsg

nguyenb6532
June 14, 2024

I thought the order was

1) Value in input
2) Save into in inputs
3) outputs

I need to leave the destination for saving inputs blank. Noted.

shubhama926776
June 14, 2024

[mention:292bb21fb8eb45c2ae8bc9d5cfd8c374:e9ed411860ed4f2ba0265705b8793d05] 

For a user input task, the value you enter takes priority over any value set in the output.
Your test confirms this - the input sets "errMsg" and the attempt to clear it in the output is ignored.

nguyenb6532
June 14, 2024

Thanks for support 
I need to leave the destination for saving inputs blank.

stefanhelzle0001
June 14, 2024

That is a very common configuration issue. Any output assignment that you configure will evaluate in a random order! Writing to the same process variable from INPUTS -> SaveInto and OUTPUTS calls for trouble.

mikes0011
Brainy
June 14, 2024

The real answer to this is, of course, that conflicts like this should be avoided as much as possible (and luckily it's possible to avoid it at approaching 100% if design is done carefully), because one can never be sure what the order of precedence will actually be without either testing it or asking around (and i'm not completely convinced it is guaranteed to happen in a particular order either).