Examples of FlowImpl


Examples of com.sogou.qadev.service.cynthia.bean.impl.FlowImpl

      rs = pstm.executeQuery();
      if(rs.next())
      {
        String xml = rs.getString("xml");
        Document doc = XMLUtil.string2Document(xml, "UTF-8");
        flow = new FlowImpl(doc,rs.getString("create_user"));
      }
    }catch(Exception e)
    {
      e.printStackTrace();
    }finally
View Full Code Here

Examples of com.sogou.qadev.service.cynthia.bean.impl.FlowImpl

      {
        try {
          String xml = rs.getString("xml");
          String createUser = rs.getString("create_user");
          Document doc = XMLUtil.string2Document(xml, "UTF-8");
          Flow flow = new FlowImpl(doc,createUser);
          flowList.add(flow);
        } catch (Exception e) {
          e.printStackTrace();
        }
       
View Full Code Here

Examples of com.sogou.qadev.service.cynthia.bean.impl.FlowImpl

  }

  public synchronized Flow createFlow(String userName)
  {
    UUID flowId = DataAccessFactory.getInstance().newUUID("FLOW");
    Flow flow  = new FlowImpl(flowId);
    flow.setCreateUser(userName);
    return flow;
  }
View Full Code Here

Examples of com.sun.faces.flow.FlowImpl

            processInitializerFinalizer(xpath, flowDefinition, flowBuilder);
           
            String startNodeId = processStartNode(xpath, flowDefinition, flowBuilder);
           
            if (null != startNodeId) {
                FlowImpl toAdd = flowBuilder._getFlow();
                FlowNode startNode = toAdd.getNode(startNodeId);
                if (null == startNode) {
                    throw new XPathExpressionException("Unable to find flow node with id " + startNodeId + " to mark as start node");
                } else {
                    toAdd.setStartNodeId(startNodeId);
                }
            } else {
                flowBuilder.viewNode(flowId, "/" + flowId + "/" + flowId + ".xhtml").markAsStartNode();
            }
            flowHandler.addFlow(context, flowBuilder.getFlow());
View Full Code Here

Examples of com.sun.faces.flow.FlowImpl

            processInitializerFinalizer(xpath, flowDefinition, flowBuilder);
           
            String startNodeId = processStartNode(xpath, flowDefinition, flowBuilder);
           
            if (null != startNodeId) {
                FlowImpl toAdd = flowBuilder._getFlow();
                FlowNode startNode = toAdd.getNode(startNodeId);
                if (null == startNode) {
                    throw new XPathExpressionException("Unable to find flow node with id " + startNodeId + " to mark as start node");
                } else {
                    toAdd.setStartNodeId(startNodeId);
                }
            } else {
                flowBuilder.viewNode(flowId, "/" + flowId + "/" + flowId + ".xhtml").markAsStartNode();
            }
            flowHandler.addFlow(context, flowBuilder.getFlow());
View Full Code Here

Examples of com.sun.faces.flow.FlowImpl

    private FacesContext context;
    private boolean didInit;
    private boolean hasId;
   
    public FlowBuilderImpl(FacesContext context) {
        flow = new FlowImpl();
        this.context = context;
        this.expressionFactory = context.getApplication().getExpressionFactory();
        this.elContext = context.getELContext();
        this.didInit = false;
        this.hasId = false;
View Full Code Here

Examples of org.amplafi.flow.impl.FlowImpl

     * Test to see that serialization/deserialization of enum's
     */
    @Test(enabled=TEST_ENABLED)
    public void testEnumHandling() {
        Map<String, String> initialFlowState = FlowUtils.INSTANCE.createState("foo", SampleEnum.EXTERNAL);
        FlowImplementor flow = new FlowImpl(FLOW_TYPE);
        FlowPropertyDefinitionImpl definition = new FlowPropertyDefinitionImpl("foo", SampleEnum.class);
        flow.addPropertyDefinitions(definition);
        FlowActivityImpl fa1 = new FlowActivityImpl().initInvisible(false);
        definition = new FlowPropertyDefinitionImpl("fa1fp", SampleEnum.class).initInitial(SampleEnum.EMAIL.name());
        fa1.addPropertyDefinitions(definition);
        flow.addActivity(fa1);
        FlowTestingUtils flowTestingUtils = new FlowTestingUtils();
        flowTestingUtils.getFlowTranslatorResolver().resolveFlow(flow);
        flowTestingUtils.getFlowDefinitionsManager().addDefinition(FLOW_TYPE, flow);
        FlowManagement flowManagement = flowTestingUtils.getFlowManagement();
        String returnToFlowLookupKey = null;
View Full Code Here

Examples of org.amplafi.flow.impl.FlowImpl

     * @return a new T
     */
    public <T extends FlowActivityImplementor> T initActivity(Class<T> clazz, FlowState state)  {
        try {
            T activity = clazz.newInstance();
            FlowImpl flow = new FlowImpl();
            flow.addActivity(activity);
            if (state!=null) {
                flow.setFlowState(state);
            }
            return activity;
        } catch (InstantiationException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
View Full Code Here

Examples of org.amplafi.flow.impl.FlowImpl

     */
    public <T extends FlowActivityImplementor> T initActivity(Class<T> clazz) {
        return initActivity(clazz, null);
    }
    public String addFlowDefinition(String flowTypeName, FlowActivityImplementor... activities) {
        final FlowImplementor def = new FlowImpl(flowTypeName, activities);
        getFlowDefinitionsManager().addDefinitions(def);
        return flowTypeName;
    }
View Full Code Here

Examples of org.amplafi.flow.impl.FlowImpl

        final FlowImplementor def = new FlowImpl(flowTypeName, activities);
        getFlowDefinitionsManager().addDefinitions(def);
        return flowTypeName;
    }
    public FlowManager programFlowManager(String flowTypeName, FlowActivityImplementor... activities) {
        final FlowImplementor def = new FlowImpl(flowTypeName, activities);
        getFlowTranslatorResolver().resolveFlow(def);
        EasyMock.expect(getFlowManager().getFlowDefinition(flowTypeName)).andReturn(def).anyTimes();
        EasyMock.expect(getFlowManager().isFlowDefined(flowTypeName)).andReturn(true).anyTimes();
        EasyMock.expect(getFlowManager().getInstanceFromDefinition(flowTypeName)).andAnswer(new IAnswer<FlowImplementor>() {
            @Override
            public FlowImplementor answer() {
                return def.createInstance();
            }
        }).anyTimes();
        return getFlowManager();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.