Feel.Extension.Camunda.Overloads (feel v0.1.0)

Copy Markdown View Source

The signatures that Camunda gives to functions of DMN 1.6 (D-81).

The function of DMN 1.6 runs first. Each of these answers only an error of it, or a number of arguments it does not take, and says :next when the arguments are not its own (Feel.Builtin.Function.with_overloads/2, D-81), so a call that DMN 1.6 answers gives what it gave.

CallCamunda
number("1,500", ",")the text with the grouping separator taken out, as number(from, grouping separator, null)
date and time(date and time, timezone)the same instant at the zone: Z, an offset or the id of a zone
string join(list, delimiter, prefix, suffix)the joined text with the prefix before and the suffix after
get value(context, keys)the entry at the path of the keys, null if there is none or the keys are none
context put(context, keys, value)the entries of the path that are not there are made
substring(string, start position, length)a length past the end is the rest of the string

Three of them answer a call that DMN 1.6 refuses by what it asks for, and are deviations from the TCK where it has a case; apps/bdm_tck/test/fixtures/tck/deviations/camunda_overloads.txt names each, with the reason.

date and time(date and time, timezone) does not take a date and time without a zone. It has no instant, and Camunda reads it in the zone of the machine it runs on, so the result depends on the machine: the example of its documentation, date and time(@"2020-07-31T14:27:30", "Z") is 12:27:30Z where the zone is Berlin in summer. Here that is the error of DMN 1.6.

Nor does it take an instant that its zone cannot write. Where the clocks go back, a local time happens twice and the library reads it as the earlier (Feel.Value.Zone), so the later of the two instants has no date and time in that zone and is the error of DMN 1.6, and not the other instant.

context put makes the entries that are not there, and only those. A key of the path that is an entry which is not a context stays the error of DMN 1.6, as the TCK has it (1146#nested009).

It is :camunda_overloads, and part of :camunda.