}
}
}
public void assignmentForceComplete(String processDefId, String processId, String activityId, String username) {
SharkConnection sc = null;
try {
sc = connect();
WMSessionHandle sessionHandle = sc.getSessionHandle();
WfAssignment wfa = getWfAssignmentByActivityId(sc, activityId);
WfResource res = sc.getResource(username);
if (res == null) {
CustomWfResourceImpl.createResource(sessionHandle, username);
res = sc.getResource(username);
}
if (wfa.assignee() == null || (wfa.assignee() != null && !res.resource_key().equals(wfa.assignee().resource_key()))) {
wfa.set_assignee(res);
}