class UserCreationWorkflow extends BaseUserEditorWorkflow {

    void onCreateEntityClick() {
        final String identifier = createEntity.getEntityIdentifier();
        if (identifier != null) {
            checkCreate(identifier,
                        new CheckCreateCallback() {
                            @Override
                            public void valid() {
                                createEntity.clear();
                                UserCreationWorkflow.this.user = userEditorDriver.createNewUser(identifier);
                                doEdit();
                            }

                            @Override
                            public void invalid(final SecurityManagementException exception) {
                                showError(exception);
                                createEntity.setErrorState();
                            }

                            @Override
                            public void error(final Throwable error) {
                                showError(error);
                            }
                        });
        }
    }

    @Inject public  UserCreationWorkflow(final ClientUserSystemManager userSystemManager,
                                final Event<OnErrorEvent> errorEvent,
                                final Event<NotificationEvent> workbenchNotification,
                                final Event<DeleteUserEvent> deleteUserEvent,
                                final Event<SaveUserEvent> saveUserEvent,
                                final Event<CreateUserEvent> createUserEvent,
                                final ConfirmBox confirmBox,
                                final CreateEntity createEntity,
                                final UserEditor userEditor,
                                final UserEditorDriver userEditorDriver,
                                final ChangePassword changePassword,
                                final LoadingBox loadingBox,
                                final EntityWorkflowView view);

}