<empty>

Empty check processor

Core v2.2.0

Overview

The processor serves two purposes: (1) Check if a value is empty/null, and (2) Execute processors for their side effects without producing output.

Usage Examples

Example 1: Check if variable is empty

example-1.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://org.webharvest/schema/2.1/core">
<if condition="${empty(apiKey)}">
  <file path="error.log" action="append">API key not configured!</file>
  <exit/>
</if>
</config>

Example 2: Execute for side effects only

example-2.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://org.webharvest/schema/2.1/core">
<empty>
  <!-- Log activity without storing result -->
  <file path="debug.log" action="append">
    Processing started at ${_date}
  </file>
</empty>
</config>

Related Processors