Skip to content

Commit

Permalink
renamed directories and other small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
denisa-dan committed Mar 2, 2017
1 parent d175c1f commit 67e7ccb
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
#
########################################################################################################################
#!!
#! @description: Check the state of a System Property file
#! @description: Decision that checks the state of a System Property file.
#!
#! @result CONTAINS: System Property is set at default value.
#! @result DOES_NOT_CONTAIN: System Property is not set at default value.
#!!#
########################################################################################################################

namespace: io.cloudslang.samples.yoda
namespace: io.cloudslang.base.examples.yoda

decision:
name: contains

results:
- CONTAINS: ${get_sp('io.cloudslang.samples.properties.default_quote', 'false') == 'true'}
- CONTAINS: ${get_sp('io.cloudslang.base.examples.properties.default_quote', 'false') == 'true'}
- DOES_NOT_CONTAIN
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
# http://www.apache.org/licenses/LICENSE-2.0
########################################################################################################################
#!!
#! @description: Based on a random number generator display a quote from Yoda
#! @description: The flow displays a Yoda quote based on a random number generator.
#!
#! @input file_path: The path for the file that contains the quotes
#! @input file_path: The path for the file that contains the quotes.
#!
#! @result SUCCESS: Flow completed successfully.
#! @result SUCCESS: The quote was displayed successfully.
#! @result FAILURE: Failure occurred during execution.
#!!#
########################################################################################################################

namespace: io.cloudslang.samples.yoda
namespace: io.cloudslang.base.examples.yoda

imports:
math: io.cloudslang.base.math
Expand Down Expand Up @@ -55,4 +55,7 @@ flow:
base.print_text:
- text: ${str(read_text.split(';')[int(random_number)])}
navigate:
- SUCCESS: SUCCESS
- SUCCESS: SUCCESS
results:
- SUCCESS
- FAILURE
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
#
########################################################################################################################
#!!
#! @description: Read an image from a file and print it.
#! @description: The flow reads an image of Yoda from a file and prints it to the screen.
#!
#! @input file_path: The path of the image
#! @input file_path: The path of the file containing the image.
#!
#! @result SUCCESS: Flow completed successfully.
#! @result SUCCESS: The image was displayed successfully.
#! @result FAILURE: Failure occurred during execution.
#!!#
########################################################################################################################

namespace: io.cloudslang.samples.yoda
namespace: io.cloudslang.base.examples.yoda

imports:
base: io.cloudslang.base.print
Expand Down Expand Up @@ -44,4 +44,7 @@ flow:
base.print_text:
- text: ${read_text}
navigate:
- SUCCESS: SUCCESS
- SUCCESS: SUCCESS
results:
- SUCCESS
- FAILURE
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,26 @@
# The Apache License is available at
# http://www.apache.org/licenses/LICENSE-2.0
#
#########################################################################################################################!!
#! @description: Based on a System Property file
########################################################################################################################
#!!
#! @description: The flow is based on a System Property file
#! If it is set on true it displays the default quote, otherwise generates a random quote.
#!
#! @input default_quote : quote with a default value
#! @input file_path: The path for the file that contains the quotes
#! @input default_quote : quote with a default value.
#! @input file_path: The path for the file that contains the quotes.
#!
#! @result SUCCESS: Flow completed successfully.
#! @result FAILURE: Failure occurred during execution.
#!!
#!!#
########################################################################################################################

namespace: io.cloudslang.samples.yoda
namespace: io.cloudslang.base.examples.yoda

imports:
base: io.cloudslang.base.print
fs: io.cloudslang.base.filesystem
math: io.cloudslang.base.math
quoteGenerator: io.cloudslang.samples.yoda
quote_generator: io.cloudslang.base.examples.yoda

flow:
name: quote_check
Expand All @@ -37,14 +38,14 @@ flow:
workflow:
- print_quote:
do:
quoteGenerator.contains: []
quote_generator.contains: []
navigate:
- CONTAINS: print_default_quote
- DOES_NOT_CONTAIN: print_random_quote

- print_random_quote:
do:
quoteGenerator.generate_random_quote:
quote_generator.generate_random_quote:
- file_path
navigate:
- SUCCESS: SUCCESS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
# http://www.apache.org/licenses/LICENSE-2.0
#
########################################################################################################################
# System property file for samples.yoda operations.
# System property file for base.examples.yoda operations.
#
# io.cloudslang.samples.properties.default_quote: value of default quote
# io.cloudslang.base.examples.properties.default_quote: value of default quote
#
########################################################################################################################

namespace: io.cloudslang.samples.properties
namespace: io.cloudslang.base.examples.properties

properties:
- default_quote: 'true'
File renamed without changes.
File renamed without changes.

0 comments on commit 67e7ccb

Please sign in to comment.