Multiline container parallel activity: no agent found
Bormans, Raf
Raf.Bormans at thevisionweb.be
Wed Nov 21 08:41:34 EST 2001
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