Question6Replies1574Views DebashisB1976 Member since 2014 3 posts HighMark Posted: 4 years agoLast activity: 4 years 4 months ago Closed Running in different threadHi,I have a requirement to run a process (doesn't have user intervention, creates new work object ) in a different thread and use outcome data in current process ( current work object). but the process running in different thread should be instant, max wait time to start the process no more than 30 sec.Pega version: Pega 6.2 SP2 and CPM Version:- 6.xWhich option is the best to use in my case.1. Queue Instruction ( using activity queue method)2. RedirectAndRun activity.3. anything else if you think.ThanksDebashis Case Management ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Moderation Team has archived post This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question. Posted: 4 years agoericosman_GCS PEGA replied to DebashisB1976Ways to start exploring the differences:1) Try a "queue" method step in your own activity and look at the generated java.2) Look at what redirect-and-run does for actually launching the new process.3) How do 1 and 2 differ?/Eric Posted: 4 years agoDebashisB1976 HighMark replied to DebashisB1976Hi,I used both of them and here is my thought. I don't want to explore and see the result rather if you know then please reply.1. queue method is not quick, it runs in a different java thread but taken care internally. so when its triggered and complete that's not in calling activity's control.2. RedirectAndRun also runs on separate thread and instantly and its under calling activity's control.My questions are following.1. Is it safe to use queue method when I need to call the process instantly and to return to calling activity?2. I know connect-wait can be used after using queue method to get back the result in calling activity, but how long I should wait, will it be performance effective that case? Posted: 4 years agoericosman_GCS PEGA replied to DebashisB1976>>> connect-wait can be used after using queue method to get back the result Hi,The connect-wait doesn't just get back the result. The important part of it is that it waits for the queued process to complete. /Eric Posted: 4 years agoDebashisB1976 HighMark replied to DebashisB1976that case calling activity does not have any control on the queued activity. Then what is your suggestion in my case: Not to use Queue method?I know one more which is QueueBatchActivity in java step.Can you please let me know which one would be best to use for my case?1. RedirectAndRun2. QueueBatchActivity in java step3. Queue method- looks like it can create problem. Posted: 4 years agoericosman_GCS PEGA replied to DebashisB1976>>> Queue method- looks like it can create problemWhat is the problem you are referring to? (By the way, I don't have any quick answer for "which is best"). /Eric Posted: 4 years agoDebashisB1976 HighMark replied to DebashisB1976The problem I am referring is not to returning control back to calling activity.Thanks Osman,Anyone else have any thought?