Retrieving batch flag?

Firstly, the flow chart.


A-1 and A-2 is not that different. But still, i need it.

So i added this code in my code.

NoYes a;


I tried to log a and checked it, but all of “a” was “no”, in both batch jobs and non-batch jobs.

Is there any other way to retrieve whether this job goes batch or on client?


Where you have written this? Tell us how your batch job is implemented?


Thanks for your reply.

CanGoBatchJournal Method is overridden on the class so I think batch jobs is implemented from this.

(Not sure, I am not the one who wrote the class. I am just modifying)

And I wrote the

NoYes a;


in the method of the class. That method is for posting planned order.

After that, I wrote if clause like if( a != NoYes::No){}


when this method is called? in run()?

Does your class extends RunBaseBatch? If so use, this.isInBatch()


I tried to call that method in everywhere, including run(), because i couldn’t retrieve the flag. Only false value.

So i wrote your suggested code and that worked! Thank you!