How to define a Mapp and a MappType


I am defining a WorkflowActionStep and I need to give a parameter that is a map. I am defining my map as below using Mapp and MappType.

var mapargs = new C3.typesys.Mapp(new C3.typesys.MappType(
_ C3.typesys.PrimitiveType.String, AnyType));_

Then I add the following entries to the map using set(key, name) and I have two parameters that are dates.


mapargs.set(“filter”, “any_filter”);
mapargs.set(“start”, startDate);
mapargs.set(“end”, endDate);

However, the issue is that the (primitive) type assigned to the start and end dates values are not datetime, the mapp stores both types as string, although they are datetime, then it causes an issue when the WorkflowActionStep runs, below exception is thrown because it tries to pass the value of startdate as string because it stored its type as a string. Unable to coerce string value of MeterAssetAnalyticProcessor.runAnalyticsJob#start to datetime at at at at

Does anyone knows how should I provide the type of a value in a mapp?


Unless you’re on a very old environment you shouldn’t need to do this complicated code…

myType.myFunction({filter: 'any_filter', start: '2018-10-24', end: '2018-10-25'})

the client typesystem library should automatically convert this to a c3 mapp.


Thanks Riley, this works to create the c3 mapp.

But the issue is for the start and end fields, their type will be stored as a string in the WorkflowActionStep Type that I am using it. Is there a way I can define or change the type?

  "batchSize": {
    "type": "int",
    "value": 10
  "end": {
    "type": "string",
    "value": "2018-10-25T00:00:00.000"
  "filter": {
    "type": "string",
    "value": any_filter"
  "idSuffix": {
    "type": "string",
    "value": "any_suffix"
  "start": {
    "type": "string",
    "value": "2018-10-24T00:00:00.000"


I see… its possible “workflow” only knows about ‘string’ arguments. One option is to manually convert these strings into dateTime objects inside the workflow code. something like: DateTime.fromString(options.end.value)

It sounds like a good enhancement request to natively have batch job understand DateTime


I was able to make it work is by specifying the type explicitly like this - start":{“type”:“datetime”,“value”:“2018-10-21T00:00:00”}


thanks both it worked making it explicitly as Venkat said.