cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Raise / Wait events in SAP CPS job chain (not in single job definition)

Former Member
0 Kudos

Hi Friends,

I have an requirement to create job chain with 10 jobs.

In the job chain (X), the first job raise an event (A), 2nd job should have wait event (A) and should raise event (B) and 3rd job should wait on event (B) and raise event (C)..... Like this, I have 10 jobs within job chain.

How do we define these raise / wait events on each and every job?

I only see, Wait Events & Raise Events tabs on Job Chain but not specific to each job within job chain.

your inputs are highly appreciate.

Thanks,

Shiva

Accepted Solutions (0)

Answers (1)

Answers (1)

gmblom
Active Contributor
0 Kudos

Hello Shiva,

Since you have the job chain, the dependencies are done through the steps and you should not need events anymore.

If you really need them, you have to put them on the definition, there is no support to put them on a chain call.

Regards Gerben

Former Member
0 Kudos

Thank you Gerben. If this is the case, can you please answer the below questions for me.

If the Job Chain has 4 steps (A, B, C & D) and have an Wait Event (X) & Raise Event (Y) defined at Job Chain level in Wait Event / Raise Event tabs.

How do we submit Wait Event (X) for Step B and Raise Event (Y) after Step C ?How does the events get cleared?  Do we have to clear events manually in between steps by adding Definition: System_RaiseClearEvent ?

Looking forward to hear from you.

Thanks,

Shiva

gmblom
Active Contributor
0 Kudos

Hello Shiva,

I do not quite understand the question. What are you trying to do? Why would you submit a wait event for step B and a raise event after step C? The events are already on the chain level right?

You can always clear the event on the wait event side by selecting the clear event flag.

Or you can use System_RaiseClearEvent to clear it, but you can also use it to raise an event.

Regards Gerben

Former Member
0 Kudos

Hi Gerben,

Thank you for answering my question. Here is an example, what I am trying to do.

Note: Raise Event "R2" should be triggered after completion of Job 4

I have created the Job Chain with below steps but need help on Raise Event R2.

1). Created Job Chain "CHAIN1"

2). Added Wait Events W1 & W2 in Wait Events tab of CHAIN1.

3). Added Raise Event R1 in Raise Event tab of CHAIN1

4).Created Steps as below:

   Step_01 contains Job1 (ABAP Program & Variant)

   Step_02 contains Job2 (ABAP Program & Variant)

   Step_03 contains Job3 (ABAP Program & Variant)

   Step_04 contains Job4 (ABAP Program & Variant)

   Step_05 contains 2 jobs - Used system def.( System_RaiseClearEvent)  to clear the events W1 & W2

Regards,

Shiva

gmblom
Active Contributor
0 Kudos

Hello,

You can add R2 in the raise event tab of CHAIN1 as the raise events of a chain will trigger when the chain finishes.

The clear jobs in step 5 are not necessary. In the wait event section in CHAIN1, just mark the 'clears event' flag for W1 &W2, this will clear the events automatically.

Regards Gerben

Former Member
0 Kudos

Thank you Gerben. make sense and thank you for the updates.