@@ -38,24 +38,26 @@ public void setJmesPathInterface(JmesPathInterface jmesPathInterface) {
38
38
}
39
39
40
40
public void runIdRules (RulesObject rulesObject , String event ) {
41
- JsonNode idsJsonObj = getIds (rulesObject , event );
42
- ArrayList <String > objects = null ;
43
- String id ;
44
- if (idsJsonObj .isArray ()) {
45
- for (final JsonNode idJsonObj : idsJsonObj ) {
46
- id = idJsonObj .textValue ();
47
- objects = matchIdRulesHandler .fetchObjectsById (rulesObject , id );
48
- for (String object :objects ) {
49
- extractionHandler .runExtraction (rulesObject , id , event , object );
50
- }
51
- if (objects .size () == 0 ){
52
- if (rulesObject .isStartEventRules ()) {
53
- extractionHandler .runExtraction (rulesObject , id , event , (JsonNode )null );
54
- } else {
55
- try {
56
- waitListStorageHandler .addEventToWaitList (event , rulesObject );
57
- } catch (Exception e ) {
58
- log .info (e .getMessage (),e );
41
+ if (rulesObject != null && event != null ) {
42
+ JsonNode idsJsonObj = getIds (rulesObject , event );
43
+ ArrayList <String > objects = null ;
44
+ String id ;
45
+ if (idsJsonObj != null && idsJsonObj .isArray ()) {
46
+ for (final JsonNode idJsonObj : idsJsonObj ) {
47
+ id = idJsonObj .textValue ();
48
+ objects = matchIdRulesHandler .fetchObjectsById (rulesObject , id );
49
+ for (String object : objects ) {
50
+ extractionHandler .runExtraction (rulesObject , id , event , object );
51
+ }
52
+ if (objects .size () == 0 ) {
53
+ if (rulesObject .isStartEventRules ()) {
54
+ extractionHandler .runExtraction (rulesObject , id , event , (JsonNode ) null );
55
+ } else {
56
+ try {
57
+ waitListStorageHandler .addEventToWaitList (event , rulesObject );
58
+ } catch (Exception e ) {
59
+ log .info (e .getMessage (), e );
60
+ }
59
61
}
60
62
}
61
63
}
0 commit comments