on 02-27-2008 11:41 AM
Does anybody know if I can replace the following UDF by making a BPM that does the same thing?
public void SearchForString(String[] a,String[] b,String[] c,ResultList result,Container container){
int start_ind = 0, //Variable used to store startindex for the substring
end_ind = 0, //Variable used to store endindex for the substring
string_length = 0; //Variable used to store length of attributestring
String result_string = ""; //Variable used to store result in
try {
start_ind = a[0].indexOf(b[0]); //Getting the index of the attributestring
if (start_ind<0) { //Checking if the attribute could be found in the string, if not returning a default value and leaving the function
result_string = "No Value Present";
result.addValue(result_string);
return;
}
string_length = b[0].length(); //Setting all the indexed needed and collecting the substring we are looking for.
start_ind = start_ind + string_length; //
end_ind = a[0].indexOf(c[0],start_ind); //
result_string = a[0].substring((start_ind), (end_ind)); //
}
catch (StringIndexOutOfBoundsException ex){
}
result.addValue(result_string); //Returning the substring we looked for.
}
The function takes a string as input a, an other string to start to search for as input b and the end string to search for as input c. The context between the string b and c will be returned as the value we was looking for.
I want to build the same functionality in BPM and dont use this function in my mapping. Is this possible and if it is how do I do it?
Hello,
What for would you like to replace that with BPM? It is searching in one message the value. If you move it to BPM you will have to implement a few transaformation steps which will decrease your monitoring and clarity of the solution and of course performance. You will generate also additional messages in the message flow. From design perspective is bad idea BPM is not for that it's like buying a truck to transport pack of matches.
Best regards,
Wojciech
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kalle:
UDF is for node level tranformation and BPM is on message level munipulation.
If you really want BPM to implement same functionality, the transformation step is used for Message transformation (Message Mapping), it is possible for Message Mapping include one of node mapping which used your UDF code, in this case what is the point to use BPM ?
Hope this clarify your doubt.
Liang
Edited by: Liang Ji on Feb 27, 2008 8:42 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.