Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
Community interest groups have now moved from Yammer to Microsoft Viva Engage. To join a Viva Engage community and take part in the latest discussions, fill out the Request access to Finance and Operations Viva Engage Community form and choose the community you want to join.
Important
Some or all of the functionality noted in this article is available as part of a preview release. The content and the functionality are subject to change. For more information about preview releases, see Service update availability.
This article describes the real async feature enhancements to SysOperations. These enhancements enable operations to run asynchronously without blocking the client as the regular SysOperations do. Therefore, users can initiate multiple operations simultaneously. In this way, the enhancements help improve overall performance.
You can view the status of async operations on the same page.
To use real async operations, you must extend the SysOperationServiceController class.
For more information about the SysOperation framework, see SysOperation Framework Overview.
Enable the real async feature
- In the Feature management workspace, select Check for updates.
- Enable SysRealAsyncOperationsFeature.
- After you enable the feature in Feature management, go to Client performance options, and select the Enable real async operations option.
Use the real async feature
To use real async operations, first extend the SysOperationServiceController class, as you normally do to implement SysOperations. Then override the following methods to enable real async operations for your service operation class.
Method 1: canRunAsRealAsync
By default, the canRunAsRealAsync method returns false.
- To turn on or off the real async execution of your operation at runtime, introduce a feature for your operation and confirm the feature is enabled inside the
canRunAsRealAsyncmethod. If the main Real Async feature is enabled in Feature management, the returned value decides if the operation runs in real async.
Here's an example.
public boolean canRunAsRealAsync()
{
if (featureManagementForSalesOrderConfirmationRealAsync::isEnabled())
{
// This operation can run through real async
return true;
}
else
{
return false;
}
}
- Return true to run the operation in real async by default.
Method 2: getSysRealAsyncOperationId
By default, the getSysRealAsyncOperationId method returns an empty string.
- Override this new method, and return the ID of the current operation. For example, if the operation is confirming a sales order, return the
SalesIdvalue of the order.
Here's an example.
public SysRealAsyncOperationId getSysRealAsyncOperationId()
{
Common sourceTable = this.parmSourceTable();
str orderId;
if (sourceTable && sourceTable is SalesTable)
{
SalesTable salesTable = sourceTable;
orderId = salesTable.SalesId;
}
else
{
orderId = this.parmId();
}
return orderId;
}