Mantrixlinux Absent Member.
Absent Member.
487 views

sleep commad, where to find it under IDM, Desgner?


Need to use IDM sleep command between PSExecute command in IDM.
PSExecute execute several commands to fast to AD and PSExecute sleep
command doesen't help.
But don't remember where to find sleep under desginer. I know the
command exist, I have seen it before.


--
Mantrixlinux
------------------------------------------------------------------------
Mantrixlinux's Profile: https://forums.netiq.com/member.php?userid=1506
View this thread: https://forums.netiq.com/showthread.php?t=55776

Labels (1)
0 Likes
8 Replies
Knowledge Partner
Knowledge Partner

Re: sleep commad, where to find it under IDM, Desgner?

Mantrixlinux wrote:

> But don't remember where to find sleep under desginer. I know the
> command exist, I have seen it before.


Set a local varable to Xpath(java.lang.Thread:sleep(timeInMilliseconds))

--
http://www.is4it.de/en/solution/identity-access-management/
0 Likes
Knowledge Partner
Knowledge Partner

Re: sleep commad, where to find it under IDM, Desgner?


Just beware that this stops the entire driver for that time so use it
with caution.


--
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: https://forums.netiq.com/member.php?userid=159
View this thread: https://forums.netiq.com/showthread.php?t=55776

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: sleep commad, where to find it under IDM, Desgner?

joakim ganse wrote:

>
> Just beware that this stops the entire driver for that time so use it
> with caution.


The NOVLLIBAJC ecmascript Library (available as a package) has a
function for this (just a wrapper around the same java call)

Also. If I recall correctly, it only locks the thread (ie subscriber or
publisher) not the entire driver.

Still Joakim's warning is very appropriate - keep usage of this to an
absolute minimum.

I would instead use a mechanism where you schedule each PSExecute event
only after the prior one has completed. Rather than manually sleeping.

This could be as simple as a transaction flag attribute on the user
object which you increment as each command is processed sucessfully and
clear when the sequence of events is complete.

Or just ditch the crippled PSExecute and use the scripting driver.
0 Likes
Mantrixlinux Absent Member.
Absent Member.

Re: sleep commad, where to find it under IDM, Desgner?


But even if the driver/channel goes to sleep.
It will anyway process the job in the queue when it's waken again?


--
Mantrixlinux
------------------------------------------------------------------------
Mantrixlinux's Profile: https://forums.netiq.com/member.php?userid=1506
View this thread: https://forums.netiq.com/showthread.php?t=55776

0 Likes
Knowledge Partner
Knowledge Partner

Re: sleep commad, where to find it under IDM, Desgner?


Yes it will, that is no problem.

You just have to understand that the channel will actually stop for that
time you specify so if it is a very common action it could queue up a
lot of changes depending on your environment.


--
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: https://forums.netiq.com/member.php?userid=159
View this thread: https://forums.netiq.com/showthread.php?t=55776

0 Likes
Knowledge Partner
Knowledge Partner

Re: sleep commad, where to find it under IDM, Desgner?

A couple of thoughts:

Using sleep in the engine is pretty terrible; it usually implies something
is completely wrong in the application, or else there is a problem with
the driver config logic.

Practical application of what joakim is stating could be that when a big
operation goes through (bulk add, bulk modification, resync of stuff) that
the operation, instead of taking 0.1 seconds per operation, will now take
10 seconds per operation (a modest sleep, since that's only ten seconds
for a broken application to finish doing something it should have already
done). This means that with a mere thousand objects going through, what
would have taken under two minutes will now take over three hours since
every single operation is delayed by ten seconds, even though the last
operation may be waiting two hours and fifty-nine minutes longer than
necessary. Hard-coded delays are bad.

Also, they are often ineffective. What happens when whatever needs a
ten-second delay now needs eleven seconds, or twenty, or a minute? how
long is long enough or all of these cases? The answer is usually, "It
could be a long time, in rare cases." so either you put insane delays in
there (in my opinion, any hard-coded delay is insane) or else you add code
to watch for a failure, or to watch for a condition so that the delayed
event is only sent, in realtime, when ready. IDM is event-driven, meaning
that as soon as something happens you can kick off something else.

For example, if you want to have a Scripting driver enable users in Skype
for Business, which is based on your microsoft active directory (MAD)
environment users, then your Scripting driver cannot fire before the MAD
environment's driver has processed those same users. There are ways to
see that the MAD driver has processed the user, so rather than imposing a
thirty-second delay on the Skype driver, watch for the completion of the
event form the MAD driver and then go immediately. If you need more delay
(because MAD replication times are so abysmal) then use a WorkOrder to
submit the operation later, or else handle that in the scripting itself
(have it try several times, then handle an error after so many failures).
The result is that things CAN go through quickly when the application
works properly, but if you need a delay you can still get it.

In 99.9% of cases (literally), if you are adding sleep() into the engine
v=somehow, you're probably doing it incorrectly and it will bite you when
you least expect, or need, it.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: sleep commad, where to find it under IDM, Desgner?

ab wrote:

> IDM is event-driven, meaning that as soon as something
> happens you can kick off something else.


This is one of the major advantages of NetIQ's IDM product. Aaron is
correct in that one should take advantage of this where possible.

> For example, if you want to have a Scripting driver enable users in
> Skype for Business, which is based on your microsoft active directory
> (MAD) environment users, then your Scripting driver cannot fire
> before the MAD environment's driver has processed those same users.
> There are ways to see that the MAD driver has processed the user, so
> rather than imposing a thirty-second delay on the Skype driver, watch
> for the completion of the event form the MAD driver and then go
> immediately.


Great example.

To solve this, I do one or more of the following (depending on the
circumstance).

1. Ensure (where possible) that the action triggered by scripting
driver is bound to the same AD DC where the object creation was
triggered by the AD driver. This eliminates replication delay issues.

2. Have the scripting driver filter include a subscriber notify (or
sync) attribute which is set by the AD driver on sucessfull creation
(or update). If there is only one AD driver in the solution, I often
choose DirXML-ADContext as this is set during creation and not changed
by other drivers. You can also use DirXML-Associations for this purpose
(as the O365 driver does) but that comes with it's own set of problems.

3. Resolve the newly created object's SID and use this in scripting
driver commands when you need to refer to the object. This can be a
reliable work around for scenarios where you can't control replication
delays via item #1.
0 Likes
Knowledge Partner
Knowledge Partner

Re: sleep commad, where to find it under IDM, Desgner?


<do-set-local-variable name="lvDelay" scope="policy">
<arg-string>
<token-xpath expression="es:doWait($gcvDelayBeforeMove)"/>
</arg-string>
</do-set-local-variable>


--
If you find this post helpful, please show your appreciation by clicking
on the star below :cool:
------------------------------------------------------------------------
al_b's Profile: https://forums.netiq.com/member.php?userid=209
View this thread: https://forums.netiq.com/showthread.php?t=55776

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.