OPALE - 10.0 - Usage

MAPRMTPROC

De MappingDoc
Révision datée du 28 mai 2019 à 11:37 par Alestoquoi (discussion | contributions) (Page créée avec « • HTTP_ISERIES_CHAR_PER_INCH= characters per inch »)

General information

The Mapping Workflow is the new rule-based system available for Mapping on both Windows and UNIX 7.0.36. In terms of features and performance, the Mapping Workflow is far more powerful than the IBM i Mapping Robot.

We have developed an IBM i Workflow connector to allow you to benefit from the features of the Mapping Workflow, on documents supported by IBM i. This is how the connector works: we use the MapSOAPServer connected to the Workflow on the host part (UNIX or Windows) as well as command MAPRMTPROC on the client part (IBM i). Mapping thus needs to be installed on both sides.

When the IBM i spooled files are sent to the Mapping server, a Workflow rule runs a series of commands and generates the resulting output. this output can then be sent back to the IBM i with log messages if deemed necessary.

Requirements

Check that network communication between the IBM i and the remote Mapping server on which the Workflow runs, can be established using the HTTP protocole - check the IP adresses, firewall, antivirus software etc.

The MapSOAPServer has to be properly configured. You can find the detailed configuration parameters of the MapSOAPServer in the Mapping Web Services section of this wiki.

Useful Workflow commands

Convert from iSeries

The “Convert from iSeries” command (in the Mapping group) allows you to convert any EBCDIC spooled file to Unicode.

(For more information on this, see "WorkFlow_ConvertFromISeries.pdf")

iSeries Response

The « iSeries Response » command (in the Web Interactivity group) allows you to send a response to the iSeries command. This response can be a file (*USERASCII or *AFPDS) or a message (JOBLOG input or update of a DTAARA).

(For more information on this, see "WorkFlow_ISeriesResponse.pdf")

MAPRMTPROC

This IBM i command allows you to send a IBM i spooled file to the rule-based system (Workflow) of the M-Processing Server.

Parameters of the MAPRMTPROC command on IBM i

Spooled File Name of the spooled file (SPLF) Alpha
Spooled File Number Number of the spooled file (SPLNUM) Alpha
Job Name Name of the job (JOB) Alpha
Job number Number of the job Num.
User User name Alpha
Login Mapping Workflow user Alpha
Password Mapping Workflow password Alpha
Remote Server Mapping Workflow IP address Alpha
Move to Queue Destination OUTQ of the input file. Leave a blank if N/A Alpha
Library Library of the destination OUTQ Alpha
Delete File Delete input file. Y(O) or N Alpha
Workflow Name Name of the workflow rule to run (leave a blank in case of workflow root) Alpha
Protocol Type of connection protocole: http or https Alpha
Remote Port Connection port of the Mapping Workflow Num.
Remote Backup Server IP address of the back-up Mapping Workflow Alpha
Remote Backup Port Connection port for the back-up Mapping Workflow Alpha
Advanced Parameter HTTP command for a specific treatment Alpha
Timeout Connection timeout in seconds Num.

Workflow input parameters

The following spooled file parameters are sent with the spooled file and are visible in the Workflow.

• HTTP_HOST= IP address of the host

• HTTP_ISERIES_CONTENT= type of data sent (spool_data)

• HTTP_ISERIES_JOB_NAME= job name

• HTTP_ISERIES_USR_NAME= user name

• HTTP_ISERIES_JOB_NUMBER= job number

• HTTP_ISERIES_SPLF_NAME= name of the spooled file

• HTTP_ISERIES_FORM_TYPE= form type

• HTTP_ISERIES_USR_DATA= user data

• HTTP_ISERIES_OUTQ_NAME= outq of the input file

• HTTP_ISERIES_OUTQ_LIB= outq library

• HTTP_ISERIES_PGM_NAME= name of the program which opened the file

• HTTP_ISERIES_PGM_LIB= program library

• HTTP_ISERIES_COUNT_CODE= count code

• HTTP_ISERIES_USER_TEXT= specific user data

• HTTP_ISERIES_PRINTER_DEVICE_TYPE= type of printer device

• HTTP_ISERIES_SPLF_NUMBER= spooled file number

• HTTP_ISERIES_PAGE_LENGTH= page length

• HTTP_ISERIES_PAGE_WIDTH= page width

• HTTP_ISERIES_CCSID= CCSID

• HTTP_ISERIES_TOTAL_COPIES= total copies number

• HTTP_ISERIES_LINES_PER_INCH= lines per inch

• HTTP_ISERIES_CHAR_PER_INCH= characters per inch

• HTTP_ISERIES_OUTPUT_PRIORITY= priorité d'output

• HTTP_ISERIES_DEV_FILE_NAME= nom du fichier device

• HTTP_ISERIES_DEV_FILE_LIB= bibliothèque du fichier device

• HTTP_ISERIES_TIME_FILE_OPEN= temps pendant lequel le fichier a été ouvert

• HTTP_ISERIES_DATE_FILE_OPEN= date à laquelle le fichier a été ouvert

• HTTP_ISERIES_PRINT_TEXT= impression texte

• HTTP_ISERIES_SOURCE_DRAWER= bac source

• HTTP_ISERIES_OUTPUT_BIN= bac de sortie

• HTTP_ISERIES_JOB_SYSTEM_NAME= nom système du job

