Need some help on default REQ and unique RITM level workflows
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 11:56 PM - edited 11-23-2023 12:33 AM
Hi All & @Ankur Bawiskar ,
Can anyone please help us on the below issue.
Firstly we have one default workflow and it's run on all the REQ tickets level. [Refer below image] and we have one Timer activity as 1 second just to create the RITM tickets and it's working fine.
But we recently developed one Catalog item with a workflow [Refer below image], and RITM workflow level we have used the below line on Run script activity level to get the requesting user name.
workflow.scratchpad.user_name = gs.getUserName();
And now due to using the Timer activity on REQ workflow level, we're getting the user_name as "system" but we want the requesting user should be returned.
Note: If we remove the Time activity from default REQ workflow then it's working fine for above the requirement but we want to keep the "Timer" activity and fulfill the above requirement .
Advance thanks,
AR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 03:08 AM
Hello,
The scope of workflow scratchpad are withing the same workflow, so make sure you are setting workflow.scratchpad.user_name and getting it in same workflow. If you setting it in RITM workflow and trying to get from request workflow it may not work.
If you are trying to get from same workflow , I don't see any reason why this would not work. Try with different variable in scratchpad like workflow.scratchpad.usrname just to eliminate case that it could be used by some other activity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 03:15 AM
If you have the user's name in any varialble, you can use current.variables.[variableName] to retrieve the value from variables.