import { FlowNode } from 'bpmn-moddle'; import { Epic } from 'redux-observable'; import { Logger } from '../../LoggerFactory'; import { ProcessAction } from '../actions'; import { ProcessState } from '../reducers'; /** * willPassTokenEpic is responsible for delegating to bpmn activity type epics based on * the current state and element type. It also handles the async token transition * between one activity to the other by invoking appropriate hooks and routing tokens * accordingly * * @returns {Epic} epic handles actions and emits new actions asynchronously * */ export declare function willPassTokenEpic(shouldPassTokenHook?: (from: string, to: string, tokenId: string) => Promise): Epic; /** * Will handle flow nodes that have been reached by a new token */ export declare function flowNodeInitEpic(): Epic; /** * Will call a provided hook to decide if the given flow node can be started * * Will default to true if no hook is provided (exceptions are flowNodes that can't be handled by the engine e.g. UserTasks and callActivities) * * @param shouldActivateFlowNode decides if the flowNode should be put in an active state */ export declare function willActivateFlowNodeEpic(shouldActivateFlowNodeHook?: (tokenId: string, flowNode: FlowNode) => Promise): Epic; /** * didPassTokenEpic is responsible for initialising the flowNode element the token lies on * * @returns {Epic} epic handles actions and emits new actions asynchronously * */ export declare function didPassTokenEpic(log: Logger): Epic; /** * continueTokenEpic is responsible for handling tokens that should continue execution after an instance import * * it is used to trigger logic that would have been started at the activation of an element but wasn't since the element was imported in an active state * */ export declare function continueTokenEpic(): Epic; /** * endFlowNodeEpic is responsible for logging the succesfully ended flowNode execution and for writing variables that were changed during the execution of an activity * * @returns {Epic} epic handles actions and emits new actions asynchronously * */ export declare function endFlowNodeEpic(): Epic; /** * endTokenEpic is responsible for managing ended tokens. * When a token is ended, also the flowNode the token lies on has to be ended. * If every token is in an end state the whole process/subprocess will be ended * * @returns {Epic} epic handles actions and emits new actions asynchronously * */ export declare function endTokenEpic(): Epic; export declare function createTokenEpic(log: Logger): Epic; export declare function moveTokenEpic(log: Logger): Epic; export declare function removeTokenEpic(log: Logger): Epic; /** * updateToken is responsible for managing updated tokens. * If every token is in an end state the whole process/subprocess will be ended * * @returns {Epic} epic handles actions and emits new actions asynchronously * */ export declare function updateTokenEpic(): Epic; declare const _default: (log: Logger, shouldPassTokenHook?: ((from: string, to: string, tokenId: string) => Promise) | undefined, shouldActivateFlowNodeHook?: ((tokenId: string, flowNode: FlowNode) => Promise) | undefined) => Epic; /** * Combine all epics for implementing token state management */ export default _default; //# sourceMappingURL=dispatcher.d.ts.map