...
The Collection of Objects From String activity parameters can be provided by manual inserted values or via IN arguments or variables:
All of the input parameters are mandatory.
Parameters:
- InputString (text box editor type) (type: string): the input string that you wish to separate with Separator parameter to obtain a collection.
- Separator (text box editor type with "¥" default value) (type: string): the separator used to separate the input string to obtain a collection.
As mentioned above, the values for all the required parameters can be provided by IN arguments or variables. Below is an example of predefined arguments, ready to be used by the Collection of Objects From String activity:
The Read Only Output variable are the possible output values that the activity will provide:
- Output CollectionCollection (type: collection<object>): outputs a collection of type object containing the separated elements from the input string.
- Output Count (type: int32): outputs an integer equal to the collection count.
Get Element From Collection
This activity connects to the specified Googledrive account and outputs a Googledrive client connection returns an element from a specified index from the given Input Collection.
Activity Parameters
The Get Element from Collection activity parameters can be provided by manual inserted values or via IN arguments or variables:
All of the input parameters are mandatory.
Parameters:
- InputString Filter Index (text box editor type) (type: the input string that you wish to separate with Separator parameter to obtain a collection.
- Separator (text box editor type with "¥" default value ) : the separator used to separate the input string to obtain a collection.
The Read Only Output variable are the possible output values that the activity will provide:
- Output Collection: outputs a collection of type object containing the separated elements from the input string.
- Output Count : outputs an integer equal to the collection count.
- string): the index of the column from where you wish to extract the element (can be an integer or one of the name indexes specified in the 'Name indexes' parameter). If no value is specified, '0' is set by default.
- Input Collection (text box editor type) (type: collection<collection<string>>, string, any collection type): the input collection. Bind this parameter with a collection type Output parameter from an activity.
- Name Indexes (text box editor type) (type: string): the name of the column indexes of the current collection, separated by comma ','.
As mentioned above, the values for all the required parameters can be provided by IN arguments or variables. Below is an example of predefined arguments, ready to be used by the the Collection of Objects From String activity:
...
"Browse and Select a .Net Type" window opens. In the Search field, type "Collection" and hit "Enter". After the results are displayed, select the one of type collection<T>. Because the "Output Collection" parameter is of type collection<Object>, select from the drop down list, Object type and hit "Enter".
The "Browse and Select a .Net Type" window will close and the "Collection" defined variable will be of type Collection<Object>.
The "Count" variable should be of type "Int32" because the output parameter "Output Count" returns a value of type "Int32".
In order to display the values stored in the "Collection" variable, an iterator-type activity must be used to iterate through the elements of the collection and output the stored values. Get Element From Collection activity returns a specific element from the collection based on the "Filter Index" value. If all elements from the collection are to be displayed, a Custom ForEach activity should be used. For showcase purposes, in this task, Get Element From Collection activity is used to display the first element of the collection.
The "Count" variable value may be displayed in the Tracking Data panel using a Write Line activity or any other activity that displays values in the Tracking Data panel.
Get Element From Collection
Input Values
The "Input Collection" parameter is bound to the "Collection" variable which stores the "Output Collection" parameter from Collection Of Objects From String activity.The "Filter Index" parameters represents the position of the element in the collection. If the "Filter Index" parameter is used, the "Name Indexes" parameter may be ignored.
Output Values
The output values are stored in three defined variables. Given the case, OUT arguments may be used in the same manner. If the output values are not to be passed outside the task, variables need not be defined, but instead set the "Track Outputs" property for this activity to "Yes" and the output values will be displayed in the Tracking Data without storing them in variables/OUT arguments.
...
In order to display the values stored in the "Collection Count" , "CSVString" and "Element" variables, use Write Line activity or any other activity that displays values in the Tracking Data panel. Because this type of activities only display string values, variables "Count" and "CollectionCount" must be converted to string with "ToString()" function. The WriteLine activity that displays the counters which are of type "Int32" should have as input ' "Count : " + Count.ToString() +Environment.NewLine + "Collection Count : " +CollectionCount.ToString() '.
On Execution (Home->(Execution section) Start button) - task "Collections_Demo" , Tracking Data panel should display:
In order to import "Collections_Demo" task in Flowster Admin Suite, use Collections_Demo.zip attachment. ( For further information check Importing Tasks in Flowster Admin Suite )
The Read Only Output variable are the possible output values that the activity will provide:
- Collection Count (type: int32): outputs an integer equal to the collection count.
- CSV String (type: string): outputs a string containing the elements of the collection separated by ','.
- Element (type: string): outputs the string value of the element indicated by the 'Filter index' parameter.
- Element Object (type: object): outputs the element indicated by the 'Filter index' parameter.