Skip to content

Commit

Permalink
Revert "fixing issue CloudSlang#1118"
Browse files Browse the repository at this point in the history
This reverts commit 0c8a95e.
  • Loading branch information
Petr Panuska committed Dec 16, 2018
1 parent 0c8a95e commit 5cc2400
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions content/io/cloudslang/base/lists/add_element.sl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5cc2400

Please sign in to comment.