class AAICreateTasks {

    public void createServiceSubscription(BuildingBlockExecution execution) {
        try {
            ServiceInstance serviceInstance =
                    extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
            Customer customer = execution.getGeneralBuildingBlock().getCustomer();
            if (null == customer) {
                String errorMessage =
                        "Exception in creating ServiceSubscription. Customer not present for ServiceInstanceID: "
                                + serviceInstance.getServiceInstanceId();
                logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), errorMessage,
                        "BPMN", ErrorCode.UnknownError.getValue(), errorMessage);
                exceptionUtil.buildAndThrowWorkflowException(execution, 7000, errorMessage);
            }
            aaiSIResources.createServiceSubscription(customer);
        } catch (BpmnError ex) {
            throw ex;
        } catch (Exception ex) {
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}