Parse Special characters in a string using a workflow
The requirement is to collect the account data and send it accross the external system using EAI Integration. In order to gather the account details we need to query the name in Siebel DB which can also contain special characters. Focussing on the configuration part i.e. to parse special characters in a Account name.
For example, Account Name can be:
AmitKumarSh’arma (Apostrophe), AmitKumar”Sharma(Double Quotes), AmitKumar#Sharma, AmitKumar$harma,Amit(Kumar)Sharma, AmitKumarSh’arma, Amit(Ku”mar)Sharma,Amit$(Ku”mar)S#harma, AmitKumar(Sh’a)rma.
We need to parse these characters and provide a scriptless solution. Although there are alternatives in escript such as functions called replace(), join() used along with split() but the need was a scriptless solution.
Follow the below scriptless solution to implement this requirement using a workflow process.
1. In Siebel Tools, create a new workflow process based on “Account” BO and workflow mode as “Service Flow”.
Create Custom process properties as below
AccountName type = String
Name type = String
Charfound type = String
Length type = Number
Number Of Rows type = Number
PrefixName type = String
SuffixName type = String
2. Configure the Search Character Step as below:
For reference the values are – InStr([&AccountName], “‘”) and Len([&AccountName])
3. Configure the Break Account Name Step as below
For reference the values are – Left([&AccountName], [&Charfound]) and Right([&AccountName],[&Length]-[&Charfound])
4. Configure the Concatenate Step as below:
For reference the values is – [&PrefixName]+”‘”+[&SuffixName]
5. Configure the Query Account Step as below:
For reference the values is – “[Alias] ='”+ [&Name]+”‘”
Alias is the field name at the BC level:
6. Configure the decision step Special character step as below:
Set the Type as Condition for “Yes” pointer and Set the type as Default for Connector 8.
Define the below condition on “Yes”
7. Configure the Query Account Name step as below
For reference the value is – “[Alias] ='”+ [&AccountName]+”‘”
8. Supply the “Default String” property for process property called “Account Name” with the input string for testing in debug mode. You will see that the special characters are parsed as below
Name containing apostophe are parsed via the path Start->Search Character -> Special Character -> Query Account Name ->End
Name containing other special characters are parsed via path Start->Search Character -> Special Character ->Break Account Name -> Concatenate -> Query Account ->End
For Scripted solution you can visit :