ONYX - 9.0 - Utilisation - Gestion des workflows-Les fondamentaux/en
Différence entre versions
(Page créée avec « <FONT color="green"> Mapping / Text M-Designer </FONT>: application of a Designer format on a data file in text mode ») |
(Page créée avec « *Type of object: Type of processing Command, Cmd, Sql or Call, *Name of the object, *title: Title of the object, *File: group of predefined commands *Copy to a folder: pre... ») |
||
Ligne 288 : | Ligne 288 : | ||
− | *Type | + | *Type of object: Type of processing Command, Cmd, Sql or Call, |
− | * | + | *Name of the object, |
− | * | + | *title: Title of the object, |
− | *File: | + | *File: group of predefined commands |
− | * | + | *Copy to a folder: predefined command to run |
− | *Source | + | *Source and destination folder: Parameters of the command |
o Présente l’ensemble des paramètres requis ou optionnels pour la bonne exécution de la commande | o Présente l’ensemble des paramètres requis ou optionnels pour la bonne exécution de la commande |
Version du 27 août 2019 à 12:35
Sommaire
Introduction
Workflows make up the ONYX Server execution engine. A Workflow is defined as a set of conditions and configurable commands, run as a new file is received by input connectors (Scanfolder robots, listening server, entry point, or Web Service query). Commands are processed sequentially which means the second command is processed once the first one was processed correctly, and so on until the end of the Workflow.
A Workflow is defined graphically by several command objects, conditions and/or parameters connected together. Its name is unique and it must be associated with at least one connector to be active.
Workflows are saved on disk in XML files in the workflow sub-folder of the rule folder specified by the RULES_PATH configuration variable.
The administration and Workflow configuration pages are accessible from the ONYX Server Web interface using the Administration Menu, go to Managing Workflows, or use the direct link: http://127.0.0.1:8004/JS_Common/workflow/index.html
Tip: Firefox is the recommended browser for a better user experience.
Configuration
A new WORKFLOW section is added to the ONYX Server configuration file which contains configuration parameters for the Workflows execution engine and for the Web Service features (SOAP_*):
Name | Meaning / Example |
---|---|
SOAP_DEBUG | Activates verbose mode for Web Services
On / Off (by default) |
SOAP_PATH_TEMP | Local path to access temporary files
E:\MappingWindows\Temp\HTTPServer |
SOAP_PATH_LOG | Local path to access the logs
E:\MappingWindows\Temp\HTTPServer |
SOAP_LOCAL_URL | Local path to the shared folder (file exchanges) |
SOAP_DOCUMENT_URL | Remote path to the shared folder (file exchanges) |
SOAP_LOCATION | Remote path of the Mapping Web Services engine |
SOAP_HOST_PROXY | IP address or DNS name of the Proxy server (if needed) |
SOAP_PORT_PROXY | Connection port to the Proxy server (if needed) |
USE_NEW_RULES | Activates the Workflows engine or returns to the v6 engine
On (by default) / Off |
MAIL_SERVER | IP address or DNS name of the SMTP server (Mail commands)
outlook.office365.com |
MAIL_DOMAIN | Domaine name of the outlook.com SMTP server |
MAIL_PORT | Connection port of the SMTP 587 server |
MAIL_LOGIN | Login ID for the SMTP server |
MAIL_PASSWORD | Password for the previous ID |
MAIL_FROM | Default sender's address |
TRACKING_SERVERADDRESS | IP address of the tracking PostGreSQL 127.0.0.1 database |
TRACKING_SERVERPORT | Connection port to the tracking 5432 database |
TRACKING_SERVERUSER | Login ID for the tracking database |
TRACKING_SERVERPASSWORD | Password for the previous ID |
TRACKING_SERVERBASENAME | Name of the tracking database
tracking |
TRACKING_LIB_PATH | Path of the PostGreSQL executables
C:\Program Files\PostgreSQL\9.0\bin |
TRACKING_SERVERSCHEMA | Schema of the tracking database
public |
DEFAULT_ADMINISTRATOR_RESPONSE | Path of the HTML default response file (Web Interactivity commands) |
DEFAULT_ADMINISTRATOR_RESPONSE_HEADER | Type (content-type) of the default response
text/html |
DEFAULT_RESPONSE_BODY | Path of the HTML default response body file (Web Interactivity commands) |
DEFAULT_FILE_TYPE | Path of the HTML default message header file (Web Interactivity commands) |
DEFAULT_MAIL_BODY | Path of the HTML default message body file (Web Interactivity commands) |
PATH_CONFIG_CUSTOM_ACCESS | Path of the user display preferences (MOM 2.0)
E:\MappingWindows\Settings\configCustomAccess |
PATH_DJDE | Path of the DJDE resources (Xerox conversions)
E:\MappingWindows\Temp\DJDE |
RESOLVE_PERPAGE | Number of lines per page for resolution tables display 25 |
MAP_CURRENT_DATE | Syntax control to retrieve the current date
%d/%m/%Y |
MAP_CURRENT_TIME | Syntax control to retrieve the current time
%H:%M:%S |
MAP_CURRENT_TIMESTAMP | Syntax control to retrieve the current timestamp %d-%m-%Y_%H%M%S |
Toolbar
- Create a new Workflow. enter the name of the Workflow, its extension, .rules.xml is automatically added.
- Open a Workflow. Select a Workflow in the list.
- Save the active Workflow.
- Save the active Workflow under another name.
- Delete the active Workflow.
- Insert a condition in the active Workflow. The new condition is added after the selected box.
- Insert a command in the active Workflow. The new command is added after the selected box.
- Insert a parameter in the active Workflow. The new parameter is added after the selected box.
- Redraw the active Workflow = graphically redraw the Workflow: aligns the boxes, links, etc…
- Duplicate an object = duplicates the selected object exactly as it is (name, parameters, etc.), without its links.
- Manage resolution tables = allows you to create, edit and delete resolution tables
Creating a new workflow
Click on the icon and name the Workflow (here called Invoices) then, validate.
The new Workflow is displayed in the editing window with a first box which corresponds to the starting point of the processing sequence:
Note: to import a Workflow, copy it under C:\ProgramDta\M-Processing Server\Settings\rules\workflow
To view the imported Workflow, Go to Menu->Administration Menu->Managing Workflows, then, click on open.
Adding a parameter
Definition
Parameter objects define the value of a parameter or create a new one. A parameter can then be used as a condition or command. A value can then be reused in several commands, for example, without having to be defined each time.
Create/Edit
To create a new parameter, select the box after which the new parameter needs to be added, then, click on the icon. To edit an existing parameter, double-click on the corresponding box. The editing window opens so as to define the different fields:
Note: A parameter is usually reused later on in the Workflow in a condition or command, sometimes even in another Workflow. Choosing names which correspond to the information conveyed is therefore recommended.
Value
Different methods can be accessed through the context menu to define the value of a parameter in the input field:
- param = dynamic value of a system environment parameter, linked to Onyx Server, the Workflow or the input spooled file.
- value = static value entered by the user.
- rulefile = dynamic value in a text or an XML file (may be the input spooled file, or any other file).
- command = dynamic value obtained after a predefined Onyx Server command was executed.
- cmd = dynamic value obtained after a user script was executed.
- SQL = dynamic value obtained after an SQL request (SELECT type in this case) was executed.
- resolve =: dynamic value obtained after a research in a resolution table.
- rulefile_multiple = defines several parameters with a dynamic value at once, with information in the same input file (in XML mode only).
Depending on the type of field needed, predictive text can be used, this option displays a new interface to configure the dynamic recovery of the value:
Type of function | Content | Icon | Type indicator |
---|---|---|---|
Parameter | Parameter of the application | Text in blue | |
None | Free text or list | none | Text in black |
RuleFile | Value in a datafile | Text of the cell | rulefile: keyword(Test) |
Command | Retrieval of a predefined command | Text of the cell | Command : cutposition |
Cmd | Retrieval of a command line | Text of the cell | cmd: completepath... |
SQL | Retrieval of an SQL request | Text of the cell | SQL: Select... |
Resolution table | Retrieval of a resolution table | Text of the cell | Resolve: TABLE[PARAM] |
Rulefile multiple | Values in the same file (XML) | Text of the cell | rulefile_multiple: xml |
Adding a condition
Definition
Condition objects define two different processings depending on the validity of a condition. Condition boxes are the only ones which have two outputs:
- at the bottom (direct path) if the condition is true (= True)
- on the right (bypath) if the condition is false (= False)
A condition is defined as a comparison between at least two values. A value can be a parameter, a constant, the result of a command or a script, of a research in a resolution table, of an SQL query, of a data file analysis.
Creat/Edit
To create a new condition, select the box after which the condition needs to be added, then, click on the icon.
To edit an existing condition, double-click on the corresponding box.
The condition editing window opens so as to define the different fields:
- Condition: Name of the condition object (1)
- title: Title of the object
- AND , OR: Tools to define the logic of the condition: adding/deleting a filter, AND and OR logical operators.
- Param1 egal value1: Condition filters
- Note: Note (blank field for comments).
A condition needs to have at least one condition filter.
Tip: The field "Name of the object" (1) is optional, filling it in is, however, highly recommended. This information appears in the log associated with the Workflow, which allows you to identify the different stages of the Workflow easily. Examples: "Condition failed" if no name is provided, otherwise "Condition 'Name of the condition' failed".
Condition filter When creating a new condition you are automatically asked to set a first filter. Double-clicking on a condition allows you to edit it:
Param1 EQUAL Value1
- parma1: Value to compare
- EQUAL: Comparison operator
- value: Comparison value
The comparison operators available are:
- equal to / different from: strict alphanumerical comparison between 2 values,
- contains / does not contain: alphanumerical research of a value in another value,
- is empty / is not empty: does the the parameter have a value?
- greater than / greater than or equal to: numerical comparison,
- less than/ less than or equal to: numerical comparison.
A condition can be defined by multiple condition filters. The button allows you to add a new condition filter. The logic between these filters is defined graphically using the boxes to tick before each filter and the and tools.
In this example, the condition logic is defined by: filter A and (filter B or filter C). The button allows you to delete a selected condition filter, or a selected condition logic (and the associated filters).
Adding a command
Definition
Command objects allow you to run unitary processings. The Workflow includes as many commands as there are processings to run. Command objects allow you to run the four main groups of processings: predefined Onyx Server commands in direct language, user scripts, SQL queries, or calls to other Workflows.
Create/Edit
To create a new command, select the box after which the command needs to be added, then, click on the icon. To edit an existing command, double-click on the corresponding box.
The command editing window opens so as to define the different fields:
- Type of object: Type of processing Command, Cmd, Sql or Call,
- Name of the object,
- title: Title of the object,
- File: group of predefined commands
- Copy to a folder: predefined command to run
- Source and destination folder: Parameters of the command
o Présente l’ensemble des paramètres requis ou optionnels pour la bonne exécution de la commande o L’onglet Standard regroupe les paramètres principaux de la commande o En fonction des commandes, d’autres onglets spécifiques présentent les paramétrages avancés Advanced
- Note: blank field for comments.
Predefined commands (COMMAND)
This group of processings includes the generic commands and ONYX Server direct language commands. Commands are sorted by groups according to what they are used for: Spooler, File, Mapping, XPS Toolbox, Mail…
Amongst the most used ones are:
Mapping / Text M-Designer : application of a Designer format on a data file in text mode
- Standard:
-Nom du format Designer à appliquer. La liste des formats importés sur le serveur est disponible par le bouton l’aide à la saisie
-Numéro de séquence (00010, ou *MRG, ou *ALL, etc.)
-Fichier d’entrée (le fichier de données)
-Fichier de sortie (le document XPS produit)
- Advanced:
-Langue de traduction (consulter le Guide Utilisateur de Designer pour l’utilisation des traductions)
-Fichier XPS à incorporer comme calque, avec possibilité de reprendre ses index
- Text options:
-Nombre de lignes maximum = possibilité de fixer un overflow sur le fichier de données en entrée et de provoquer un saut de page automatique, -Largeur de page : nombre de caractères maximum par ligne à lire dans le fichier de données en entrée,
-Page de code du fichier en entrée : permet de réaliser une conversion à la volée en Unicode UTF-16 si besoin. La liste des codes pages gérés dans Onyx Server est disponible par le bouton d’aide à la saisie .
- Output options:
-Page de début / page de fin : intervalle de pages à produire,
-Bac d’entrée / bac de sortie : ajout d’options de finition (PrintTicket) sur le document XPS produit pour la gestion des bacs d’imprimantes.
Spooler / Imprimer : envoi d’un spool dans une file d’attente du Spooler Onyx Server
- Standard:
-Nom de la file d’attente de destination. La liste des files d’attente déclarées dans le Spooler est disponible par le bouton d’aide à la saisie ,
-Nom du fichier à envoyer,
-Titre : nom donné au spool dans la file d’attente, -Envoyer le spool en état suspendu dans la file d’attente de destination,
-Conserver le spool après traitement dans la file d’attente de destination,
-Conserver les attributs courants = affecter au spool en sortie les attributs du spool en cours,
-Ajouter les paramètres courants = affecter au spool en sortie les paramètres de la session en cours,
- Page:
-Page de début / page de fin : positionne les attributs correspondants sur le spool de destination pour son intervalle de traitement,
-Nombre de copies : positionne l’attribut correspondant sur le spool de destination.
- Security:
-Propriétaire du spool de destination,
-Droits d’accès sur le spool de destination,
-Code comptabilité : affectation de l’attribut correspondant.
- Userdatas:
-Possibilité de définir des attributs supplémentaires sur le spool de destination.
- Advanced:
-Priorité du spool de destination,
-Nombre de jours de conservation du spool de destination,
-Nombre de jours avant compression du spool de destination (attribut hérité du monde AS/400, parfois utilisé par les applications clientes en amont et en aval),
-Type de support papier,
-Fidélité : attribut hérité du monde AS400 parfois utilisé par les applications clientes en amont et en aval
-Nom du fichier spool de destination.
La liste exhaustive des commandes prédéfinies Onyx Server est détaillée dans le Chapitre 4.
Les scripts utilisateurs
Le mode CMD permet de passer l’objet de type commande en mode éditeur de texte afin de taper une commande complète comme il serait fait en mode telnet ou en fenêtre de commandes MS-DOS. Tous les paramètres d’environnement (système et Mapping) ainsi que les attributs du fichier en cours de traitement sont accessibles. La commande exécutée peut être une commande Onyx Server spécifique et non disponible en commande prédéfinie ou alors un script (*.bat ou *.sh) complexe.
SQL queries
Le mode SQL permet de passer l’objet de type commande en mode éditeur de texte afin d’exécuter des ordres SQL. Tous les paramètres d’environnement (système et Mapping) ainsi que les attributs du fichier en cours de traitement sont accessibles. Les paramètres de connexion à la base de données doivent être définis dans la configuration de Onyx Server.
Les appels à des WORKFLOWS(CALL)
Le mode CALL permet d’exécuter, dans le Workflow en cours, un autre Workflow puis de continuer l’exécution du Workflow en cours une fois que le second est correctement terminé. Tous les paramètres d’environnement (système et Mapping) ainsi que les attributs du fichier en cours de traitement sont automatiquement transmis au sous-Workflow et utilisables dans celui-ci.