Deploying RuleApps and XOMs automatically by using JCL

Operational Decision Manager provides a scripted deployment mechanism for the MiniLoanDemo rule application. This mechanism can be copied and customized for your rule application to deploy RuleApps and XOMs automatically.

About this task

This task uses the following values for the variables as an example:
  • ++HBRINSTPATH++ = /usr/lpp/zDM/V8R8M0

  • ++HBRWORKPATH++ = /u/<user_name>/workpaths/BRAY

Procedure

  1. Copy and edit the deployment JCL.
    Copy HBRDPLOY from ++HBRHLQ++ to a new PDS and customize for the new script locations. HBRDPLOY now looks like the following example:
    //HBRDPLOY EXEC PGM=IKJEFT01,REGION=0M,TIME=NOLIMIT
    //SYSTSPRT DD  SYSOUT=*
    //STDOUT   DD  SYSOUT=*
    //STDERR   DD  SYSOUT=*
    //SYSTSIN  DD  *
    BPXBATCH SH +
    cd /u/<user_name>/deploy; +
    . deploy.sh +
    /java/J7.1_64 +
    /usr/lpp/zDM/V8R8M0+
    /shared/tools/ant +
    DB2 +
    -DHBRINSTPATH=/usr/lpp/zDM/V8R8M0 +
    -DHBRWORKPATH=/u/<user_name>/workpaths/BRAY  +
    -DRULEAPPNAME=MiniLoanDemo +
    -DLIBNAME=MiniLoanDemoRuleApp_1.0 +
    -DDB2SERVNAME=host.db2.example.com +
    -DDB2PORT=40100 +
    -DDB2LOCATION=DSNV10GP +
    -DDB2SCHEMA=HBR0 +
    -DDB2USER=DB2USER +
    -DDB2PASSWORD=DB2PASSWD +
    -DDB2JARLOCN=/usr/lpp/db2v10/jdbc/classes
    /*
  2. Ensure that the new JCL can be executed to still deploy the MiniLoanDemo RuleApp.

    Submit the new HBRDPLOY job to ensure that the MiniLoanDemo rule application can still be deployed. Upon successful completion, you see the BUILD SUCCESSFUL message in the job output.

  3. Edit the files to deploy your own RuleApp, XOM, and COBOL or PL/I marshallers.
    1. Create a directory for your RuleApp:
      mkdir /u/<user_name>/deploy/<directory_name>
    2. Transfer the RuleApp to the mainframe by using FTP in binary mode so that it is now in the new directory.
    3. Edit /u/<user_name>/deploy/build.xml to point to the correct file names for deployment so that the XOM can be successfully deployed.
      For example, depending on your persistence layer, the file.deploy or db2.deploy targets change from
      ="${RULEAPPNAME}-xom.zip" />
      to
      ="<correct_file_name>.zip" />
      You must also ensure that the COBOL and PL/I marshallers are correctly named. In this example, the following line is changed from
      ="${RULEAPPNAME}-xom-xmarshaller.jar" />
      to
      ="<correct_file_name>-xmarshaller.jar" />
      If you changed the target name to aaa.zip, the marshaller name must be aaa-xmarshaller.jar. Continue to make these edits until the rule application, XOM, and marshaller files are correctly referenced from the build.xml file.
    4. Edit HBRDPLOY and change the -DRULEAPPNAME= value from MiniLoanDemo to <directory_name>, where <directory_name> is the name that is used in Step 3-a.
    5. Submit HBRDPLOY to deploy the <directory_name> rule application and associated artifacts. If HBRDPLOY completes successfully, then the Rule Execution Server console shows the newly deployed artifacts.

      You must correct any errors until the deployment succeeds.

  4. Ensure that the versioning policy is correct.

    The build.xml file uses the Operational Decision Manager Ant tasks to deploy the rule application, the XOM, and the marshallers. The Ant tasks can be configured to change the versioning policy that is used during the deployment. For more information about each persistence layer, see the related topics, which are listed at the bottom of this topic.

  5. Hot-deploy to the console by using HBRDPLYC.

    Operational Decision Manager provides a deployment script that deploys the rule application, XOM, and marshallers to a running Rule Execution Server console. The benefit of this approach, rather than the HBRDPLOY script, is that the Rule Execution Server console notifies the running zRule Execution Server for z/OS instances of the deployment so that they begin executing the new rulesets.

What to do next

Follow the same instructions in this task for editing the deployment scripts and use HBRDPLYC in place of HBRDPLOY.