on 06-04-2012 2:59 PM
Hi All,
I am facing a strange issue, which is mentioned below.
I am triggering a WF using a Custom class, where I have defined an Event and in the event triggering Method I am using below code.
I want to pass a custom container element to WF, which is WC_STATUS. but I can't find the value in log.
DATA : l_container TYPE REF TO if_swf_ifs_parameter_container,
l_event TYPE REF TO if_swf_evt_event,
lv_status(1) TYPE c.
lv_status = 'A'.
*---- raise the event; use instance method (example)
CALL METHOD cl_swf_evt_event=>get_instance
EXPORTING
im_objcateg = me->za_mpor-catid
im_objtype = me->za_mpor-typeid
im_event = im_event
im_objkey = me->za_mpor-instid
RECEIVING
re_event = l_event.
l_container = l_event->get_event_container( ).
CALL METHOD l_container->set
EXPORTING
name = 'WC_STATUS'
value = lv_status.
l_event->raise( ).
COMMIT WORK.
Another varient of program I have used is below
DATA: l_event_parameters TYPE REF TO if_swf_ifs_parameter_container,
lv_status(1) TYPE c.
*- begin of local data
lv_status = 'A'.
TRY.
*--- get the event container that is used to transport the event parameters
CALL METHOD cl_swf_evt_event=>get_event_container
EXPORTING
im_objcateg = 'CL' "category for classes
im_objtype = me->za_mpor-typeid "the classname
im_event = im_event " “event that will be triggerd
RECEIVING
re_reference = l_event_parameters.
*--- set the values of the parameters
CALL METHOD l_event_parameters->set
EXPORTING
name = 'WC_STATUS' "the name of the event parameter
value = lv_status. "the value
*--- raise the event
CALL METHOD cl_swf_evt_event=>raise
EXPORTING
im_objcateg = 'CL' "“category for classes
im_objtype = me->za_mpor-typeid " “the classname
im_event = im_event " “the event name
im_objkey = me->za_mpor-instid "“the obj.-key (instid)
im_event_container = l_event_parameters. "the event params
*--- start the receivers (tRFC)
COMMIT WORK.
CATCH cx_swf_evt_exception. "“except. while raising the event
CATCH cx_swf_cnt_container. "“except. while setting event params
ENDTRY.
any suggestions?
Hi. You must check:
1. Event parameter 'wc_status' actually exist for triggering event
2. Binding between event container and workflow container is correctly defined
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check you mention WC_STATUS. Please check your container parameter it is in small letter like wc_status or something WC_staus.
You container element must be all capital letter as you mention
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.