cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

why doesn't my workflow trigger automatically ?

Hichem_Rahmani
Participant
0 Likes
4,484

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.

Accepted Solutions (1)

Accepted Solutions (1)

Dominik_Tylczynski
SAP Champion
SAP Champion

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

  • object category = BO
  • object type = BUS2038
  • event = CREATED
  • receiver type = WS99900001 (your workflow)

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

Hichem_Rahmani
Participant

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 ?

Dominik_Tylczynski
SAP Champion
SAP Champion
hichem_rahmani

That explains a lot. See my updated answer on how to disable queue usage in the event linkage.

Hichem_Rahmani
Participant
0 Likes

hello,

i did check this, it is disabled, and still same problem, do you have any clue why is that ?

Dominik_Tylczynski
SAP Champion
SAP Champion

hichem_rahmani What does the workflow event trace (the SWEL transaction) say? Can you share screenshots from the trace?

Hichem_Rahmani
Participant
0 Likes

I Hope that these images represent what you need.

Dominik_Tylczynski
SAP Champion
SAP Champion

hichem_rahmani See my updated answer.

Hichem_Rahmani
Participant
0 Likes

Hello again,

Unfortunately , it is already done as you said.

Dominik_Tylczynski
SAP Champion
SAP Champion

hichem_rahmani See my updated answer.

Hichem_Rahmani
Participant
0 Likes

good morning sir,

After i did all what you told me, i undestood that the problem was with the workflow going to the queue even tho i customized it in a way that shouldn't use the queue, should i put a new question for this ? because it seems like off topic ?

Dominik_Tylczynski
SAP Champion
SAP Champion

hichem_rahmani You can either close this question and create a new one or update the existing question. Either way will work.

Hichem_Rahmani
Participant

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 !

Answers (0)