import { AnyAction } from 'redux'; import { TokenState } from './reducers/tokens'; import { ExecutionState } from './reducers/log'; import { VariablesState } from './reducers/variables'; import { Definitions } from 'bpmn-moddle'; import { AdaptationEntry, AdaptationType } from './reducers/adaptationLog'; export declare enum ProcessActionType { PauseProcess = "PauseProcess", ResumeProcess = "ResumeProcess", EndProcess = "EndProcess", StopProcess = "StopProcess", ReactivateProcess = "ReactivateProcess", TearDownProcess = "TearDownProcess", UpdateProcessStatus = "UpdateProcessStatus", FlowNodeInit = "FlowNodeInit", FlowNodeWillActivate = "FlowNodeWillActivate", FlowNodeActivate = "FlowNodeActivate", FlowNodeEnd = "FlowNodeEnd", FlowNodeInterrupt = "FlowNodeInterrupt", FlowNodeResume = "FlowNodeResume", TokenWillPass = "TokenWillPass", TokenDidPass = "TokenDidPass", UpdateToken = "UpdateToken", SetIntermediateVariableValue = "SetIntermediateVariableValue", AddDirectVariableChange = "AddDirectVariableChange", PauseToken = "PauseToken", EndToken = "EndToken", CreateToken = "CreateToken", ContinueToken = "ContinueToken", MoveToken = "MoveToken", RemoveToken = "RemoveToken", SetFlowNodeProgress = "SetFlowNodeProgress", SetFlowNodeState = "SetFlowNodeState", EventReceiveMessage = "EventReceiveMessage", EventSendMessage = "EventSendMessage", EventReceiveSignal = "EventReceiveSignal", EventSendSignal = "EventSendSignal", PropagateEscalation = "PropagateEscalation", PropagateError = "PropagateError", TaskThrowError = "TaskThrowError", TaskThrowEscalation = "TaskThrowEscalation", ActivityEnd = "ActivityEnd", RespondThrowingEvent = "RespondThrowingEvent", BoundaryEventListen = "BoundaryEventListen", BoundaryEventInit = "BoundaryEventInit", UpdateProcessId = "UpdateProcessId", UpdateModdleDefinitions = "UpdateModdleDefinitions", SetVariables = "SetVariables", UpdateVariables = "UpdateVariables", LogExecution = "LogExecution", UpdateLog = "UpdateLog", LogAdaptation = "LogAdaptation", UpdateAdaptationLog = "UpdateAdaptationLog", StartMigration = "StartMigration", EndMigration = "EndMigration" } declare type Without = { [P in Exclude]?: never; }; declare type XOR = T | U extends object ? (Without & U) | (Without & T) : T | U; export interface ProcessAction extends AnyAction { type: ProcessActionType; payload: object; } export interface PauseProcessAction extends ProcessAction { type: ProcessActionType.PauseProcess; payload: {}; } export declare function pauseProcessAction(): PauseProcessAction; export interface ResumeProcessAction extends ProcessAction { type: ProcessActionType.ResumeProcess; payload: {}; } export declare function resumeProcessAction(): ResumeProcessAction; export interface EndProcessAction extends ProcessAction { type: ProcessActionType.EndProcess; payload: { tokenId: string; messageRef?: string; signalRef?: string; aborted: boolean; }; } export declare function endProcessAction({ tokenId, messageRef, signalRef, aborted }: { tokenId: string; messageRef?: string; signalRef?: string; errorRef?: string; aborted?: boolean; }): EndProcessAction; export interface StopProcessAction extends ProcessAction { type: ProcessActionType.StopProcess; payload: {}; } export declare function stopProcessAction(): StopProcessAction; export interface ReactivateProcessAction extends ProcessAction { type: ProcessActionType.ReactivateProcess; payload: {}; } export declare function reactivateProcessAction(): ReactivateProcessAction; export interface TearDownProcessAction extends ProcessAction { type: ProcessActionType.TearDownProcess; payload: {}; } export declare function tearDownProcessAction(): TearDownProcessAction; export interface UpdateProcessStatusAction extends ProcessAction { type: ProcessActionType.UpdateProcessStatus; payload: { status: string; }; } export declare function updateProcessStatusAction({ status }: { status: string; }): UpdateProcessStatusAction; export interface TokenAction extends ProcessAction { payload: { tokenId: string; [key: string]: any; }; } export interface PauseTokenAction extends TokenAction { type: ProcessActionType.PauseToken; payload: { tokenId: string; }; } export declare function pauseTokenAction({ tokenId }: { tokenId: string; }): PauseTokenAction; export interface WillPassTokenAction extends TokenAction { type: ProcessActionType.TokenWillPass; payload: { sequenceId: string; tokenId: string; }; } export declare function willPassTokenAction(payload: { sequenceId: string; tokenId: string; }): WillPassTokenAction; export interface ContinueTokenAction extends TokenAction { type: ProcessActionType.ContinueToken; payload: { tokenId: string; }; } export declare function continueTokenAction(payload: { tokenId: string; }): ContinueTokenAction; export interface CreateTokenAction extends TokenAction { type: ProcessActionType.CreateToken; payload: { tokenId: string; state: TokenState | string; localStartTime: number; currentFlowElement: { id: string; }; localExecutionTime: number; [key: string]: any; }; } export declare function createTokenAction(payload: { tokenId: string; state: TokenState | string; localStartTime: number; currentFlowElement: { id: string; }; localExecutionTime: number; [key: string]: any; }): CreateTokenAction; export interface DidPassTokenAction extends TokenAction { type: ProcessActionType.TokenDidPass; payload: { tokenId: string; to: string; }; } export declare function didPassTokenAction(payload: { tokenId: string; to: string; }): DidPassTokenAction; export interface UpdateTokenAction extends TokenAction { type: ProcessActionType.UpdateToken; payload: { tokenId: string; state?: TokenState | string; [key: string]: any; }; } export declare function updateTokenAction(payload: { tokenId: string; state?: TokenState | string; [key: string]: any; }): UpdateTokenAction; export interface SetIntermediateVariableValueAction extends TokenAction { type: ProcessActionType.SetIntermediateVariableValue; payload: { tokenId: string; key: string; value: any; }; } export declare function setIntermediateVariableValueAction(payload: { tokenId: string; key: string; value: any; }): SetIntermediateVariableValueAction; export interface AddDirectVariableChangeAction extends TokenAction { type: ProcessActionType.AddDirectVariableChange; payload: { tokenId: string; key: string; oldValue: any; newValue: any; time: number; }; } export declare function addDirectVariableChangeAction(payload: { tokenId: string; key: string; oldValue: any; newValue: any; time: number; }): AddDirectVariableChangeAction; export interface EndTokenAction extends TokenAction { type: ProcessActionType.EndToken; payload: { tokenId: string; state: TokenState | string; endTime?: number; errorMessage?: string; removeAfterEnding?: boolean; [key: string]: any; }; } export declare function endTokenAction(payload: { tokenId: string; state: TokenState | string; endTime?: number; errorMessage?: string; removeAfterEnding?: boolean; [key: string]: any; }): EndTokenAction; export interface MoveTokenAction extends AnyAction { type: ProcessActionType.MoveToken; payload: { token: { tokenId: string; [key: string]: any; }; elementId: string; targetDefinitions?: Definitions; }; } export declare function moveTokenAction(payload: { token: { tokenId: string; [key: string]: any; }; elementId: string; targetDefinitions?: Definitions; }): MoveTokenAction; export interface RemoveTokenAction extends TokenAction { type: ProcessActionType.RemoveToken; payload: { tokenId: string; }; } export declare function removeTokenAction(payload: { tokenId: string; }): RemoveTokenAction; export interface FlowNodeAction extends TokenAction { payload: { flowNodeId: string; tokenId: string; [key: string]: any; }; } export interface InitFlowNodeAction extends FlowNodeAction { type: ProcessActionType.FlowNodeInit; payload: { flowNodeId: string; tokenId: string; }; } export declare function initFlowNodeAction({ flowNodeId, tokenId }: { flowNodeId: string; tokenId: string; }): InitFlowNodeAction; export interface WillActivateFlowNodeAction extends FlowNodeAction { type: ProcessActionType.FlowNodeWillActivate; payload: { flowNodeId: string; tokenId: string; }; } export declare function willActivateFlowNodeAction(payload: { tokenId: string; flowNodeId: string; }): WillActivateFlowNodeAction; export interface ActivateFlowNodeAction extends FlowNodeAction { type: ProcessActionType.FlowNodeActivate; payload: { flowNodeId: string; tokenId: string; }; } export declare function activateFlowNodeAction(payload: { tokenId: string; flowNodeId: string; }): ActivateFlowNodeAction; export interface EndFlowNodeAction extends FlowNodeAction { type: ProcessActionType.FlowNodeEnd; payload: { flowNodeId: string; tokenId: string; state: ExecutionState | string; endTime?: number; tokenHandling?: XOR<{ passTokenTo: string; }, { endToken?: TokenState; removeToken?: boolean; }>; errorMessage?: string; [key: string]: any; }; } export declare function endFlowNodeAction(payload: { flowNodeId: string; tokenId: string; state: ExecutionState | string; endTime?: number; tokenHandling?: XOR<{ passTokenTo: string; }, { endToken?: TokenState; removeToken?: boolean; }>; errorMessage?: string; [key: string]: any; }): EndFlowNodeAction; export interface EndActivityAction extends FlowNodeAction { type: ProcessActionType.ActivityEnd; payload: { flowNodeId: string; tokenId: string; state: ExecutionState; }; } export declare function endActivityAction(payload: { flowNodeId: string; tokenId: string; state: ExecutionState; }): EndActivityAction; export interface ReceiveMessageAction extends ProcessAction { type: ProcessActionType.EventReceiveMessage; payload: { id: string; }; } export declare function receiveMessageAction(payload: { id: string; }): ReceiveMessageAction; export interface SendMessageAction extends ProcessAction { type: ProcessActionType.EventSendMessage; payload: { id: string; }; } export declare function sendMessageAction(payload: { id: string; }): SendMessageAction; export interface SendSignalAction extends ProcessAction { type: ProcessActionType.EventSendSignal; payload: { id: string; }; } export declare function sendSignalAction(payload: { id: string; }): SendSignalAction; export interface ReceiveSignalAction extends ProcessAction { type: ProcessActionType.EventReceiveSignal; payload: { id: string; }; } export declare function receiveSignalAction(payload: { id: string; }): ReceiveSignalAction; export interface PropagateEscalationAction extends FlowNodeAction { type: ProcessActionType.PropagateEscalation; payload: { flowNodeId: string; tokenId: string; refId?: string; }; } export declare function propagateEscalationAction(payload: { flowNodeId: string; tokenId: string; refId?: string; }): PropagateEscalationAction; export interface PropagateErrorAction extends FlowNodeAction { type: ProcessActionType.PropagateError; payload: { flowNodeId: string; tokenId: string; refId?: string; }; } export declare function propagateErrorAction(payload: { flowNodeId: string; tokenId: string; refId?: string; }): PropagateErrorAction; export interface TaskThrowEscalationAction extends FlowNodeAction { type: ProcessActionType.TaskThrowEscalation; payload: { flowNodeId: string; tokenId: string; refId?: string; }; } export declare function taskThrowEscalationAction(payload: { flowNodeId: string; tokenId: string; refId?: string; }): TaskThrowEscalationAction; export interface TaskThrowErrorAction extends FlowNodeAction { type: ProcessActionType.TaskThrowError; payload: { flowNodeId: string; tokenId: string; refId?: string; }; } export declare function taskThrowErrorAction(payload: { flowNodeId: string; tokenId: string; refId?: string; }): TaskThrowErrorAction; export interface RespondThrowingEventAction extends FlowNodeAction { type: ProcessActionType.RespondThrowingEvent; payload: { flowNodeId: string; tokenId: string; caught: boolean; continueExecution: boolean; }; } export declare function respondThrowingEventAction(payload: { flowNodeId: string; tokenId: string; caught: boolean; continueExecution: boolean; }): RespondThrowingEventAction; export interface InterruptAction extends FlowNodeAction { type: ProcessActionType.FlowNodeInterrupt; payload: { flowNodeId: string; tokenId: string; }; } export declare function interruptAction(payload: { flowNodeId: string; tokenId: string; }): InterruptAction; export interface ResumeAction extends FlowNodeAction { type: ProcessActionType.FlowNodeResume; payload: { flowNodeId: string; tokenId: string; }; } export declare function resumeAction(payload: { flowNodeId: string; tokenId: string; }): ResumeAction; export interface ListenBoundaryEventAction extends FlowNodeAction { type: ProcessActionType.BoundaryEventListen; payload: { flowNodeId: string; tokenId: string; }; } export declare function listenBoundaryEventAction({ flowNodeId, tokenId }: { flowNodeId: string; tokenId: string; }): ListenBoundaryEventAction; export interface InitBoundaryEventAction extends FlowNodeAction { type: ProcessActionType.BoundaryEventInit; payload: { flowNodeId: string; tokenId: string; eventOrigin?: { flowNodeId: string; tokenId: string; }; }; } export declare function initBoundaryEventAction({ flowNodeId, tokenId, eventOrigin }: { flowNodeId: string; tokenId: string; eventOrigin?: { flowNodeId: string; tokenId: string; }; }): InitBoundaryEventAction; export interface UpdateVariablesAction extends ProcessAction { type: ProcessActionType.UpdateVariables; payload: { variables: VariablesState; }; } export declare function updateVariablesAction(payload: { variables: VariablesState; }): UpdateVariablesAction; export interface SetVariablesAction extends ProcessAction { type: ProcessActionType.SetVariables; payload: { changedBy: string; variables: { [key: string]: any; }; changedTime?: number; }; } export declare function setVariablesAction(payload: { changedBy: string; variables: { [key: string]: any; }; changedTime?: number; }): SetVariablesAction; export interface LogExecutionAction extends ProcessAction { type: ProcessActionType.LogExecution; payload: { flowElementId: string; tokenId: string; executionState?: ExecutionState | string; startTime?: number; endTime?: number; errorMessage?: string; variableChanges?: { [variableName: string]: { oldValue?: any; newValue: any; changedTime: number; }[]; }; [key: string]: any; }; } export declare function logExecutionAction(payload: { flowElementId: string; tokenId: string; executionState?: ExecutionState | string; startTime?: number; endTime?: number; errorMessage?: string; variableChanges?: { [variableName: string]: { oldValue?: any; newValue: any; changedTime: number; }[]; }; [key: string]: any; }): LogExecutionAction; export interface UpdateLogAction extends ProcessAction { type: ProcessActionType.UpdateLog; payload: { flowElementId: string; tokenId: string; [key: string]: any; }; } export declare function updatelogAction(payload: { flowElementId: string; tokenId: string; [key: string]: any; }): UpdateLogAction; export interface LogAdaptationAction extends ProcessAction { type: ProcessActionType.LogAdaptation; payload: AdaptationEntry; } export declare function logAdaptationAction(payload: AdaptationEntry): LogAdaptationAction; export interface UpdateAdaptationLogAction extends ProcessAction { type: ProcessActionType.UpdateAdaptationLog; payload: { type: AdaptationType | string; time: number; [key: string]: any; }; } export declare function updateAdaptationLogAction(payload: { type: AdaptationType | string; time: number; [key: string]: any; }): UpdateAdaptationLogAction; export interface SetFlowNodeStateAction extends TokenAction { type: ProcessActionType.SetFlowNodeState; payload: { tokenId: string; state: string; }; } export declare function setFlowNodeStateAction(payload: { tokenId: string; state: string; }): SetFlowNodeStateAction; export interface UpdateProcessIdAction extends ProcessAction { type: ProcessActionType.UpdateProcessId; payload: { processId: string; }; } export declare function updateProcessIdAction(processId: string): UpdateProcessIdAction; export interface UpdateModdleDefinitionsAction extends ProcessAction { type: ProcessActionType.UpdateModdleDefinitions; payload: { moddleDefinitions: Definitions; }; } export declare function updateModdleDefinitionsAction(moddleDefinitions: Definitions): UpdateModdleDefinitionsAction; export interface StartMigrationAction extends ProcessAction { type: ProcessActionType.StartMigration; payload: {}; } export declare function startMigrationAction(): StartMigrationAction; export interface EndMigrationAction extends ProcessAction { type: ProcessActionType.EndMigration; payload: {}; } export declare function endMigrationAction(): EndMigrationAction; export {}; //# sourceMappingURL=actions.d.ts.map