11 Replies Latest reply on Jul 24, 2014 12:28 PM by ben.duffin86

    jiveversion table jive 7

    rj027942

      Hello,

       

      Does anyone has an idea about how jiveversion table is being used to populate the upgrade tasks and versions in there?.

       

      I have created my own upgrade task and defined like updrade-custom.xml in the overlay

       

      <upgrade-config>

          <upgrades>

              <upgrade>

                  <name>watch-upgrade</name>

                  <tasks>

                      <task version="70600020"

                            className="com.cerner.ucern.sbs.watch.task.WatchExclusionToStreamAssociationTask" />

                  </tasks>

              </upgrade>

          </upgrades>

      </upgrade-config>

       

      my Jiveversion table data

       

          Name                  Version integer

      clearspace                70600019

      development            70400003

      eae                             70030004

      eae-development     60030000

      watch-upgrade        1

       

      I believe when my local jive 7 with overlay application starts up it looks into updrade-custom.xml for higher version number and it will run the task. Unfortunately, my task isn't running. Correct me if I am wrong in this theory.

       

      Also local jiveversion table has first 4 rows polluted. I don't know how?. Any idea there?.

       

      Please help.

      Thanks,

      Rohit

        • Re: jiveversion table jive 7
          whoiskevin

          The version is related to the core or in the case of a plugin the version of the plugin.  If you are modifying core code then the version hasn't changed and adding a task will not trigger anything since the core version has not changed.  If this is a plugin which it appears to be then you need to modify the plugin version as well as the definition in the plugin.xml file in order to trigger a new version.  If it is called "watch-upgrade" then the version needs to be higher in the plugin.xml and upgrade.xml to trigger the upgrade task.  In this case a version "2".

            • Re: jiveversion table jive 7
              rj027942

              Hey Kevin,

               

              This is not an plugin or core. This is inside overlay I am trying to add task. I do not have plugin.xml file in there.  Any suggestions please.

               

              Thanks

                • Re: jiveversion table jive 7
                  whoiskevin

                  then you have to modify the core version in the table in order to have your task run.  This is the core if you are using an overlay.  So you are depending on the core code to trigger this upgrade and it won't do that unless it has a lower version than the database table.

                    • Re: jiveversion table jive 7
                      rj027942

                      Sorry but what I have understood from your reply is I need to put this number (70600020 ) in jiveversion table instead of 1?. Or version number should be lesser than all the version numbers in jiveversion.

                       

                       

                      <upgrade-config>

                          <upgrades>

                              <upgrade>

                                  <name>watch-upgrade</name>

                                  <tasks>

                                      <task version="70600020"

                                            className="com.cerner.ucern.sbs.watch.task.WatchExclusionToStreamAssociationTask" />

                                  </tasks>

                              </upgrade>

                          </upgrades>

                      </upgrade-config>

                       

                          Name                  Version integer

                      clearspace                70600019

                      development            70400003

                      eae                            70030004

                      eae-development    60030000

                      watch-upgrade       (70600020)

                        • Re: jiveversion table jive 7
                          whoiskevin

                          Well I wouldn't recommend this path.  Seems like a plugin in this case would be wiser so that you can manage the version of your customization separately from the main Jive version.

                           

                          However, in this case I was referring to the main jive version which is the "clearspace" entry.  I've not seen watch-upgrade before myself.  Maybe a temporary entry that I have just not noticed in the past.  But I would say proceed at your own risk because what you are doing in this case is changing the primary Jive version.  You really need to reset the database and then your task (if it is also in the upgrade.xml file) would be run. 

                           

                          And interesting that you have version 7060....

                            • Re: jiveversion table jive 7
                              ben.duffin86

                              Hi Kevin,

                               

                              The core upgrade.xml has multiple <upgrade> nodes, including clearspace, analytics, eae, etc.  What is being done to register those various nodes?  I doubt that they would be hard-coded.  If we could just hook our watch-upgrade node into the registry, then that would solve the problem, right?

                               

                              I also noticed that jive-core.jar contains an upgrade-custom.xml file, which contains 1 commented-out <upgrade> node, named "custom".  So I imagine that this scenario has been tested out by the developers.

                                • Re: jiveversion table jive 7
                                  whoiskevin

                                  I cannot say.  All I can say is that you are attempting to add a task to the core code via an overlay so the only way the upgrade is going to get kicked off is if the core version is less than the version of the core code.  So only by reset of the version can you hope to kick this off.  Otherwise nothing is going to happen.  Adding a new service or "node" as you called it is a whole new scope and that is not something I have tried or can help you with.....I still feel like this is a very bad direction but I don't know the requirements.

                                    • Re: jiveversion table jive 7
                                      rj027942

                                      Hey Kevin,

                                       

                                      Thanks for the response.

                                      you wrote:- upgrade is going to get kicked off is if the core version is less than the version of the core code. ....here (core version is less than the version of the core code is confusing )

                                       

                                      Do you mean I need to lower this number 70600019 form jivevesriontable with respect to the 

                                      watch-upgrade task version number.

                                        • Re: jiveversion table jive 7
                                          whoiskevin

                                          I don't think you can just manipulate the number.  But assuming you are running an upgrade then the number for clearspace needs to be less than the version of the code.  So if the code is version 7.0.1.1 then the jiveversion table might contain 70110xxx and it will need to be lower for upgrade tasks to kick off.  But simply lowering the number in this one table and not rolling back the entire database runs the risk from upgrade tasks that may not be written to safely run more than once.  So there is no guarantee they are all safe to re-run.

                                           

                                          The watch-upgrade task might just be the task number the upgrade last executed but I don't know for sure.

                                            • Re: jiveversion table jive 7
                                              rj027942

                                              Hey Kevin,

                                               

                                              We have successfully added the task in the overlay. I did not have to add anything in the jiveversion table only thing is did is mentioned correct version number in this file with taks order on it updrade-custom.xml

                                               

                                              I was implementing UpgradeTask for my task the was the only thing which I went wrong.

                                               

                                              Thanks,

                                              Rohit