I guess that you're working with ivy 5.x?
To suspend a task a user is currently working on, set it back by calling
=> ivy.task.reset();
in a Script Step after user cancels the task (e.g by a cancel button in a form)
Be sure, that the user who owns this task has the appropriate permission to call this method.
=> ivy.wf.getApplication().getSecurityDescriptor().grantPermission(IPermission.TASK_RESET,<IRole User owns>);
Call this by an System Admin to grant the permission to the role this user owns.
Now the task is going back to it's state before user resumed it.suspended state.