use of com.evolveum.midpoint.web.component.prism.show.SceneDto in project midpoint by Evolveum.
the class WorkItemDto method prepareDeltaVisualization.
public void prepareDeltaVisualization(String sceneNameKey, PrismContext prismContext, ModelInteractionService modelInteractionService, Task opTask, OperationResult result) throws SchemaException, ExpressionEvaluationException {
TaskType task = getTaskType();
if (task == null || task.getWorkflowContext() == null) {
return;
}
if (!(task.getWorkflowContext().getProcessorSpecificState() instanceof WfPrimaryChangeProcessorStateType)) {
return;
}
WfPrimaryChangeProcessorStateType state = (WfPrimaryChangeProcessorStateType) task.getWorkflowContext().getProcessorSpecificState();
Scene deltasScene = SceneUtil.visualizeObjectTreeDeltas(state.getDeltasToProcess(), sceneNameKey, prismContext, modelInteractionService, opTask, result);
deltas = new SceneDto(deltasScene);
ObjectTreeDeltas deltas = ObjectTreeDeltas.fromObjectTreeDeltasType(state.getDeltasToProcess(), prismContext);
changes = TaskDto.createChangesToBeApproved(deltas, modelInteractionService, prismContext, opTask, result);
}
use of com.evolveum.midpoint.web.component.prism.show.SceneDto in project midpoint by Evolveum.
the class TaskDto method retrieveDeltaToProcess.
private SceneDto retrieveDeltaToProcess(TaskType taskType, ModelInteractionService modelInteractionService, Task opTask, OperationResult thisOpResult) throws SchemaException, ExpressionEvaluationException {
WfContextType wfc = taskType.getWorkflowContext();
if (wfc == null || !(wfc.getProcessorSpecificState() instanceof WfPrimaryChangeProcessorStateType)) {
return null;
}
WfPrimaryChangeProcessorStateType pcps = (WfPrimaryChangeProcessorStateType) wfc.getProcessorSpecificState();
Scene scene = SceneUtil.visualizeObjectTreeDeltas(pcps.getDeltasToProcess(), "", taskType.asPrismObject().getPrismContext(), modelInteractionService, opTask, thisOpResult);
return new SceneDto(scene);
}
Aggregations