Hello
We have a workflow that looks for a new hires manager's OU in to determine the location of the new hire.
The lookup information is in T_MASTER_ENTERPRISE_USERS.
I need to provide "stub" data if the manager cannot be located in the database.
Use Case:
Manager and subordinate are hired on the same day.
Same Joiner rule creates their accounts.
Job(s) fail because the subordinate is looking for the manager, which does not yet exist.
I need to find existing information and provide a hard coded location if the manager cannot be located.
This is what I have so far - the biggest challenge right now is providing the hard coded location (assuming this query is working at all)
Declare
m_exst number;
mgrou varchar2(512);
begin
select count(*)
into m_exst
FROM T_MASTER_ENTERPRISE_USERS
WHERE USER_ID = ''
and UNIQUE_ID != '<null>';
if m_exst = 0
then
'CN=AveksaAdmin,OU={subou},DC=Company,DC=org'
else
SELECT UNIQUE_ID
into mgrou
FROM T_MASTER_ENTERPRISE_USERS
WHERE USER_ID = '####'
and UNIQUE_ID != '<null>';
end if;
end;
If I were to translate your exact PL/SQL block up there to a normal SELECT statement it would look like this: