- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2016 10:07 AM
Hi Team,
I am currently working on an Orchestration workflow, which is used from creating users through SN automation to Active Directory. There is an issue while creating users. i.e., for already existing users, an error is triggered in the logs--> "The specified account already exists"
In such cases for Failure, I want to fetch the error from logs in the workflow and notify User (create event OR email notification), about this error "The specified account already exists, submit a new request through General SR form".
Any help wold be greatful!
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2016 11:58 AM
Why not check for this in the workflow instead and do a notification activity to the user if the user exits. If not a mail is what you want to happen?
//Göran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2016 10:12 AM
What happens in the workflow when you get this error?
Harel
Edit: if you have an error in your flow, how about trying this: Workflow Error Handling , section 4: Creating Error Condition Exits.
You can then create an event activity which will generate a notification in return.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2016 10:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2016 11:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2016 03:49 AM
Hi Rathika,
See below goranlundqvist's suggestion.
You can add an if activity that checks whether the user exists. If it doesn't, move on to user creation. If it does, create an event which will generate a notification.
The if activity script can be something like this:
checkUserExists();
function checkUserExists() {
var usr = new GlideRecord('sys_user');
usr.addQuery('user_name', current.SOME_VALUE); //I am not entirely sure what you are sending to the AD to create the user, but of you have some parameters, you can add them here for the script to look in the sys_user table.
usr.query();
if(usr.next()) {
return 'yes';
} else{
return 'no';
}
}
Goran, feel free to suggest something better
harel