Hey,
I need a help about async methods in x .
My requirements are, i want to do some functions after insert a table but i dont want to wait user or whoever insert for my functions.
I found some methods about Thread here is my code like :
// you can think this place after insert purchLine.
Thread thread;
thread = new Thread();
t.setInputParm([purchLine.RecId]);
if(thread)
{
t.removeOnComplate(true);
t.run(classNum(MyStaticClass),staticMethodStr(MyStaticClass,proces));
}
and
public static class MyStaticClass
{
public static void proces(Thread _thread)
{
MyEntegration entegration = MyEntegration::construct(curExt());
entegration.informEntegration(PurchLine::findRecId(conPeek(_thread.getInputParm(),1)); // i am preparing information about purchline and sending to web api and api puts them on message queue
}
}
so my first question is there any way to use thread without static classes methods and can you share with me any examples how can i perform this logic with runbasebatch ?