M3 Program Connectivity Setup
  • 21 Jul 2021
  • 5 Minutes to read
  • Contributors
  • Dark
    Light

M3 Program Connectivity Setup

  • Dark
    Light

Article summary

Introduction

Purpose of this document

The purpose of this document is to document how to call M3 java programs from Comflow

Before you start

The following information is needed about M3 before you start:

  • The version of M3 Foundation
  • The ip-address and port for M3 MI connectivity
  • A user with authorization to modify the _Set_Movex.cmd- file.
  • To install the connection kit in a M3 grid system you must have access to the grid and rights to logon and modify the folders in the file system where M3 is installed.

Overview

M3 programs can be called in 2 ways depending on if it is an API e.g. OIS100MI or a normal M3 program e.g. MMS001

To be able to call a normal M3 java programs from a rule in Comflow the following is needed

  • An autojob for CASRVCL has to be setup in M3 in MNS050
  • The camvx-jar file, like  “camvx-0.9.0.jar”,  need to be installed in M3. Always look for the latest release for your M3 version on the update site.

We need to set up the following in the site def to specify which port the ServerProgramCaller server will run on:

<Property name="connect.mvx.ng.port" value="33001"/>

<Property name="connect.mvx.as400.system" value="1.23.45.67.89"/>

<Property name="connect.mvx.as400.envlib" value="MVXCENV"/>

 

The default port on the M3 Java Server is 33001. The port can be changed in CA.properties. 

 

Retrieval of jar file

The technical components are retrieved from Corzia Update Site.

Start a web browser

Enter the URL    http://update.corzia.com/

 

Login with your Corzia login

