@Override public Form getForm( String ctxUID ) { FormEditorContext context = formEditorContextManager.getRootEditorContext( ctxUID ); if ( context != null ) return context.getForm(); return null; }
@Override public Form getForm(String ctxUID) { FormRenderContext renderContext = formRenderContextManager.getRootContext(ctxUID); if (renderContext != null) { return renderContext.getForm(); } return null; }
@Override public void completeTaskFromContext(String ctxUID, String serverTemplateId, String containerId, Long taskId) { Map<String, Object> params = formRenderContextManager.getFormRenderContext(ctxUID).getOutputData(); formRenderContextManager.removeContext(ctxUID); taskService.completeTask(serverTemplateId, containerId, taskId, params); }
protected void initContext() { context = new FormRenderContext(CTX_UID, form, inputs, outputs); when(formRenderContextManager.getFormRenderContext(anyString())).thenReturn(context); when(formRenderContextManager.getRootContext(anyString())).thenReturn(context); } }
public Form getForm() { return renderContext.getForm(); }
public String getCtxUID() { return ctx.getUID(); }
@Override public void clear(String ctxUID) { clear(formRenderContextManager.getFormRenderContext(ctxUID)); }
public boolean isSubmited() { return ctx.isSubmit(); } }
public boolean isMine(String ctxUID) { return context.getCtxUID().equals(ctxUID); } }
@Override public void clearContext(String ctxUID) { formRenderContextManager.removeContext(ctxUID); } }
public boolean isReadonly() { return ctx.isReadonly(); }
public void setForm(Form form) { renderContext.setForm(form); }
@Override public void beforeRenderBean() { if (ctx != null) ctx.setInUse(true); }
@Override public void removeEditingForm( String ctxUID ) { formEditorContextManager.removeEditingForm( ctxUID ); }
@Override public Form getForm( String ctxUID ) { FormRenderContext renderContext = formRenderContextManager.getRootContext( ctxUID ); if ( renderContext != null ) return renderContext.getForm(); return null; }
@Override public Long startProcessFromRenderContext(String ctxUID, String serverTemplateId, String domainId, String processId, String correlationKey, Long parentProcessInstanceId) { Map<String, Object> params = formRenderContextManager.getFormRenderContext(ctxUID).getOutputData(); formRenderContextManager.removeContext(ctxUID); return processService.startProcess(serverTemplateId, domainId, processId, correlationKey, params); }
public Form getForm() { return ctx == null ? null : ctx.getForm(); }
public String getUID() { return renderContext.getUID(); }
@Override public Long saveTaskStateFromRenderContext(String ctxUID, String serverTemplateId, String containerId, Long taskId, boolean clearStatus) { Map<String, Object> params = formRenderContextManager.getFormRenderContext(ctxUID).getOutputData(); if (clearStatus) { formRenderContextManager.removeContext(ctxUID); } taskService.saveTaskContent(serverTemplateId, containerId, taskId, params); return -1l; }