BPM - flowchart with two parallel sub-processes after trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Maarten
    Member
    • Jun 2020
    • 56

    BPM - flowchart with two parallel sub-processes after trigger

    Hi,

    I'm trying to have two parallel sub-processes running after a single trigger:

    Click image for larger version

Name:	dataurl469358.png
Views:	407
Size:	93.9 KB
ID:	87406

    In each send message sub-process a variable is set, after which a workflow is initiated.

    However, it seems the variable that is set doesn't have it's scope limited to the sub-process.

    In other words, in the workflows that are initiated, the variable has the same value for both.

    What i'm trying to achieve is that after a single state change to an entity, i'm sending messages to two different groups of people, using two different templates.

    Someone has a suggestion of how to set run these in parallel?​
  • yuri
    Member
    • Mar 2014
    • 8452

    #2


    I re-checked. It worked as expected. I paralleled two sub-processes. Each sub-process had their variable declared within. I set the sub-processes to return those variables to the parent process. After execution both variables returned to the parent process.

    Not sure about your lower flow with the timer start. These two start events will instantiate separate processes.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • Maarten
      Member
      • Jun 2020
      • 56

      #3
      yuri thanks, it seems indeed they run in parallel as expected. My problem might be that I'm not able to pass within the sub-process the variable $template_id to the workflow that is initiated. I've tried to catch the variable in the workflow formula action with $template_id and $$template_id, but both are not set. Any suggestions how to pass the variable to the workflow when initiated through a BPM sub-process?

      Click image for larger version  Name:	image.png Views:	0 Size:	15.5 KB ID:	87457

      Click image for larger version

Name:	image.png
Views:	295
Size:	8.0 KB
ID:	87458Click image for larger version

Name:	image.png
Views:	293
Size:	12.1 KB
ID:	87459

      I've tried to catch it with {$$template_id}, $$template_id, $template_id and {$template_id}
      Click image for larger version

Name:	image.png
Views:	287
Size:	63.9 KB
ID:	87460​​

      Last edited by Maarten; 01-25-2023, 09:34 AM.

      Comment

      • Maarten
        Member
        • Jun 2020
        • 56

        #4
        It seems to work when I create a new process and call it as an activity from the main process. But it doesn't work when the main process initiates a workflow. Somehow the variable is not passed on to a workflow.

        Comment

        • yuri
          Member
          • Mar 2014
          • 8452

          #5
          When triggering another workflow rule variables are not passed (we would have documented it otherwise). I recommended to use a BPM task instead.
          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

          Comment

          Working...