Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

180
Vistas
Working with tw.object.Map in IBM BAW javascript

My service flow has a map variable. Using a script task, I populate that variable.

Here is the sample code:

variable defined in service flow - myMap of type tw.Object.Map

My JavaScript:

tw.local.myMap = new tw.object.Map();
var contentTypeKey = "Content-Type";
var contentTypeValue = "application/json";

tw.local.myMap.put(contentTypeKey, contentTypeValue);
log.info(tw.local.myMap.get(contentTypeKey));

When debugging I get this exception:

CWTBG0019E: Unexpected exception during execution. Exception information: 'An exception occurred in activity "Script Task" of "Service Flow" with name "Service Flow test". Task instance id "Task.1083173". Details: "Runtime error in script ("Process: 'Service Flow test' ProcessItem: 'Script Task' Type: 'ITEM'" 2:-1). ReferenceError: "myMap" is not defined. (#2) Script (line 2): 1 : // Assignment script 2 : myMap.get("Content-Type");

Any help appreciated.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda