Class TransientScottyEngine

    • Constructor Detail

      • TransientScottyEngine

        public TransientScottyEngine()
    • Method Detail

      • setTicketPoolManager

        public void setTicketPoolManager​(TicketPoolManager ticketPoolManager)
      • setTimeoutManager

        public void setTimeoutManager​(TimeoutManager timeoutManager)
      • setEarlyResponseContainer

        public void setEarlyResponseContainer​(EarlyResponseContainer earlyResponseContainer)
      • notify

        public void notify​(Response<?> response,
                           Acknowledge ack)
        Description copied from interface: ProcessingEngine
        Adds a response to the engine. The engine will subsequently try to find the corresponding workflow instance that is waiting for the response. Depending on the workflow instances waitmode and the number of open responses, the workflow may or may not be resumed.
        Specified by:
        notify in interface ProcessingEngine
        Parameters:
        response - the reponse
        ack - the object to notify upon processing of the message. Note: The ack.waitForAcknowledge returns when the response is processed by the COPPER engine, not when the workflow was waked up with this response.
      • startup

        public void startup()
        Description copied from interface: ProcessingEngine
        Starts up the engine. The invocation of this method blocks until the startup procedure is finished. This method might even throw an Error, if something fundamentally wents wrong like starting up the workflow repository or database storage.
        Specified by:
        startup in interface ProcessingEngine
        Overrides:
        startup in class AbstractProcessingEngine
      • registerCallbacks

        public void registerCallbacks​(Workflow<?> w,
                                      WaitMode mode,
                                      long timeoutMsec,
                                      java.lang.String... correlationIds)
        Description copied from interface: ProcessingEngine
        Registers a workflow instance to we waiting for a number of correlation ids.
        Specified by:
        registerCallbacks in interface ProcessingEngine
        Parameters:
        w - the workflow instance waiting for one or more response
        mode - the wait mode
        timeoutMsec - the relative timeout in milliseconds or 0 for no an infinite timeout
        correlationIds - the correlation ids of the expected responses
      • removeWorkflow

        public void removeWorkflow​(java.lang.String id)
        For internal use only!!
        Parameters:
        id - workflow instance id
      • getState

        public java.lang.String getState()
        Specified by:
        getState in interface org.copperengine.management.ProcessingEngineMXBean
      • queryObjectState

        public java.lang.String queryObjectState​(java.lang.String id)
        Specified by:
        queryObjectState in interface org.copperengine.management.ProcessingEngineMXBean
      • queryWorkflowInstances

        public java.util.List<org.copperengine.management.model.WorkflowInfo> queryWorkflowInstances()
        Specified by:
        queryWorkflowInstances in interface org.copperengine.management.ProcessingEngineMXBean
      • queryWorkflowInstance

        public org.copperengine.management.model.WorkflowInfo queryWorkflowInstance​(java.lang.String id)
        Specified by:
        queryWorkflowInstance in interface org.copperengine.management.ProcessingEngineMXBean
      • getNumberOfWorkflowInstances

        public int getNumberOfWorkflowInstances()
        Specified by:
        getNumberOfWorkflowInstances in interface org.copperengine.management.ProcessingEngineMXBean
      • addWaitHook

        public void addWaitHook​(java.lang.String wfInstanceId,
                                WaitHook waitHook)
        Description copied from interface: ProcessingEngine
        Adds the specified WaitHook for the workflow instance with the specified id. The WaitHook is called once at the next wait invocation of the specified workflow instance.
        Specified by:
        addWaitHook in interface ProcessingEngine
        Parameters:
        wfInstanceId - workflow instance id
        waitHook - wait hook
      • getProcessorPools

        public java.util.List<org.copperengine.management.ProcessorPoolMXBean> getProcessorPools()
        Specified by:
        getProcessorPools in interface org.copperengine.management.ProcessingEngineMXBean
      • getEngineType

        public org.copperengine.management.model.EngineType getEngineType()
        Specified by:
        getEngineType in interface org.copperengine.management.ProcessingEngineMXBean
      • queryActiveWorkflowInstances

        public java.util.List<org.copperengine.management.model.WorkflowInfo> queryActiveWorkflowInstances​(java.lang.String className,
                                                                                                           int max)
        Specified by:
        queryActiveWorkflowInstances in interface org.copperengine.management.ProcessingEngineMXBean
      • queryActiveWorkflowInstance

        public org.copperengine.management.model.WorkflowInfo queryActiveWorkflowInstance​(java.lang.String id)
        Specified by:
        queryActiveWorkflowInstance in interface org.copperengine.management.ProcessingEngineMXBean
      • getWorkflowInstanceStates

        public java.util.List<java.lang.String> getWorkflowInstanceStates()
        Specified by:
        getWorkflowInstanceStates in interface org.copperengine.management.ProcessingEngineMXBean
      • queryWorkflowInstances

        public java.util.List<org.copperengine.management.model.WorkflowInfo> queryWorkflowInstances​(org.copperengine.management.model.WorkflowInstanceFilter filter)
        Specified by:
        queryWorkflowInstances in interface org.copperengine.management.ProcessingEngineMXBean
      • countWorkflowInstances

        public long countWorkflowInstances​(org.copperengine.management.model.WorkflowInstanceFilter filter)
        Specified by:
        countWorkflowInstances in interface org.copperengine.management.ProcessingEngineMXBean
      • incErrorWFCounter

        public void incErrorWFCounter()