Announcement

Collapse
No announcement yet.

Process variables incorrectly change their value in the BPM

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Process variables incorrectly change their value in the BPM

    Hi. There's a defined process in BPM that I don't quite understand how it works.

    I've given a very simple example.

    1.- I start having a Variable and make a process with it.
    2.- Before and after the process they must have different values.
    3.- I save it before and after the process to other variables, that I do not modify.
    4.- I write in a test log record (LogPruebass) the values that all the variables have.

    Then I compare the results obtained with the ones I expected. I do not understand it,

    I don't understand why they all have the same value.

    In the images you can see, the process, the code of the two tasks, the result generated in the test log and a comparison between the expected results and these last ones.

    Thanks in advance for your help

  • #2
    Hi,

    It wasn't supposed to change variables in Update Actions. It was supposed that variables will be be changed only in Script Task.

    I will check what I can do with this. But I recommend to change your flowchart so that variables are not changed in Actions.

    It was very difficult for me to understand your example, too complex and variables named so that it's difficult to track them. I managed to reproduce the issue in 4 lines of code.
    Last edited by yuri; 03-23-2020, 09:17 AM.

    Comment


    • #3
      Thanks a lot for your answer. Gives me a way out of this issue.

      And apologies for the complexity. It was part of a much larger code and took me a lot to first to identify the issue and then simplify it. Seems that not enough simplified. Sorry for that.

      I never understood why there was those script task. Now I see.

      I only used Update, Create, Create related or similar actions and got all my logic into them. That include plenty of variables changes.


      So, your suggestion is to split the current workflows and move all the logic to a Script Task and leave Update Actions just with the DB field updating. Or if any logic is left in Update Actions, one that doesn't change the variables along the process.

      Is that correct?




      Comment


      • #4
        Tested what you suggested and worked perfectly. Thanks a lot.

        Now I ned to review all the already developed BPM and update them accordingly.

        Thanks again

        Comment

        Working...
        X