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