Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #809 from andrea11/integer_input_fix
Browse files Browse the repository at this point in the history
Do not convert Number instances in InputData to String
  • Loading branch information
apanicker-nflx committed Oct 19, 2018
2 parents c428a7d + 651b50f commit 480e3e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public Object replace(String paramString) {
private Map<String, Object> replace(Map<String, Object> input, DocumentContext documentContext, String taskId) {
for (Entry<String, Object> e : input.entrySet()) {
Object value = e.getValue();
if (value instanceof String || value instanceof Number) {
if (value instanceof String) {
Object replaced = replaceVariables(value.toString(), documentContext, taskId);
e.setValue(replaced);
} else if (value instanceof Map) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3488,6 +3488,9 @@ public void testSubWorkflow() {
assertNotNull(task);
assertNotNull(task.getOutputData());
assertNotNull("Output: " + task.getOutputData().toString() + ", status: " + task.getStatus(), task.getOutputData().get("subWorkflowId"));
assertNotNull(task.getInputData());
assertTrue(task.getInputData().containsKey("workflowInput"));
assertEquals(42, ((Map<String, Object>)task.getInputData().get("workflowInput")).get("param2"));
String subWorkflowId = task.getOutputData().get("subWorkflowId").toString();

es = workflowExecutionService.getExecutionStatus(subWorkflowId, true);
Expand Down Expand Up @@ -4153,6 +4156,7 @@ private void createSubWorkflow() {
Map<String, Object> ip2 = new HashMap<>();
ip2.put("test", "test value");
ip2.put("param1", "sub workflow input param1");
ip2.put("param2", 42);
wft2.setInputParameters(ip2);
wft2.setTaskReferenceName("a2");

Expand Down

0 comments on commit 480e3e4

Please sign in to comment.