Ejemplo n.º 1
0
 function (callback) {
     ResourceAssociation.create( data ).then(function (association) {
         callback(null, association);
     }).catch(function (err) {
         callback(err.message);
     });
 }
Ejemplo n.º 2
0
 function (callback) {
     ResourceAssociation.count({where: {
         resourceId: resource.id,
         userId: user.id
     }}).then(function (count) {
         callback(null, count);
     });
 },
Ejemplo n.º 3
0
 function countUserResourceAssociations(callback) {
     ResourceAssociation.count({where: {
         resourceId: data.resourceId,
         userId: data.userId
     }}).then(function (count) {
         callback(null, count);
     });
 },
Ejemplo n.º 4
0
 function (callback) {
     ResourceAssociation.findById( associationId)
         .then(function (association) {
             callback( null, association);
         })
         .catch(function (err) {
             callback(err.message);
         });
 },
Ejemplo n.º 5
0
 function (callback) {
     ResourceAssociation.find({
         where: {
             id: associationId
         },
         attributes: ['id','context','resourceId','userId','projectId','workflowId','workflowServiceSubstepId']
     }).then(function (association) {
         callback( null, association);
     }).catch(function (err) {
         callback(err.message);
     });
 },