Está en la página 1de 6

EXAMEN PRACTICO

De acuerdo a la siguiente estructura de mensaje de una transacción (TRAMA) en MIDAS.

Ejemplo: 1 transacción con dos partidas.

<?xml version="1.0" encoding="UTF-8"?>


<ns2:updatePrestamoRequest
xmlns:ns5="http://servicios.montedepiedad.com.mx/NMP/Schema/Tipos/Oferta/Prendario"
xmlns:ns4="http://servicios.montedepiedad.com.mx/NMP/Schema/NMPStandardHeader"
xmlns:ns3="http://servicios.montedepiedad.com.mx/NMP/Schema/Tipos/Comun"
xmlns:ns2="http://servicios.montedepiedad.com.mx/NMP/Schema/NMPPrestamo"
xmlns="http://servicios.montedepiedad.com.mx/NMP/Schema/NMPStandardMessage"
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<ns2:idTransaccion>10001</ns2:idTransaccion>
<ns2:idCliente>4049127</ns2:idCliente>
<ns2:nombre>Miguel</ns2:nombre >
<ns2:apellidoP>F </ns2: apellidoP >
<ns2:apellidoM>V </ns2: apellidoM>
<ns2:fechaOperacion>2019-10-31T11:46:36.000-05:00</ns2:fechaOperacion>
<ns2:idSucursal>11</ns2:idSucursal>
<ns2:esCancelacion>false</ns2:esCancelacion>
<ns2:esReempeno>false</ns2:esReempeno>
<ns2:ListaOperaciones>
<ns2:Operacion>
<ns2:Prestamo>
<ns2:folioPartida>122874</ns2:folioPartida>
<ns2:idClientePrenda>4049127</ns2:idClientePrenda>
<ns2:ramo>AL</ns2:ramo>
<ns2:subramo>AL</ns2:subramo>
<ns2:valorOperacion>2970.00</ns2:valorOperacion>
<ns2:tipoOperacion>PP</ns2:tipoOperacion>
<ns2:montoPrestamo>2970.00</ns2:montoPrestamo>
<ns2:producto>CL</ns2:producto>
<ns2:tipoOferta>PERSONALIZADA</ns2:tipoOferta>
</ns2:Prestamo>
<ns2:Contabilidad>
<ns2:esquemaCobro>DIA</ns2:esquemaCobro>
<ns2:idSucursalPartida>11</ns2:idSucursalPartida>
<ns2:interesDevengadoPorPeriodo>3.37</ns2:interesDevengadoPorPeriodo>
<ns2:fechaDecremento>2017-07-19T11:46:36.000-05:00</ns2:fechaDecremento>
<ns2:saldoFavor>0</ns2:saldoFavor>
<ns2:iva>0</ns2:iva>
<ns2:saldoInsoluto>2970.00</ns2:saldoInsoluto>
<ns2:montoAvaluoComercial>4704.00</ns2:montoAvaluoComercial>
EXAMEN PRACTICO
<ns2:idSucursalIngreso>0</ns2:idSucursalIngreso>
</ns2:Contabilidad>
</ns2:Operacion>
<ns2:Operacion>
<ns2:Prestamo>
<ns2:folioPartida>122875</ns2:folioPartida>
<ns2:idClientePrenda>4049127</ns2:idClientePrenda>
<ns2:ramo>AL</ns2:ramo>
<ns2:subramo>AL</ns2:subramo>
<ns2:valorOperacion>350.00</ns2:valorOperacion>
<ns2:tipoOperacion>PP</ns2:tipoOperacion>
<ns2:montoPrestamo>350.00</ns2:montoPrestamo>
<ns2:producto>CL</ns2:producto>
<ns2:tipoOferta>PERSONALIZADA</ns2:tipoOferta>
</ns2:Prestamo>
<ns2:Contabilidad>
<ns2:esquemaCobro>DIA</ns2:esquemaCobro>
<ns2:idSucursalPartida>11</ns2:idSucursalPartida>
<ns2:interesDevengadoPorPeriodo>3.37</ns2:interesDevengadoPorPeriodo>
<ns2:fechaDecremento>2017-07-19T11:46:36.000-05:00</ns2:fechaDecremento>
<ns2:saldoFavor>0</ns2:saldoFavor>
<ns2:iva>0</ns2:iva>
<ns2:saldoInsoluto>350.00</ns2:saldoInsoluto>
<ns2:montoAvaluoComercial>2104.00</ns2:montoAvaluoComercial>
<ns2:idSucursalIngreso>0</ns2:idSucursalIngreso>
</ns2:Contabilidad>
</ns2:Operacion>
</ns2:ListaOperaciones>
</ns2:updatePrestamoRequest>
EXAMEN PRACTICO
Los Parámetros que pueden variar son:

