public String getFlowExecutionUrl() { if (flowExecutionContext.getKey() == null) { throw new IllegalStateException( "Flow execution key not yet assigned; unable to build the flow execution url"); } else { String flowDefinitionId = flowExecutionContext.getDefinition().getId(); return externalContext.getFlowExecutionUrl(flowDefinitionId, flowExecutionContext.getKey().toString()); } }
public void render() throws IOException { Map<String, Object> model = new HashMap<>(); model.putAll(flowScopes()); exposeBindingModel(model); model.put("flowRequestContext", requestContext); FlowExecutionKey key = requestContext.getFlowExecutionContext().getKey(); if (key != null) { model.put("flowExecutionKey", requestContext.getFlowExecutionContext().getKey().toString()); model.put("flowExecutionUrl", requestContext.getFlowExecutionUrl()); } model.put("currentUser", requestContext.getExternalContext().getCurrentUser()); try { if (logger.isDebugEnabled()) { logger.debug("Rendering MVC [" + view + "] with model map [" + model + "]"); } doRender(model); } catch (IOException e) { throw e; } catch (Exception e) { IllegalStateException ise = new IllegalStateException("Exception occurred rendering view " + view); ise.initCause(e); throw ise; } }
private FlowExecutionResult createPausedResult(FlowExecution flowExecution) { return FlowExecutionResult.createPausedResult(flowExecution.getDefinition().getId(), flowExecution.getKey() .toString()); }
public String getFlowExecutionUrl() { String key = flowExecution.getKey() != null ? flowExecution.getKey().toString() : null; if (key != null) { return externalContext.getFlowExecutionUrl(flowExecution.getDefinition().getId(), key); } else { return null; } }
private String getFlowExecutionKey() { RequestContext requestContext = RequestContextHolder.getRequestContext(); return requestContext.getFlowExecutionContext().getKey().toString(); }
private String getFlowExecutionKey() { RequestContext requestContext = RequestContextHolder.getRequestContext(); return requestContext.getFlowExecutionContext().getKey().toString(); }
public String getFlowExecutionUrl() { if (flowExecutionContext.getKey() == null) { throw new IllegalStateException( "Flow execution key not yet assigned; unable to build the flow execution url"); } else { String flowDefinitionId = flowExecutionContext.getDefinition().getId(); return externalContext.getFlowExecutionUrl(flowDefinitionId, flowExecutionContext.getKey().toString()); } }
public void render() throws IOException { Map<String, Object> model = new HashMap<>(); model.putAll(flowScopes()); exposeBindingModel(model); model.put("flowRequestContext", requestContext); FlowExecutionKey key = requestContext.getFlowExecutionContext().getKey(); if (key != null) { model.put("flowExecutionKey", requestContext.getFlowExecutionContext().getKey().toString()); model.put("flowExecutionUrl", requestContext.getFlowExecutionUrl()); } model.put("currentUser", requestContext.getExternalContext().getCurrentUser()); try { if (logger.isDebugEnabled()) { logger.debug("Rendering MVC [" + view + "] with model map [" + model + "]"); } doRender(model); } catch (IOException e) { throw e; } catch (Exception e) { IllegalStateException ise = new IllegalStateException("Exception occurred rendering view " + view); ise.initCause(e); throw ise; } }
public void render() throws IOException { Map model = new HashMap(); model.putAll(flowScopes()); exposeBindingModel(model); model.put("flowRequestContext", requestContext); FlowExecutionKey key = requestContext.getFlowExecutionContext().getKey(); if (key != null) { model.put("flowExecutionKey", requestContext.getFlowExecutionContext().getKey().toString()); model.put("flowExecutionUrl", requestContext.getFlowExecutionUrl()); } model.put("currentUser", requestContext.getExternalContext().getCurrentUser()); try { if (logger.isDebugEnabled()) { logger.debug("Rendering MVC [" + view + "] with model map [" + model + "]"); } doRender(model); } catch (IOException e) { throw e; } catch (Exception e) { IllegalStateException ise = new IllegalStateException("Exception occurred rendering view " + view); ise.initCause(e); throw ise; } }
public String getFlowExecutionUrl() { if (flowExecutionContext.getKey() == null) { throw new IllegalStateException( "Flow execution key not yet assigned; unable to build the flow execution url"); } else { String flowDefinitionId = flowExecutionContext.getDefinition().getId(); return externalContext.getFlowExecutionUrl(flowDefinitionId, flowExecutionContext.getKey().toString()); } }
private FlowExecutionResult createPausedResult(FlowExecution flowExecution) { return FlowExecutionResult.createPausedResult(flowExecution.getDefinition().getId(), flowExecution.getKey() .toString()); }
private FlowExecutionResult createPausedResult(FlowExecution flowExecution) { return FlowExecutionResult.createPausedResult(flowExecution.getDefinition().getId(), flowExecution.getKey() .toString()); }
public void testParseFlowExecutionKey() { String key = "e12345s54321"; FlowExecutionKey k = repository.parseFlowExecutionKey(key); assertEquals(key, k.toString()); }
public String getFlowExecutionUrl() { String key = flowExecution.getKey() != null ? flowExecution.getKey().toString() : null; if (key != null) { return externalContext.getFlowExecutionUrl(flowExecution.getDefinition().getId(), key); } else { return null; } }
public String getFlowExecutionUrl() { String key = flowExecution.getKey() != null ? flowExecution.getKey().toString() : null; if (key != null) { return externalContext.getFlowExecutionUrl(flowExecution.getDefinition().getId(), key); } else { return null; } }
public void testPutFlowExecution() { FlowExecution execution = executionFactory.createFlowExecution(flow); execution.start(null, new MockExternalContext()); assertNotNull(execution.getKey()); repository.putFlowExecution(execution); String key = execution.getKey().toString(); FlowExecutionKey parsedKey = repository.parseFlowExecutionKey(key); FlowExecution execution2 = repository.getFlowExecution(parsedKey); assertSame(execution.getDefinition(), execution2.getDefinition()); assertEquals(execution.getActiveSession().getState().getId(), execution2.getActiveSession().getState().getId()); }
public void testPutFlowExecutionNextSnapshotId() { FlowExecution execution = executionFactory.createFlowExecution(flow); execution.start(null, new MockExternalContext()); assertNotNull(execution.getKey()); repository.putFlowExecution(execution); String key = execution.getKey().toString(); FlowExecutionKey parsedKey = repository.parseFlowExecutionKey(key); FlowExecution execution2 = repository.getFlowExecution(parsedKey); assertSame(execution.getDefinition(), execution2.getDefinition()); assertEquals(execution.getActiveSession().getState().getId(), execution2.getActiveSession().getState().getId()); MockExternalContext context = new MockExternalContext(); context.setEventId("foo"); execution2.resume(context); repository.putFlowExecution(execution2); assertNotSame(execution.getKey(), execution2.getKey()); }