infor.com
concierge
infor u
developer portal
Home
Groups
Process Automation (IPA) Community
Linking an Actor to an Agent
Legacy Contributor
Hello,
Does anybody have an example of querying the Agent Business Class based on the KeyText value using the Landmark Node? The KeyText value is HROrganization and Employee Number. I can't seem to get anywhere. Also, I am trying to figure out how to link an employee to an agent and am not getting anywhere. We are on Landmark 10.1.1.23. Thank you.
Find more posts tagged with
Process Automation (IPA) - General Discussions
Comments
jreese
There is a free webinar on the s3tech blogs that walks through a lot of this.
Infor Process Automation, automate user administration
Legacy Contributor
Can you point me to where is is? Thank you.
jreese
http://blogs.infor.com/S3Tech/
Legacy Contributor
Thank you.
Legacy Contributor
Hi JamesY - I assume you're trying to find the employee that is associated with an actor? I have a SQL query I use for this (DB2 SQL):
SQL Statement:
select
trim(a.actor) as Actor
,trim(substr(b.keytext,locate(',',b.keytext)+2)) as Employee
,trim(substr(b.keytext,1,locate(',',b.keytext)-1)) as HROrg
from
lmhcm.parentagent a
inner join lmhcm.agent b
on a.parentagent=b.parentagent
and b.borbusinessclassname = 'Employee'
and trim(substr(b.keytext,1,locate(',',b.keytext)-1)) = 'JRS'
and hex(b.deleteflag) = repeat('0',32)
where
a.actorentered='Y'
and b.hasparent='Y'
and hex(a.deleteflag) = repeat('0',32)
and a.actor = ''
Variable Assignment:
=_EMPLOYEE
I hope this helps.
FYI - you can also do this by querying the Employee BC and filtering on "AgentEmployee" for the actor value.
I hope this is helpful.
Kelly
Legacy Contributor
JamesY - regarding your question about linking the Employee to the Agent, go to the Agent bc and select action "Link to Actor". The Agent is the EmployeeID and the Actor is the ActorID.
Note that your IPA user must have appropriate rights to do this, of course.
I hope this helps.
Kelly
Legacy Contributor
There are 4 agents in play here. Employee, EmployeeSearch, Candidate and Candidate Search. Each are associated with the employee via the Keytext fields. The Employee Agents have the employee numbers and the Candidate Agents have their candidate numbers.
In my version of creating employees I look for any employee who doesn't have actor context assigned. Our actors are just extensions of the employee numbers. I only look for people with 4 Agents because anyone with more needs manual creation because they'll get different roles.
I then create the Actor, Identity, Roles and Actor Context with an IPA Flow. We have Lawson, so I create the Lawson USER too at this time.
I now use the data from the query below to link the Actor to the Agents using a second part of my IPA flow.
It uses this DME in the Landmark Node.
_dataArea="" & _module="person" & _objectName="Agent" & _actionName="LinkToActor" & _actionOperator="NONE" & _actionType="CreateUpdateDelete" & _pageSize="30" & Agent="" & Actor=""
You have to add the dashes in the Binary Agent to create the variable "Agent_String" .
This is SQL Server and we add "CPS0" in front of the employee number to create the Actor and Lawson User.
With agent_ct as (SELECT count(*) as ct, d.EMPLOYEE FROM lmhcm.EMPLOYEE d JOIN lmhcm.AGENT e
ON ((RTRIM(CONVERT(VARCHAR(10),d.EMPLOYEE)) = SUBSTRING(e.KEYTEXT,6,6)
OR
CONVERT(VARCHAR(10),d.CANDIDATENUMBER) = SUBSTRING(e.KEYTEXT,6,6)
) and e.DELETEFLAG = 0)
group by d.EMPLOYEE)
SELECT AGENT, a.EMPLOYEE, d.ct FROM lmhcm.EMPLOYEE a JOIN lmhcm.AGENT b
ON ((RTRIM(CONVERT(VARCHAR(10),a.EMPLOYEE)) = SUBSTRING(b.KEYTEXT,6,6) OR CONVERT(VARCHAR(10),CANDIDATENUMBER) = SUBSTRING(KEYTEXT,6,6)) and b.DELETEFLAG = 0)
JOIN agent_ct d on (a.EMPLOYEE = d.EMPLOYEE and d.ct = 4 )
LEFT OUTER JOIN
lmhcm.EMPLOYEECONTACT c on (a.EMPLOYEE = c.EMPLOYEE and c.CONTACTMETHOD = 6 and c.PREFERREDCONTACT = 1 and c.ACTIVE = 1)
WHERE not exists
(select 'x'
from lmhcm.ACTORCONTEXT d
where ('CPS0' + convert(nvarchar(10),a.EMPLOYEE) = d.ACTOR or convert(nvarchar(10),a.EMPLOYEE)= d.ACTOR
) and d.DELETEFLAG = 0)
and RELATIONSHIPTOORGANIZATION not in ('RETIRED','TERMINATED','VOLUNTEER','BOARD MEMBER','PENDING SUBSTITUTE')
and RELATIONSHIPSTATUS = 'ACTIVE'
0712050809193544.doc
Legacy Contributor
Thank you all. This is a big help.
Wichtige Lösungen in der Wissensdatenbank April 2013.pdf
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Help
Popular Tags
Infor Lawson Human Resources Group - Discussion
Infor Lawson Technology Group - Discussion
General Discussions
VISUAL - Enterprise General Discussions
Infor Lawson Supply Chain Management - Discussion
Process Automation (IPA) - General Discussions
Pegasus - Partner General Discussions
Infor Lawson Supply Chain Group - Discussion
Infor Lawson Financials Group - Discussion
Infor EPM Discussions