AnsweredAssumed Answered

Question considering process correlation

Question asked by parcus on Jul 20, 2012
Latest reply on Jul 23, 2012 by frederikheremans1

I'm working with activiti in a small group at a university and we have some issues with the way that processes can be found given some information to look for. Our project is about creating a game like monopoly that is executing based on activiti processes.

The situation:
We have a big process that acts as a game loop with a lot of call activities to keep it as structured as possible. One instance of the game is generelly identified by a Guid. Now it happens that the client sends a message to the server. That message contains the game's Guid and we want to find the corresponding and currently active process instance. When I say active I'm talking about the process that currently is doing the work, so in a lot of cases thats not the game loop process but some call activiti that was once startet in the game loop (running in sequence, not parallel).

The problem:
How to correlate between execution and the game's Guid or in detail, what is the smartest/fastest way to do it?
Until now it works when we are using signals and can query for executions waiting for a specific signal, but the performance is really bad, considering we have a query for each signal that is used and each time we have an incoming message. Using the business key for the top-level process (the game loop) did not really help, as it seems you only get exactly that process and not the currently active call activiti.

If you have a good solution to that, please tell me.

Further questions:
The problem kind of arises as i was not able to find proper definitions and descriptions (how they behave etc.) of business key, process instance id and execution id.
How do i handle call activities when using business keys? What is the difference between process instance id and execution id? As far as i understand a process instance is an execution, but why would i rather want the process instance than the execution?

I would be really glad if some person with more insight could help. Thanks in advance