Package org.pentaho.platform.api.engine

Examples of org.pentaho.platform.api.engine.ISolutionEngine.execute()


    solutionEngine.init( userSession );
    solutionEngine.setForcePrompt( forcePrompt );
    if ( parameterXsl != null ) {
      solutionEngine.setParameterXsl( parameterXsl );
    }
    return solutionEngine.execute( file.getPath(), processId, false, instanceEnds, instanceId, false,
      parameterProviders, outputHandler, null, urlFactory, messages );
  }

  @SuppressWarnings ( { "unchecked", "rawtypes" } )
  public static String executeXml( RepositoryFile file, HttpServletRequest httpServletRequest,
View Full Code Here


      final String obj_id = (String) requestParmProvider.getParameter( "obj_id" );
      final String msg_name = (String) requestParmProvider.getParameter( "message_name" );
      final String job_id = (String) requestParmProvider.getParameter( "job_id" );

      runtime = solutionEngine.execute( doc.toString(), obj_id, job_id, false, true, //$NON-NLS-1$ //$NON-NLS-2$
          msg_name, true, parameterProviders, outputHandler, null, urlFactory, new ArrayList() ); //$NON-NLS-1$
    } else {
      runtime = solutionEngine.execute( doc.toString(), "chartbeans_mql", "myprocessid", false, true, //$NON-NLS-1$ //$NON-NLS-2$
          "myinstanceid", true, parameterProviders, outputHandler, null, urlFactory, new ArrayList() ); //$NON-NLS-1$
    }
View Full Code Here

      final String job_id = (String) requestParmProvider.getParameter( "job_id" );

      runtime = solutionEngine.execute( doc.toString(), obj_id, job_id, false, true, //$NON-NLS-1$ //$NON-NLS-2$
          msg_name, true, parameterProviders, outputHandler, null, urlFactory, new ArrayList() ); //$NON-NLS-1$
    } else {
      runtime = solutionEngine.execute( doc.toString(), "chartbeans_mql", "myprocessid", false, true, //$NON-NLS-1$ //$NON-NLS-2$
          "myinstanceid", true, parameterProviders, outputHandler, null, urlFactory, new ArrayList() ); //$NON-NLS-1$
    }

    if ( ( runtime != null ) && ( runtime.getStatus() != IRuntimeContext.RUNTIME_STATUS_SUCCESS ) ) {
      StringBuilder buf = new StringBuilder();
View Full Code Here

    String processId = this.getClass().getName();

    String actionSeqPath = ActionInfo.buildSolutionPath( solution, actionPath, actionName );

    context =
        solutionEngine.execute( actionSeqPath, processId, false, true, instanceId, false, parameterProviders,
            outputHandler, null, urlFactory, messages );

    if ( actionOutput != null ) {
      if ( context.getOutputNames().contains( actionOutput ) ) {
        IActionParameter output = context.getOutputParameter( actionOutput );
View Full Code Here

      String xactionPath = null;
      if ( xactionDefInputStream instanceof RepositoryFileInputStream ) {
        xactionPath = ( (RepositoryFileInputStream) xactionDefInputStream ).getFile().getPath();
      }
      rt =
          solutionEngine.execute( xactionPath, this.getClass().getName(), false, true, null, true, parameterProviders,
            outputHandler, null, null, messages );

      if ( !outputHandler.contentDone() ) {
        if ( ( rt != null ) && ( rt.getStatus() == IRuntimeContext.RUNTIME_STATUS_SUCCESS ) ) {
          boolean isFlushed = false;
View Full Code Here

      }
      String xactionStr = str.toString();

      solutionEngine.setSession( session );
      runtimeContext =
          solutionEngine
              .execute(
                  xactionStr,
                  actionSequence,
                  "action sequence test", false, true, instanceId, false, parameterProviderMap, null, null, urlFactory, messages ); //$NON-NLS-1$
    } catch ( Exception e ) {
View Full Code Here

        ArrayList messages = new ArrayList();

        IRuntimeContext context = null;
        try {
          context =
              solutionEngine.execute( sessionStartupAction.getActionPath(), "Session startup actions", false, true,
                  instanceId, false, parameterProviderMap, outputHandler, null, urlFactory, messages ); //$NON-NLS-1$

          // if context is null, then we cannot check the status
          if ( null == context ) {
            return;
View Full Code Here

        ArrayList messages = new ArrayList();

        IRuntimeContext context = null;
        try {
          context =
              solutionEngine.execute( globalStartupAction.getActionPath(), "Global startup actions", false, true,
                  instanceId, false, parameterProviderMap, outputHandler, null, urlFactory, messages ); //$NON-NLS-1$

          // if context is null, then we cannot check the status
          if ( null == context ) {
            return;
View Full Code Here

    when( response.getOutputStream() ).thenReturn( outputStream );

    final ISolutionEngine solutionEngine = mock( ISolutionEngine.class );
    final IRuntimeContext runtime = mock( IRuntimeContext.class );
    when( runtime.getStatus() ).thenReturn( IRuntimeContext.RUNTIME_STATUS_SUCCESS );
    when( solutionEngine.execute( eq( actionPath ), eq( servlet.getClass().getName() ), eq( false ), eq( true ),
      eq( instanceID ), eq( true ), any( Map.class ), any( IOutputHandler.class ), any( IActionCompleteListener.class ),
      any( IPentahoUrlFactory.class ), any( List.class ) ) ).thenReturn( runtime );
    mp.defineInstance( ISolutionEngine.class, solutionEngine );
    final IMessageFormatter messageFormatter = mock( IMessageFormatter.class );
    mp.defineInstance( IMessageFormatter.class, messageFormatter );
View Full Code Here

    SimpleOutputHandler outputHandler = null;
    outputHandler = new SimpleOutputHandler( outputStream, false );

    ArrayList messages = new ArrayList();
    String processId = this.getClass().getName();
    context = solutionEngine.execute( actionPath, processId, false, true, instanceId, false, //$NON-NLS-1$ //$NON-NLS-2$
        parameterProviders, outputHandler, null, urlFactory, messages );

    if ( context == null ) {
      // this went badly wrong
      return null;
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.