AssembleProduct
Whenever a line item has been paid for, it should be possible to invoke a custom workflow for “assembly/production of the product” instead of using the default enfore functionality. The custom workflow will be triggered if the sales item referenced by the line item has a custom workflow configured for the AssembleProduct
extension point.
The workflow receives information about the line item. If the workflow completes successfully, no return value is expected and the line item will be considered to have been “assembled”. If the workflow fails, an error is shown and the line item status is left at “paid”.
Workflow parameters
The AssembleProduct
-CUWO does not yet receive a dedicated WorkflowParameters
structure.
Success result
On success, the AssembleProduct
-CUWO is expected to pass a AssemblyProductWorkflowResult
structure to terminateSuccess
.
The structure is defined as:
/**
* The result value for a "assemble product" workflow.
*/
class AssemblyProductWorkflowResult extends WorkflowResult {
readonly "@type" : string = "n4.cuwo.AssemblyProductWorkflowResult";
/**
* The new external data to attach to the line item. If not provided,
* the existing external data of the line item will not be changed.
*/
public updatedExternalData? : string;
}
Failure result
The AssembleProduct
-CUWO does not yet have a dedicated WorkflowFailure
structure to pass into terminateFailure
.
Cancelation result
The AssembleProduct
workflow does not support cancelation.