class AAIUpdateTasks {

    public void updateOrchestrationStatusActiveNetworkCollection(BuildingBlockExecution execution) {
        execution.setVariable("aaiNetworkCollectionActivateRollback", false);
        try {
            ServiceInstance serviceInstance =
                    extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
            Collection networkCollection = serviceInstance.getCollection();
            Collection copiedNetworkCollection = networkCollection.shallowCopyId();

            networkCollection.setOrchestrationStatus(OrchestrationStatus.ACTIVE);
            copiedNetworkCollection.setOrchestrationStatus(OrchestrationStatus.ACTIVE);
            aaiCollectionResources.updateCollection(copiedNetworkCollection);
            execution.setVariable("aaiNetworkCollectionActivateRollback", true);
        } catch (Exception ex) {
            logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusActiveNetworkCollection", ex);
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}