Tipo de operación. <ns2:tipoOperacion>PP</ns2:tipoOperacion>


Ejemplos de tipo de operación:

PP Empeño
DS Desempeño
RF Refrendo
AO IngresoAlmoneda

Sucursal. <ns2:idSucursalPartida>11</ns2:idSucursalPartida>
Monto. <ns2:valorOperacion>2970.00</ns2:valorOperacion>

Importante: Un transacción puede llevar una o varias partidas, recuerde que una partida es un
articulo a empeñar.
EXAMEN PRACTICO

Arquitectura general de la aplicación:

Flujo de información.

1. Enviar el MIDAS desde un Proxy Service a un tema topic JMS.


EXAMEN PRACTICO
2. Guardar la Transacción, Partidas y Cliente en las respectivas tablas
NMP_TRANSACCIONES, NMP_PARTIDAS, NMP_CLIENTES.
3. Crear las siguientes Reglas en un BR:
- Regla1. Si el monto es menor o igual 500 no genere alerta
- Regla2. Monto esta entre (501-1000) Tipo de Operación PP o RF, Codigo de alerta
generado (ATIPOO)
- Regla3. Monto esta entre (1001-3000), Codigo de alerta generado (ATIPOM)
- Regla4. Monto Mayor a 3000 y Tipo de Operación DS y Sucursal diferente de 7, Codigo
de alerta generado (ATIPOS)

4. Consumir el BR, en caso de generar alerta Guarda la información de la alerta en la tabla


NMP_ALERTAS, Realizar una consulta de la tabla NMP_ALERTAS con el respectivo cliente a la
tabla NMP_ALERTAS y si el cliente tiene más de 3 ALERTAS modificar su calificación en la tabla
de NMP_CLIENTES.
5. El BPEL debe responder en caso de ser un cliente con alertas un estatus REV_1, id de cliente y
una colección con los ID de las alertas registradas al cliente. Si no retornar el id de cliente y
estatus ACT_1.
NOTA: Cada cliente debe ser identificado por un único ID.
NOTA: Se pueden realizar múltiples transacciones por cliente.
NOTA: Todos los componentes y recursos realizados deben tener al inicio las siguientes siglas
PI_(Primer letra nombre)(Primer letra apellido).

EJEMPLO: Miguel Fuentes PI_MF_BPELProcess

Script para creación de tablas.

CREATE TABLE SOAINFRA.NMP_TRANSACCIONES (


"ID" INTEGER NOT NULL ,
"FECHA_REGISTRO" DATE ,
"SUCURSAL" VARCHAR(3) ,
"ID_CLIENTE" VARCHAR(15)
, CONSTRAINT "NMP_TRANSACCIONES_PK" PRIMARY KEY ( "ID" ) );

CREATE TABLE SOAINFRA.NMP_PARTIDAS (


"FOLIO" INTEGER NOT NULL ,
"ID_TRANSACCION" INTEGER NOT NULL ,
"ID_CLIENTE" VARCHAR(15) ,
"FECHA_REGISTRO" DATE ,
EXAMEN PRACTICO
"RAMO" VARCHAR(2) ,
"SUBRAMO" VARCHAR(2) ,
"MONTO" DECIMAL(5, 0) ,
"TIPO_OPERACION" VARCHAR(2) ,
"SUCURSAL" VARCHAR(3)
, CONSTRAINT "NMP_PARTIDAS_PK" PRIMARY KEY ( "FOLIO", "ID_TRANSACCION" ) );

ALTER TABLE SOAINFRA.NMP_PARTIDAS ADD CONSTRAINT


"NMP_PARTIDASTRANSACCIONES_FK" FOREIGN KEY ( "ID_TRANSACCION" )
REFERENCES SOAINFRA.NMP_TRANSACCIONES ( "ID" ) ON DELETE NO ACTION;

CREATE TABLE SOAINFRA.NMP_ALERTAS(


"ID" INTEGER NOT NULL ,
"ID_CLIENTE" VARCHAR(15),
"CODIGO_ALERTA" VARCHAR(6) ,
"FECHA_REGISTRO" DATE ,
"STATUS" VARCHAR(1) );

CREATE TABLE SOAINFRA.NMP_CLIENTES (


"ID" VARCHAR(20) NOT NULL ,
"NOMBRE" VARCHAR(50) NOT NULL ,
"CALIFICACION" DECIMAL(5, 0)
, CONSTRAINT "NMP_CLIENTES_PK" PRIMARY KEY ( "ID" ) );

EXITOS!

También podría gustarte