OG-EP Référentiel
Raccourcis espace
OG-EP Référentiel OGEPREF

IDE

Modeleur pour édition des diagrammes BPMN: https://camunda.com/download/modeler/

Moteur BPM opensource: Camunda 7.12

Doc: https://docs.camunda.org/manual/

Appli de supervision embarquée: cockpit (http://localhost:8080/app/cockpit/default/#/dashboard)

BDD MySQL : https://dev.mysql.com/downloads/workbench/

SCM

https://git.intra.monext.fr:8443/socle/financial/financial/tree/develop/financial-bpm => fonctionnel EP (java + bpmn)

https://git.intra.monext.fr:8443/socle/financial/financial/tree/develop/financial-bpm/financialbpm-business/src/main/resources/bpm => diagrammes BPMN

https://git.intra.monext.fr:8443/socle/financial/financial/tree/develop/financial-bpm/financialbpm-model/src/main/resources/sql/create => scripts SQL

https://git.intra.monext.fr:8443/socle/jfrm-engines/jfrm-engines => utilitaires pour moteur de workflow

https://git.intra.monext.fr:8443/socle/financial/financial-subihm-front → Front ERD

https://git.intra.monext.fr:8443/socle/financial/financial-subihm-back → Back ERD


CI

SonarQube

https://sonarqube.intra.monext.fr:10410/dashboard?id=monext.financial%3Afinancialbpm

(Analyse effectuée sur branche Master)

LIVRAISON

Procédure à suivre en intégration / recette :

  1. Push des commits sur branche 'develop'
  2. Merge de branche 'develop' sur branche 'release'
  3. Execution du job jenkins 'ep-financial-bpm-release'
  4. Merge de branche 'release' sur branche 'master'
  5. Merge de branche 'master' sur branche 'develop'
  6. Déploiement de la nouvelle version: 
    1. mbslite-stop
    2. jfrm-lsol-mbs-lite/bin/update-app.sh en spécifiant manuellement la version
    3. mbslite-start

Les process existants précédemment peuvent être purgés via menu "More" / "Deployments"  et action "delete Deployment: SpringAutoDeployment" avec "cascade" coché du déploiement antérieur.

ENV


IntégrationRecetteProd
Camunda

URL  https://epa1r1.dc1lan.local:8443/app/cockpit/default/#/dashboard

login / mdp : demo/oldPWDd@m0!


URL : https://epa1r1.dc1lan.local:8444/app/cockpit/default/#/dashboard 

login / mdp : demo/oldPWDd@m0!

https://ep-bpm.intra.monext.fr : générique

https://epa1p1.dc1lan.local:8443/ : Rennes

https://epa2p1.dc2lan.local:8443/ : Brest

Gestion des utilisateurs sur Camunda

Kibana

https://vpc-mxt-es-ep-hprod-int01-mdy22tl2iwzmeoaugntnvbmdmi.eu-west-3.es.amazonaws.com/_plugin/kibana/app/home#/

https://vpc-mxt-es-ep-hprod-rec01-bbfnti3rhrizmgnxtlmkobvz5u.eu-west-3.es.amazonaws.com/_plugin/kibana/app/home#/

https://vpc-mxt-es-ep-prod-prod-5ogrqiw7ntac566njvicqvlgiq.eu-west-3.es.amazonaws.com/_plugin/kibana/app/home#/

Serveur MREP

Rennes/Brest

epa1r1.dc1lan.local / epa2r1.dc2lan.local (backup)

users :

epbpmi - epbpmitrans : MREP

epgtwi : gateway

epgtwmocki : bouchon

epa1r1.dc1lan.local / epa2r1.dc2lan.local (backup)

users :

epbpmr - epbpmrtrans : MREP

epgtwr : gateway

epgtwmockr : bouchon

epa1p1.dc1lan.local / epa2p1.dc2lan.local  (backup)

users :

epbpmp - epbpmptrans : MREP + gateway

+ user perso pour la plateforme


BDD (Camunda)

mysql://epb1r1.dc1lan.local:3305/EPBPMI716 - epbpmi_admin

mysql://epb1r1.dc1lan.local:3308/EPDATAI - epdatai_admin

Conf : /USR/epbpmi/spring-boot/financialbpm/config/application-dev.properties

mysql://epb1r1.dc1lan.local:3306/EPBPMR716 - epbpmr_admin

mysql://epb1r1.dc1lan.local:3307/EPDATAR - epdatar_admin

Conf : /USR/epbpmr/spring-boot/financialbpm/config/application-dev.properties

mysql://epb1p1.dc1lan.local:3306/EPBPMP716 - user nominatif (demander accès)

mysql://epb1p1.dc1lan.local:3307/EPDATAP - user nominatif (demander accès)

Conf : /USR/epbpmp/spring-boot/financialbpm/config/application-prod.properties

TEST

Déclenchement d'un workflow non cyclique - Exemple: actu commerçants
curl -X POST http://localhost:8080/rest/process-definition/key/actu-commercants/start \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '{
	"variables": {
		"directory": {
			"value": "src\\test\\resources\\\\merchant"
		},
		"filenameGlob": {
			"value": "actu_commerçants.txt"
		}
	}
}'
Workflow sans variables de démarrage et permettant de générer un fichier de virement
curl -X POST http://localhost:8080/rest/process-definition/key/vacation-creances/start \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"variables": {}
}'

Camunda

Déploiement d'un workflow:

Exemple d'appel au MOM dans virement_banktransfer.bpmn / Tâche "Créer ordre BankTransfer" :

Construction d'un tableau json en javascript:

var System = Java.type('java.lang.System')
var JavaDate = Java.type('java.util.Date')
var SimpleDateFormat = Java.type('java.text.SimpleDateFormat')
var orders = S("[]",'application/json')
for each (var cashoutOrder in execution.getVariable('cashoutOrders').elements()) {
	var orderId = execution.id + '-' + new Date().getTime();
	var order = {
		"orderId": orderId,
		"refExterne": orderId,
		"orderType": "V",
		"creditorName": cashoutOrder.prop("creditorName").stringValue(),
		"creditorBic": cashoutOrder.prop("creditorBic").stringValue(),
		"creditorIban": cashoutOrder.prop("creditorIban").stringValue(),
		"debtorName": "MONEXT",
		"debtorBic": System.getProperty('monext.bank.bic'),
		"debtorIban": System.getProperty('account.abi.reglement.iban'),
		"amount": cashoutOrder.prop("amount").numberValue(),
		"deviseId": "EUR",
		"ccy": "EUR",
		"bankId": System.getProperty('output.transfers.bankId'),
		"orderFormat": System.getProperty('output.transfers.external.format'),
		"echeance": new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(new JavaDate()),
		"info": ("Cashout du " +  new SimpleDateFormat("yyyy-MM-dd").format(new JavaDate()))
	}
	orders.append(S(order,'application/json'))
}

A noter:

  • S("[]",'application/json') permet de créer un tableau json vide
  • .elements() permet d'itérer sur les éléments d'un tableau json
  • .prop("amount").numberValue() permet d'accéder au contenu numérique de la propriété "amount" de l'objet json
Utilisation de clé sensible depuis javascript
var KeyStoreUtils = Java.type('monext.financialbpm.business.commons.KeyStoreUtils')
System.out.println(KeyStoreUtils.getValue('account.abi.reglement.iban'))

  • Aucune étiquette
Écrire un commentaire...
OG-EP Référentiel OGEPREF