はこふぐのメモ

めもです

自分へのメモ BluePrism Collectionを操作する Collection Manipulation Filter Collection/Sort Collection

 

BluePrismでCollectionを扱うには、Collection Manipulationでいろいろできそう。

 

Collection ManipulationのFilter CollectionのとSort Collectionのサンプルをつくってみました。

Filter Collection

Filters a collection using the given query
与えられた条件を使ってCollectionをフィルタする。
 

サンプルで使用する元のCollection

f:id:sazanamifugu:20191122111342p:plain

入力パラメータ

 

f:id:sazanamifugu:20191122113654p:plain



Collection in  操作したい元のCollectionを指定

FileterはFilter  条件を指定

 

出力パラメータ

f:id:sazanamifugu:20191122111534p:plain

 

Collection Out フィルタ後のデータを入れるCollectionを指定。

 

実行結果

f:id:sazanamifugu:20191122113750p:plain

出力パラメータに指定したCollectionに、Price=400の条件でFilterされた結果のみ可能されました。

入力パラメータに指定したもともとのCollectionには変更はありません。

Filterに何を指定するか

ヘルプを見てもいまいち説明がありません。

f:id:sazanamifugu:20191122113848p:plain

しょうがないのでFilter CollectionのCodeStageを見てみると

f:id:sazanamifugu:20191122114015p:plain

DataRowのSelectの引数の形式に従う形式がありそうです。

ヘルプに書いてくれ~

 

ということで、Filterには以下のような指定ができます。

文字列を指定したい場合 ⇒  "Name='商品A003'"

複数指定   ⇒  "Name IN ('商品A003','商品B001')"

ワイルドカード  ⇒ "Name like '*商品A*'"

 

Sort Collection

Sorts a collection according to the specified field.特定の項目でCollectionをソートします。

 

入力パラメータ

f:id:sazanamifugu:20191124082543p:plain

Collection ソートしたい元のCollection

Sort Field ソートを行うキー項目名

Accending Order ソート順  昇順:True 降順:False


出力パラメータ

 

f:id:sazanamifugu:20191124082856p:plain


Sorted Collection ソート後のデータを入れるCollectionを指定
Success ソートが成功したかどうかのFlag True:成功
Message  ソートが失敗した場合のエラーメッセージ
 

実行結果

Accending OrderがTrue(昇順)の場合

f:id:sazanamifugu:20191124083244p:plain

Accending OrderがFalse(降順)の場合

f:id:sazanamifugu:20191124083158p:plain

 

 

プライバシーポリシー
©2019 はこふぐのメモ All rights reserved