cancel
Showing results for 
Search instead for 
Did you mean: 

Execute a Script from UI

Former Member
0 Kudos

Hey all,

I know I've been posting a lot of questions on here lately. Hopefully this will be my last one for awhile. I want to put a button or something along those lines on the UI when modifying a contractor that simply executes a script. Basically, I've created a custom attribute that saves a contractor's expiration date. Once that date gets near, the manager needs to extend that expiration date by 90 days. I've created a script that does this. How do I place something on the UI when modifying that user's account to simply execute the script? Thanks for any and all assistance.

Accepted Solutions (1)

Accepted Solutions (1)

terovirta
Active Contributor
0 Kudos

The only easy way would be attaching it in the workflow that's triggered by the "extend contractor" UI submit.

regards, Tero

Former Member
0 Kudos

So would I have to create another attribute, i.e. extend_contractor, that my help desk people can check the box through the UI then click "Save", then by doing that, the script executes? Then I create a second pass that clears that attribute. Is that what you're suggesting?

former_member2987
Active Contributor
0 Kudos

Brandon,

I think there's two ways to do this:

1. Create a task that would filter on only those users who are near expiration, then once you've selected the user, they are extended.  You might need to use the Extension framework if you want to customize that some more. (e.g., user specified extension in days, selection of extension dates (1 week, 1 month, 3 months, etc.)

2. Basically do what Former Member  says, so that once a contractor's date is manually extended your changes are made.

However neither of those is a button. IDM doesn't let you create new buttons outside of the REST UIs.

Matt

terovirta
Active Contributor
0 Kudos

Is that 90 days fixed? If so, just add empty job with toIdStore pass to the UI task and do the calculation / assignment of new value in the toIdStore pass.

regards, Tero

Former Member
0 Kudos

OK so I could actually create a task that will come up under the "Choose Task..." button, which you could also add to favorites. I think that's probably going to be the winner.

Once I have that in place, I can use the Access Control tab on the task to make it so that only users with my IDM:IT_SUPPORT role have access to it and then, use the filter / SQL query combo to only allow it to be selectable if my target user is a contractor that is nearing expiration. Then, create an Ordered Task Group under this new "Extend Contractor" task that will execute my script and extend the contractor out for my 90 days. Does that sound about right? Thanks for the push in the right direction.

Former Member
0 Kudos

Yes, it is fixed. They want this solution as idiot proofed as possible. They don't want the service desk to have the ability to extend out a user for years on end. IDM Admins can set the date to whatever we want but Help Desk should be limited to 90 days or nothing.

terovirta
Active Contributor
0 Kudos

Something like that. If you have multiple UIs where different actors can do the extension then you could consider an event task, same event/logic would be triggered from various UIs. But if it's only one UI then the workflow that's attached to the UI task works best IMO.

regards, Tero

former_member2987
Active Contributor
0 Kudos

Brandon,

Sounds about right.  Call me if you need more pushes!

Matt

Answers (0)