How to convert Rules 'text' data type to 'text_formatted' type? I am working with Rules to set a node's body. Based on the data selector, the node body requires a text_formatted type as input.

Currently, my custom event only provides a plain 'text' Rules data type. Is there a way I can programmatically convert the plain text to text_formatted? And when and where should it happen?
I tried fixing this myself but I'm not sure if this is the best.

I took a peek at entity/includes/entity.property.inc and found the definition of entity_property_text_formatted_info() enough for me to define it properly.

I simply wrapped the plain 'text' with an array definition of a 

    $text_formatted = array('value' => $text_plain,
                            'summary' => $text_plain,
                            'format' => 'full_html');

And fed $text_formatted to the event invoke call.