OPALE - 10.0 - Utilisation - MAPRMTPROC/en

Différence entre versions

De MappingDoc
(Page créée avec « ===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 f... »)
(Page créée avec « ==Useful Workflow commands== »)
Ligne 13 : Ligne 13 :
 
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.
 
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.
  
==Boites de Workflow utiles==
+
==Useful Workflow commands==
  
 
===Convert from iSeries===
 
===Convert from iSeries===

Version du 28 mai 2019 à 09:49

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).

(Voir documentation « WorkFlow_ISeriesResponse.pdf » pour plus d’informations)

MAPRMTPROC

Cette commande AS/400 permet d’envoyer un spool file de l’AS/400 vers le moteur de règles (Workflow) de M-Processing Server.

Paramètres de la commande sur AS/400

Spooled File Nom du fichier spool (SPLF) Alpha
Spooled File Number Numéro du fichier spool (SPLNUM) Alpha
Job Name Nom du job (JOB) Alpha
Numéro du job Numéro du job Num.
User Nom de l'utilisateur Alpha
Login Utilisateur du Workflow Mapping Alpha
Password Mot de passe du Workflow Mapping Alpha
Remote Server Adresse IP du Workflow Mapping Alpha
Move to Queue OUTQ de destination du fichier d'entrée. Laisser vide si

N/A

Alpha
Library Bibliothèque de l'OUTQ de destination. Alpha
Delete File Suppression du fichier d'entrée. Y(O) ou N. Alpha
Workflow Name Nom de la règle du workflow à exécuter (laisser vide si

workflow root)

Alpha
Protocol Type de protocole de la connexion : http ou https Alpha
Remote Port Port de connexion au Workflow Mapping Num.
Remote Backup Server Adresse IP du Workflow Mapping de back-up Alpha
Remote Backup Port Port de connexion au Workflow Mapping de back-up Alpha
Advanced Parameter Commande HTTP pour traitement spécifique Alpha
Timeout Délai de connexion exprimé en secondes Num.

Paramètres reçus par le workflow

Les paramètres de fichier spool suivants sont envoyés avec le fichier spool et sont à disposition dans le Workflow.

• HTTP_HOST= adresse IP de l'hôte

• HTTP_ISERIES_CONTENT= type de données envoyées (spool_data)

• HTTP_ISERIES_JOB_NAME= nom du job

• HTTP_ISERIES_USR_NAME= nom de l'utilisateur

• HTTP_ISERIES_JOB_NUMBER= numéro du job

• HTTP_ISERIES_SPLF_NAME= nom du fichier spool

• HTTP_ISERIES_FORM_TYPE= type de formulaire

• HTTP_ISERIES_USR_DATA= données utilisateur

• HTTP_ISERIES_OUTQ_NAME= outq du fichier d'entrée

• HTTP_ISERIES_OUTQ_LIB= bibliothèque de l'outq

• HTTP_ISERIES_PGM_NAME= programme qui a ouvert le fichier

• HTTP_ISERIES_PGM_LIB= bibliothèque du programme

• HTTP_ISERIES_COUNT_CODE= code compta

• HTTP_ISERIES_USER_TEXT= données spécifiques utilisateur

• HTTP_ISERIES_PRINTER_DEVICE_TYPE= type de device imprimante

• HTTP_ISERIES_SPLF_NUMBER= numéro du fichier spool

• HTTP_ISERIES_PAGE_LENGTH= longueur de la page

• HTTP_ISERIES_PAGE_WIDTH= largeur de la page

• HTTP_ISERIES_CCSID= CCSID

• HTTP_ISERIES_TOTAL_COPIES= nombre total de copies

• HTTP_ISERIES_LINES_PER_INCH= lignes par inch

• HTTP_ISERIES_CHAR_PER_INCH= caractères par 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.