Solved it using hook_menu_alter and adding custom module. I have modified the access callback function to suit my needs.
Here is my code, may help user having same task:
function mymodule_tab_menu_alter(&$items) {
$items['node/%node/workflow']['access callback'] =
'custom_workflow_tab_node_access';
}
function custom_workflow_tab_node_access($node = NULL) {
global $user;
if ($workflow = workflow_get_workflow_type_map_by_type($node->type)) {
if ($workflow = workflow_get_workflows_by_wid($workflow->wid)) {
$roles = array_keys($user->roles);
if ($node->uid == $user->uid) {
$roles = array_merge(array('author'), $roles);
}
$allowed_roles = $workflow->tab_roles ?
explode(',', $workflow->tab_roles) : array();
if (user_access('administer nodes') || array_intersect($roles, $allowed_roles)) {
/* This is additional Condition*/
if ($node->type == "article") {
$current_state = workflow_get_workflow_states_by_sid(workflow_node_current_state($node));
if ($current_state->state == "State_name") {
return FALSE;
} else {
return TRUE;
}
} else /*End Additional Condition */{
return TRUE;
}
} else {
return FALSE;
}
}
}
return FALSE;
}
As above in custom access callback, I have used the same code, just added the additional condition and it solved my issue. :)
-- Thanks