Announcement

Collapse
No announcement yet.

Update array from BPM

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

  • Update array from BPM


    Hello.

    I can't execute a BPM without error. The database update instruction fails.

    The field to be updated is an array field.

    I've made a very simple example so you can easily reproduce it.

    I update the database but the BPM execution is interrupted.

    Attached:
    the image of the process, where you see it has failed
    of the code, which is very simple.
    of the field definition that you see is an array field (Lista is the spanish for Array)
    and from the database record, where you see that the update actually took place

    I don't quite know what I'm doing wrong.

    thank you very much

    Attached Files

  • #2
    Hi,

    Anything in log?

    Comment


    • #3
      Yes. Something related to syntax error. But I cant access myself to the log.

      I'll ask for the details and provide them to you tomorrow morning

      Comment


      • #4
        I tried to replicate the same formula in BPM and it passed the task w/o problem.

        Comment


        • #5
          Hi.

          This is the log at the time of the process:

          [2020-04-02 18:21:06] Espo.ERROR: Process 5e862d12ac491fa31 element h5nf73f9ye: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' `modified_by_id` = 'system' WHERE l_g_orden.id = '5e63fa1e4fdfd49dc' AND l_g_or' at line 1 [] []
          I have verified that 5e862d12ac491fa31 was the process I sent you, and 5e63fa1e4fdfd49dc was the record updated We used the following versions: MariaDB 10.3.22 PHP 7.2

          Comment


          • #6
            Hi yuri . I just made a test in the espoCRM demo environment.


            Created tha same BPM.

            Created an entity with the same name (LGOrden) and included the same array attribute (listaSuscripciones).

            Executed the BPM with process ID: 5e870cdbe1f934da4

            It failed very similarly. The only difference I see is that it didn´t update the field and failed. It just failed.

            Attached Files

            Comment


            • #7
              You created a field of wrong type. You created Enum, but should create Multi-enum.

              P.S. I don't understand Spanish. Screenshot in Spanish are very difficult to understand.

              Comment


              • #8
                I changed that (Enum to Multi-Enum) in your demo and worked perfectly. Thanks a lot!!

                PS. Apologies for the spanish screenshots

                Comment

                Working...
                X