@@ -682,14 +682,21 @@ private void inboundTransferC2bImplementationRoutes() {
682
682
String accountHoldingInstitutionId = e .getIn ().getHeader ("accountHoldingInstitutionId" ).toString ();
683
683
String clientCorrelationId = e .getIn ().getHeader ("X-CorrelationID" , String .class );
684
684
String callbackURL = e .getIn ().getHeader ("X-CallbackURL" ).toString ();
685
- // inbound-transfer-mifos-lion
685
+ String tenantId = ( String ) e . getIn (). getHeader ( "Platform-TenantId" );
686
686
Map <String , Object > variables = amsUtils .setZeebeVariables (gsmaTranfer .getCustomData (), timer );
687
- variables .put (TENANT_ID , accountHoldingInstitutionId );
687
+ if (tenantId != null && !tenantId .isEmpty ()) {
688
+ variables .put (TENANT_ID , tenantId );
689
+ } else {
690
+ variables .put (TENANT_ID , accountHoldingInstitutionId );
691
+ tenantId = accountHoldingInstitutionId ;
692
+ }
693
+ variables .put ("accountHoldingInstitutionId" , accountHoldingInstitutionId );
688
694
variables .put (CHANNEL_REQUEST , objectMapper .writeValueAsString (gsmaTranfer ));
689
695
variables .put ("clientCorrelationId" , clientCorrelationId );
690
696
variables .put ("X-CallbackURL" , callbackURL );
697
+ // tenantId in workflowName should be changed to accountHoldingInstitutionId;
691
698
String workflowName = new StringBuilder ().append (subtype ).append ("_" ).append (type ).append ("_" ).append (amsName )
692
- .append ("-" ).append (accountHoldingInstitutionId ).toString ();
699
+ .append ("-" ).append (tenantId ).toString ();
693
700
logger .info ("Workflow Name:{}" , workflowName );
694
701
String transactionId = zeebeProcessStarter .startZeebeWorkflowC2B (workflowName , variables );
695
702
GsmaP2PResponseDto responseDto = new GsmaP2PResponseDto ();
0 commit comments