Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Recover Joget App From Local GIT

  1. Preparing the files - Let's say you have these folders from your backup

    • wflow/app_src/supportTicket/supportTicket_1
    • wflow/app_src/supportTicket/supportTicket_2
    • wflow/app_src/supportTicket/supportTicket_3

    In each version folder, perform a git branch . In each folder version (n) folder, it should contain the next version (n+1).

    In the example below, we can see that folder version 1 contains version 2 when we execute git branch command.

    Code Block
    C:\Joget-DX7-Enterprise\wflow\app_src\supportTicket\supportTicket_1>git branch
      help
      master
    * supportTicket_1
      supportTicket_2

    For example, in supportTicket_2, it does not contain version 3 somehow. 

    Code Block
    C:\Joget-DX7-Enterprise\wflow\app_src\supportTicket\supportTicket_2>git branch
      master
    * supportTicket_2

    We can run git branch supportTicket_3 to create the branch.

    Code Block
    C:\Joget-DX7-Enterprise\wflow\app_src\supportTicket\supportTicket_2>git branch supportTicket_3
    
    C:\Joget-DX7-Enterprise\wflow\app_src\supportTicket\supportTicket_2>git branch
      master
    * supportTicket_2
      supportTicket_3

    Copy them into your working wflow folder.
    Omit wflow/app_src/supportTicket/app.properties from the backup to prevent potential conflicts such as with existing remote GIT server and so on.

  2. In Joget, create a new app with matching app ID, "supportTicket". You are now on version 1 that is currently empty.
  3. Go to Version, GIT Configurations, check "Auto Sync DB From Git" and submit.
  4. Click Forms and UI to refresh the page. This will trigger Joget to perform GIT Sync. Your Joget will now sync from GIT into Joget DB for app version 1.
    You should now see all the forms/lists/userviews/process recovered.
  5. Click Version, you should see the next version shows up, version 2. Choose the version and click view. It will perform the same sync from GIT too.
    Remember, folder version n must contain n+1 branch for this to work. Use "git branch appId_n+1" command to create the branch if needed to as highlighted in step 1 earlier.

  6. Repeat step 5 for the next version until all versions sync up.

Recover Missing Plugins, Process Mappings, Resources and Messages

In some cases, you may realize that previously configured process mappings (participant, activity, tool, decision), resources (files uploaded), messages (translations) may have gone missing. This is because, in step 2 earlier, when creating a new Joget app, when Joget attempts to initialize a new GIT folder, it created a clean slate and then attempted to merge the clean slate with the backup copy in step 5. During the merging process, it might have overwritten the content of these files:-

  • appDefinition.xml
  • appConfig.xml
English
To recover to the intended state, we will need to revert the changes made via GIT.

We will need to do it for each app version that you wish to recover. In this example, we will focus on the latest version 3.

  1. Shutdown Joget server so that it does not lock on to the GIT folder.
  2. Use your favorite GIT interface, find out at which commit changes are made to remove the content in the 2 files mentioned above. For example, we found out that it happened in commit e87ec85.
  3. Make use of GIT, and perform a GIT reset.

    Code Block
    C:\Joget-DX7-Enterprise\wflow\app_src\supportTicket\supportTicket_3>git reset e87ec85
    Unstaged changes after reset:
    M	appConfig.xml
    M	appDefinition.xml
    C:\Joget-DX7-Enterprise\wflow\app_src\supportTicket\supportTicket_3>git status
    On branch supportTicket_3
    Changes not staged for commit:
      (use "git add <file>..." to update what will be committed)
      (use "git checkout -- <file>..." to discard changes in working directory)
    
    	modified:   appConfig.xml
    	modified:   appDefinition.xml

    If you are using Github Desktop, you can right-click on e87ec85 and choose "Revert Changes in Commit".

  4. Verify the changes, resolve the conflicts if necessary, and commit the unstaged files. If you are using Github Desktop, you can inspect them in "Changes" tab, resolve the conflicts if necessary, and commit the unstaged files.

  5. Start Joget server, go to the app, and trigger a sync from GIT to Joget.


Related Links