In the Corzia Update Site (http://update.corzia.com), select Comactivity Connection Kits, select Movex Java/M3 Connection Kits and down load the appropriate camvx-jar-file.

Figure 1 http://update.corzia.com/

Setup of site def in M3

In file _Set_Movex.cmd in map C:\Movex_v12\env\Comact\ServerScripts

We need to set upp  SET  cpBefore=C:\ComActivity\CA_Movex_v12 

(Different for each installation)

To indicate the map where we put our pcml.

 

@echo off

::                         x

:: =============================================

:: =                                           =

:: =         Set values for Movex Server       =

:: =              ------------------            =

:: =                                           =

:: =   Copyright (C) Intentia R&D AB 2003.     =

:: =   All rights reserved.                    =

:: =   Licensed material property of Intentia. =

:: =============================================

::  Change log

::  ----------

::  Number Date   User        Description

::         031120 kavrog0    Created for 12.4.3

::         031204 kavrog0    Added SessionTester,cpBefore, cpAfter

::                                      

::   ================================================================================

::  =  All settings will be done here No changes needed in the _sub-scripts        =

::  =  Settings for HUM, Market and customer is done in the library list function  =

::  =  of Movex                                                                     = 

::   ================================================================================

 

::   ===============================

::  =  Root_path : Path to Movex  =

::  ===============================

 

SET Root_path=C:\Movex_v12

 

::   ================================================

::  =  Environment: Path to Environment for Movex  =

::   ================================================

 

SET Environment=%Root_path%\env\Comact

 

::  ========================================

::  =  JavaPath: Set the path to the JVM.  = 

::   ========================================

 

SET JavaPath=C:\j2sdk1.4.2_13

 

::   ======================================================================================

::  =  cpBefore : Special classpath; added before standard classpath; normally disabled  =

::   ======================================================================================

 

SET  cpBefore=C:\ComActivity\CA_Movex_v12 

(Different for each installation)

 

 

::   ====================================================================================

::  =  cpAfter : Special classpath; added after standard classpath; normally disabled  =

::   ====================================================================================

 

:: SET  cpAfter= 

 

::  =====================

::  =  Set JVM options  =

::  =====================


Setup of CASRVCL in MNS050 in M3

 

The job CASRVCL has to be setup in MNS050

Figure 2 MNS050

 

Figure 3 MNS050 panel E

 

Start the job CSRVASJ with the run command

runjobcsrvasj

Figure 4 Start CSRVASJ

 


 Check in the server view if you see the job CSRV01 below   

Figure 5 Server view with CASRVCL defined as CASRV01

 

Set up in M3 Grid

Start M3 Grid and select the M3 Auto subsystem

 

Go the subsystem

 


Go to the classpath

 

Find the grids lib folder and a bindbg folder in the class path. 



 

Use Windows Explorer and connect to the file system. The camvx.jar should be placed in the lib folder and the pcmls in a binddbg folder. NB! If the Grid is updated the camvx.jar file must be installed again.

 

The CASRVCL must be added in MNS150 (see chapter 3)

In sitedef.xml the connect port must be added:


<Property name="connect.mvx.ng.port" value="35001" />

The port used for connection can be modified in CA.properties



After the installation is finished M3 must be restarted.

Check that CASRV01 is up and running

Check that the correct port is used in CASRV

 


Use telnet from the Comflow server to verify the port is open in the firewall.



 

Reference:CA.properties file

 

Here is the full layout of the CA.properties file as a reference.

 

# ------------- ComActivity Properties ------------------

# There are two modes of running CASRV; in a separate subsystem or as an autojob in the autojob subsystem.

# Valid values:

# SUBS - In a separate subsystem

# ASJ - As an autojob

comactivity.casrv.mode=ASJ

 

# Environment path; Points to the corresponding environment in Movex

# Mode: SUBS

comactivity.casrv.movex.env.path=C:\\Movex_v12\\env\\Comact

 

# Port prefix for CASRV job. Default=33. Server port = portprefix + company number (33001 for company 001)

# Mode: ASJ | SUBS

comactivity.casrv.portprefix=33

 

# Port for the CASRV job. This has precedence over 'comactivity.casrv.portprefix' above.

# Mode: ASJ | SUBS

comactivity.casrv.port=33001

 

# Port for the subsystem

# Mode: SUBS

comactivity.casrv.subs.port=34000

 

# Should the subsystem notify the server about it's existence.

# Must be true to show up in the server view

# Mode: SUBS

comactivity.casrv.subs.notify=true

 

# The key for the subsystem. Shows up in the serverview: Subs:BI:<key>

# Mode: SUBS

comactivity.casrv.subs.key=COMACT

 

# Port for debugging the subsystem

# Mode: SUBS

comactivity.casrv.subs.debug.port=34200

 

# Max jobs in the subsystem

# Mode: SUBS

comactivity.casrv.subs.max.jobs=60

 

# Minimum memory allocated to the subsystem

# Mode: SUBS

comactivity.casrv.subs.min.memory=64m

 

# Maximum memory allocated to the subsystem

# Mode: SUBS

comactivity.casrv.subs.max.memory=360m

 

# VM type

# Valid values:

# -client - The client vm

# -server - The server vm

# Special values for iSeries

# Mode: SUBS

comactivity.casrv.subs.jit=-client

 

# Job Description

# Mode: SUBS - iSeries only

comactivity.casrv.subs.jobd=MVXJVA

 

# Company to use for the server job. Should be the same as the autojobs

# Mode: SUBS

comactivity.casrv.subs.cono=1

 

# Division to use for the server job. Should be the same as the autojobs

# Mode: SUBS

comactivity.casrv.subs.divi=

 

# Language to use for the server job. Should be the same as the autojobs

# Mode: SUBS

comactivity.casrv.subs.lanc=GB

 

# User to use for the server job. Should be the same as the autojobs

# Mode: SUBS

comactivity.casrv.subs.usid=MOVEX

 

# Job name to use for the server job

# Mode: SUBS

comactivity.casrv.subs.dsjna=CASRV

 

# Program name to call when subsystem is started

# Mode: SUBS

comactivity.casrv.subs.startup.program=CASRVCL

 

# Specifies the job type for the connected clients. Valid values:

# Mode: ASJ | SUBS

# Valid values:

# INTER - Interactive job

# BATCH - Batch job

# MIBATCH - MI batch job

# AUTOBATCH - Autojob  

# X - User defined 1 (M3 7.1+)

# Y - User defined 2 (M3 7.1+)

# Z - User defined 3 (M3 7.1+)

comactivity.casrv.jobtype.clients=INTER

 

# Specifies the job type for the server job. 

# Mode: SUBS

# Valid values:

# INTER - Interactive job

# BATCH - Batch job

# MIBATCH - MI batch job

# AUTOBATCH - Autojob 

# X - User defined 1 (M3 7.1+)

# Y - User defined 2 (M3 7.1+)

# Z - User defined 3 (M3 7.1+)

comactivity.casrv.jobtype.server=BATCH

 

# Client job name prefix

# Mode: ASJ | SUBS

comactivity.casrv.job.name.prefix=CA_


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.