org.alfresco.bm.eventprocessor
Class StartWorkflow

java.lang.Object
  extended by org.alfresco.bm.event.AbstractEventProcessor
      extended by org.alfresco.bm.http.AuthenticatedHttpEventProcessor
          extended by org.alfresco.bm.eventprocessor.StartWorkflow
All Implemented Interfaces:
org.alfresco.bm.event.EventProcessor, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware

public class StartWorkflow
extends org.alfresco.bm.http.AuthenticatedHttpEventProcessor

Execute an unfinished process

Input

Process name

Data

A MongoDB collection containing unprocessed data.

Actions

Fetches the workflow from mongo DB and starts a workflow in alfresco based on the workflow-definition defined on it. Depending on that definition, different properties are passed when starting.

Output

An event to process the active tasks on the workflow.

Since:
1.0
Author:
Frederik Heremans

Nested Class Summary
 
Nested classes/interfaces inherited from class org.alfresco.bm.http.AuthenticatedHttpEventProcessor
org.alfresco.bm.http.AuthenticatedHttpEventProcessor.HttpRequestCallback<T>
 
Field Summary
static String EVENT_NAME_PROCESS_STARTED
           
 
Fields inherited from class org.alfresco.bm.event.AbstractEventProcessor
DEFAULT_WARN_DELAY, logger
 
Constructor Summary
StartWorkflow(WorkflowDataService workflowDataService, org.alfresco.bm.user.UserDataService userDataService, org.alfresco.bm.http.HttpClientProvider httpClientProvider, org.alfresco.bm.http.AuthenticationDetailsProvider authenticationDetailsProvider, WorkflowExecutorRegistry executorRegistry)
           
 
Method Summary
 org.alfresco.bm.event.EventResult processEvent(org.alfresco.bm.event.Event event)
           
 void setEventNameProcessStarted(String eventNameProcessDone)
          Override the default event name that is returned as next when process is started.
 
Methods inherited from class org.alfresco.bm.http.AuthenticatedHttpEventProcessor
executeHttpMethodAsAdmin, executeHttpMethodAuthenticated, getAuthDetailProvider, getHttpProvider, setTicketBasedAuthentication
 
Methods inherited from class org.alfresco.bm.event.AbstractEventProcessor
getWarnDelay, register, setBeanName, setEventName, setEventNames, setRegistry, setWarnDelay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENT_NAME_PROCESS_STARTED

public static final String EVENT_NAME_PROCESS_STARTED
See Also:
Constant Field Values
Constructor Detail

StartWorkflow

public StartWorkflow(WorkflowDataService workflowDataService,
                     org.alfresco.bm.user.UserDataService userDataService,
                     org.alfresco.bm.http.HttpClientProvider httpClientProvider,
                     org.alfresco.bm.http.AuthenticationDetailsProvider authenticationDetailsProvider,
                     WorkflowExecutorRegistry executorRegistry)
Parameters:
workflowDataService - service to acces WorkflowData objects.
Method Detail

setEventNameProcessStarted

public void setEventNameProcessStarted(String eventNameProcessDone)
Override the default event name that is returned as next when process is started.


processEvent

public org.alfresco.bm.event.EventResult processEvent(org.alfresco.bm.event.Event event)
                                               throws Exception
Specified by:
processEvent in interface org.alfresco.bm.event.EventProcessor
Specified by:
processEvent in class org.alfresco.bm.http.AuthenticatedHttpEventProcessor
Throws:
Exception


Copyright © 2012. All Rights Reserved.