7 Replies Latest reply on Nov 16, 2006 11:43 AM by kukeltje

    storing strings longer than 4000 in Context Variables?

    rmunjuluri

      Hello,

      I am trying to store context variables that are longer than 4K in the Context Variables. I could do this in Jbpm2 by customizing the String in instanceVariable config to text and that seemed to work fine. (I had to update about 2 hibernate.*.xml to mke this work in jBpm2.0 including the log**.xml).

      Can I have a similar modification in Jbpm3.0 as well? I see that there can potentially be over 10 hibernate.xmls to update.

      Is there a better way to do this?

      thanx
      -ram

        • 1. Re: storing strings longer than 4000 in Context Variables?
          kukeltje

          afaik the context variables are in one hibernate file. You only have to update one (besides the log ...) but I could be wrong.

          • 2. Re: storing strings longer than 4000 in Context Variables?
            rmunjuluri

            I modified the StringInstance.hbm.xml to hold text instead of the a String (4000). Also had to alter the mssql.create.sql script so that the JBPM_VARIABLEINSTANCE.STRINGVALUE_ is text.
            this worked for my initial tests when I was hold large Stringified XML.

            I was wondering about any implications because of this change say when I want to view the variable instance in a webapp?.

            thanx
            -ram

            • 3. Re: storing strings longer than 4000 in Context Variables?
              tom-the-bomb

              same here:

              I created a custom class BigString which only wraps a String instance.
              Then I created a class BigStringInstance as descendant of VariableInstance.
              And I created a mapping file BigStringInstance.hbm.xml (new column BIGSTRINGVALUE_ of type clob), modified the jbpm.hibernate.cfg.xml file and also added an entry to jbpm.varmapping.properties.

              this is working fine without persistence. but as soon as I try to commit my transaction (after creating a BigString variable), the JbpmSession will throw a ClassCastException.

              what am I missing on defining a custom jbpm type? JbpmType.getJbpmTypes() does include my BigStringInstance.

              • 4. Re: storing strings longer than 4000 in Context Variables?
                leena1

                Hi,

                I want to do some validations / confirmation on onClick of button in one form file. For that purpose I have changed the type of button from "submit" to "button" and i am now caling one javascript function on that onClick. After submitting it is giving following error :-

                javax.servlet.ServletException: no transitionName is specified while state 'decision-site' has 4 leaving transitions : [transition[decision-site|accept-payment], transition[decision-site|forward-asst], transition[decision-site|decision-site], transition[decision-site|done]]

                So can you please tell me what is the soltution for this problem ?

                I am using jbpm2.0

                Thanks,

                • 5. Re: storing strings longer than 4000 in Context Variables?
                  leena1

                  Hi,

                  How can i get current tokenid in .form file ?
                  I am using jbpm2.0

                  Thanks,

                  • 6. Re: storing strings longer than 4000 in Context Variables?
                    markricard

                    So help me understand something here. The scripts that come with JBPM for mysql, specifically the mssql.create.sql script, does not work with mysql?

                    At least, that is what I found and appears to be what you found with your 4000 issue. If this is the case, what is the point of having this mysql script if it is not mysql compatible?

                    When I run the script from JBPM I get:

                    "MySQL Error Nr.1064-You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'identity not null, class char(1) not null, NAME_ varchar(255) n"

                    • 7. Re: storing strings longer than 4000 in Context Variables?
                      kukeltje

                      append every line with a ;