let actions = action.find({
recordType: 'timebill',
recordId: recordId
});
log.debug("We've got the following actions: " + Object.keys(actions));
if (actions.approve) {
let result = actions.approve();
log.debug("Timebill has been successfully approved");
} else {
log.debug("The timebill is already approved");
}