Default Role Resolution - Purchase Req Approvals

Sergey Breslavets sergey.breslavets at epstechnology.com
Wed Jan 21 18:50:10 EST 2004


Hi Rita,
 
Here's how you can do it:
 
1. Defined custom event for ZBUS2105 (custom obj type, delegate to
BUS2105) - e.g. RELEASED with parameter R_AGENT.=20
 
2. Made it a triggering event for your workflow, define workflow
container element R_AGENT and binding for triggering event
(RELEASED.R_AGENT -> WORKFLOW.R_AGENT).=20
 
4. In you workflow check for R_AGENT value (it should be assigned in
your triggering event binding). If it is initial - assign _WF_INITIATOR
value to it.
 
5. in the binding for the release task, assign:
 TASK_CONTAINER: _WF_ACTUAL_AGENT =3D=3D> WORKFLOW_CONTAINER: R_AGENT
 
6. After the release task (as a last step in your workflow) insert
EVENT_CREATION step: if not all releases were done yet, create event
BUS2105.RELEASED and bind R_AGENT to event parameter.
 
As a result, when you run the workflow for the first time - R_AGENT will
be set to _WF_INITIATOR (e.g. WF_CLERK1) , your Role Resolution will
find manager for it and send workitem to him/her (e.g. WF_MNG1). After
manager released at level L1, actual agent id will be assigned to
R_AGENT (R_AGENT =3D WF_MNG1), and because there is one more level to =
do,
it will create event BUS2105.RELEASED with parameter (R_AGENT =3D
WF_MNG1), and complete.=20
The event will start another instance of the workflow, only this time
event parameter R_AGENT will contain WF_MNG1, and it'll be passed to
workflow container element R_AGENT. Role resolution will determine agent
now based on R_AGENT (manager for WF_MNG1) - e.g. WF_MNG2 - and send
workitem to him/her... and so on until last release code is applied, at
which point no RELEASED event will be triggered, and no new workflow
launched.
 
Even better way to do it, is to create event BUS2105.RELEASED from
change documents (SWEC). Here you can use event check FM to determine
whether you should create the event, and event container FM to populate
R_AGENT (changed_by from change documents). You then will not need to
use the event creation step, as the event will be triggered
automatically from change documents when subsequent release code is
applied. The process will go on iteratively until all release codes are
applied.
 
Hope this helps, let me know if you have any questions :)
 
Regards,
Sergey
 
 
 
 
 
 
 
-----Original Message-----
From: ritatimmons [mailto:ritatimmons at swbell.net]=20
Sent: Wednesday, January 21, 2004 4:06 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Default Role Resolution - Purchase Req Approvals
 
Praveen Johri:  I tried this out... I assigned &_WI_ACTUAL_AGENT& from
my
task container to the default Role Container.  My binding shows as:
ORG_OBJECT <=3D &_WI_ACTUAL_AGENT&.
 
However when testing the workflow I get a message - Element
_WI_ACTUAL_AGENT
not in source container.  I looked at the task container and it is part
of
the container.  I'm not what to do next and was hoping you could help me
further.
 
Regards,
Rita
 
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]On Behalf Of
'Praveen Johri'
Sent: Tuesday, January 13, 2004 2:46 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Default Role Resolution - Purchase Req Approvals
 
 
Hi Rita,
 
U can go for WF_Actual_agent ....this field carries the value of user
who
is lastly executing the workitem
(Embedded image moved to file: pic16439.pcx)
 
 
 
                      ritatimmons
                      <ritatimmons at swbell        To:
SAP-WUG at MITVMA.MIT.EDU
                      .net>                      cc:
                      Sent by: SAP               Subject:  Default Role
Resolution - Purchase Req Approvals
                      Workflow
                      <Owner-SAP-WUG at MITV
                      MA.MIT.EDU>
 
 
                      01/08/2004 02:23 AM
                      Please respond to
                      SAP Workflow Users'
                      Group
 
 
 
 
 
 
Hello all:  I have a purchase requisition release workflow that I am
working
on - BUS2105.RELEASESTEPCREATED.  I have created user-exit ZXM06U12 to
run
the role SWX_GET_MANAGER.  Currently I have the following binding
defined:
 
Workflow container =3D> _WF_Initiator
Task Container   =3D> &INITIATOR&
Role Container   =3D> ORG_OBJECT
 
The system passes the _WF_Initiator to the task container &INITIATOR&.
It
then passes &INITIATOR& from the task container to the default role
container &ORG_OBJECT&.  The user-exit then returns the manager for the
_WF_Initiator.
 
My problem is this:  I want to use the last person that released/changed
the
purchase requisition instead of _WF_Initiator.
 
For example:  Purchase req created by WF_CLERK1.  It has 2 release
levels -
L1 & L2.  The first go works correctly as it should find the manager for
WF_CLERK1 (say WF_MGR1).  This person releases the purch req (WF_MGR1)
with
a release code L1.  The workflow runs again - I want it to find the
manager
for WF_MGR1 (say WF_MGR2), but the role resolution returns WF_MGR1 again
since the _WF_Initiator is the person that created the purchase req -
WF_CLERK1.
 
Can anyone suggest a way around this?
 
Regards,
Rita
 
 
 
 
 
Whilst this email has been checked for all known viruses, recipients
should
undertake their own virus checking as Xansa will not accept any
liability
whatsoever.
 
This email and any files transmitted with it are confidential and
protected
by client privilege.  It is solely for the use of the intended
recipient.
Please delete it and notify the sender if you have received it in
error. Unauthorised use is prohibited.
 
Any opinions expressed in this email are those of the individual and not
necessarily the organisation.
     Xansa, Registered Office: 420 Thames Valley Park Drive,
     Thames Valley Park, Reading, RG6 1PU, UK.
     Registered in England No.1000954.
     t  +44 (0)8702 416181
     w  www.xansa.com
 


More information about the SAP-WUG mailing list