Stream

Here are the details about stream.

Stream container

Container is used to merge multiple streams into one. For example, if the FileGet Component's "Begin loop" property is set as "No", and its "File path" property is set as "*.csv", and there are 3 files that can match the properties, the 3 streams can be merged into one, and output as a container. Namely, after the 3 CSV streams that have 3 records, 5 records, 10 records seperately are containerized, you can process the 18 records as CSV stream by using Mapper Component. In the below Flow, the output data of the FileGet Component can be processed as an 18-line CSV stream.

ストリーム

A container has the below features.

Not all of the components can receive a container. If a container is input into a component that can't receive it, an error will happen. However, some components can spread a container to use. For example, if an attachment is added by the SimpleMail Component, each stream in the container can be used as an attachment.

Convert stream type

To convert a stream type means to convert a stream into another type and read it. For example, you can store the whole CSV stream into a Flow variable by converting a CSV stream into a Binary stream. According to the Converter Component, some streams can be converted into another type, but some can't.

Memo

Except the streams with single field (MIME, HTML, TEXT, Binary), when you want to convert a stream type that can define multiple fields into another stream type that can also define multiple fields, you can't change the number of the fields and the name.

Stream type conversion table
Input\Output Binary (※1) Text (※2) HTML (※3) CSV Fixed XML Record Parameter MIME (※8)
Binary ○ (※4) ○ (※6) ○ (※7) × ×
Text ○ (※4) ○ (※6) ○ (※7) × ×
HTML × × ○ (※7) × ×
CSV × ○ (※5) ○ (※5) × ○ (※5) ×
FixedLength × ○ (※5) ○ (※5) × ○ (※5) ×
XML × × × ×
Record × ○ (※5) ○ (※5) ○ (※1) ○ (※5) × ○ (※1)
ParameterList × ○ (※5) ○ (※5) ○ (※1) ○ (※5) × ○ (※1)
MIME × × × × × ×

※1 The stream's binary value is used here.

※2 The stream's string value is used here.

※3 The validity of the HTML isn't checked.

※4 When the input data is CSV format.

※5 The fields are matched by index instead of their names. Moreover, the field definition can't be changed.

※6 When input data according to the field definition

※7 When the input data is XML format

※8 To convert the data into MIME is to add an appropriate MIME header according to the stream type.

Data representation of stream

All of the streams represents their data content by the below 3 methods.

A component processes a stream with the arbitrary one of the above 3 methods. For example, the FilePut Component converts a stream into a file by using binary representation; The Mapper Component makes the mapping of each field of the stream graphical by using record representation; Both the string representation and the record representation can be used in the Velocity Component.

XML

CSV

FixedLength

Record

ParameterList

MIME

Text, HTML

Binary

Convert data type

When a value is assigned to a field or a variable by the Mapper Component, the data type will be converted implicitly. If a value that can't be converted is assigned, an error will happen.

Data conversion form
Input\Output Boolean Integer Decimal Double String Binary※1 DateTime
Boolean - ○※2 ○※2 ○※2 ○※3 ×
Integer ○※4 - ○※5
Decimal ○※4 - ○※5
Double ○※4 ○※11 - ○※5
String ○※6 △※9 △※9 △※9 - △※10
Binary ※7 -
DateTime × ○※5 ○※5 ○※5 ○※8 -

○=can be converted, △=depend on format, ×=can't be converted

※1 To convert data to Binary is to convert it into String, then convert it into byte by the system's encoding. (Please take care of the platform dependencies)

※2 True=1, False=0

※3 True="true", False="false"

※4 0=False, otherwise,0=True.

※5 DateTime Type can be converted with Numeric Type in milisecond from 00:00:00 GMT January 1st 1970.

※6 There is no difference between capital letter and small letter in it, and if it matches to "true", it will be True, otherwise it will be False.

※7 You can convert the data from Binary when it has been converted into String by the system encoding. (Please take care of the platform dependencies.)

※8 The standard data fomat in the Flow Service is "yyyy-MM-dd'T'HH:mm:ss'.'sss z".

※9 Only demical number is valid. (The blanks before and after the number can be ignored.)

※10 Please refer to the DateTime Type's format.

※11 The part after the point of the value can be rounded up.

No matter what the data type is, null can be converted into every type. If it failed to convert when it was input into the field by the Mapper Component, an error will happen.

DateTime Type format

The standard date format in the Flow Service is the "yyyy-MM-dd'T'HH:mm:ss'.'SSS z" format defined in the ISO8601. The format will be used when the date type is output as a string. z represents time zone, and is recorded as ’JST’, ’+0900’, ’GMT-01:00’ etc. If the time zone is omitted, it will be processed as the local time.

Moreover, the date string in the below formats can be read. Please use either of the below formats when set the DateTime value as string for the property.

yyyy-MM-dd'T'HH:mm:ss z
yyyy-MM-dd'T'HH:mm:ss'.'SSS z

Moreover, only when the format is "yyyyMMdd'T'HH:mm:ss'.'SSS", if the UTC specified “Z” is added to the data directly, it will be processed as GMT.

 

To the top of this page