Using RH_GET_ACTORS

Dart, Jocelyn jocelyn.dart at sap.com
Fri Jun 23 20:38:43 EDT 2000


Hi All, Do remember that RH_GET_ACTORS ONLY evaluates the role itself!  It
does NOT do the further step of reducing agents returned by the role to
agents returned by the role who are also possible agents.  This is a later
step in workflow.  It's rather more complicated to resolve that.  Equally
agents who are "excluded agents" are excluded after the role has been
evaluated.  You need to take this into account in your testing.
 
Just remember that workflow evaluation effectively works as follows:
1. The role is evaluated
2. The possible agents are evalutated
3. All agents found in the role who are not possible agents are removed
4. All specifically excluded agents are removed
The workitem appears in the inbox of all remaining agents.
 
Thanks to all who have been helping out - yes you do need to make your
container persistent when testing outside workflow.
Regards, Jocelyn.
 
-----Original Message-----
From: Susan R. Keohan [mailto:skeohan at MIT.EDU]
Sent: Wednesday, 14 June 2000 10:15 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Using RH_GET_ACTORS
 
 
On behalf of george.campbell-kelly at nstarch.com...
 
>From: <george.campbell-kelly at nstarch.com>
>X-Lotus-Fromdomain: ICI
>To: skeohan at MIT.EDU
>Date: Thu, 8 Jun 2000 09:57:03 +0100
>Subject: Using RH_GET_ACTORS
>Mime-Version: 1.0
 
>Hello all,
>
>In Nov 1999 a posting was made describing how you can call the function
>module 'RH_GET_ACTORS'.
>
>I have spent several days attempting to resolve a role  using the code
>below without much success. The role uses uses an organization object type
>referenced by a Purchase Order's release code eg. A402. When I have the
>list of users, I am going to then use SO_OBJECT_SEND to send them all a
>Lotus email - I have this part working.
>
>When executing and debugging I get an error code 3 (
>EXCEPTION_OF_ROLE_RAISED). It seems to be populating the container
>correctly, but this is not being recognized by the FM causing it to error.
>
>Please could you either help me by saying what I am doing wrong, or point
>me in the right direction.
>
>Thank you very much for your help,
>
>George
>
>
>REPORT ZZGCKTS5.
>
>INCLUDE: <CNTN01>.
>
>SWC_CONTAINER MY_CONTAINER.
>SWC_CREATE_CONTAINER MY_CONTAINER.
>
>* my object code
>DATA: MYOBJECT TYPE SWC_OBJECT,
>      MYREADOBJECT TYPE SWC_OBJECT.
>
>DATA: BEGIN OF OBJECTKEY,
>    RELGRP LIKE T16FC-FRGGR,
>    RELCOD LIKE T16FC-FRGCO,
>  END OF OBJECTKEY.
>
>OBJECTKEY-RELGRP = 'A4'.
>OBJECTKEY-RELCOD = '02'.
>
>SWC_CREATE_OBJECT MYOBJECT 'ZT16FC' OBJECTKEY.
>SWC_SET_ELEMENT MY_CONTAINER 'Release Codes' MYOBJECT.
>
>
>DATA: AGENTS LIKE SWHACTOR OCCURS 0 WITH HEADER LINE.
>
>BREAK-POINT.
>
>CALL FUNCTION 'RH_GET_ACTORS'
>     EXPORTING
>          ACT_OBJECT                = 'AC90400001'
>*         act_task                  = 'T 50000354'
>*         act_wi_id                 = 36439
>*         ACT_PLVAR                 =
>          SEARCH_DATE               = SY-DATUM
>     TABLES
>          ACTOR_CONTAINER           = MY_CONTAINER
>*         EXCLUDED_AGENTS           =
>          ACTOR_TAB                 = AGENTS
>*         ERROR_TAB                 =
>     EXCEPTIONS
>          NO_ACTIVE_PLVAR           = 1
>          NO_ACTOR_FOUND            = 2
>          EXCEPTION_OF_ROLE_RAISED  = 3
>          NO_VALID_AGENT_DETERMINED = 4
>          OTHERS                    = 5.
>
>WRITE: / MY_CONTAINER.
>
>WRITE: / SY-SUBRC, AGENTS-OTYPE, AGENTS-OBJID.
>
>WRITE: / 'end of report'.
>
>
>
>
>>>>>
>>>> Posting number 1019, dated 3 Nov 1999 02:55:13
>Date:         Wed, 3 Nov 1999 02:55:13 +0100
>Reply-To:     SAP Workflow Users' Group <SAP-WUG at MITVMA.MIT.EDU>
>Sender:       SAP Workflow <Owner-SAP-WUG at MITVMA.MIT.EDU>
>From:         Jocelyn Dart <jocelyn.dart at sap.com>
>Subject:      Re: Role won't work!!
>Mime-Version: 1.0
>Content-Type: TEXT/PLAIN; CHARSET="ISO-8859-1"
>Content-Transfer-Encoding: 7BIT
>
>Hi Todd, Another thing you can try if you want to test it with your
>container, is to write a little program that calls function
>RH_GET_ACTORS.  If you feed in "AC" followed by the role number
>(including leading zeros of course) into
>the ROLE_ID parameter, use the usual container macros to create
>the ACTOR_CONTAINER, and enter the date e.g. SY-DATUM in SEARCH_DATE
>then the ACTOR_TAB table will return the agents found by the role.
>The exceptions indicate if no agent was found.
>
>You can also use this function module to test against an existing
>workitem id and see what agents were found.
>
>If you set a breakpoint at the start of your role function module, e.g.
>with the BREAK-POINT command then you should be able to debug the
>function module with the correct container set up.
>
>RH_GET_ACTORS is not released for customer use so this is something
>you can try at your own risk, but it is a function module which is
>actually used by the workflow runtime environment to evaluate the
>role.
>Enjoy!
>Regards, Jocelyn Dart.
>SAP Australia.
>
>
>
>
>George J. Campbell-Kelly
>Tel: +44 1494 467514
>Fax: +44 1494 467560
>
>
>
>IMPORTANT NOTICE:
>This email is confidential, may be legally privileged, and is for the
>intended recipient only.  Access, disclosure, copying, distribution, or
>reliance on any of it by anyone else is prohibited and may be a criminal
>offence.  Please delete if obtained in error and email confirmation to the
>sender.
>
 


More information about the SAP-WUG mailing list