Multiline container parallel activity: no agent found

Rickayzen, Alan alan.rickayzen at sap.com
Wed Nov 21 09:57:20 EST 2001


Raf,
Are you starting this step as a TS task or a WS task?
 
I would recommend starting a WS task passing the nth sales order to the flow
(e.g. &salesorder() ). That way the subflow only deals with one sales order
and you can find the agent based on the attribute of that one sales order
(&salesorder.creator    - without brackets ) .
 
Sorry for the jumble of words. I'm in a rush but I can explain better later,
 
Alan
 
-----Original Message-----
From: Bormans, Raf [mailto:Raf.Bormans at thevisionweb.be]
Sent: 21 November 2001 14:42
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Multiline container parallel activity: no agent found
 
 
Hi,
 
I want to send a workitem to the creators of some specific sales orders,
with a display method, to inform that some further action can be taken for
this order.
 
[1] In a background step, I get all relevant orders and put them as objects
in a multiline container (mlSalesTransactionCRM). The relevant coding in the
method looks like this:
 
data: x_mlSalesTransactionCRM type swc_object occurs 0,
      l_object type swc_object,
      x_guid like BBP_BOR_KEY occurs 0 with header line.
 
loop at x_guid.
  swc_create_object l_object 'BUS2000115' x_guid-GUID.
  append l_object to x_mlSalesTransactionCRM.
endloop.
swc_set_table container 'mlSalesTransactionCRM'
                        x_mlSalesTransactionCRM.
 
[2] Based on this container, I created a parallel step (activity) to create
a workitem for each order. When I put myself as agent (user), I indeed get
all the workitems., so I believe the bindings are ok.
 
[3] I want now that the creator of the order gets the workitem, so I
delegated BUS2000115 and added 2 virtual attributes:
-> CreatedBy
GET_PROPERTY CREATEDBY CHANGING CONTAINER.
select single CREATED_BY
    from  CRMD_ORDERADM_H
    into  OBJECT-CREATEDBY
    where guid = object-key-BusinessProcess.
if ( syst-subrc = 0 )                      and
   ( not ( OBJECT-CREATEDBY is initial ) ).
  SWC_SET_ELEMENT CONTAINER 'CreatedBy' OBJECT-CREATEDBY.
endif.
END_PROPERTY.
 
-> OrgCreatedBy
GET_PROPERTY ORGCREATEDBY CHANGING CONTAINER.
data: l_created type CRMD_ORDERADM_H-created_by.
 
  swc_get_property SELF 'CreatedBy' l_created.
  if ( not ( l_created is initial ) ).
    concatenate 'US' l_created into OBJECT-ORGCREATEDBY.
    SWC_SET_ELEMENT CONTAINER 'OrgCreatedBy' OBJECT-ORGCREATEDBY.
  endif.
 
END_PROPERTY.
 
When I test and instantiate the object, I get indeed an organisational
object identification (type HROBJEC_14) in de form of US<userid>. When I
used it as expression in the parallel step (using the indexed object), the
workflow stops with following error:
 
===================================================================
Workflow 65822 Error WL 470 . Please repair the su
 
The following error occurred in the workflow above:
Workflow CRM: BP unlock (data completion) no. 65822 activity 30 role
'&MLSALESTRANSACTIONCRM().ORGCREATEDBY&': No agent found
LSALESTRANSACTIONCRM().ORGCREATEDBY&': No agent found
Please repair the suspended workflow
 
Press 'Execute' to display the workflow that has errors.
===================================================================
 
 
I'm almost certain I got a similar thing working with materials once. But
maybe the combination of a virtual attribute on a virtual attribute is too
much for this situation.
 
Anybody any suggestions, ideas, ...
 
Thanks, Raf
 


More information about the SAP-WUG mailing list