Workflow failure on a user decision step

Schroeter, Brad BSchroeter at ti.com
Wed Mar 28 19:00:17 EST 2001


Michel,
Here's a suggestion:
1) Create a subtype of object ABSENCE (ZABSENCE).
2) Within object ZABSENCE, create new method Z_DISPLAY by copying method
DISPLAY.
3) Within new method Z_DISPLAY, before "call transaction 'PA20' and skip
first screen" line is executed, put in some code to check if user has
correct authorization (you might be able to use "authority-check object
s_tcode id <name> field <name>" - I've used this in a ABAP report but not in
a method).
4) If authorization check fails (sy-subrc <> 0) within method, you could
display a popup box to display the authorization problem (i.e. function
module POPUP_TO_DISPLAY_TEXT, mess with start_column and start_row to center
popup) and then do a "exit_cancelled" to keep the work item in the user's
queue (in process).  That way the user would get some info on the problem
and after the user's authorizations were corrected, he/she could go back and
re-process the work item.
5) If authorization check passes (sy-sybrc = 0) within method, you could
just proceed to the "call transaction 'PA20' and skip first screen" line
since you know you don't have an authorization problem.
6) Create new task which references ZABSENCE.Z_DISPLAY method, and use this
new task in your workflow.
 
Hope this helps,
Brad
 
-----Original Message-----
From: Michel Laviolette [mailto:michel_laviolette at hotmail.com]
Sent: Wednesday, March 28, 2001 10:49 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Workflow failure on a user decision step
 
 
WFers:
In a desperate attempt to get feedback on a note I posted earlier, I will
rephrase my question. I would really appreciate any help anyone can offer
(thanks in advance).
 
We are using an absence/attendance workflow in a 40b environment.
 
Has anyone come across a scenario where a workflow is sent to a selected
agent but this agent does not have the proper authorizations to action the
workitem? What happens to the workflow when the selected agent attempts to
action the workitem?
 
Our specific problem goes as follows:
 
An employee puts in a leave/attendance request. The selected agent (chief)
is determined via the standard role 157. The workitem shows up in the
chief's inbox. Not knowing that he/she does not have the proper HR
authorizations, the chief executes the workitem. The next step should be the
'Absence.display' method on a user decision (Approve or Reject). This step
is not displayed! Instead, the user decision 'Approved' is defaulted. As a
result, the workflow forks out to the 'Approved' branch attempting to unlock
the employee's HR leave record. This fails and generates a workflow error
(Workflow approval process: Response nnnn suspended as workflow has error
status). At this point, we fix the authorization problem. The chief goes
back to his inbox and sees the request. When it is executed, workflow picks
up on the unlock step skipping the user decision step  not allowing the
chief to Approve or Reject the request (workflow assumes that it's  been
approved already).
 
I looked at OSS but couldn't find anything.
 
ANY help would be MUCH appreciated.
 
Thanks in advance,
Michel Laviolette
ABAP Technical Team/Workflow Administrator/Developper
Canadian International Development Agency
Hull, Quebec Canada
 
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
 


More information about the SAP-WUG mailing list