Trying to put together a fairly simple decision table and would like to strictly use javascript(as opposed to learning yet another syntax…)
As a MVP i am simply trying to check if a single input is in a specified array.
Basically: [“A”].includes(cellInput) where cellInput is provided.
Keep getting a error ant cannot seem to understand why…
"FEEL/SCALA-01008 Error while evaluating expression: failed to parse expression '[\"A\"].includes(cellInput)': [1.15] failure: end of input expected\n\n[\"A\"].includes(cellInput)\n ^"
Here is the example for reference:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="decision" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="4.9.0">
<decision id="MyDecision" name="My Decision">
<decisionTable id="DecisionTable_11mhzt9" hitPolicy="FIRST">
<input id="Input_1" label="My Text">
<inputExpression id="InputExpression_1" typeRef="string" expressionLanguage="javascript">
<text>myText</text>
</inputExpression>
</input>
<output id="Output_1" name="Result" typeRef="string" />
<rule id="DecisionRule_14ioo8t">
<inputEntry id="UnaryTests_0ltytx1">
<text>["A"].includes(cellInput)</text>
</inputEntry>
<outputEntry id="LiteralExpression_1710kw6">
<text>"A"</text>
</outputEntry>
</rule>
<rule id="DecisionRule_17bwwkc">
<inputEntry id="UnaryTests_1hh2s22">
<text></text>
</inputEntry>
<outputEntry id="LiteralExpression_0l4r2ac">
<text>"ZZ"</text>
</outputEntry>
</rule>
</decisionTable>
</decision>
<dmndi:DMNDI>
<dmndi:DMNDiagram>
<dmndi:DMNShape dmnElementRef="MyDecision">
<dc:Bounds height="80" width="180" x="160" y="100" />
</dmndi:DMNShape>
</dmndi:DMNDiagram>
</dmndi:DMNDI>
</definitions>
Any help on this is appreciated!