Hi Keerthisree,
You can set the on created event as ‘call microflow’ and call a new microflow.
Inside that microflow, you can call the ‘SUB_UserTask_Assign’ microflow where you can pass the user and workflowusertask objects as shown below
I’ve done this by using a microflow to get the specific user I want based on my requirements. Annoyingly you always have to return a list but if you know you are only getting one result based on your microflow logic you can select for the workflow to automatically assign it to that user.
You can probably do it with an Xpath too depending on your domain model, ultimately though you need a way of getting the specific user you want, not a list of users with a particular user role.