Method to execute timed tasks

Hi,
It has been several years since I worked with LabVIEW and now I need to utilize it for a project. The main idea is as follows:
There is a power supply whose output will need to be turned ON and OFF at a specific rate (45 minutes ON followed by 15 mins OFF)
This entire process should last for a specific durtation (days or months)
The vi should be able to take inputs from the user : Total Duration, ON duration, OFF duration.
VI should calculate the # of times ON/OFF sequence should be executed and when done, should stop.
Initially, I've implemented a wait (ms) to enable the output block to run for a specific duration until it moved to the next one which is to turn the output OFF. THis is not acceptable as I need to be able to STOP the VI at any time or it should be autmoatalically stopped if any alarms are triggered. With wait (ms), I could not do it.
My question is, what is the most efficient and stable way to do this?
Timed loops or sequences?

maybe this can help?
Spoiler (Highlight to read)
Attachments:
execute time.vi ‏43 KB

Similar Messages

  • SSIS Package Load Failure and is missing Execute SQL Task in Toolbox

    Also, BIDS closes after right-clicking the toolbox and selecting “Choose Items”.
    I’ve tried several ways to fix these issues with no success.
    I’m running SSIS/SSMS/SQL Server 2008 R2 (but not running an SQL instance on my PC) on a Windows XP with Service Pack 3 workstation. I get the following errors:
    WHEN OPENING BIDS:
    I get 2 errors titled “Package Load Failure”. They both reference ‘Visual Studio Explorers and Designers Package’ as being what failed to load. The first message references GUID 8D8529D3-625D-4496-8354-3DAD630ECC1B. The second references GUID AA612177-A69A-4391-B2F4-17F8A88F4BBA
    . They both mention contacting the package vendor, but I haven’t got any Add-ins loaded so I’m not sure what that means exactly. They also both ask if I’d like to skip loading the package in the future.
    ONCE BIDS IS OPEN:
    No error messages appear here. There is no ‘Execute SQL Task’ in the toolbox for Control Flows. Also, if I attempt to open a project containing this object (Execute SQL Task), I get this error in a modal window:
    TITLE: Microsoft Visual Studio
    There were errors while the package was being loaded.
    The package might be corrupted.
    See the Error List for details.
    BUTTONS:
    OK
    . . . and these errors in the Error List at the bottom of the IDE:
    Error      1             
    Error loading Package.dtsx: Failed to load task "Execute SQL Task", type "Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91". The contact information
    for this task is "Execute SQL Task; Microsoft Corporation; Microsoft SQL Server 2008 R2; © 2007 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1". 
            C:\Documents and Settings\848862.VCHS_NT_DOMAIN\My Documents\Visual Studio 2008\Projects\LearnSSIS\LearnSSIS\Package.dtsx   
    1               
    1             
    Error      2             
    Validation error. Execute SQL Task : The task has failed to load. The contact information for this task is "Execute SQL Task; Microsoft Corporation; Microsoft SQL Server 2008 R2; © 2007 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1". 
            Package.dtsx    
    0             
    0             
    Error      3             
    Validation error. Execute SQL Task : There were errors during task validation. 
       Package.dtsx    
    0             
    0               
    Finally, when I attempt to add the Execute SQL Task via the Tools menu, “Choose Toolbox Items” selection, I do get the tabbed box for adding things. However, they only come up after issuing this error:
    The following assemblies are installed SDK assemblies but could not be shown in the customize toolbox dialog because they are missing one or more components. Please make sure that all necessary libraries are available:
    Microsoft.SqlServer.SqlCEDest.dll
    Microsoft.SqlServer.Management.CollectorTasks.dll
    Microsoft.SqlServer.SQLTask.dll
    System.Data.SqlServerCe.dll
    Microsoft.Synchronization.Data.SqlServerCe.dll
    (above dll repeated at bottom of message)
    After this message, I have my choice of .NET Framework Compnents. When I select COM Components, those come up with no problem. The WPF Components tab generates the same dll error above. The Maintenance tab is empty. The SSIS Data Flow Items tab loads fine,
    as does the SSIS Control Flow Items tab – but there’s no Execute SQL Task there either.
    If you open the toolbox (on a new project, with a project loaded, or without a project loaded) and right-click, then select “Choose Items”, the entire application quickly closes. This “closing behavior” is the same thing you get if you attempt to add toolbox
    items through either the Tools menu or the right-click method when you launch BIDS in SafeMode.
    In an effort to fix this – I’ve rolled back the .NET Framework version to 3.0 and reinstalled back up to 4; I’ve uninstalled and reinstalled SQL Server 2008 R2 shared services as well as the entire application; I’ve cleared the .tbd files from my user profile;
    and I’ve run several things from the command line (devenv.exe /resetuserdata, /setup, /resetskippkgs, etc.). Lastly – I’ve applied every Service Pack and update applicable to my PC (ok, it belongs to my employer – but no one here has been able to figure this
    out either).
    After having worked this for several days now and, I think, exhausting every available avenue from search engines – I turn to you. Please let me know if you can help. Also, I can provide any additional
    files or information you may require.
    CBS

    try: Devenv.exe /ResetSettings
    http://msdn.microsoft.com/en-us/library/ms241273(v=vs.80).aspx
    Or try this (it's for 2005, but maybe it works for 2008 aswell):
    http://geekswithblogs.net/cicorias/archive/2007/10/10/Restoring-Missing-Toolbox-Items-in-Visual-Studio-2005---just.aspx
    or try
    http://stackoverflow.com/questions/1268298/how-to-rebuild-the-visual-studio-toolbox
    "You can also go into the folder "C:\Documents and Settings\\Local Settings\Application Data\Microsoft\VisualStudio\9.0" and delete the *.tbd files.  I have had to do this a couple times to get rid of duplicate items and when Reset Toolbox crashes
    without warning"
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • How to use one commandButton  to execute two task in JSF

    I have a form in JSF page which contains different faces components. These faces bind to ADF BC to insert one row in the database when the user press commandButton. Also I need to bind the value of one inputText in that form to managed bean to execute another task in the application when the user press the same commandButton.
    The code of the inputText:
    <h:inputText value="#{bindings.ProjectNumber.inputValue}"
    id="pn"
    size="10"
    required="#{bindings.ProjectNumber.mandatory}">
    The code of commandButton:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}"/>
    The managed bean is “findInspector”. I tried to insert inputHidden inside commandButton tag and assign the value of the inputText to the inputHidden as follows:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}">
    <h:inputHidden value="#{bindings.ProjectNumber.inputValue}" binding="#{findInspector.project}"/>
    </h:commandButton>
    But it was not work
    Please how can I write the code to use the value of the inputText more than one time in the JSF(one to insert one row by using ADF BC and another to use the same value to bind to a managed bean) and how to use one commandButton to execute two task in JSF.
    Thank you
    Waheed

    Yes I did
    <managed-bean>
    <description>The bean for get project No</description>
    <managed-bean-name>projectBean</managed-bean-name>
    <managed-bean-class>
    mcscm.model.ProjectBean
    </managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>bindings</property-name>
    <value>#{bindings}</value>
    </managed-property>
    </managed-bean>
    Also I changed the method in the managed bean as follows:
    public String commandButton_action() {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding vb = fctx.getApplication().createValueBinding("#{bindings}");
    DCBindingContainer dcb = (DCBindingContainer) vb.getValue(fctx);
    OperationBinding operation = (OperationBinding) dcb.get("projectNumber");
    operation.execute();
    return null;
    where projectNumber is my method in the java class of the application module "TaskInformationImpl". I made this method to be accessed from outside of ADF BC.
    I just create a sample code for projectNumber method for testing only as:
    public void projectNumber (String data){
    System.out.print(data);
    In the page Pagedef file I added this :
    <methodAction id="projectNumber"
    InstanceName="TaskInformationDataControl.dataProvider"
    DataControl="TaskInformationDataControl"
    MethodName="projectNumber" RequiresUpdateModel="true"
    Action="999" IsViewObjectMethod="false">
    <NamedData NDName="data" NDValue = "#{bindings.ProjectNumber.inputValue}" NDType="java.lang.String"/>
    After I did all of this I get a new error like:
    javax.faces.FacesException: #{projectBean.commandButton_action}: javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding cannot be cast to oracle.adf.model.OperationBinding
    Is it very difficult to do this in JDeveloper?. yes ADF BC provide me a lot of facilities, but when I want to do a specific task I face a lot of troubles

  • SSIS custom execute sql task : Failed with error

    I am developing a custom SSIS task for running sql task. But it fails with error - I'm trying to set the resultsetbinding to be used by next task in workflow.
    Error: 0xC0014054 at CustomSSISTask: Failed to lock variable "User::id" for read access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container
    during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.".
    Error: 0xC002F210 at CustomSSISTask, Execute SQL Task: Executing the query "SELECT id FROM sysobjects WHERE name = 'sysrowsets..." failed with the following error: "Failed to lock variable "User::id" for read access with error 0xC0010001
    "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is
    not being created.".
    ". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    Warning: 0x80019002 at CustomSSISTask: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches
    the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
    Task failed: CustomSSISTask
    Here is the code sample I'm trying , 
            public override DTSExecResult Execute(Connections connections, VariableDispenser variableDispenser,
                                                  IDTSComponentEvents componentEvents, IDTSLogging log, object transaction)
                MessageBox.Show("testing:");
                try
                    // Add the SQL Task
                    Package package = new Package();
                    package.Executables.Add("STOCK:SQLTask");
                    Microsoft.SqlServer.Dts.Runtime.Variable variable = package.Variables.Add("id", false, "User", 0);
                     // Get the task host wrapper
                    TaskHost taskHost = package.Executables[0] as TaskHost;
                    // Get the task object
                    ExecuteSQLTask task = taskHost.InnerObject as ExecuteSQLTask;
                    // Set core properties
                    task.Connection = connections[0].Name;
                    task.SqlStatementSource = "SELECT id FROM sysobjects WHERE name = 'sysrowsets'";
                    //task.SqlStatementSource =
                    //    "SELECT PersonID from [AmalgaSpeedTableData].[SpeedTable].[DimPerson] where PersonIntID  = '1'";
                    task.SqlStatementSourceType = SqlStatementSourceType.DirectInput;
                    // Add result set binding, map the id column to variable
                    IDTSResultBinding resultBinding = task.ResultSetBindings.Add();
                    //IDTSResultBinding resultBinding = task.ResultSetBindings.GetBinding(0);
                    resultBinding.ResultName = "variable";
                    resultBinding.DtsVariableName = variable.QualifiedName; //"User::id";
                    task.Execute(connections, variableDispenser, componentEvents, log, transaction);
                catch (Exception ex)
                    throw new ArgumentException(ex.Message);
                return DTSExecResult.Success;
    It doesnt throw any exception but custom task fails.
    Later I will be also using parametersetbindings to pass some input parameters to this task , since I'm stuck for out param - blocked moving ahead.
    Any help would be greatly appreciated.
    Thanks
    Sang

    Hi, could you check whether the following threads help:
    http://stackoverflow.com/questions/5787621/ssis-package-failed-to-locak-variable-for-read-access-with-error-0xc0010001
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/40ee7eff-5ec1-426f-a1a8-ab85b40b51aa/error-variable-can-not-be-found-while-executing-package-from-the-net-code?forum=sqlintegrationservices
    Regards, Leo

  • Customized Execute SQL Task in SSIS

    Hi,
    I,m using Execute SQL Task in SSIS Package with these configuration ..
    But, If SQL Statement doesn't report any record mean Query is not returning any data then this Task will be failed.
    How can I assure that If there is no record is returning in query that " Execute SQL Task " should bot be executed .
    Also I If I can do the same thing through other methods in SSIS, Pls response .
    -Ashish

    Hi Ashish,
    The Execute SQL Task failed because you had set the ResultSet to “Single row”, however, the SQLStatement didn’t return any records. If you don’t want to execute this task when the query doesn’t return any records, you can use the following method:
    Create a String type variable RowCnt, add another Execute SQL Task prior to this task.
    In the new Execute SQL Task, input the SQLStatement as “Select Count(*) From Table”, set the ResultSet to “Single row”, and map the result set 0 to the variable RowCnt.
    Join the two tasks (green line), and edit the Precedence Constraint (Green line), and set the expression to “(DT_I4)@[User::RowCnt]>0”.
    Regards,
    Mike Yin
    TechNet Community Support

  • Passing input parameters to the method call in ADF task flow.

    Hi,
    I have the following use case:
    There is a task flow with 2 jspx pages. In the first page I have 2 input search parameters and search button. the search button calls the webservice data control execute (GET_ACCOUNTOperation) method .
    Displaying the search results in the same page is not a problem , but my requirement is that the search results are to be displayed in the second page in tabular form.
    To achieve this, I dragged the execute method as the method call in the task flow and specified the input parameters for the method call (right click and add parameters) . I am getting the following exception :
    javax.el.MethodNotFoundException: Method not found: GET_ACCOUNTOperation.execute(java.lang.String, java.lang.String)
         at com.sun.el.util.ReflectionUtil.getMethod(Unknown Source)
         at com.sun.el.parser.AstValue.getMethodInfo(Unknown Source)
         at com.sun.el.MethodExpressionImpl.getMethodInfo(Unknown Source)
         at oracle.adf.controller.internal.util.ELInterfaceImpl.getReturnType(ELInterfaceImpl.java:214)
         at oracle.adfinternal.controller.activity.MethodCallActivityLogic.execute(MethodCallActivityLogic.java:135)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:1035)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:921)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:820)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:552)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:148)
         at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:109)
         at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:78)
         at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:43)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:889)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:379)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    even though the execute method is there and the service is up and running. I am not sure whether its the correct way of doing it. Please shed some light on how to solve this use case
    Some additional info:
    Under the data controls pallete, the GET_ACCOUNTOperation method has a parameters section , which has "part" (java.lang.Object) as
    the input parameter.
    Regards,
    Rampal

    Hi,
    thanks for the quick turn-around. Jdev version that i am using is Studio Edition Version 11.1.1.6.0. And i am using SOAP. Isnt there a way without using a backing bean? I am planning to use it as a portlet. Would'nt creating a backing bean cause a problem in that case?? Also i am confused here . The method that i am dragging is GET_ACCOUNTOperation(Object). I tried passing the hashmap . It gave the following exception :
    javax.el.MethodNotFoundException: Method not found: GET_ACCOUNTOperation.execute(java.util.HashMap)
    Rampal

  • DUMP when execute any tasks - OBJECTS_OBJREF_NOT_ASSIGNED_NO

    Hi Experts,
    I need help. When we try to execute any tasks at UCMON we have the following DUMP:
    Erro tpo.exec.         OBJECTS_OBJREF_NOT_ASSIGNED_NO                                              
    Exceção                CX_SY_REF_IS_INITIAL                                                        
    Data e hora            16.03.2011 11:53:29                                                         
    Dump breve ABAP não está complet.gravado (demas.extenso)                                           
    TxtBreve                                                                               
    Access with 'ZERO' object reference not possible.                                             
    O que aconteceu ?                                                                               
    Error in ABAP application program.                                                                               
    The current ABAP program "CL_UC_COMPOUND================CP" had to be                         
         terminated because one of the                                                                
        statements could not be executed.                                                                               
    This is probably due to an error in the ABAP program.                                         
    O que pode ser feito?                                                                               
    Print out the error message (using the "Print" function)                                      
        and make a note of the actions and input that caused the                                      
        error.                                                                               
    To resolve the problem, contact your SAP system administrator.                                
        You can use transaction ST22 (ABAP Dump Analysis) to view and administer                      
         termination messages, especially those beyond their normal deletion                          
        date.                                                                               
    is especially useful if you want to keep a particular message.                                
    Análise do erro                                                                               
    An exception occurred. This exception is dealt with in more detail below                      
        . The exception, which is assigned to the class 'CX_SY_REF_IS_INITIAL', was                   
         neither                                                                               
    caught nor passed along using a RAISING clause, in the procedure                              
         "GET_GUI_DATA_SELACC" "(METHOD)"                                                             
    Since the caller of the procedure could not have expected this exception                      
         to occur, the running program was terminated.                                                
        The reason for the exception is:                                                              
        There was an attempt to access a component using a 'NULL' object                              
        reference (points to nothing).                                                                
        An object reference must indicate an object (an instance of a class),                         
        before it can be used to access components.                                                   
        Either the reference was never set or it was set to 'NULL' using a                            
        CLEAR statement.                                                                               
    Notas p/eliminação de erros                                                                       
        Probably the only way to eliminate the error is to correct the program.                                                                               
    You may able to find an interim solution to the problem                                       
        in the SAP note system. If you have access to the note system yourself,                       
        use the following search criteria:                                                                               
    "OBJECTS_OBJREF_NOT_ASSIGNED_NO" CX_SY_REF_IS_INITIALC                                        
        "CL_UC_COMPOUND================CP" or "CL_UC_COMPOUND================CM00H"                   
        "GET_GUI_DATA_SELACC"                                                                         
        If you cannot solve the problem yourself and you wish to send                                 
        an error message to SAP, include the following documents:                                                                               
    1. A printout of the problem description (short dump)                                         
           To obtain this, select in the current display "System->List->                              
           Save->Local File (unconverted)".                                                                               
    2. A suitable printout of the system log                                                      
           To obtain this, call the system log through transaction SM21.                              
           Limit the time interval to 10 minutes before and 5 minutes                                 
           after the short dump. In the display, then select the function                             
           "System->List->Save->Local File (unconverted)".                                                                               
    3. If the programs are your own programs or modified SAP programs,                            
           supply the source code.                                                                    
           To do this, select the Editor function "Further Utilities->                                
           Upload/Download->Download".                                                                               
    4. Details regarding the conditions under which the error occurred                            
           or which actions and input led to the error.                                               
        The exception must either be prevented, caught within the procedure                           
         "GET_GUI_DATA_SELACC"                                                                        
        "(METHOD)", or declared in the procedure's RAISING clause.                                    
    Someone help me please?
    Thanks
    Marilia

    Is it a Groundhog Day again:
    TSV_TNEW_PAGE_ALLOC_FAILED - BCS load from data stream task
    Raise Exception when execute UCMON
    and this very thread
    in all these cases, IMHO, the proper way was the following:
    1. Try to find the proper OSS note
    2. if not succesfull - properly regenerate the data basis,
    3. if not succesfull - open a new OSS note to SAP.
    Edited by: Eugene Khusainov on Mar 16, 2011 10:42 PM

  • 2012: Execute Package Task (external reference) Very Slow in SSDT

    Hi All,
    I have 4 packages which I've deployed using the package deployment model to the MSDB package store.
    Configuration setup is System Env Var pointing at SSIS Configurations table that populates the connection string of my SSISConfig data source. Source/Dest configurations are in the SSIS Configuration table.
    I have a  'master' package that executes the 4 packages in parallel using the Execute Package control flow task (external reference, SSIS Package Store)
    When I execute this master package in SSDT it takes 1minute 56 seconds to finish. All the execute package tasks seem to hang until the last few sec then finish one after the other. It's the same if execute one of the Execute Package Task items individually.
    It just hangs there for nearly 2 min then rushes through its work (i've verified by looking at the destination tables; nothing happens until the end).
    But the packages executed directly in ssdt take 2-3 sec to execute.
    I've deployed the master package to the server and executed it via SSMS. It takes <3 sec.
    I've RDPed into the ssis box and it's the same. Executing the packages individually or the master package in dtexecui takes less than 3 sec.
    Something's going wrong inside SSDT (some kind of timeout? but there are no error msgs or warning) that's making it take nearly 2 minutes.
    Have others experienced this? Have I misconfigured something? The env var has been working on my local machine since last week and i've restarted many times since then, so I'm positive SSDT is using the 'current' version of the env var.
    Jakub @ Adelaide, Australia

    Very strange. The sysssislogs are the same for any method of execution, but there's a 5 sec delay for each step when executing via SSDT
    endtime,message
    2014-02-06 09:37:15.000,Execute phase is beginning.
    2014-02-06 09:37:20.000,PrimeOutput will be called on a component. : 104 : Merge Join : Merge Join
    2014-02-06 09:37:20.000,PrimeOutput will be called on a component. : 213 : Unchanged : Unchanged
    2014-02-06 09:37:25.000,A component has returned from its PrimeOutput call. : 213 : Unchanged : Unchanged
    2014-02-06 09:37:25.000,A component has returned from its PrimeOutput call. : 104 : Merge Join : Merge Join
    2014-02-06 09:37:30.000,PrimeOutput will be called on a component. : 143 : ODS - Src - State : ODS - Src - State
    2014-02-06 09:37:30.000,PrimeOutput will be called on a component. : 17 : Src - dbo - State : Src - dbo - State
    2014-02-06 09:37:35.000,A component has returned from its PrimeOutput call. : 143 : ODS - Src - State : ODS - Src - State
    2014-02-06 09:37:35.000,A component has returned from its PrimeOutput call. : 17 : Src - dbo - State : Src - dbo - State
    2014-02-06 09:37:35.000,Rows were provided to a data flow component as input. : : 264 : OLE DB Source Output : 182 : Source Checksum : 185 : ChecksumInput : 7 : Source Checksum : Paths[Src - dbo - State.OLE DB Source Output] : Source Checksum.Inputs[ChecksumInput]
    2014-02-06 09:37:35.000,Rows were provided to a data flow component as input. : : 263 : OLE DB Source Output : 53 : Destination Checksum : 56 : ChecksumInput : 7 : Destination Checksum : Paths[ODS - Src - State.OLE DB Source Output] : Destination Checksum.Inputs[ChecksumInput]
    2014-02-06 09:37:40.000,A component will be given the end of rowset signal. : 53 : Destination Checksum : 56 : ChecksumInput : Destination Checksum : Destination Checksum.Inputs[ChecksumInput]
    2014-02-06 09:37:40.000,Rows were provided to a data flow component as input. : : 258 : ChecksumOutput : 104 : Merge Join : 109 : Merge Join Left Input : 7 : Merge Join : Paths[Source Checksum.ChecksumOutput] : Merge Join.Inputs[Merge Join Left Input]
    2014-02-06 09:37:40.000,A component will be given the end of rowset signal. : 182 : Source Checksum : 185 : ChecksumInput : Source Checksum : Source Checksum.Inputs[ChecksumInput]
    2014-02-06 09:37:45.000,Rows were provided to a data flow component as input. : : 259 : ChecksumOutput : 104 : Merge Join : 118 : Merge Join Right Input : 7 : Merge Join : Paths[Destination Checksum.ChecksumOutput] : Merge Join.Inputs[Merge Join Right Input]
    2014-02-06 09:37:45.000,Rows were provided to a data flow component as input. : : 264 : OLE DB Source Output : 182 : Source Checksum : 185 : ChecksumInput : 0 : Source Checksum : Paths[Src - dbo - State.OLE DB Source Output] : Source Checksum.Inputs[ChecksumInput]
    2014-02-06 09:37:45.000,Rows were provided to a data flow component as input. : : 263 : OLE DB Source Output : 53 : Destination Checksum : 56 : ChecksumInput : 0 : Destination Checksum : Paths[ODS - Src - State.OLE DB Source Output] : Destination Checksum.Inputs[ChecksumInput]
    2014-02-06 09:37:50.000,A component has finished processing all of its rows. : 53 : Destination Checksum : 56 : ChecksumInput : Destination Checksum : Destination Checksum.Inputs[ChecksumInput]
    2014-02-06 09:37:50.000,A component has finished processing all of its rows. : 182 : Source Checksum : 185 : ChecksumInput : Source Checksum : Source Checksum.Inputs[ChecksumInput]
    2014-02-06 09:37:55.000,A component will be given the end of rowset signal. : 104 : Merge Join : 118 : Merge Join Right Input : Merge Join : Merge Join.Inputs[Merge Join Right Input]
    2014-02-06 09:38:00.000,Rows were provided to a data flow component as input. : : 259 : ChecksumOutput : 104 : Merge Join : 118 : Merge Join Right Input : 0 : Merge Join : Paths[Destination Checksum.ChecksumOutput] : Merge Join.Inputs[Merge Join Right Input]
    2014-02-06 09:38:05.000,A component has finished processing all of its rows. : 104 : Merge Join : 118 : Merge Join Right Input : Merge Join : Merge Join.Inputs[Merge Join Right Input]
    2014-02-06 09:38:10.000,A component will be given the end of rowset signal. : 104 : Merge Join : 109 : Merge Join Left Input : Merge Join : Merge Join.Inputs[Merge Join Left Input]
    2014-02-06 09:38:15.000,Rows were provided to a data flow component as input. : : 258 : ChecksumOutput : 104 : Merge Join : 109 : Merge Join Left Input : 0 : Merge Join : Paths[Source Checksum.ChecksumOutput] : Merge Join.Inputs[Merge Join Left Input]
    2014-02-06 09:38:20.000,A component has finished processing all of its rows. : 104 : Merge Join : 109 : Merge Join Left Input : Merge Join : Merge Join.Inputs[Merge Join Left Input]
    2014-02-06 09:38:20.000,Rows were provided to a data flow component as input. : : 261 : Merge Join Output : 2 : Add audit columns : 3 : Derived Column Input : 7 : Add audit columns : Paths[Merge Join.Merge Join Output] : Add audit columns.Inputs[Derived Column Input]
    2014-02-06 09:38:25.000,A component will be given the end of rowset signal. : 2 : Add audit columns : 3 : Derived Column Input : Add audit columns : Add audit columns.Inputs[Derived Column Input]
    2014-02-06 09:38:25.000,Rows were provided to a data flow component as input. : : 260 : Derived Column Output : 195 : Type 1 SCD : 196 : Conditional Split Input : 7 : Type 1 SCD : Paths[Add audit columns.Derived Column Output] : Type 1 SCD.Inputs[Conditional Split Input]
    2014-02-06 09:38:30.000,Rows were provided to a data flow component as input. : : 265 : Unchanged : 213 : Unchanged : 214 : Union All Input 1 : 7 : Unchanged : Paths[Type 1 SCD.Unchanged] : Unchanged.Inputs[Union All Input 1]
    2014-02-06 09:38:30.000,Rows were provided to a data flow component as input. : : 261 : Merge Join Output : 2 : Add audit columns : 3 : Derived Column Input : 0 : Add audit columns : Paths[Merge Join.Merge Join Output] : Add audit columns.Inputs[Derived Column Input]
    2014-02-06 09:38:35.000,A component has finished processing all of its rows. : 2 : Add audit columns : 3 : Derived Column Input : Add audit columns : Add audit columns.Inputs[Derived Column Input]
    2014-02-06 09:38:40.000,A component will be given the end of rowset signal. : 195 : Type 1 SCD : 196 : Conditional Split Input : Type 1 SCD : Type 1 SCD.Inputs[Conditional Split Input]
    2014-02-06 09:38:45.000,Rows were provided to a data flow component as input. : : 260 : Derived Column Output : 195 : Type 1 SCD : 196 : Conditional Split Input : 0 : Type 1 SCD : Paths[Add audit columns.Derived Column Output] : Type 1 SCD.Inputs[Conditional Split Input]
    2014-02-06 09:38:50.000,A component has finished processing all of its rows. : 195 : Type 1 SCD : 196 : Conditional Split Input : Type 1 SCD : Type 1 SCD.Inputs[Conditional Split Input]
    2014-02-06 09:38:55.000,A component will be given the end of rowset signal. : 66 : Insert ODS - Src - State : 79 : OLE DB Destination Input : Insert ODS - Src - State : Insert ODS - Src - State.Inputs[OLE DB Destination Input]
    2014-02-06 09:38:55.000,A component will be given the end of rowset signal. : 220 : Update ODS - Src - State : 225 : OLE DB Command Input : Update ODS - Src - State : Update ODS - Src - State.Inputs[OLE DB Command Input]
    2014-02-06 09:38:55.000,A component will be given the end of rowset signal. : 213 : Unchanged : 214 : Union All Input 1 : Unchanged : Unchanged.Inputs[Union All Input 1]
    2014-02-06 09:39:00.000,Rows were provided to a data flow component as input. : : 262 : New : 66 : Insert ODS - Src - State : 79 : OLE DB Destination Input : 0 : Insert ODS - Src - State : Paths[Type 1 SCD.New] : Insert ODS - Src - State.Inputs[OLE DB Destination Input]
    2014-02-06 09:39:00.000,Rows were provided to a data flow component as input. : : 257 : Changed : 220 : Update ODS - Src - State : 225 : OLE DB Command Input : 0 : Update ODS - Src - State : Paths[Type 1 SCD.Changed] : Update ODS - Src - State.Inputs[OLE DB Command Input]
    2014-02-06 09:39:00.000,"The final commit for the data insertion in ""Insert ODS - Src - State"" has started."
    2014-02-06 09:39:00.000,Rows were provided to a data flow component as input. : : 265 : Unchanged : 213 : Unchanged : 214 : Union All Input 1 : 0 : Unchanged : Paths[Type 1 SCD.Unchanged] : Unchanged.Inputs[Union All Input 1]
    2014-02-06 09:39:00.000,"The final commit for the data insertion in ""Insert ODS - Src - State"" has ended."
    2014-02-06 09:39:05.000,A component has finished processing all of its rows. : 213 : Unchanged : 214 : Union All Input 1 : Unchanged : Unchanged.Inputs[Union All Input 1]
    2014-02-06 09:39:05.000,A component has finished processing all of its rows. : 220 : Update ODS - Src - State : 225 : OLE DB Command Input : Update ODS - Src - State : Update ODS - Src - State.Inputs[OLE DB Command Input]
    2014-02-06 09:39:05.000,A component has finished processing all of its rows. : 66 : Insert ODS - Src - State : 79 : OLE DB Destination Input : Insert ODS - Src - State : Insert ODS - Src - State.Inputs[OLE DB Destination Input]
    2014-02-06 09:39:05.000,Post Execute phase is beginning.
    2014-02-06 09:39:05.000,Insert ODS - Src - State wrote 0 rows.
    2014-02-06 09:39:05.000,Cleanup phase is beginning.
    2014-02-06 09:39:05.000,End of package execution.
    2014-02-06 09:39:05.000,
    2014-02-06 09:39:05.000,"<?xml version=""1.0""?><DTS:ProcessMemoryUsage xmlns:DTS=""www.microsoft.com/SqlServer/Dts""><DTS:PeakWorkingSetSize>66457600</DTS:PeakWorkingSetSize></DTS:ProcessMemoryUsage>"
    2014-02-06 09:39:05.000,End of package execution.
    Look at the times. It's going up in exact 5sec increments! The package takes about 3 sec to run when the master package is executed via dtexecUI outside SSDT. The log looks "normal" in those instances as well; the end times are more randomised
    This is with SP1 CU8 installed.
    Jakub @ Adelaide, Australia

  • Execute process task to append file

    hi
    i am using execute process task to append one file (header)  to main file.
    in expession i am using this
    "/c copy \"" +  @[User::DestinationHeader] + "\" \"" + @[User::FinalFile] + "\""
    but only header is coming ,not the file content.
    what should be corect syntax and what should i put in argument

    cmd.exe
    i cant use .net as its not supporting large files
    You can use method like below also
    http://agilebi.com/jwelch/2008/02/08/adding-headers-and-footers-to-flat-files/
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Execute Process Task quote encloses arguments

    Is there any way to not have SSIS Exceute Process Task quote enclose the arguments?
    This is what the script task is echoing out to me via DTS.Events.FireInformation method - it is in the format I need.
    -File "C:\Development\KP Integration\KP Integration\ADExport.ps1" "C:\Test\ADUsers.csv"
    By the time the Execute Task Component consumes it, it quotes the entire expression. There is a prefix " before -File and a suffix quote at the end of the statement as shown below.
    [Execute Process Task] Error: In Executing "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
    "-File "C:\Development\KP Integration\KP Integration\ADExport.ps1" "C:\Test\ADUsers.csv"" 
    Again, I've verified quotes are in the right places for the arguments, but the script component seems to want to qualify the entire argument string as one long string and not take the value as is, which is causing an exception
    Thanks,
    Morgan

    This appears to be a bug with how the expression is handled in the Exec Process Task.
    Information: 0x0 at Build Path: -File "C:\Test\test.ps1" "C:\argument\path\test.csv"
    Error: 0xC0029151 at Execute Process Task, Execute Process Task: In Executing "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "-File "C:\Test\test.ps1" "C:\argument\path\test.csv"" at "".
    Looks like I'll be moving the powershell integration to a step in a SQL Agent task, was trying to keep it contained to a package but it looks like the expression is converted to a literal and quote-enclosing the value rather than passing the value as-is.

  • Executing Workflow Task through JAVA APIs

    Hi,
    I'm able to send the workflow task to the next step with JAVA APIs.
    The problem comes here if I try to log in into MDM through IConnectorGatewayService.
    If I get a connection to MDM through CatalogData's login method, everything works fine, task is getting executed properly. But, if I try to run the same code where I get the connection through IConnectorGatewayService, the same code doesn't work.
    Surprisingly, there is no problem in retrieving data from MDM while connecting with ConnectorGatewayService.
    Please do let me know if I need to specify some parameters while getting the connection with IConnectorGatewayService so that I can change the workflow task status.
    Thanks and Regards,
    Mausam

    Hi Mausam
    Please go through this document u will get the solution
    https://help.sap.com/javadocs/MDM/current/index.html
    https://help.sap.com/javadocs/MDM/current/index.html
    I think it may help you
    Regards
    Hari

  • ARD Timed Tasks Issue

    After upgrading my ARD Admin software from 3.1 to 3.2, I noticed that none of the timed tasks I had scheduled to run were running at all. Upon checking each task, I noticed that the checkboxes next to "schedule for" in ALL of the tasks was unchecked. I rechecked them and reset the time for the tasks to run and quit ARD. Upon restarting ARD, I noticed that, once again, the checkboxes next to "schedule for" in all of the tasks was unchecked.
    BTW, in the ARD main window, a clock icon will still show next to the task in the sidebar if the "Repeating every" checkbox is checked. This makes you think the timer still works, but upon opening the task's schedule, you will see the checkbox next to "Schedule for" is unchecked and the command will not execute.
    I created a new task from scratch, scheduled it, and the result was the same - upon restart of ARD, the checkbox next to "schedule for" was unchecked.
    I then created a new task, scheduled it and looked at com.apple.RemoteDesktop.plist in Property List Editor. I saw that the time was there. I then restarted ARD and looked at com.apple.RemoteDesktop.plist and saw that the time was now gone. The line that is being removed is:
    startDate string Oct 21, 2007 1:22:00 PM
    I then created a new task, scheduled it and quit ARD without reopening it. When I looked at com.apple.RemoteDesktop.plist, the time was still there. I then opened ARD and looked at com.apple.RemoteDesktop.plist and the time was gone.
    So, to recap When ARD starts up, it removes the startDate line from ALL timed tasks.
    It does not matter what date or time I set it for.
    Ownership and Read/Write preferences on com.apple.RemoteDesktop.plist are correct.
    I have tried removing the com.apple.RemoteDesktop.plist and starting from scratch, but no change.
    I Tried removeing all ARD components (per kbase article 108021) and reinstalling ARD Admin 3.0 from scratch. No problems after installing 3.0, but the problem reappeared after installing 3.2 update.
    I've reproduced this on 4 machines: A Mac Pro, A MacBook, A G4 tower and an iBook G4. I run a lot of timed tasks, so I am not particularly happy.

    We're having the exact same problem with remote desktop in our labs. We have several mac labs that are scheduled to restart every evening, however after upgrading ARD to 3.2 it always forgets the scheduled time.
    I've trashed all the prefs, re-added all the computers, etc. and nothing fixes the problem.
    Any help would be greatly appreciated.

  • How do I return two values from a stored procedure into an "Execute SQL Task" within SQL Server 2008 R2

    Hi,
    How do I return two values from a
    stored procedure into an "Execute SQL Task" please? Each of these two values need to be populated into an SSIS variable for later processing, e.g. StartDate and EndDate.
    Thinking about stored procedure output parameters for example. Is there anything special I need to bear in mind to ensure that the SSIS variables are populated with the updated stored procedure output parameter values?
    Something like ?
    CREATE PROCEDURE [etl].[ConvertPeriodToStartAndEndDate]
    @intPeriod INT,
    @strPeriod_Length NVARCHAR(1),
    @dtStart NVARCHAR(8) OUTPUT,
    @dtEnd NVARCHAR(8) OUTPUT
    AS
    then within the SSIS component; -
    Kind Regards,
    Kieran. 
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Below execute statement should work along the parameter mapping which you have provided. Also try specifying the parameter size property as default.
    Exec [etl].[ConvertPeriodToStartAndEndDate] ?,?,? output, ? output
    Add a script task to check ssis variables values using,
    Msgbox(Dts.Variables("User::strExtractStartDate").Value)
    Do not forget to add the property "readOnlyVariables" as strExtractStartDate variable to check for only one variable.
    Regards, RSingh

  • [Forum FAQ] How do I send multiple rows returned by Execute SQL Task as Email content in SQL Server Integration Services?

    Question:
    There is a scenario that users want to send multiple rows returned by Execute SQL Task as Email content to send to someone. With Execute SQL Task, the Full result set is used when the query returns multiple rows, it must map to a variable of the Object data
    type, then the return result is a rowset object, so we cannot directly send the result variable as Email content. Is there a way that we can extract the table row values that are stored in the Object variable as Email content to send to someone?
    Answer:
    To achieve this requirement, we can use a Foreach Loop container to extract the table row values that are stored in the Object variable into package variables, then use a Script Task to write the data stored in packages variables to a variable, and then set
    the variable as MessageSource in the Send Mail Task. 
    Add four variables in the package as below:
    Double-click the Execute SQL Task to open the Execute SQL Task Editor, then change the ResultSet property to “Full result set”. Assuming that the SQL Statement like below:
    SELECT   Category, CntRecords
    FROM         [table_name]
    In the Result Set pane, add a result like below (please note that we must use 0 as the result set name when the result set type is Full result set):
    Drag a Foreach Loop Container connects to the Execute SQL Task. 
    Double-click the Foreach Loop Container to open the Foreach Loop Editor, in the Collection tab, change the Enumerator to Foreach ADO Enumerator, then select User:result as ADO object source variable.
    Click the Variable Mappings pane, add two Variables as below:
    Drag a Script Task within the Foreach Loop Container.
    The C# code that can be used only in SSIS 2008 and above in Script Task as below:
    public void Main()
       // TODO: Add your code here
                Variables varCollection = null;
                string message = string.Empty;
                Dts.VariableDispenser.LockForWrite("User::Message");
                Dts.VariableDispenser.LockForWrite("User::Category");
                Dts.VariableDispenser.LockForWrite("User::CntRecords");     
                Dts.VariableDispenser.GetVariables(ref varCollection);
                //Format the query result with tab delimiters
                message = string.Format("{0}\t{1}\n",
                                            varCollection["User::Category"].Value,
                                            varCollection["User::CntRecords"].Value
               varCollection["User::Message"].Value = varCollection["User::Message"].Value + message;   
               Dts.TaskResult = (int)ScriptResults.Success;
    The VB code that can be used only in SSIS 2005 and above in Script Task as below, please note that in SSIS 2005, we should
    change PrecompileScriptIntoBinaryCode property to False and Run64BitRuntime property to False
    Public Sub Main()
            ' Add your code here
            Dim varCollection As Variables = Nothing
            Dim message As String = String.Empty
            Dts.VariableDispenser.LockForWrite("User::Message")
            Dts.VariableDispenser.LockForWrite("User::Category")
            Dts.VariableDispenser.LockForWrite("User::CntRecords")
            Dts.VariableDispenser.GetVariables(varCollection)
            'Format the query result with tab delimiters
            message = String.Format("{0}" & vbTab & "{1}" & vbLf, varCollection("User::Category").Value, varCollection("User::CntRecords").Value)
            varCollection("User::Message").Value = DirectCast(varCollection("User::Message").Value,String) + message
            Dts.TaskResult = ScriptResults.Success
    End Sub
    Drag Send Mail Task to Control Flow pane and connect it to Foreach Loop Container.
    Double-click the Send Mail Task to specify the appropriate settings, then in the Expressions tab, use the Message variable as the MessageSource Property as below:
    The final design surface like below:
    References:
    Result Sets in the Execute SQL Task
    Applies to:
    Integration Services 2005
    Integration Services 2008
    Integration Services 2008 R2
    Integration Services 2012
    Integration Services 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • How to use one commandButton to execute two tasks in JSF

    I have a form in JSF page which contains different faces components. These faces bind to ADF BC to insert one row in the database when the user press commandButton. Also I need to bind the value of one inputText in that form to managed bean to execute another task in the application when the user press the same commandButton.
    The code of the inputText:
    <h:inputText value="#{bindings.ProjectNumber.inputValue}"
    id="pn"
    size="10"
    required="#{bindings.ProjectNumber.mandatory}">
    The code of commandButton:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}"/>
    The managed bean is �findInspector�. I tried to insert inputHidden inside commandButton tag and assign the value of the inputText to the inputHidden as follows:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}">
    <h:inputHidden value="#{bindings.ProjectNumber.inputValue}" binding="#{findInspector.project}"/>
    </h:commandButton>
    But it was not work
    Please how can I write the code to use the value of the inputText more than one time in the JSF(one to insert one row by using ADF BC and another to use the same value to bind to a managed bean) and how to use one commandButton to execute two tasks in JSF.
    Thank you
    Waheed

    Just dopublic void execute() {
        anotherAction(inputValue);
    I guess those articles might be interesting about passing params and the usage of inputHidden and also about using datatables:
    http://balusc.xs4all.nl/srv/dev-jep-com.html
    http://balusc.xs4all.nl/srv/dev-jep-dat.html

Maybe you are looking for