String inode=def.getInode();
Contentlet c;
// if the worflow requires a checkin
if(action.requiresCheckout()){
c = APILocator.getContentletAPI().checkout(inode, APILocator.getUserAPI().getSystemUser(), false);
c.setStringProperty("wfActionId", action.getId());
c.setStringProperty("wfActionComments", wfActionComments);
c.setStringProperty("wfActionAssign", wfActionAssign);