@Override
public void processEvent() throws Exception {
ITrackerAppSoap trackerClient = (ITrackerAppSoap) ClientSoapStubFactory.getSoapStub(ITrackerAppSoap.class, defaultWebserviceEndpoint);
ArtifactSoapDO artifact = (ArtifactSoapDO) getUpdatedData();
TrackerFieldSoapDO[] fields = trackerClient.getFields(getSessionKey(), artifact.getFolderId());
boolean processEvent = false;
SoapFieldValues flexFields = artifact.getFlexFields();
for(TrackerFieldSoapDO field: fields) {
System.out.println(field.getName() + field.getDisabled());
if(field.getName().equals(ctfFieldName) && Arrays.asList(flexFields.getNames()).contains(field.getName())
&& !field.getDisabled()) {
if(field.getFieldValues() != null && field.getFieldValues().length > 0
&& field.getFieldValues()[0].getValue() != null
&& field.getFieldValues()[0].getValue().equals(ctfFieldValue)) {
processEvent = true;
break;
}
}
}
System.out.println(processEvent);
if(!processEvent) return;
String originId = artifact.getId();
//get the target id.
String targetId = getTargetId(originId);
String operation = getEventContext().getOperation();