Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Integration / Customization
S3 Customization/Development
logan and production prodline COBOL program
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
LindseyC
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5183
People Online:
Visitors:
379
Members:
0
Total:
379
Online Now:
New Topics
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3288
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1348
Roger French
1311
mark.cook
1244
Forums
Unanswered
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
S3 Customization/Development
logan and production prodline COBOL program
Sort:
Oldest First
Most Recent First
You are not authorized to post a reply.
Author
Messages
kim
Basic Member
Posts: 15
9/30/2009 4:27 PM
<p><span style="font-size: 9pt; line-height: 115%">Hang on to your hats because this will be fun.
Scenario:
Individual Action work units (WFWORKUNIT) are created via ProcessFlow trigger on PA52.x, both Portal/LID and MSS.
</span><span style="font-size: 9pt; line-height: 115%">Requirement:
Now here is the fun part! Again I am only talking about work units that are created from PA52.x.
I have been tasked with building an online form that allows the user to review the WFWORKUNIT but, here’s the fun part, I have to be able to apply HR Security to the work unit. Meaning I have to look at what employee the WFWORKUNIT is created for and run that thru the 700-HR-EMP-SECURITY API to confirm that the user has access to the WFWORKUNIT employee.</span></p>
<div style="margin: 0in 0in 10pt"><span style="font-size: 9pt; line-height: 115%">What I would like to do:
Retrieve all WFWORKUNIT.OBJECT-NAME records for the PCTSET1
Unstring the WFWORKUNIT.KEY-STRING to retrieve the PCTSET1 key</span></div>
<div style="margin: 0in 0in 10pt"><span style="font-size: 9pt; line-height: 115%">Check 700-HR-EMP-SECURITY using the employee retrieved from the WFWORKUNIT.KEY-STRING</span></div>
<div style="margin: 0in 0in 10pt"><span style="font-size: 9pt; line-height: 115%">Sample Code would be:
-- retrieve all workunits
MOVE “PCTSET1” TO DB-OBJECT-NAME.
MOVE WFWSET2-OBJECT-NAME TO WS-DB-BEG-RNG.
PERFORM 850-FIND-BEGRNG-WFWSET2.
IF (WFWORKUNIT-NOTFOUND)
GO TO NEXT-WFWORKUNIT
END-IF.
</span></div>
<div style="margin: 0in 0in 10pt"><span style="font-size: 9pt; line-height: 115%">--- parse the workunit key
(unstring the key)
</span></div>
<div style="margin: 0in 0in 10pt"><span style="font-size: 9pt; line-height: 115%">--- retrieve the employee
MOVE WFW-PCT-COMPANY TO DB-COMPANY.
MOVE WFW-PCT-EMPLOYEE TO DB-EMPLOYEE.
PERFORM 840-FIND-EMPSET1.
IF (EMPLOYEE-NOTFOUND)
GO TO NEXT-WFWORKUNIT
END-IF.
</span></div>
<div style="margin: 0in 0in 10pt"><span style="font-size: 9pt; line-height: 115%">--- check HR Security
MOVE WFW-PCT-COMPANY TO CRT-COMPANY.
MOVE EMP-PROCESS-LEVEL TO CRT-PROCESS-LEVEL.
PERFORM 700-HR-EMP-SECURITY.
IF (HRWS-EMP-SECURED)
GO TO NEXT-WFWORKUNIT
END-IF.
</span></div>
<div style="margin: 0in 0in 10pt"> </div>
<div style="margin: 0in 0in 10pt"><span style="font-size: 9pt; line-height: 115%">I have looked and looked and looked for additional APIs within the WFAPI that will allow me to do the standard find APIs but no such luck. The issue is I
cannot
talk to both databases within a single program. Does anyone have any tricks? I would rather not create two forms where the logan form would drop a workfile that includes all the workunits and the production form will pick up the workfile and do the check. Seems like a lot of extra work for such a simple simple check.</span></div>
<div style="margin: 0in 0in 10pt"><span style="font-size: 9pt; line-height: 115%">Thanks for your thoughts and assistance.</span></div>
<div style="margin: 0in 0in 10pt"> </div>
<div style="margin: 0in 0in 10pt"><span style="font-size: 9pt; line-height: 115%">Release information:
Apps: 8.1.0 MSP6
Env: 9.0.0 ESP4
currently using laua for security not ldap</span></div>
<div style="margin: 0in 0in 10pt"> </div>
<div style="margin: 0in 0in 10pt"><span style="font-size: 9pt; color: #b2a1c7; line-height: 115%">kim valdez
Providence Health & Services
ProvConnect/Development Services
Lawson ERP Developer
3601 SW Murray Blvd, Suite 100
Beaverton, OR 97005</span></div>
<p>
</p>
Jay Riddle
Veteran Member
Posts: 191
9/30/2009 6:01 PM
You can create a view in the main production line that links into the logan data. Here is what we did for Requisitions. It would be somewhat simular for PA52. Once you have the company and emloyee number in the view the security should get pulled in for you if you are using LAUA. If your using the new security than you should be able to just create a security rule.
CREATE
VIEW
[dbo]
.
[XXREQLOC]
AS
(
SELECT
rqh
.
COMPANY
,
rqh
.
REQ_NUMBER
,
rqh
.
REQUESTER
,
CAST
(
t
.
TASK
AS
CHAR
(
20
))
AS
TASK
,
rqst
.
NAME
,
rqh
.
REQ_LOCATION
,
CAST
(
CASE
WHEN
t
.
TASK
=
'CEO'
THEN
'CEO'
WHEN
t
.
TASK
=
'Materials Mgt Appr'
THEN
'Materials Mgt Appr'
WHEN
ucat
.
WF_RM_ID
IS
NOT
NULL
THEN
ucat
.
WF_RM_ID
ELSE
'Contact Help Desk'
END
AS
CHAR
(
20
))
AS
APPROVER_ID
,
CAST
(LEFT(
CASE
WHEN
t
.
TASK
=
'CEO'
THEN
'CEO'
WHEN
t
.
TASK
=
'Materials Mgt Appr'
THEN
'Materials Mgt Appr'
WHEN
emp
.
NICK_NAME
IS
NOT
NULL
THEN
LTRIM
(
RTRIM
(
emp
.
NICK_NAME
))
+
' '
+
LTRIM
(
RTRIM
(
emp
.
LAST_NAME
))
WHEN
ucat
.
WF_RM_ID
IS
NOT
NULL
THEN
ucat
.
WF_RM_ID
ELSE
'Error: Routing Changes'
END
+
' '
,
30
)
AS
CHAR
(
30
))
AS
DESCRIPTION
FROM
logan
..
WFWORKUNIT wu
,
REQHEADER rqh
,
REQUESTER rqst
,
logan
..
WFWUQUEUE que
LEFT
OUTER
JOIN
logan
..
WFQUETASK t
ON
que
.
WORKUNIT
=
t
.
WORKUNIT
AND
que
.
PROCESS_ID
=
t
.
PROCESS_ID
AND
que
.
ACTIVITY_ID
=
t
.
ACTIVITY_ID
LEFT
OUTER
JOIN
logan
..
WFUSERCAT ucat
ON
t
.
TASK
=
ucat
.
TASK
AND
que
.
CATEGORY_VALUE
=
ucat
.
WORK_CAT_VALUE
LEFT
OUTER
JOIN
logan
..
WEBUSER web
ON
ucat
.
WF_RM_ID
=
web
.
WEB_USER
LEFT
OUTER
JOIN
EMPLOYEE emp
ON
web
.
COMPANY
=
emp
.
COMPANY
AND
web
.
EMPLOYEE
=
emp
.
EMPLOYEE
WHERE
LEFT(
wu
.
KEY_STRING
,
4
)
=
rqh
.
COMPANY
AND
SUBSTRING
(
wu
.
KEY_STRING
,
5
,
7
)
=
rqh
.
REQ_NUMBER
AND
wu
.
OBJECT_NAME
=
'RQHSET1'
AND
wu
.
WORKUNIT
=
que
.
WORKUNIT
AND
que
.
DISP_STATUS
=
1
AND
rqh
.
REQUESTER
=
rqst
.
REQUESTER
)
Sam Simpson
Veteran Member
Posts: 239
9/30/2009 6:08 PM
We have been doing this type of things all the time. Here's my suggestion.
1. Create a new table in the application database which is a complete copy of WFWORKUNIT table in the logan db.
2. Create a processflow (scheduled everyday) to get pa52 workunits only and update your
new table. This flow will either add, change or delete records in your new table.
In addition to your requirements, I would also suggest creating some metrics table so you can use them in your query. Such metrics should indicate what happen to the personnel action and where it is located in the business process.
You are not authorized to post a reply.