use of com.centurylink.mdw.model.value.user.UserActionVO.Entity in project mdw-designer by CenturyLinkCloud.
the class UserDataAccessRest method auditLogUserAction.
public void auditLogUserAction(final UserActionVO userAction) throws DataAccessException {
// certain actions need to be logged on the server
// TODO: this should actually be done on the server side, but currently many services don't require username
Action action = userAction.getAction();
Entity entity = userAction.getEntity();
if (action == Action.Run || action == Action.Send || action == Action.Retry || action == Action.Proceed || action == Action.Import || entity == Entity.ProcessInstance || entity == Entity.ActivityInstance || entity == Entity.VariableInstance) {
if (isOnline()) {
// run in background thread
new Thread(new Runnable() {
public void run() {
try {
ActionRequestMessage actionRequest = new ActionRequestMessage();
actionRequest.setAction("AuditLog");
actionRequest.addParameter("appName", "MDW Designer");
JSONObject msgJson = actionRequest.getJson();
msgJson.put(userAction.getJsonName(), userAction.getJson());
invokeActionService(msgJson.toString(2));
} catch (Exception ex) {
// silent
ex.printStackTrace();
}
}
}).start();
}
}
}
Aggregations