Difference between Rule and Role

What is the difference between a Rule and a Role? Is there different tcodes for creating them? In which scenario, we use them instead of the other one? 

A Rule is a general way to 'define' your agents. 

A rule is maintained with TCode PFAC and are used to programmatically define the agents. For example, if you want a work item to go to all managers who worked for the company for 5 years or more, then you would have to create a rule that handles this custom scenario. Typically this is done by creating a custom function module that performs your selection logic and passes the results back to the rule. 

A Role is a general way to 'assign' your agents. 

A role is maintained with TCode PFCG and are usually assigned to a User (someone with a valid login). For example, you can have the role of ABAP_DEVELOPER and assign this role to all users who are developers. This is a good method to use if you want ALL developers to receive a workflow work item. 

You can specify not only a system user, but also a role or an object of Organizational Management such as a position, a Job, an organizational unit or a work center. Alternatively, you can define a container element that contains the object of Organizational Management at runtime or a rule for dynamic agent determination. 

Objects of Org Managemnet being organizational unit, job, position, work center. 

Role and Rule are not considered objects of OM. 

Get help for your SAP WF problems 
Do you have a SAP WorkFlow Question?

SAP Books
SAP Certification, Interview Questions, Functional, Basis Administration and ABAP Programming Reference Books

SAP WorkFlow Tips
SAP Business WorkFlow Tips and WF Discussion Forum

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.