-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
133 changed files
with
3,545 additions
and
1,024 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,29 @@ | ||
package ru.runa.wfe.audit; | ||
|
||
public interface Attributes { | ||
static final String ATTR_ACTION = "action"; | ||
static final String ATTR_NODE_NAME = "nodeName"; | ||
static final String ATTR_NODE_TYPE = "nodeType"; | ||
static final String ATTR_NODE_ID_FROM = "nodeIdFrom"; | ||
static final String ATTR_NODE_ID_TO = "nodeIdTo"; | ||
static final String ATTR_TRANSITION_ID = "transitionId"; | ||
static final String ATTR_MESSAGE = "message"; | ||
static final String ATTR_INFO = "info"; | ||
static final String ATTR_PROCESS_ID = "processId"; | ||
static final String ATTR_TOKEN_ID = "tokenId"; | ||
static final String ATTR_ACTOR_ID = "actorId"; | ||
static final String ATTR_ACTOR_NAME = "actorName"; | ||
static final String ATTR_OLD_VALUE = "oldValue"; | ||
static final String ATTR_NEW_VALUE = "newValue"; | ||
static final String ATTR_VARIABLE_NAME = "varName"; | ||
static final String ATTR_TASK_ID = "taskId"; | ||
static final String ATTR_TASK_NAME = "taskName"; | ||
static final String ATTR_INDEX = "index"; | ||
static final String ATTR_IS_FILE_VALUE = "fileValue"; | ||
static final String ATTR_IS_EXECUTOR_VALUE = "executorValue"; | ||
static final String ATTR_DUE_DATE = "dueDate"; | ||
static final String ATTR_ID = "id"; | ||
static final String ATTR_PARAM = "param"; | ||
static final String ATTR_VALUE_TRUE = Boolean.TRUE.toString(); | ||
String ATTR_ACTION = "action"; | ||
String ATTR_NODE_NAME = "nodeName"; | ||
String ATTR_NODE_TYPE = "nodeType"; | ||
String ATTR_NODE_ID_FROM = "nodeIdFrom"; | ||
String ATTR_NODE_ID_TO = "nodeIdTo"; | ||
String ATTR_TRANSITION_ID = "transitionId"; | ||
String ATTR_MESSAGE = "message"; | ||
String ATTR_INFO = "info"; | ||
String ATTR_PROCESS_ID = "processId"; | ||
String ATTR_TOKEN_ID = "tokenId"; | ||
String ATTR_ACTOR_ID = "actorId"; | ||
String ATTR_ACTOR_NAME = "actorName"; | ||
String ATTR_OLD_VALUE = "oldValue"; | ||
String ATTR_NEW_VALUE = "newValue"; | ||
String ATTR_VARIABLE_NAME = "varName"; | ||
String ATTR_TASK_ID = "taskId"; | ||
String ATTR_TASK_NAME = "taskName"; | ||
String ATTR_INDEX = "index"; | ||
String ATTR_IS_FILE_VALUE = "fileValue"; | ||
String ATTR_IS_EXECUTOR_VALUE = "executorValue"; | ||
String ATTR_DUE_DATE = "dueDate"; | ||
String ATTR_ID = "id"; | ||
String ATTR_TRANSITION_NAME = "transitionName"; | ||
String ATTR_PARAM = "param"; | ||
String ATTR_VALUE_TRUE = Boolean.TRUE.toString(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package ru.runa.wfe.audit; | ||
|
||
import javax.persistence.DiscriminatorValue; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Transient; | ||
import ru.runa.wfe.lang.Node; | ||
|
||
/** | ||
* Info log from Groovy Action. | ||
* | ||
* @author vromav | ||
*/ | ||
@Entity | ||
@DiscriminatorValue(value = "J") | ||
public class NodeInfoLog extends NodeLog { | ||
private static final long serialVersionUID = 1L; | ||
|
||
public NodeInfoLog() { | ||
} | ||
|
||
public NodeInfoLog(Node node, Severity severity, String data) { | ||
super(node); | ||
addAttributeWithTruncation(ATTR_PARAM, data); | ||
setSeverity(severity); | ||
} | ||
|
||
@Override | ||
public void processBy(ProcessLogVisitor visitor) { | ||
visitor.onNodeInfoLog(this); | ||
} | ||
|
||
@Override | ||
@Transient | ||
public Object[] getPatternArguments() { | ||
return new Object[] { getAttribute(ATTR_PARAM) }; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
wfe-core/src/main/java/ru/runa/wfe/audit/TaskRemovedOnEmbeddedSubprocessEndLog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package ru.runa.wfe.audit; | ||
|
||
import javax.persistence.DiscriminatorValue; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Transient; | ||
import ru.runa.wfe.task.Task; | ||
import ru.runa.wfe.task.TaskCompletionInfo; | ||
|
||
@Entity | ||
@DiscriminatorValue(value = "P") | ||
public class TaskRemovedOnEmbeddedSubprocessEndLog extends TaskCancelledLog { | ||
private static final long serialVersionUID = 1L; | ||
|
||
public TaskRemovedOnEmbeddedSubprocessEndLog() { | ||
} | ||
|
||
public TaskRemovedOnEmbeddedSubprocessEndLog(Task task, TaskCompletionInfo completionInfo) { | ||
super(task, completionInfo); | ||
} | ||
|
||
@Override | ||
@Transient | ||
public Object[] getPatternArguments() { | ||
return new Object[] { getTaskName() }; | ||
} | ||
|
||
@Override | ||
public void processBy(ProcessLogVisitor visitor) { | ||
visitor.onTaskRemovedOnEmbeddedSubprocessEndLog(this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,36 @@ | ||
|
||
<!-- A : ru.runa.bpm.log.ActionLog --> | ||
<!-- B : ru.runa.bpm.log.SubprocessStartLog --> | ||
<!-- C : ru.runa.bpm.log.CreateTimerLog --> | ||
<!-- D : ru.runa.bpm.log.VariableDeleteLog --> | ||
<!-- E : ru.runa.bpm.log.AdminActionLog --> | ||
<!-- F : ru.runa.bpm.log.TaskDelegationLog --> | ||
<!-- H : ru.runa.bpm.log.NodeErrorLog --> | ||
<!-- I : ru.runa.bpm.log.ProcessCreateLog --> | ||
<!-- K : ru.runa.bpm.log.TaskEndByAdminLog --> | ||
<!-- L : ru.runa.bpm.log.NodeLeaveLog --> | ||
<!-- M : ru.runa.bpm.log.TaskRemovedOnProcessEndLog --> | ||
<!-- N : ru.runa.bpm.log.NodeEnterLog --> | ||
<!-- O : ru.runa.bpm.log.TaskCancelledLog --> | ||
<!-- P : --> | ||
<!-- R : ru.runa.bpm.log.VariableCreateLog --> | ||
<!-- S : ru.runa.bpm.log.TaskEndBySubstitutorLog --> | ||
<!-- T : ru.runa.bpm.log.TransitionLog --> | ||
<!-- A : ru.runa.wfe.audit.ActionLog --> | ||
<!-- B : ru.runa.wfe.audit.SubprocessStartLog --> | ||
<!-- C : ru.runa.wfe.audit.CreateTimerLog --> | ||
<!-- D : ru.runa.wfe.audit.VariableDeleteLog --> | ||
<!-- E : ru.runa.wfe.audit.AdminActionLog --> | ||
<!-- F : ru.runa.wfe.audit.TaskDelegationLog --> | ||
<!-- H : ru.runa.wfe.audit.NodeErrorLog --> | ||
<!-- I : ru.runa.wfe.audit.ProcessCreateLog --> | ||
<!-- J : ru.runa.wfe.audit.NodeInfoLog --> | ||
<!-- K : ru.runa.wfe.audit.TaskEndByAdminLog --> | ||
<!-- L : ru.runa.wfe.audit.NodeLeaveLog --> | ||
<!-- M : ru.runa.wfe.audit.TaskRemovedOnProcessEndLog --> | ||
<!-- N : ru.runa.wfe.audit.NodeEnterLog --> | ||
<!-- O : ru.runa.wfe.audit.TaskCancelledLog --> | ||
<!-- P : ru.runa.wfe.audit.TaskRemovedOnEmbeddedSubprocessEndLog --> | ||
<!-- R : ru.runa.wfe.audit.VariableCreateLog --> | ||
<!-- S : ru.runa.wfe.audit.TaskEndBySubstitutorLog --> | ||
<!-- T : ru.runa.wfe.audit.TransitionLog --> | ||
<!-- U : ru.runa.wfe.audit.ProcessActivateLog --> | ||
<!-- V : ru.runa.wfe.audit.ProcessSuspendLog --> | ||
<!-- W : ru.runa.bpm.log.VariableUpdateLog --> | ||
<!-- X : ru.runa.bpm.log.ProcessEndLog --> | ||
<!-- Y : ru.runa.bpm.log.ProcessCancelLog --> | ||
<!-- Z : ru.runa.bpm.log.SubprocessEndLog --> | ||
<!-- W : ru.runa.wfe.audit.VariableUpdateLog --> | ||
<!-- X : ru.runa.wfe.audit.ProcessEndLog --> | ||
<!-- Y : ru.runa.wfe.audit.ProcessCancelLog --> | ||
<!-- Z : ru.runa.wfe.audit.SubprocessEndLog --> | ||
<!-- 0 : ru.runa.wfe.audit.ProcessLog & abstract subclasses --> | ||
<!-- 1 : ru.runa.bpm.log.TaskCreateLog --> | ||
<!-- 2 : ru.runa.bpm.log.TaskAssignLog --> | ||
<!-- 3 : ru.runa.bpm.log.TaskEndLog --> | ||
<!-- 4 : ru.runa.bpm.log.SwimlaneAssignLog --> | ||
<!-- 5 : ru.runa.bpm.log.TaskEscalationLog --> | ||
<!-- 1 : ru.runa.wfe.audit.TaskCreateLog --> | ||
<!-- 2 : ru.runa.wfe.audit.TaskAssignLog --> | ||
<!-- 3 : ru.runa.wfe.audit.TaskEndLog --> | ||
<!-- 4 : ru.runa.wfe.audit.SwimlaneAssignLog --> | ||
<!-- 5 : ru.runa.wfe.audit.TaskEscalationLog --> | ||
<!-- 6 : --> | ||
<!-- 7 : ru.runa.bpm.log.SendMessageLog --> | ||
<!-- 8 : ru.runa.bpm.log.ReceiveMessageLog --> | ||
<!-- 9 : ru.runa.bpm.log.TaskExpiredLog --> | ||
<!-- 7 : ru.runa.wfe.audit.SendMessageLog --> | ||
<!-- 8 : ru.runa.wfe.audit.ReceiveMessageLog --> | ||
<!-- 9 : ru.runa.wfe.audit.TaskExpiredLog --> | ||
|
21 changes: 21 additions & 0 deletions
21
wfe-core/src/main/java/ru/runa/wfe/commons/GroovyNodeInfoLogExecutor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package ru.runa.wfe.commons; | ||
|
||
import ru.runa.wfe.audit.NodeInfoLog; | ||
import ru.runa.wfe.audit.Severity; | ||
import ru.runa.wfe.execution.ExecutionContext; | ||
|
||
public class GroovyNodeInfoLogExecutor { | ||
private final ExecutionContext executionContext; | ||
|
||
public GroovyNodeInfoLogExecutor(ExecutionContext executionContext) { | ||
this.executionContext = executionContext; | ||
} | ||
|
||
public void debug(String message) { | ||
executionContext.addLog(new NodeInfoLog(executionContext.getNode(), Severity.DEBUG, message)); | ||
} | ||
|
||
public void info(String message) { | ||
executionContext.addLog(new NodeInfoLog(executionContext.getNode(), Severity.INFO, message)); | ||
} | ||
} |
Oops, something went wrong.