import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
import groovy.time.TimeCategory
def Message processData(Message message) {
def properties = message.getProperties();
int s_Minutes = properties.get("Minutes").toInteger();
def currentDate = new Date()
LogEnd = (currentDate.format("yyyy-MM-dd'T'HH:mm:ss"))
use( TimeCategory ) {
logStart = currentDate - s_Minutes.minutes
}
LogStart = (logStart.format("yyyy-MM-dd'T'HH:mm:ss"))
message.setProperty("logStart", LogStart);
message.setProperty("logEnd", LogEnd);
return message;
}
def void completedCount(String[] status, String[] iflow, Output output, MappingContext context){
def count = 0;
for(int i=0;i<=iflow.length-1;i++){
count = 0;
for(j=0;j<=status.length-1;j++){
if(status[j].contains(iflow[i]) && status[j].contains("COMPLETED"))
{
count++;
}
}
output.addValue(count);
}
}
def void FAILEDCount(String[] status, String[] iflow, Output output, MappingContext context){
def count = 0;
for(int i=0;i<=iflow.length-1;i++){
count = 0;
for(j=0;j<=status.length-1;j++){
if(status[j].contains(iflow[i]) && status[j].contains("FAILED"))
{
count++;
}
}
output.addValue(count);
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |