|
|
@ -208,10 +208,8 @@ public class EntityRule {
|
|
|
|
if (expression != null) {
|
|
|
|
if (expression != null) {
|
|
|
|
if ("header".equals(what) && needsHeaders(expression))
|
|
|
|
if ("header".equals(what) && needsHeaders(expression))
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
if ("body".equals(what))
|
|
|
|
if ("body".equals(what) && needsBody(expression))
|
|
|
|
for (String variable : expression.getUsedVariables())
|
|
|
|
return true;
|
|
|
|
if ("text".equalsIgnoreCase(variable))
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
} catch (Throwable ex) {
|
|
|
@ -759,6 +757,17 @@ public class EntityRule {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static boolean needsBody(Expression expression) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
for (String variable : expression.getUsedVariables())
|
|
|
|
|
|
|
|
if ("text".equalsIgnoreCase(variable))
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
boolean execute(Context context, EntityMessage message, String html) throws JSONException, IOException {
|
|
|
|
boolean execute(Context context, EntityMessage message, String html) throws JSONException, IOException {
|
|
|
|
boolean executed = _execute(context, message, html);
|
|
|
|
boolean executed = _execute(context, message, html);
|
|
|
|
if (this.id != null && executed) {
|
|
|
|
if (this.id != null && executed) {
|
|
|
|