Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!