Node sequelize transaction transaction issues

  node.js, question

A file project contains methods for creating projects.
One file is member, which contains methods for adding items to members.

1. Create a project first, then add personnel.
2. Now we have to do transaction processing. If the project is successfully created and the personnel are failed, then the project will be deleted. That is, the project will be rolled back.

The problem I am facing now is
It is that the two methods are not in the same file and I do not know how to implement them.
` createProject: function(projectObj, callback) {

var self=this;
 entityFactory.sequelize.transaction(function (t) {
 ProjectEntity.create(projectObj,{transaction: t}).then(function(projectEntity){
 var viewpointNO = {
 id: dxUtils.generateUUID(),
 projectId: projectEntity.id,
 viewpointNO:0
 };
 ViewpointNOEntity.create(viewpointNO,{transaction: t}).then(function(viewpointNOEntity) {
 var groupAllObj = {
 id: dxUtils.generateUUID(),
 Name: "All Members",
 Description:' all members',
 ownerId: projectObj.ownerId,
 projectId: projectEntity.id
 };
   ProjectMemberGroupEntity.create(groupAllObj, {transaction: t}).then(function (groupEntity) {
 
 //This is RoleService. FindRoleByName ("R _ PROJECT _ OWNER",' GLOBAL', Function (ERR, role) {
 if(err){
 logger.error(err)
 throw new Error();
 }else{
 //This is addprojectmember, another method in this document.
 self.addProjectMember(projectEntity.id, projectObj.ownerId , role.id, t,function (err, projectUserEntity) {
 logger.error("2222")
 if(err){
 logger.error(err)
 throw new Error();
 }else{
 return  projectEntity;
 bracket
 })
 bracket
 
 })
 });
 });
 });
 }).then(function(result){
 callback(null, result);
 }).catch(function(err) {
 callback(err);
 });  `

Have you solved this problem? I also encountered the same problem.