From 5cc24000b41b7ce3f26838549cf04d45fb7f21df Mon Sep 17 00:00:00 2001 From: Petr Panuska Date: Sun, 16 Dec 2018 17:02:02 +0100 Subject: [PATCH] Revert "fixing issue #1118" This reverts commit 0c8a95e29fa3f184f99237ebc5ea051203e4abf5. --- .../io/cloudslang/base/lists/add_element.sl | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/content/io/cloudslang/base/lists/add_element.sl b/content/io/cloudslang/base/lists/add_element.sl index aef420d004..1f555dc849 100644 --- a/content/io/cloudslang/base/lists/add_element.sl +++ b/content/io/cloudslang/base/lists/add_element.sl @@ -21,26 +21,34 @@ #! Example: '7' #! @input delimiter: The list delimiter #! +#! @output response: 'success' or 'failure' #! @output return_result: The new list or an error message otherwise +#! @output return_code: 0 if success, -1 if failure #! #! @result SUCCESS: The new list was retrieved with success +#! @result FAILURE: Otherwise #!!# ######################################################################################################################## + namespace: io.cloudslang.base.lists + operation: name: add_element + inputs: - - list: - required: false - - element: - required: false - - delimiter: - default: ',' - required: false - python_action: - script: | - list = list+delimiter+element if list else element + - list + - element + - delimiter + + java_action: + gav: 'io.cloudslang.content:cs-lists:0.0.7' + class_name: io.cloudslang.content.actions.ListAppenderAction + method_name: appendElement + outputs: - - return_result: ${list} + - return_result: ${returnResult} + - return_code: ${returnCode} + results: - - SUCCESS + - SUCCESS: ${returnCode == '0'} + - FAILURE