Retrieving batch flag?

Firstly, the flow chart.

6038.batch.png

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

So i added this code in my code.

NoYes a;

a=this.batchInfo().parmBatchExecute();

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?

Regards.

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

Kranthi

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;

a=this.batchInfo().parmBatchExecute();

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

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

Regards,

when this method is called? in run()?

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

Kranthi

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!

Regards,