How to execute rules action programatically Is it possible to execute a rule action upon form submission? I've created a rule and disabled it, so it'll be only called if it meets the condition I've set. Below is a sample code I've been using:-

function hook_form_FORM_ID_alter(&amp;$form, &amp;$form_state) {
  if ($form_state['values']['field_name'][LANGUAGE_NONE][0]['value'] == 1)
    rules_invoke_component('rules_uncheck_update_checkbox', $form_state['commerce_order']);
  }
}


Not sure what are the other options as I've been stuck to make it work. Please help. Thank you.

EDIT:

Rules export

{ "rules_uncheck_update_checkbox" : {
"LABEL" : "Uncheck checkbox",
"PLUGIN" : "reaction rule",
"ACTIVE" : false,
"OWNER" : "rules",
"REQUIRES" : [ "rules", "entity" ],
"ON" : { "commerce_order_update" : [] },
"IF" : [
  { "entity_has_field" : { "entity" : [ "commerce-order" ], "field" : "field_update_checkbox" } }
],
"DO" : [
  { "data_set" : { "data" : [ "commerce-order:field-update-checkbox" ], "value" : "0" } }
]
}
}
rules_invoke_component is used to invoke a Rules Component.

In your case, it seems like you should invoke a Rules Event, using rules_invoke_event.