on 07-19-2016 3:33 PM
Hi,
i have created a workflow using classes. i have done all the configurations for events and also implemented the methods of IF_workflow in the class.
problem is i am not getting the class instance in the workflow. following things i have done:
1. created a custom class Zcl_sd_sales_workflow.
2. this class has a method "Start" which triggers the workflow.
3. i am saving the instance of the class in an table Mt_instance which has two fields 1. UUID and 2. Instance.
4. did the binding of _event_object with the container Zclass (custom container created by refering class in workflow).
5. on execution i am getting all the event parameters except the one which holds the class instance.
6. i searched on SCN and tried many suggestions but unfortunatly none has worked.
7. ifeel i am missing something at the time of triggering the event / filling the mt_instance table in class.
could you please help by providing solution. my class is almost replica of standard class cl_se_pur_po_wf_out.
Regards
Anand Sugandhi
Hi Stephane,
suggested code is almost same as my original code. problem here is i am getting no records in MT_Instance table when i open workflow log even though i saved instance entry in this table at the time of event triggering.
in short, IF_workflow is not working for my class and not holding the persistent instant data. do i missed any setting which is required to hold instance data at IF_Workflow persistent layer?
- Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anand,
What is the visibility of the table MT_INSTANCE ? is this a private attribute ?
Also I don't understand why your table does not have the same key as your object key (the number is the same but one is of type UUID and the other VEBLN
Please debug yoiur class I (pass WF-BATCH to dialog and with an external break point you"ll arrive there)
I am not sure that not seeing the Mt_instance table attribute from the workflow log is an issue.
Cheers
Stephane
Hi
Yes the same value but not the same structure or type this might be an issue for comparison.
No a persistent class is to work with DB table.
Protected visibility so my guess is that it is normal that you can not see it from the workflow.
I have worked with ABAP OO within workflow using the same approach that you are using today and I really had no issue, however I don't recally checking the instance table within the workflow because it should work intenally within the class
I think that both SAP Workflow | Book and E-Book - by SAP PRESS and ABAP Development for SAP Business Workflow. von Ilja- - by SAP PRESS describe perfectly how to set that up.
If you have not already invested in those ebooks may be you should you do have invaluable information within them.
Have you made the debugging from the class ? What happens ?
Cheers and courage
Stephane
User | Count |
---|---|
72 | |
8 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.