I can't set a data value using rule on a custom entity I have created a custom entity "Project" with this fields: id, name.

I have created a rule and added an action "create entity" and selected "Project".

I have added another action "Set a data value" and selected "name" of the newly created entity project and I had this message : "The selected data property doesn't support writing."

Here is the entity property info

 /**
 * Implements hook_entity_property_info().
 */
function project_entity_property_info() {

  $info = array();

  $info['project']['properties']['id'] = array(
    'label' =&gt; t('Project ID'),
    'description' =&gt; t('The ID of the project.'),
    'type' =&gt; 'integer',
    'schema field' =&gt; 'id',
  );

  $info['project']['properties']['name'] = array(
    'label' =&gt; t('Project name'),
    'description' =&gt; t('Name of the project.'),
    'type' =&gt; 'text',
    'schema field' =&gt; 'name',
  );
  $info['project']['properties']['description'] = array(
    'label' =&gt; t('Project description'),
    'description' =&gt; t('Description of the project.'),
    'type' =&gt; 'text',
    'schema field' =&gt; 'description',
  );
  $info['project']['properties']['deadline'] = array(
    'label' =&gt; t('Deadline'),
    'description' =&gt; t('Project deadline.'),
    'type' =&gt; 'date',
    'schema field' =&gt; 'deadline',
  );

  return $info;
}
In the provided hook, You need to add the setter callback.

So it will be like:

function project_entity_property_info() {
  // .... rest of code removed for brevity.    

  $info['project']['properties']['name'] = array(
    'label' =&gt; t('Project name'),
    'description' =&gt; t('Name of the project.'),
    'type' =&gt; 'text',
    'schema field' =&gt; 'name',
    'setter callback' =&gt; 'entity_property_verbatim_set', // -&gt; this is it!
  );


Now rules knows how to set the value on entity.

More information about the hook_entity_property_info can be found here. If name requires a complex workflow to be set, you can write your own setter similar to entity_property_verbatim_set (for validating purposes, or ...).

If you are benefiting from the power of Entity API you may declare it in your EntityMetadataController class. There is a default class called EntityDefaultMetadataController you can extend it and introduce it as your entity type's metadata controller.

Another option is to use entityspice to declare your entity type which takes care of it all.