Ambigious Girl
Ambigious Girl

Reputation: 1

How to perform Sorting using flow steps in WebMethods (Software AG)?

I am new to this Middleware and I tried my level best to perform sorting using the flow steps in designer but couldn't make it.Can anybody help me out by giving me direction for how to complete my work?(like the flow steps in order and where i can put the conditions and all)

Thanks.

Upvotes: 0

Views: 2308

Answers (4)

Matthew Mills
Matthew Mills

Reputation: 103

No need to over-complicate it - use the utilities - pub.document:sortDocuments is what you are looking for.

  • If you receive stringList as input - convert this into a documentList. This can be done using pub.list:stringListToDocumentList (set the key to 'value')
  • Use pub.document:sortDocuments to sort the documentList. Remember to specify the key as 'value' once again and compareStringAs as 'numeric'. The order can also be set (ascending/descending)

Upvotes: 2

Gazza Knight
Gazza Knight

Reputation: 5

What format do you have the numbers in? Are they in a flat file or in a string list etc.

Upvotes: 0

Aryan Singh
Aryan Singh

Reputation: 38

Logic behind Sorting in webMethods is same as all other languages. You need LOOP to iterate every string in stringList, BRANCH to compare the two number and then map to the compare result to new StringList.

Upvotes: 0

Michael Knoth
Michael Knoth

Reputation: 78

What do you want to Sort? For Document-Lists you will find a built-in services in the WmPublic Folder. For String-Lists i would use a Java-Service for Sorting.

Upvotes: 0

Related Questions