Réponses reçues par la commande

Le type de réponse dépend des paramètres configurés dans le workflow. La réponse peut être :

  • Un fichier spool (*USERASCII ou *AFPDS)
  • Un message dans la JOBLOG actuelle (*INFO ou *MESSAGE)
  • Des données dans la DTAARA MAPRMTPROC dans QTEMP

Exemples

Envoi d’un spool vers ONYX Server

Le but est d’envoyer le spool file ayant les informations suivantes vers le workflow MAPRMTPROC.rules.xml de ONYX Server :

Spooled file . . . . . . . . . . >          OLP

Spooled file number  . . . . . . >    237

Job Name . . . . . . . . . . . . >          QPRTJOB

Job number . . . . . . . . . . . >         109341

User . . . . . . . . . . . . . . >               QTMPLPD

Différents points à réaliser :

  1. Sur ONYX, créer un workflow : Ici appelé MAPRMTPROC
  2. Remarque : Inutile de créer un point d’entrée
  3. Sur AS/400, exécuter la commande MAPRMTPROC :   


a)     Spécifier les attributs du spool file à envoyer



b)   Login et mot de passe pour le webservice (Apache)

c)    Remote Server : L’adresse du Mapping Windows

d)   Move to Queue : Pas obligatoire, cela dépend si on veut sauvegarder le spool dans une outqueue ou pas

e)    Workflow name : Nom du workflow a exécuter sur Mapping Windows (si vide alors root sera utilisé)

f)     Timeout de connexion éventuel 

L’envoi se fait via web service. Par conséquent, il ne faut pas s’attendre à avoir un spool dans le spooler. Le fichier arrive simplement dans le workflow. Pour le récupérer, il faut par exemple utiliser une boite de copie. Pour obtenir les variables récupérées, on peut faire un set qui est redirigé vers un fichier. 

 Voici les variables récupérées :

  • CONTENT_TYPE=text/plain
  • CONTENT_LENGTH=16324
  • HTTP_HOST=192.168.217.16
  • HTTP_ACCEPT_ENCODING=gzip
  • HTTP_ISERIES_CONTENT=spool_data
  • HTTP_ISERIES_JOB_NAME=QPRTJOB
  • HTTP_ISERIES_USR_NAME=QTMPLPD
  • HTTP_ISERIES_JOB_NUMBER=109341
  • HTTP_ISERIES_SPLF_NAME=OLP
  • HTTP_ISERIES_FORM_TYPE=SJJI
  • HTTP_ISERIES_USR_DATA=OWABSOC022
  • HTTP_ISERIES_OUTQ_NAME=FMERCIER
  • HTTP_ISERIES_OUTQ_LIB=QGPL
  • HTTP_ISERIES_PGM_NAME=OWABSOC022
  • HTTP_ISERIES_PGM_LIB=DIPOBJ
  • HTTP_ISERIES_COUNT_CODE=
  • HTTP_ISERIES_USER_TEXT=
  • HTTP_ISERIES_PRINTER_DEVICE_TYPE=*SCS
  • HTTP_ISERIES_SPLF_NUMBER=237
  • HTTP_ISERIES_PAGE_LENGTH=48
  • HTTP_ISERIES_PAGE_WIDTH=136
  • HTTP_ISERIES_CCSID=1027
  • HTTP_ISERIES_TOTAL_COPIES=1
  • HTTP_ISERIES_LINES_PER_INCH=6,00
  • HTTP_ISERIES_CHAR_PER_INCH=10,00
  • HTTP_ISERIES_OUTPUT_PRIORITY=
  • HTTP_ISERIES_DEV_FILE_NAME=QPRINT
  • HTTP_ISERIES_DEV_FILE_LIB=QGPL
  • HTTP_ISERIES_TIME_FILE_OPEN=111007
  • HTTP_ISERIES_DATE_FILE_OPEN=1140425
  • HTTP_ISERIES_PRINT_TEXT=
  • HTTP_ISERIES_SOURCE_DRAWER=1
  • HTTP_ISERIES_OUTPUT_BIN=0
  • HTTP_ISERIES_JOB_SYSTEM_NAME=S65C7FEE 


Toutes ces variables peuvent être utilisées dans le workflow (pour des conditions, nommage, ou autres).

Renvoi du fichier généré par le workflow vers une outq iSeries

Le but est de renvoyer à l’iSeries un fichier provenant du workflow.

Le workflow ci-dessous reçoit un spool de l’AS/400, le convertit en Unicode et renvoie le fichier unicode vers l’AS/400 via la boite « iSeries Response »

Détail de la boite « iSeries Response » :

Résultat sur l’iSeries (dans l’Outq FMERCIER) :


Remarque :

On pourrait de la même façon renvoyer un fichier XPS vers l’iSeries afin de l’imprimer à travers l’OutQ de l’AS/400 et non du spooler ONYX Server.

En cas de problème de connexion

En cas de problème de connexion entre OPALE et ONYX , le job MAPRMTPROC va continuer à envoyer le spool jusqu’à ce que le timeout de connexion soit atteint (si un timeout est indiqué).

Si pendant ce temps plusieurs MAPRMTPROC sont réalisés, ils seront tous en "processing" sur le serveur jusqu’à ce que la connexion soit établie ou alors jusqu’à ce que le timeout soit atteint.