Overview
A Combined Result (such as Batch Result, Job Result, Sync Result, etc.) can be sent in different ways based on the type of configuration as follows.
- Option 1: A Result with references to sub-results is useful when the use case requires:
- Shorter turn-around time.
- Receive single results as soon as they are generated.
- Smaller size on each message.
- Option 2: A Result including the complete content of the sub-results is useful when the use case requires:
- Self-contained result.
- Note: It is not suitable for a large number of sub-results.
- Note: A Result including partial content of the sub-results is useful when the use case requires:
- Tracking of progress for a batch, sync or job process.
- Recommendation:
- Option 1 is the recommended option.
Batch Result with References
This example describes the usage of a Result (Batch) where the sub-results (already sent) with references are included in the parent result. The SYNC Result also can be modelled in a similar way where Classification = SYNC_RESULT.
Figure 28 – Batch Result with References
Batch Result with Sub-Results Content
This example describes the usage of a Result (Batch) where the content of the sub-results is included in the result. The SYNC Result also can be modelled in a similar way where Classification = SYNC_RESULT.
Note: This approach may not be suitable if there are several child results. It is recommended to use the Results with References approach for complex use cases.
Figure 29 – Batch Result with Content
Partial Batch Result
A joining process that is not an atomic process, could be set up to generate a result either when it is done, or continuously send partial results as soon as a sub result is generated.
Example:
A dashboard close to the operator needs to point out the location of the product where the next operation should take place. Hence, the dashboard needs information on how many joining operations in a batch are completed.
This example describes the usage of a partial Batch Result (2 out of 8 results). As it is a partial result, the following properties IsPartial = True and ResultState = Processing in the below diagram.
Figure 30 – Partial Batch Result
Job Result with sub-results
This example describes the usage of a Result (Job) where the content contains a Batch Result and a Single Result.
Result messages with sub-results as references
This is an example of how the result messages are sent separately using sub-results references.
- Configuration: A Job with two batches as follows:
- Batch 1 with Batch Size = 3, Program 1
- Batch 2 with Batch Size = 2, Program 2
- Meta Data Usage for Results
- All Results shall contain Result.ResultMetaData.ResultId, Result.ResultMetaData.SequenceNumber, and Result.ResultMetaData.Classification.
- Additional ResultMetaData such as Name, etc. can be set based on the context.
- Single Results:
- Single Result. ResultMetaData. Classification = SINGLE_RESULT
- Single Result. ResultMetaData. ResultState = COMPLETED
- Single Result. ResultMetaData. IsPartial = FALSE
- Batch Results:
- Batch Result. ResultMetaData. Classification = BATCH_RESULT
- Batch Result. ResultMetaData. ResultState = Based on the context.
- Batch Result. ResultMetaData. IsPartial = TRUE if it is in progress, otherwise, it is FALSE.
- Each Batch Result MUST contain the following ResultCounters:
- BATCH_COUNT and BATCH_SIZE
- ResultContent is empty.
- Job Results:
- Job Result. ResultMetaData. Classification = JOB_RESULT
- Job Result. ResultMetaData. ResultState = Based on the context.
- Job Result. ResultMetaData. IsPartial = TRUE if it is in progress, otherwise, it is FALSE.
- Each Job Result can contain the following ResultCounters:
- JOB_SIZE and JOB_COUNT
- ResultContent is empty.
- Note: For a Combined Result (Batch or Job Result), if SequenceNumber is not available then it can be assigned to the sequence number of the LATEST/LAST single tightening it is referencing.
- Example Result Structure Layout for a Batch Result with Batch Size = 2
- Result
- ResultMetaData
- ResultId
- Classification = BATCH_RESULT
- ...
- ResultContent
[
{
- Result
- ResultMetaData
- ResultId = Single Result 1 ID
- Classification = SINGLE_RESULT
- ResultContent = Empty array
}
{
- Result
- ResultMetaData
- ResultId = Single Result 2 ID
- Classification = SINGLE_RESULT
- ResultContent = Empty array
}
]
- Result Messages: Send Parent and Child Results (sub-results) separately with References as follows.
- Send Single Result 1 of Batch 1
- Send Batch Result 1 with Single Result 1 ID, and Batch Count = 1, Batch Size = 3
- Send Job Result with Batch Result 1 ID
- Send Single Result 2 of Batch 1
- Send Batch Result 1 with Single Result 1 ID and Single Result 2 ID and Batch Count = 2
- Send Single Result 3 of Batch 1
- Send Batch Result 1 with Single Result 1 ID and Single Result 2 ID and Single Result 3 ID and Batch Count = 3
- Send FINAL Batch Result 1 with IDENTIFIERS of all the Single Results
- Send Single Result 1 of Batch 2
- Send Batch Result 2 with Single Result 1 ID and Batch Count = 1, Batch Size = 2
- Send Job Result with Batch Result 1 ID and Batch Result 2 ID.
- Send Single Result 2 of Batch 2
- Send Batch Result 2 with Single Result 1 ID and Single Result 2 ID and Batch Count = 2
- Send FINAL Job Result with Identifiers of Batch Result 1 and Batch Result 2.
- Note: Refer to the example result structure layout above.
Result messages with sub-results as references including intervention results
- Context:
- The primary purpose of the section is to describe that a separate intervention result is sent for any type of intervention such as INCREMENTED, DECREMENTED, ABORTED, etc.
- The Intervention Result ID shall be part of Batch Result or Job Result based on the configuration and type of intervention.
- Result Messages:
- Send Single Result 1 of Batch 1
- Send Batch Result 1 with Single Result 1 ID
- Send Job Result with Batch Result 1 ID
- Client or any other interface triggered an intervention.
- Send Intervention Result with InterventionType.
- Send Batch Result 1 with Single Result 1 ID, Intervention Result ID.
- Continue the processing.
- …