Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

How implement multi-threading using SysOperation framework

Posted on by 490
I have gone through many articles available but can't be able to implement the same, need help for that. here is my service class, in data update class, I am multiple 20 30 columns values in a custom table, how implement multithreading for same
/// <summary>/// MultithreadingService/// </summary>internal final class MultithreadingService extends SysOperationServiceBase{        /// <summary>    /// Servcie Class Process method    /// </summary>    /// <param name = /_contract/>Process</param>    public void process(MultiThreadingContract _contract)    {        #OCCRetryCount        try        {            if (_contract)            {                ttsbegin;                MultiThreadingDataUpdate::DataUpdate(_contract.getFromDate(),_contract.getToDate());                Info('Operation Successful');                ttscommit;            }        }        catch(Exception::Error)        {            error(/@SYS104505/);        }            }}
 
  • Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    How implement multi-threading using SysOperation framework
    You need at least two pieces of work to be able to run multiple things in parallel. If you're unable to split your logic to two or more pieces, then you can't use multithreading.
     
    What number of fields you have in a table is completely irrelevant, because that's not a process to execute.
  • Sachin Mittal Profile Picture
    Sachin Mittal 490 on at
    How implement multi-threading using SysOperation framework
    Ok what I have done is for learning purposes .i.e. multithreading., I have added 25 columns in sales table  , and inserting values in those columns. And in data contract class I have create from date , to date contracts , to select sales orders in given range. So i want to implement multithreading for same process
  • Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    How implement Multithreading using sysoperation framework in D365FO
    Please tell us more about the processes that you want to run in parallel in several threads. "I am multiple 20 30 columns values in a custom table" says nothing useful.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans