Ticket T297440
Visible to All Users

Workflow - Improve performance when a large portion of data matches a workflow activity criterion

created 9 years ago

Hi, I have an application with several workflows that work ok in my local computer (testing with few records), but when I deploy the workflows to a server and the workflow gets approximately 1,500,000 records that match the criteria the workflow service crashes with the following error:
----------------------------------------------------------------------
Fault bucket , type 0
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: BestTime.Service.exe
P2: 1.0.5756.30725
P3: 561301eb
P4: DevExpress.Data.v15.1
P5: 15.1.5.15211
P6: 55ba692e
P7: 17a5
P8: d9
P9: 10IEODV4TCLSIDYTIJZW0DD4R5TBIMWB
P10:

Attached files:

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_BestTime.Service_5cf6d5ef294430fbafd52ea9bd8205fbd1683_f32672a2_4e2245e7

Analysis symbol:
Rechecking for solution: 0
Report Id: aa2287e5-6c48-11e5-80d6-00155dfd2d78
Report Status: 0
Hashed bucket:
----------------------------------------------------------------------

I've done some testing and this only happens when the workflow needs to deal with a lot of data, workflows that deal with less records don't have a problem. I've been looking for an alternative like XPCursor or something similar to ask the workflow to page the records that meet the criteria but I haven't found any.
Any suggestions?

Comments (2)
DO DO
Dmitry O. (DevExpress) 9 years ago

    Hello Pablo,

    We need some additional time to research this scenario. We will get back to you once we have an answer. Please bear with us.

    P P
    Pablo Rubio Doddoli 9 years ago

      Hi Dmitry, I made some changes to the workflow to test:
      - Changed the criteria to trigger the workflow, now it looks for a record in a new class created just to trigger the workflow.
      - Moved all the criteria to look those million records within a process within a class and used XPCursor, then I go through a foreach recreating what the workflow is supposed to do.
      With these changes the workflow works, obviously I have some draw backs as I need to recompile if the criteria is changed and don't have the detail on the execution for each record that was used in the workflow, but on the other hand, I got the process to work as a workflow.
      I wanted to mention this because this makes me think it is definetely a memory issue.

      Answers approved by DevExpress Support

      created 9 years ago (modified 9 years ago)

      We have implemented the functionality described in this ticket. It will be included in our next update(s).

      Please check back and leave a comment to this response to let us know whether or not this solution addresses your concerns.

      Additional information:

      To reduce memory usage in cases when a large amount of workflow data is used, we have implemented partial loading of target objects in v15.1.8 of our product. Starting with this new version, you can configure the maximum number of target objects that can be simultaneously operated by a certain workflow activity via the static MaxSimultaneouslyOperatedTargetObjectsCount property of the DevExpress.ExpressApp.Workflow.Server.StartWorkflowListenerService class.
      In a typical scenario, you can set this property in the WorkflowServerService.xx file of the workflow service project as follows:
      [C#]

        created 9 years ago (modified 9 years ago)

        Hello Pablo,

        To reduce memory usage in cases when a large amount of workflow data is used, we have implemented partial loading of target objects in the next version (v15.1.8) of our product. Starting with this new version, you can configure the maximum number of target objects that can be simultaneously operated by a certain workflow activity via the static MaxSimultaneouslyOperatedTargetObjectsCount property of the DevExpress.ExpressApp.Workflow.Server.StartWorkflowListenerService class.
        In a typical scenario, you can set this property in the WorkflowServerService.xx file of the workflow service project as follows:

        C#
        DevExpress.ExpressApp.Workflow.Server.StartWorkflowListenerService.MaxSimultaneouslyOperatedTargetObjectsCount = 2000;

        If you want, we can provide you with a hotfix build for testing. Otherwise, you can wait for a few weeks for the official v15.1.8 release. Let me know how you would like to proceed.

          Show previous comments (1)
          DO DO
          Dmitry O. (DevExpress) 9 years ago

            You are welcome!

            P P
            Pablo Rubio Doddoli 9 years ago

              Hi Dmitry, quick question, I was looking for this fix in today's release information on solved issues:
              https://www.devexpress.com/Support/WhatsNew/DXperience/files/15.1.8.xml#autolist18
              But I couldn't find any reference to this ticket and/or functionality. Do you know if  it's included?

              DO DO
              Dmitry O. (DevExpress) 9 years ago

                Hell Pablo,

                This is a minor improvement for a specific scenario. That's why a reference to this ticket is not included in the What's new list. However, we have created a special blog post about it. Improving performance when a large portion of data matches a workflow activity criterion

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.