Skip to content

Commit

Permalink
docs(protocol): add ACTIVATE explanation to index
Browse files Browse the repository at this point in the history
A batch ACTIVATE operation works different from a TERMINATE batch operation.
During a TERMINATE the index is the key of a child element instance. For ACTIVATE it is a simple counter,
 keeping track of how many ACTIVATE commands we still need to write.
  • Loading branch information
remcowesterhoud committed May 8, 2023
1 parent c3a73f5 commit c3701cf
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ public final class ProcessInstanceBatchRecord extends UnifiedRecordValue
new LongProperty("batchElementInstanceKey");

/**
* The index is used to determine the beginning of the next batch. If the index equals -1 it means
* there won't be another batch. For the TERMINATE intent this index will be the element instance
* key of the first child instance of the next batch.
* The index is used to keep track of the position in the batch. When the index is -1, there won't
* be another batch.
*
* <p>Depending on the Intent the index is used differently:
*
* <ul>
* <li>TERMINATE - The index is the element instance key of the first child instance of the next
* batch.
* <li>ACTIVATE - The index is a counter, indicating how many more child instances need to be
* activated.
* </ul>
*/
private final LongProperty indexProperty = new LongProperty("index", -1L);

Expand Down

0 comments on commit c3701cf

Please sign in to comment.