on ‎2022 Nov 16 2:25 PM
Hello,
i tried to create a workflow that would send an email automatically as soon as a maintenance notification is created or put in process, when i test the workflow it works perfectly but when i create maintenance notifications it doesn't.
i will share with you pictures of the different configurations that i did and please let me know if i am missing anything.





Thanks in advance.
Request clarification before answering.
Hello hichem_rahmani
As per your 2nd screenshot the workflow is triggered by the CREATED or INPROCESS event of the BUS2038 business object. Are you sure those events are generated when a maintenance notification is created?
I'd suggest the following tests.
First, check if the events trigger the workflow correctly. You can manually create a workflow event with the SWUE transaction. Trigger BUS2038 CREATED event and check if it starts the workflow.
Then, check if maintenance notification creation triggers the event. Activate workflow event trace with the SWELS transaction. Make sure the trace is active and that the trace restrictions include BUS2038 CREATED and INPROCESS events. Create a maintenance notification. Display the workflow event trace with the SWEL transaction and check if the events are there.
If maintenance notification creation doesn't trigger WF events in standard, consult SAP Help on Event Creation
I find Creation of Events When Change Documents are Written and Creation of Events upon Status Changes very useful in custom workflows implementations.
As per your comment the background job to deliver event queue is not active. Therefore if the triggering events linkage to your workflow is queue enabled, the events are sent to the queue only and the workflow doesn't start as there is no job to get them from the queue.
Go to the details of the triggering events linkage:

and disable queue usage in the following popup.
Also go to the SWE2 transaction, select the entry where
Make sure that the event delivery is "Using tRFC (Default) and "enable event queue" is unchecked:

Repeat for the INPROCESS event.
What we are trying to do here is to get BUS2038 delivered to your workflow directly, without the event queue as your event queue delivery job is inactive. You could of course active the job, which should be done anyway, but that will have system-wide consequences and it will deliver all the events in the queue. I'm not quite sure if you want to do that.
Those settings will deliver events directly to the receiver, i.e. your workflow. If they are still put in the event queue, then I suspect there is something wrong with the event linkage. See the note 1709418 - How to use the Event Trace for troubleshooting and attached PDF guide on how to analyze event trace.
You can also display your events in the queue with the SWEQBROWSER transaction. Check if it indicates any linkage issues.
Best regards
Dominik Tylczynski
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mr Dominik Tylczynski
First of all i would like to thank you for the detailed answer that you provided.
for both tests that you are talking about i did check them, and here is what i found :
1 - the first test worked it does trigger the event
2 - the second one does too
I did some research and here is what i found :

all my workflows are put on queue but they never start, do you think the reason why this is happening is because of this job ? if so, can you tell me how can i activate it ?
That explains a lot. See my updated answer on how to disable queue usage in the event linkage.
hichem_rahmani What does the workflow event trace (the SWEL transaction) say? Can you share screenshots from the trace?
hichem_rahmani See my updated answer.
hichem_rahmani See my updated answer.
hichem_rahmani You can either close this question and create a new one or update the existing question. Either way will work.
hello sir,
i did accept your answer, because it does answer my question, i did findout why my workflow isn't working, now i will open another question to find a solution to the problem,
Thanks again for everything !
| User | Count |
|---|---|
| 8 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.