Add specs for automation engine's data type handling.
Fix automation engine to handle the data value based on its data type.