Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Highlighted
Anonymous_User Absent Member.
Absent Member.
504 views

Need a way to search for and delete a Work Order


I have a Work Order driver that handles terminations. A term date comes
in from our HR system and the Work Order driver queues up a termed work
order for midnight of the termed date. Occasionally I need to delete a
Work Order and going through the Work Order Management iManager task is
cumbersome. I have about ~12,000 work orders. I hate the current click
through interface. Is there a quick back-end way to search and delete
work orders associated with a particular user?


--
triciabowen
------------------------------------------------------------------------
triciabowen's Profile: https://forums.netiq.com/member.php?userid=542
View this thread: https://forums.netiq.com/showthread.php?t=49315

Labels (1)
0 Likes
2 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Need a way to search for and delete a Work Order

The workorder object should have a DN to the affected (terminated user in
your case) object in one of its attributes. If you know the syntax of
that you could search for it directly using any old directory tools like
iManager or LDAP, etc. Knowing that syntax should be as simple as looking
at any current termination workorder, specifically at its attribute
holding a link back to the to-be-terminated object. From there, an LDAP
filter to find it, if held (for example) in the Description attribute,
would look like this within the context of the ldapsearch command:

Code:
--------------------
ldapsearch -LLL -x -h serverHere -p 389 -D cn=admin,o=org -W
'(description=\org\context\ou\user)' dn
--------------------

After you know the DN just delete it with whatever tool, or maybe use LDAP
again:

Code:
--------------------
echo 'cn=workorer,ou=context,o=goes,dc=here' | ldapdelete -x -h serverHere
-p 389 -D cn=admin,o=org -W
--------------------

--
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: Need a way to search for and delete a Work Order


Thank you! After looking at your solution, I realized I could search for
the object through the iManager -> View Object -> Browse option, since
the cn is used as part of the Work Order name
[Lawson-1377600722428-stest.WORKORDERS.IDM.SERVICES.HQ]. Must be a case
of the Mondays.


--
triciabowen
------------------------------------------------------------------------
triciabowen's Profile: https://forums.netiq.com/member.php?userid=542
View this thread: https://forums.netiq.com/showthread.php?t=49315

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.