Xyna Factory and Git - Xyna-Factory/xyna GitHub Wiki

It is possible to have XMOM objects under version control with git.

This chapter will list the necessary steps in order to connect the saved state of XMOM objects within a workspace to a git repository.

General idea

As a minimal prerequesite a Xyna Factory instance and local git repository is needed. It is recommended to have a separate directory for the cloned repository.

The process includes two main steps. The first step is to handle your sources with git commands and the second part involves the announcement of changes to the Xyna Factory instance.

  1. Either use an existing workspace or create a new one with the help of the Factory Manager (or with the CLI command ./xynafactory.sh createworkspace)
  2. Clone a repository to a separate directory git clone <your_repo>.git
  3. Find out the current revision of the workspace (Factory Manager or ./xynafactory.sh listworkspaces -t)
  4. Backup the original revision folder like this:
    cd /opt/xyna/xyna_001/revisions
    mv rev_<n> rev_<n>_bkp
  5. Create a symlink to the git respository with ln -s /path/to/git/repo/your_workspace rev_<n>. Make sure that <n> matches the revision number determined in step 3.
  6. Announce the directory change to the Factory i. e. with ./xynafactory.sh refreshworkspace -d (for details see chapter "Announce changes to Xyna Factory")

Announce changes to Xyna Factory

After handling the git commands it is necessary to announce the changes to Xyna Factory instance. The procedure depends on the kind of XMOM objects.

DataTypes, Workflows and Exceptions

  • Added/Modified/Renamed: Either deploy the changed DataTypes/Workflows/Exceptions with the -xmlFile option:
    # data type
    ./xynafactory.sh deploydatatype -workspaceName <your_workspace> -fqDatatypeName <full_qualified_path> -xmlFile <../revisions/rev_<n>/path/to/xml>
    
    # workflow
    ./xynafactory.sh deploy -workspaceName <your_workspace> -fqWorkflowName <full_qualified_path> -xmlFile <../revisions/rev_<n>/path/to/xml>
    
    # exception
    ./xynafactory.sh deployexception -workspaceName <your_workspace> -fqExceptionName <full_qualified_path> -xmlFile <../revisions/rev_<n>/path/to/xml>

or refresh the whole workspace with -d option ./xynafactory.sh refreshworkspace -d

  • Delete: Delete the corresponding object within the Factory Manager > Deployment Items > Trash bin

Service Groups with .jar

  • Added/Modified/Renamed: Re-deploy the corresponding service group with ./xynafactory.sh deploydatatype -workspaceName <your_workspace> -fqDatatypeName <full_qualified_path> -xmlFile <../revisions/rev_<n>/path/to/xml>

  • Delete: Nothing additionally has to be done, because it is already covered with the Delete of the datatype

Shared Libraries (.jar)

  • Added/Modified: Re-deploy the shared library with ./xynafactory.sh deploysharedlib -workspaceName <your_workspace> -sharedLibName <your_sharedLib>

  • Delete:

    1. Delete the shared lib folder
    2. Deploy shared lib with empty folder with ./xynafactory.sh deploysharedlib -workspaceName <your_workspace> -sharedLibName <your_sharedLib>
    3. Shutdown Factory ./xynafactory.sh stop
    4. Delete Folder revision/rev_<n>/sharedLib/<your_sharedLib>>
    5. Start Factory ./xynafactory.sh

See Also

Git-Integration-Plugin

⚠️ **GitHub.com Fallback** ⚠️